util-linux/libblkid
Karel Zak 969e8cbeb1 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>
2019-01-08 12:07:18 +01:00
..
docs misc: fix typos using codespell 2018-02-16 11:12:52 +01:00
samples build-sys: fix library order when linking 2017-06-01 03:16:48 +02:00
src libblkid: improve whole-disk detection when read /proc/partitions 2019-01-08 12:07:18 +01:00
COPYING docs: use SPDX license names 2018-08-16 14:47:21 +02:00
Makemodule.am build-sys: remove redundant EXTRA_DIST files 2018-01-22 11:16:49 +01:00
blkid.pc.in build-sys: use top-level directory for libblkid rather than shlibs/blkid 2011-06-09 22:04:24 +02:00
libblkid.3 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00