From 5bfa0f7563058dd743ca934f2bdc287a5c794d01 Mon Sep 17 00:00:00 2001
From: Jonghwan Choi <jhbird.choi@gmail.com>
Date: Tue, 11 Oct 2016 14:37:06 +0900
Subject: [PATCH] ataprint.cpp Print missing the Valid Value bit in
ACS-3 Device Statistics Flags
Signed-off-by: Jonghwan Choi <jhbird.choi@gmail.com>
---
ataprint.cpp | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/ataprint.cpp b/ataprint.cpp
index 593e2cb..74cb09c 100644
a
|
b
|
static void print_device_statistics_page(const unsigned char * data, int page)
|
1539 | 1539 | valstr[0] = '-'; valstr[1] = 0; |
1540 | 1540 | } |
1541 | 1541 | |
1542 | | pout("0x%02x 0x%03x %d %15s %c%c%c%c %s\n", |
| 1542 | pout("0x%02x 0x%03x %d %15s %c%c%c%c%c %s\n", |
1543 | 1543 | page, offset, |
1544 | 1544 | abs(size), |
1545 | 1545 | valstr, |
| 1546 | ((flags & 0x40) ? 'V' : '-'), // valid value |
1546 | 1547 | ((flags & 0x20) ? 'N' : '-'), // normalized statistics |
1547 | 1548 | ((flags & 0x10) ? 'D' : '-'), // supports DSN (ACS-3) |
1548 | 1549 | ((flags & 0x08) ? 'C' : '-'), // monitored condition met (ACS-3) |
… |
… |
static bool print_device_statistics(ata_device * device, unsigned nsectors,
|
1650 | 1651 | print_device_statistics_page(pages_buf.data() + offset, page); |
1651 | 1652 | } |
1652 | 1653 | |
1653 | | pout("%32s|||_ C monitored condition met\n", ""); |
1654 | | pout("%32s||__ D supports DSN\n", ""); |
1655 | | pout("%32s|___ N normalized value\n\n", ""); |
| 1654 | pout("%32s||||_ C monitored condition met\n", ""); |
| 1655 | pout("%32s|||__ D supports DSN\n", ""); |
| 1656 | pout("%32s||___ N normalized value\n", ""); |
| 1657 | pout("%32s|____ V valid value\n\n", ""); |
1656 | 1658 | } |
1657 | 1659 | |
1658 | 1660 | return true; |