chiark / gitweb /
thread unknown ENV{key} match as empty value
authorKay Sievers <kay.sievers@suse.de>
Sat, 16 Jul 2005 03:50:34 +0000 (05:50 +0200)
committerKay Sievers <kay.sievers@suse.de>
Sat, 16 Jul 2005 03:50:34 +0000 (05:50 +0200)
This way we can run a rule if a certain key is not set by:
  ENV{key}="" or ENV{key}!="?*"

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
udev_rules.c

index 5669a85..4bf05cd 100644 (file)
@@ -748,8 +748,8 @@ static int match_rule(struct udevice *udev, struct udev_rule *rule,
                        const char *value = getenv(key_name);
 
                        if (!value) {
-                               dbg("ENV{'%s'} is not found", key_name);
-                               goto exit;
+                               dbg("ENV{'%s'} is not set", key_name);
+                               value = "";
                        }
                        if (match_key("ENV", rule, &pair->key, value))
                                goto exit;