diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2012-03-14 14:52:45 +0100 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2012-03-14 18:10:59 +0100 |
commit | 91418155ae9034f466d436c314cd136309bc557d (patch) | |
tree | fe1c36a0659e36a0bfe75a0d55b9c55d5691f2de /src/libudev.c | |
parent | 4b50a3d0048d13f6e37126f20f96e8bef262cbe2 (diff) |
rules sort order: /lib, /run, /etc
After long consideration we came to the conclusion that user
configuration in /etc should always override the (generally
computer generated) configuration in /run. User configuration
should always be what matters over anything else. Hence rearrange
the search orders accordingly. In general this should change
very little as overriding like this is seldomn done so far,
and the order between /etc and /usr stays the same.
Diffstat (limited to 'src/libudev.c')
-rw-r--r-- | src/libudev.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libudev.c b/src/libudev.c index be24329adc..d954daef68 100644 --- a/src/libudev.c +++ b/src/libudev.c @@ -236,7 +236,7 @@ UDEV_EXPORT struct udev *udev_new(void) fclose(f); } - /* environment overwrites config */ + /* environment overrides config */ env = getenv("UDEV_LOG"); if (env != NULL) udev_set_log_priority(udev, util_log_priority(env)); @@ -260,15 +260,15 @@ UDEV_EXPORT struct udev *udev_new(void) if (!udev->rules_path[0]) goto err; + /* /run/udev -- runtime rules */ + if (asprintf(&udev->rules_path[2], "%s/rules.d", udev->run_path) < 0) + goto err; + /* /etc/udev -- local administration rules */ udev->rules_path[1] = strdup(SYSCONFDIR "/udev/rules.d"); if (!udev->rules_path[1]) goto err; - /* /run/udev -- runtime rules */ - if (asprintf(&udev->rules_path[2], "%s/rules.d", udev->run_path) < 0) - goto err; - udev->rules_path_count = 3; } |