chiark / gitweb /
[PATCH] udev - switch SYSFS_file to SYSFS{file}
[elogind.git] / udevinfo.c
index 4d28755b2f04a289e0c755f879101e5f3b8236d6..e4ea69811125f8b5edbe976a48574e1c1403562a 100644 (file)
 char **main_argv;
 int main_argc;
 
+#ifdef LOG
+unsigned char logname[42];
+void log_message (int level, const char *format, ...)
+{
+       va_list args;
+
+       va_start(args, format);
+       vsyslog(level, format, args);
+       va_end(args);
+}
+#endif
+
 static int print_all_attributes(const char *path)
 {
        struct dlist *attributes;
@@ -78,7 +90,7 @@ static int print_all_attributes(const char *path)
                                len--;
                        }
                        if (len == 0)
-                               printf("    SYSFS_%s=\"%s\"\n", attr->name, value);
+                               printf("    SYSFS{%s}=\"%s\"\n", attr->name, value);
                }
        }
        printf("\n");
@@ -412,6 +424,8 @@ int main(int argc, char *argv[], char *envp[])
        main_argv = argv;
        main_argc = argc;
 
+       init_logging("udevinfo");
+
        /* initialize our configuration */
        udev_init_config();