chiark / gitweb /
libudev: make libudev-hwdb a wrapper around sd-hwdb
[elogind.git] / src / udev / udevadm-hwdb.c
index fa137c1cc2727112232a7b81562a6fa5f69627fe..afd9f5a539212bb37dc84e52ed034ab40d42ee87 100644 (file)
@@ -28,7 +28,7 @@
 #include "conf-files.h"
 
 #include "udev.h"
-#include "libudev-hwdb-def.h"
+#include "hwdb-internal.h"
 
 /*
  * Generic udev properties, key/value database based on modalias strings.
@@ -428,6 +428,10 @@ static int insert_data(struct trie *trie, struct udev_list *match_list,
         value[0] = '\0';
         value++;
 
+        /* libudev requires properties to start with a space */
+        while (isblank(line[0]) && isblank(line[1]))
+                line++;
+
         if (line[0] == '\0' || value[0] == '\0') {
                 log_error("Error, empty key or value '%s' in '%s':", line, filename);
                 return -EINVAL;