[systemd-devel] [PATCH] udev: fix rules sort order

Tom Gundersen teg at jklm.no
Sat Apr 7 04:41:13 PDT 2012


Commit 91418155ae9034f466d436c314cd136309bc557d moved around the code,
but did not chang ethe array index.
---
 src/udev/libudev.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/udev/libudev.c b/src/udev/libudev.c
index c2c5cda..d710dc4 100644
--- a/src/udev/libudev.c
+++ b/src/udev/libudev.c
@@ -261,12 +261,12 @@ _public_ struct udev *udev_new(void)
                         goto err;
 
                 /* /run/udev -- runtime rules */
-                if (asprintf(&udev->rules_path[2], "%s/rules.d", udev->run_path) < 0)
+                if (asprintf(&udev->rules_path[1], "%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])
+                udev->rules_path[2] = strdup(SYSCONFDIR "/udev/rules.d");
+                if (!udev->rules_path[2])
                         goto err;
 
                 udev->rules_path_count = 3;
-- 
1.7.10



More information about the systemd-devel mailing list