From: Karel Zak Date: Thu, 21 May 2015 10:14:32 +0000 (+0200) Subject: blkid: don't ignore info about partitions on non-formated devices X-Git-Tag: v2.27-rc1~195 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8098e2b2c0a8a98ccb603f53dfba0cc05683a39;p=thirdparty%2Futil-linux.git 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 --- diff --git a/misc-utils/blkid.c b/misc-utils/blkid.c index 1bd8646567..bbe7b62677 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);