chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gpt-auto-generator: print debug messages when we ignore a block device
[elogind.git]
/
src
/
gpt-auto-generator
/
gpt-auto-generator.c
diff --git
a/src/gpt-auto-generator/gpt-auto-generator.c
b/src/gpt-auto-generator/gpt-auto-generator.c
index cd24d9483ac4837705905f94ed2d455f7ce6711d..4927919b81d5d3c446ba535998dc66d352a4a91e 100644
(file)
--- 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);
return log_oom();
parent = udev_device_get_parent(d);
- if (!parent)
+ if (!parent) {
+ log_debug("Not a partitioned device, ignoring.");
return 0;
return 0;
+ }
/* Does it have a devtype? */
devtype = udev_device_get_devtype(parent);
/* 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;
return 0;
+ }
/* Is this a disk or a partition? We only care for disks... */
/* 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;
return 0;
+ }
/* Does it have a device node? */
node = udev_device_get_devnode(parent);
/* 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;
return 0;
+ }
log_debug("Root device %s.", node);
log_debug("Root device %s.", node);
@@
-454,8
+462,10
@@
static int enumerate_partitions(dev_t devnum) {
}
/* We only do this all for GPT... */
}
/* 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;
return 0;
+ }
errno = 0;
pl = blkid_probe_get_partitions(b);
errno = 0;
pl = blkid_probe_get_partitions(b);