summaryrefslogtreecommitdiff
path: root/udev_rules_parse.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2005-06-25 13:10:16 +0200
committerKay Sievers <kay.sievers@suse.de>2005-06-25 13:10:16 +0200
commitbd0ed2ffbec325512c3131ce0db896234e36c923 (patch)
treedcc939391e5e641edbca49a54534e542016b7023 /udev_rules_parse.c
parent6bf0ffe8fd312c1e6549cb1721d7a7efeee77185 (diff)
IMPORT=<file> allow to import a shell-var style config-file
This allows to source-in a file into the udev environment to have the defined keys available for later processing by udev itself or the forked helper programs. Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Diffstat (limited to 'udev_rules_parse.c')
-rw-r--r--udev_rules_parse.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/udev_rules_parse.c b/udev_rules_parse.c
index 36bf97177d..121236820b 100644
--- a/udev_rules_parse.c
+++ b/udev_rules_parse.c
@@ -375,6 +375,13 @@ static int rules_parse(const char *filename)
continue;
}
+ if (strcasecmp(key, KEY_IMPORT) == 0) {
+ strlcpy(rule.import, value, sizeof(rule.import));
+ rule.import_operation = operation;
+ valid = 1;
+ continue;
+ }
+
if (strcasecmp(key, KEY_DRIVER) == 0) {
strlcpy(rule.driver, value, sizeof(rule.driver));
rule.driver_operation = operation;