X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fudev%2Fudevadm-hwdb.c;h=afd9f5a539212bb37dc84e52ed034ab40d42ee87;hb=8b516fdea74127327b0945bb50690bd70c6b6692;hp=fa137c1cc2727112232a7b81562a6fa5f69627fe;hpb=da927ba997d68401563b927f92e6e40e021a8e5c;p=elogind.git diff --git a/src/udev/udevadm-hwdb.c b/src/udev/udevadm-hwdb.c index fa137c1cc..afd9f5a53 100644 --- a/src/udev/udevadm-hwdb.c +++ b/src/udev/udevadm-hwdb.c @@ -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;