chiark / gitweb /
[PATCH] udevinfo - now a real program :)
[elogind.git] / namedev_parse.c
index 0712c3b44769350d268845b2bd858d5588407fa8..b15be0e6fa7d5894c9c8bc0a3a19f07034300a06 100644 (file)
@@ -36,6 +36,7 @@
 #include <errno.h>
 
 #include "udev.h"
+#include "logging.h"
 #include "namedev.h"
 
 static int add_config_dev(struct config_device *new_dev)
@@ -119,7 +120,6 @@ void dump_perm_dev_list(void)
                dump_perm_dev(dev);
 }
 
-
 int namedev_init_rules(void)
 {
        char line[255];
@@ -249,6 +249,7 @@ int namedev_init_rules(void)
                        goto error;
                }
 
+               dev.config_line = lineno;
                retval = add_config_dev(&dev);
                if (retval) {
                        dbg("add_config_dev returned with error %d", retval);
@@ -322,7 +323,7 @@ int namedev_init_permissions(void)
                        dbg("cannot parse line '%s'", line);
                        continue;
                }
-               strncpy(dev.group, temp2, sizeof(dev.owner));
+               strncpy(dev.group, temp2, sizeof(dev.group));
 
                if (!temp) {
                        dbg("cannot parse line: %s", line);
@@ -343,6 +344,5 @@ int namedev_init_permissions(void)
 exit:
        fclose(fd);
        return retval;
-}      
-
+}