summaryrefslogtreecommitdiff
path: root/src/udev
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2013-07-01 17:39:50 +0000
committerAnthony G. Basile <blueness@gentoo.org>2013-07-07 12:04:06 -0400
commit86d0542d34e5db789a1ce8a059750f76d8b2c8f8 (patch)
tree7e9cc4d8edaf06b405d163a2c7d3173515c1aa43 /src/udev
parentc9096d049007b7197efca087aa620f370bf86c15 (diff)
hwdb: remove support for (not fully implemented) conditional properties
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/udev')
-rw-r--r--src/udev/udevadm-hwdb.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/udev/udevadm-hwdb.c b/src/udev/udevadm-hwdb.c
index ded88b19e1..ab6924e586 100644
--- a/src/udev/udevadm-hwdb.c
+++ b/src/udev/udevadm-hwdb.c
@@ -411,14 +411,12 @@ static int import_file(struct trie *trie, const char *filename) {
FILE *f;
char line[LINE_MAX];
char match[LINE_MAX];
- char cond[LINE_MAX];
f = fopen(filename, "re");
if (f == NULL)
return -errno;
match[0] = '\0';
- cond[0] = '\0';
while (fgets(line, sizeof(line), f)) {
size_t len;
@@ -428,7 +426,6 @@ static int import_file(struct trie *trie, const char *filename) {
/* new line, new record */
if (line[0] == '\n') {
match[0] = '\0';
- cond[0] = '\0';
continue;
}
@@ -441,20 +438,10 @@ static int import_file(struct trie *trie, const char *filename) {
/* start of new record */
if (match[0] == '\0') {
strcpy(match, line);
- cond[0] = '\0';
continue;
}
- if (line[0] == '+') {
- strcpy(cond, line);
- continue;
- }
-
- /* TODO: support +; skip the entire record until we support it */
- if (cond[0] != '\0')
- continue;
-
- /* value lines */
+ /* value line */
if (line[0] == ' ') {
char *value;
@@ -464,7 +451,10 @@ static int import_file(struct trie *trie, const char *filename) {
value[0] = '\0';
value++;
trie_insert(trie, trie->root, match, line, value);
+ continue;
}
+
+ log_error("Error parsing line '%s' in '%s\n", line, filename);
}
fclose(f);
return 0;