chiark / gitweb /
[PATCH] Don't require the BUS value for the CALLOUT rule.
[elogind.git] / namedev_parse.c
index 266fa35a1945939ab5f384d70980dfcd3b2c089e..449aa44eaaeb53da2c55229ed106c17afa0b283c 100644 (file)
@@ -176,7 +176,7 @@ int namedev_init_rules(void)
                        ++temp;
 
                /* empty line? */
-               if (*temp == 0x00)
+               if ((*temp == 0x00) || (*temp == 0x0a))
                        continue;
 
                /* see if this is a comment */
@@ -324,7 +324,6 @@ keys:
                                  dev.name, dev.bus, dev.exec_program,
                                  dev.id, dev.symlink);
                        if ((*dev.name == '\0') ||
-                           (*dev.bus == '\0') ||
                            (*dev.id == '\0') ||
                            (*dev.exec_program == '\0'))
                                goto error;
@@ -378,7 +377,7 @@ int namedev_init_permissions(void)
                        ++temp;
 
                /* empty line? */
-               if (*temp == 0x00)
+               if ((*temp == 0x00) || (*temp == 0x0a))
                        continue;
 
                /* see if this is a comment */