On 2021/08/27 16:35, Naohiro Aota wrote: > Add zoned columns to the "-z" option as follow. > > $ lsblk -z -i > NAME ZONED ZONE-SZ ZONE-NR ZONE-AMAX ZONE-OMAX ZONE-APP ZONE-GRAN > sda host-managed 256M 55880 0 128 672K 4K > sdb host-managed 256M 55880 0 128 672K 4K > zram0 none 0B 0 0 0 0B 0B > nvme2n1 none 0B 0 0 0 0B 0B > |-nvme2n1p1 none 0B 0 0 0 0B 0B > |-nvme2n1p2 none 0B 0 0 0 0B 0B > `-nvme2n1p3 none 0B 0 0 0 0B 0B > nvme0n1 none 0B 0 0 0 0B 0B > nvme1n1 none 0B 0 0 0 0B 0B > nvme0n2 host-managed 2G 1844 14 14 4M 4K > nvme1n2 host-managed 2G 1844 14 14 4M 4K> > Signed-off-by: Naohiro Aota <naohiro.aota@xxxxxxx> > --- > misc-utils/lsblk.8.adoc | 2 +- > misc-utils/lsblk.c | 8 +++++++- > 2 files changed, 8 insertions(+), 2 deletions(-) > > diff --git a/misc-utils/lsblk.8.adoc b/misc-utils/lsblk.8.adoc > index 7356976403a7..9e68a847ce0c 100644 > --- a/misc-utils/lsblk.8.adoc > +++ b/misc-utils/lsblk.8.adoc > @@ -116,7 +116,7 @@ Specifies output width as a number of characters. The default is the number of t > Sort output lines by _column_. This option enables *--list* output format by default. It is possible to use the option *--tree* to force tree-like output and than the tree branches are sorted by the _column_. > > *-z*, *--zoned*:: > -Print the zone model for each device. > +Print the zone related information for each device. > > *--sysroot* _directory_:: > Gather data for a Linux instance other than the instance from which the *lsblk* command is issued. The specified directory is the system root of the Linux instance to be inspected. The real device nodes in the target directory can be replaced by text files with udev attributes. > diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c > index 108c8187498e..8a2578312f0d 100644 > --- a/misc-utils/lsblk.c > +++ b/misc-utils/lsblk.c > @@ -1919,7 +1919,7 @@ static void __attribute__((__noreturn__)) usage(void) > fputs(_(" -t, --topology output info about topology\n"), out); > fputs(_(" -w, --width <num> specifies output width as number of characters\n"), out); > fputs(_(" -x, --sort <column> sort output by <column>\n"), out); > - fputs(_(" -z, --zoned print zone model\n"), out); > + fputs(_(" -z, --zoned print zone related information\n"), out); > fputs(_(" --sysroot <dir> use specified directory as system root\n"), out); > fputs(USAGE_SEPARATOR, out); > printf(USAGE_HELP_OPTIONS(22)); > @@ -2041,6 +2041,12 @@ int main(int argc, char *argv[]) > case 'z': > add_uniq_column(COL_NAME); > add_uniq_column(COL_ZONED); > + add_uniq_column(COL_ZONESIZE); > + add_uniq_column(COL_ZONE_NR); > + add_uniq_column(COL_ZONE_AMAX); > + add_uniq_column(COL_ZONE_OMAX); > + add_uniq_column(COL_ZONEAPPEND); > + add_uniq_column(COL_ZONEWRITEGRAN); > break; > case 'e': > parse_excludes(optarg); > Looks good, modulo the change to ZONE-WGRAN. Reviewed-by: Damien Le Moal <damien.lemoal@xxxxxxx> -- Damien Le Moal Western Digital Research