diff options
author | Karel Zak | 2015-05-21 12:14:32 +0200 |
---|---|---|
committer | Karel Zak | 2015-05-21 12:14:55 +0200 |
commit | f8098e2b2c0a8a98ccb603f53dfba0cc05683a39 (patch) | |
tree | 407c03ef2d02aa2502b056945dd6699c4a0e9f2e /misc-utils/blkid.c | |
parent | docs: update TODO (diff) | |
download | kernel-qcow2-util-linux-f8098e2b2c0a8a98ccb603f53dfba0cc05683a39.tar.gz kernel-qcow2-util-linux-f8098e2b2c0a8a98ccb603f53dfba0cc05683a39.tar.xz kernel-qcow2-util-linux-f8098e2b2c0a8a98ccb603f53dfba0cc05683a39.zip |
blkid: don't ignore info about partitions on non-formated devices
# blkid -p /dev/sdc1; echo $?
2
but libblkid provides information about partition, fixed version:
# blkid -p /dev/sdc1; echo $?
/dev/sdc1: PART_ENTRY_SCHEME="dos" PART_ENTRY_UUID="4c1e518c-01" PART_ENTRY_TYPE="0x83" PART_ENTRY_NUMBER="1" PART_ENTRY_OFFSET="2048" PART_ENTRY_SIZE="1021952" PART_ENTRY_DISK="8:32"
0
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'misc-utils/blkid.c')
-rw-r--r-- | misc-utils/blkid.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/misc-utils/blkid.c b/misc-utils/blkid.c index 1bd864656..bbe7b6267 100644 --- a/misc-utils/blkid.c +++ b/misc-utils/blkid.c @@ -510,21 +510,6 @@ static int lowprobe_device(blkid_probe pr, const char *devname, if (!rc) nvals = blkid_probe_numof_values(pr); - if (nvals && - !(chain & LOWPROBE_TOPOLOGY) && - !(output & OUTPUT_UDEV_LIST) && - !blkid_probe_has_value(pr, "TYPE") && - !blkid_probe_has_value(pr, "PTTYPE")) - /* - * Ignore probing result if there is not any filesystem or - * partition table on the device and udev output is not - * requested. - * - * The udev db stores information about partitions, so - * PART_ENTRY_* values are alway important. - */ - nvals = 0; - if (nvals && !first && output & (OUTPUT_UDEV_LIST | OUTPUT_EXPORT_LIST)) /* add extra line between output from devices */ fputc('\n', stdout); |