chiark / gitweb /
Fix typo
[elogind.git] / src / gpt-auto-generator / gpt-auto-generator.c
index cd24d9483ac4837705905f94ed2d455f7ce6711d..7dcbbfe497a52b66f0bf23de38222813b63de115 100644 (file)
@@ -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);
@@ -687,8 +695,6 @@ static int parse_proc_cmdline_item(const char *key, const char *value) {
                 arg_root_rw = true;
         else if (streq(key, "ro") && !value)
                 arg_root_rw = false;
-        else if (startswith(key, "systemd.gpt-auto.") || startswith(key, "rd.systemd.gpt-auto."))
-                log_warning("Unknown kernel switch %s. Ignoring.", key);
 
         return 0;
 }