diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2009-06-28 02:21:58 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2009-06-28 02:21:58 +0200 |
commit | b25a94549ce37cd7654f6f44b66944375919db58 (patch) | |
tree | 79ed16fcd6b09cc0bbb5b5dea5b388dbf903b658 /udev | |
parent | b53c3a21b9992915f89624f60e85fe50b7aad4ad (diff) |
do not exports properties starting with a '.'
Private variables can be marked like:
ENV{.FOO}="bar"
Diffstat (limited to 'udev')
-rw-r--r-- | udev/udev-rules.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/udev/udev-rules.c b/udev/udev-rules.c index 174edfd9c4..96d7377472 100644 --- a/udev/udev-rules.c +++ b/udev/udev-rules.c @@ -718,8 +718,9 @@ static int import_property_from_string(struct udev_device *dev, char *line) struct udev_list_entry *entry; entry = udev_device_add_property(dev, key, val); - /* store in db */ - udev_list_entry_set_flag(entry, 1); + /* store in db, skip private keys */ + if (key[0] != '.') + udev_list_entry_set_flag(entry, 1); } return 0; } @@ -785,8 +786,9 @@ static int import_parent_into_properties(struct udev_device *dev, const char *fi dbg(udev, "import key '%s=%s'\n", key, val); entry = udev_device_add_property(dev, key, val); - /* store in db */ - udev_list_entry_set_flag(entry, 1); + /* store in db, skip private keys */ + if (key[0] != '.') + udev_list_entry_set_flag(entry, 1); } } return 0; @@ -2374,8 +2376,9 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event udev_event_apply_format(event, value, temp_value, sizeof(temp_value)); entry = udev_device_add_property(event->dev, name, temp_value); - /* store in db */ - udev_list_entry_set_flag(entry, 1); + /* store in db, skip private keys */ + if (name[0] != '.') + udev_list_entry_set_flag(entry, 1); } else { udev_device_add_property(event->dev, name, NULL); } |