summaryrefslogtreecommitdiffstats
path: root/misc-utils
diff options
context:
space:
mode:
authorKarel Zak2019-01-08 12:07:18 +0100
committerKarel Zak2019-01-08 12:07:18 +0100
commit969e8cbeb124581b376bc5534c716d1b18144190 (patch)
tree4d005f1a26334eaeb79cc8872811e8ba1956579f /misc-utils
parentldattach: Check for value of _HAVE_STRUCT_TERMIOS_C_ISPEED (diff)
downloadkernel-qcow2-util-linux-969e8cbeb124581b376bc5534c716d1b18144190.tar.gz
kernel-qcow2-util-linux-969e8cbeb124581b376bc5534c716d1b18144190.tar.xz
kernel-qcow2-util-linux-969e8cbeb124581b376bc5534c716d1b18144190.zip
libblkid: improve whole-disk detection when read /proc/partitions
blkid(8) in high-level mode checks partitions and unpartitioned whole-disk devices from the file /proc/partitions. The current heuristic assumes that partition name ends with a digit. Unfortunately, this is not correct -- for example md0 or nvme0n1 are whole-disk devices. This commit uses sysfs_devno_is_wholedisk() to make sure the device is a partition (according to kernel or DM). It's probably more expensive, because this way requires more syscalls (to read stuff from /sys etc.). The patch also adds more information to the blkid(8) man page. Addresses: https://github.com/karelzak/util-linux/issues/728 Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'misc-utils')
-rw-r--r--misc-utils/blkid.82
1 files changed, 1 insertions, 1 deletions
diff --git a/misc-utils/blkid.8 b/misc-utils/blkid.8
index d1cec1dea..ac36bee48 100644
--- a/misc-utils/blkid.8
+++ b/misc-utils/blkid.8
@@ -78,7 +78,7 @@ is specified, tokens from only this device are displayed.
It is possible to specify multiple
.I device
arguments on the command line.
-If none is given, all devices which appear in
+If none is given, all partitions or unpartitioned devices which appear in
.I /proc/partitions
are shown, if they are recognized.
.PP