]> sourceware.org Git - lvm2.git/commitdiff
Add udev checks.
authorAlasdair Kergon <agk@redhat.com>
Mon, 3 Aug 2009 18:33:08 +0000 (18:33 +0000)
committerAlasdair Kergon <agk@redhat.com>
Mon, 3 Aug 2009 18:33:08 +0000 (18:33 +0000)
libdm/libdm-common.c

index 257f439738f3ec4b68a8b2763bde7e734352a041..6b1bc2b64d00a730f7c38c19a60088786fa9522e 100644 (file)
@@ -355,7 +355,9 @@ static int _add_dev_node(const char *dev_name, uint32_t major, uint32_t minor,
                                  dev_name);
                        return 0;
                }
-       }
+       } else if (dm_udev_get_sync_support())
+               log_warn("%s not set up by udev: Falling back to direct "
+                        "node creation.", path);
 
        old_mask = umask(0);
        if (mknod(path, S_IFBLK | mode, dev) < 0) {
@@ -426,6 +428,9 @@ static int _rm_dev_node(const char *dev_name)
 
        if (stat(path, &info) < 0)
                return 1;
+       else if (dm_udev_get_sync_support())
+               log_warn("Node %s was not removed by udev. "
+                        "Falling back to direct node removal.", path);
 
        if (unlink(path) < 0) {
                log_error("Unable to unlink device node for '%s'", dev_name);
This page took 0.033486 seconds and 5 git commands to generate.