X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fgpt-auto-generator%2Fgpt-auto-generator.c;h=78643c9a3ce09eb05eb1c072c03c5bd6bb85913e;hb=62b002337727093c21d020c730bd65971f7783a7;hp=cd24d9483ac4837705905f94ed2d455f7ce6711d;hpb=cca1dfddd4ce4357113663532696488427cc54e4;p=elogind.git diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c index cd24d9483..78643c9a3 100644 --- a/src/gpt-auto-generator/gpt-auto-generator.c +++ b/src/gpt-auto-generator/gpt-auto-generator.c @@ -395,22 +395,30 @@ static int enumerate_partitions(dev_t devnum) { return log_oom(); parent = udev_device_get_parent(d); - if (!parent) + if (!parent) { + log_debug("Not a partitioned device, ignoring."); return 0; + } /* Does it have a devtype? */ devtype = udev_device_get_devtype(parent); - if (!devtype) + if (!devtype) { + log_debug("Parent doesn't have a device type, ignoring."); return 0; + } /* Is this a disk or a partition? We only care for disks... */ - if (!streq(devtype, "disk")) + if (!streq(devtype, "disk")) { + log_debug("Parent isn't a raw disk, ignoring."); return 0; + } /* Does it have a device node? */ node = udev_device_get_devnode(parent); - if (!node) + if (!node) { + log_debug("Parent device does not have device node, ignoring."); return 0; + } log_debug("Root device %s.", node); @@ -428,8 +436,6 @@ static int enumerate_partitions(dev_t devnum) { return -errno; } - blkid_probe_enable_superblocks(b, 1); - blkid_probe_set_superblocks_flags(b, BLKID_SUBLKS_TYPE); blkid_probe_enable_partitions(b, 1); blkid_probe_set_partitions_flags(b, BLKID_PARTS_ENTRY_DETAILS); @@ -454,8 +460,10 @@ static int enumerate_partitions(dev_t devnum) { } /* We only do this all for GPT... */ - if (!streq_ptr(pttype, "gpt")) + if (!streq_ptr(pttype, "gpt")) { + log_debug("Not a GPT partition table, ignoring."); return 0; + } errno = 0; pl = blkid_probe_get_partitions(b);