diff options
author | Damien Le Moal | 2017-02-24 04:47:29 +0100 |
---|---|---|
committer | Karel Zak | 2017-02-24 11:53:45 +0100 |
commit | a7f742069ec5f1a51d0c9cfc238954553e2ffe8f (patch) | |
tree | 9f3398d3fde195219335a8b96e462edc23b583ae /sys-utils/blkzone.c | |
parent | blkzone: Report all zones if length is not specified (diff) | |
download | kernel-qcow2-util-linux-a7f742069ec5f1a51d0c9cfc238954553e2ffe8f.tar.gz kernel-qcow2-util-linux-a7f742069ec5f1a51d0c9cfc238954553e2ffe8f.tar.xz kernel-qcow2-util-linux-a7f742069ec5f1a51d0c9cfc238954553e2ffe8f.zip |
blkzone: Improve zone information print
Add "0x" to the zone start, length and write pointer print
to make it always clear that the values are Hexadecimal.
Also update the zone condition string and associated comments
to match more closely the wording in the standard document.
The man page is also updated to match the new wording.
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Diffstat (limited to 'sys-utils/blkzone.c')
-rw-r--r-- | sys-utils/blkzone.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sys-utils/blkzone.c b/sys-utils/blkzone.c index c9d65dc23..2d6a76015 100644 --- a/sys-utils/blkzone.c +++ b/sys-utils/blkzone.c @@ -147,15 +147,15 @@ static const char *type_text[] = { }; static const char *condition_str[] = { - "cv", /* conventional zone */ - "e0", /* empty */ - "Oi", /* open implicit */ - "Oe", /* open explicit */ - "Cl", /* closed */ + "nw", /* Not write pointer */ + "em", /* Empty */ + "io", /* Implicitly opened */ + "eo", /* Explicitly opened */ + "cl", /* Closed */ "x5", "x6", "x7", "x8", "x9", "xA", "xB", /* xN: reserved */ - "ro", /* read only */ - "fu", /* full */ - "OL" /* offline */ + "ro", /* Read only */ + "fu", /* Full */ + "of" /* Offline */ }; static int blkzone_report(struct blkzone_control *ctl) @@ -188,7 +188,7 @@ static int blkzone_report(struct blkzone_control *ctl) err(EXIT_FAILURE, _("%s: BLKREPORTZONE ioctl failed"), ctl->devname); if (ctl->verbose) - printf(_("Found %d zones from %lx\n"), + printf(_("Found %d zones from 0x%lx\n"), zi->nr_zones, ctl->offset); if (!zi->nr_zones) { @@ -209,9 +209,9 @@ static int blkzone_report(struct blkzone_control *ctl) break; } - printf(_(" start: %9lx, len %6lx, wptr %6lx" + printf(_(" start: 0x%09lx, len 0x%06lx, wptr 0x%06lx" " reset:%u non-seq:%u, zcond:%2u(%s) [type: %u(%s)]\n"), - start, len, wp - start, + start, len, (type == 0x1) ? 0 : wp - start, entry->reset, entry->non_seq, cond, condition_str[cond & ARRAY_SIZE(condition_str)], type, type_text[type]); |