This implementation allow to sort output by arbitrary output column.
Note that output is always converted to human readable strings, but
sort functions in many cases work with original data (stored as
private data to cells by scols_cell_set_userdata()).
Signed-off-by: Karel Zak <kzak@redhat.com>
Simple command line for gathering information as many as possible is
useful when understanding a system, especially when trouble shooting.
This patch introduces -O option which enables all available columns.
[kzak@redhat.com: - define collisions between options,
- define columns when parse argv[]]
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
* read WWN from udev DB
* use *_ENC properties from udev DB to get original unmodified
strings (otherwise for example blank space is replaced with '_' in
ID_FS_LABEL)
* always read from udev, libblkid is fallback solution only
Signed-off-by: Karel Zak <kzak@redhat.com>
The lsblk depends on /sys/dev/block/ symlinks, which appeared in
kernel 2.6.27. Users with old, or non-sysfs configured, kernel
got ealier message
lsblk: md0: failed to initialize sysfs handler
lsblk: xvda: failed to initialize sysfs handler
[...]
that I found a little too difficult to understand. This patch will
change the message to
lsblk: failed to access sysfs directory: /sys/dev/block: No such file or directory
and informs in manual page what could be reason to that.
[kzak@redhat.com: - use access() rather than opendir()]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
Use dates without the day, use the full month name, put "util-linux" in
the lower left corner, and "User Commands" or "System Administration"
at the top center.
Also improve here and there the one-line program description.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
I got tired of poking around in sysfs to find the discard topology.
Here's a patch against lsblk that adds a -D option to present this
information in a human-readable form:
NAME DISC-ALN DISC-GRAN DISC-MAX DISC-ZERO
sda 0 0B 0B 0
└─sda1 0 0B 0B 0
sdb 0 512B 2G 1
└─sdb1 0 512B 2G 1
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Karel Zak <kzak@redhat.com>