chiark / gitweb /
[PATCH] udev - allow all files in a directory as the config
[elogind.git] / udev.c
diff --git a/udev.c b/udev.c
index 8c91ac62d4f303b40b4b59a8c4af0892ef76c9b1..1c65f2e59c5063753fc92e7c5cb5a134c22ddc1f 100644 (file)
--- a/udev.c
+++ b/udev.c
@@ -111,13 +111,13 @@ static int udev_hotplug(int argc, char **argv)
 
        action = get_action();
        if (!action) {
-               dbg ("no action?");
+               dbg("no action?");
                goto exit;
        }
 
        devpath = get_devpath();
        if (!devpath) {
-               dbg ("no devpath?");
+               dbg("no devpath?");
                goto exit;
        }
        dbg("looking at '%s'", devpath);
@@ -131,6 +131,10 @@ static int udev_hotplug(int argc, char **argv)
 
        /* skip blacklisted subsystems */
        subsystem = argv[1];
+       if (!subsystem) {
+               dbg("no subsystem?");
+               goto exit;
+       }
        i = 0;
        while (subsystem_blacklist[i][0] != '\0') {
                if (strcmp(subsystem, subsystem_blacklist[i]) == 0) {