]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
blkid: don't ignore info about partitions on non-formated devices
authorKarel Zak <kzak@redhat.com>
Thu, 21 May 2015 10:14:32 +0000 (12:14 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 21 May 2015 10:14:55 +0000 (12:14 +0200)
 # 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>
misc-utils/blkid.c

index 1bd86465676013031fce7d9fcb5794c394f3210d..bbe7b6267711795ae278ab2b1aceef523eb84a46 100644 (file)
@@ -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);