mdev: do not complain if /sys/block doesn't exist
authorDenis Vlasenko <vda.linux@googlemail.com>
Sun, 12 Apr 2009 14:00:12 +0000 (14:00 -0000)
committerDenis Vlasenko <vda.linux@googlemail.com>
Sun, 12 Apr 2009 14:00:12 +0000 (14:00 -0000)
util-linux/mdev.c

index 78bb48ac0b809615b66f32c5c19fd2b40af4cb5a..b7b311aaaa5d4dfc6ad8ba44bb31aa45939a122e 100644 (file)
@@ -425,10 +425,11 @@ int mdev_main(int argc UNUSED_PARAM, char **argv)
                if (access("/sys/class/block", F_OK) != 0) {
                        /* Scan obsolete /sys/block only if /sys/class/block
                         * doesn't exist. Otherwise we'll have dupes.
+                        * Also, do not complain if it doesn't exist.
+                        * Some people configure kernel to have no blockdevs.
                         */
                        recursive_action("/sys/block",
-                               ACTION_RECURSE | ACTION_FOLLOWLINKS,
-                               // not needed now? | ACTION_QUIET
+                               ACTION_RECURSE | ACTION_FOLLOWLINKS | ACTION_QUIET,
                                fileAction, dirAction, temp, 0);
                }
                recursive_action("/sys/class",