[systemd-commits] 2 commits - src/udev

Kay Sievers kay at kemper.freedesktop.org
Sun Jul 1 18:10:34 PDT 2012


 src/udev/udevd.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit ddbe6850b2ae490ab359a050b190cf96e1559cd7
Author: Dave Reisner <dreisner at archlinux.org>
Date:   Mon Jul 2 03:09:18 2012 +0200

    udevd: fix bogus mkdir invocation
    
    The filename parameter passed to mkdir can't contain anything but a
    garbage value at this point. This was meant to be the full pathname to
    the new udev DB, as the mkdir_parents() call before it won't create the
    trailing child directory.
    
    [replace mkdir_parents() + mkdir() with mkdir_p() -- kay]

diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index 1d6b230..a5478a7 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -899,8 +899,7 @@ static int convert_db(struct udev *udev)
                 return 0;
 
         /* make sure we do not get here again */
-        mkdir_parents("/run/udev/data", 0755);
-        mkdir(filename, 0755);
+        mkdir_p("/run/udev/data", 0755);
 
         /* old database */
         util_strscpyl(filename, sizeof(filename), "/dev/.udev/db", NULL);

commit b80680eda9e615711414b7efa2d81e4ac1496b6a
Author: Dave Reisner <dreisner at archlinux.org>
Date:   Sun Jul 1 19:37:52 2012 -0400

    udevd: use ROOTPREFIX to create path to modules.devname

diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index e635795..1d6b230 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -806,7 +806,7 @@ static void static_dev_create_from_modules(struct udev *udev)
         FILE *f;
 
         uname(&kernel);
-        util_strscpyl(modules, sizeof(modules), "/lib/modules/", kernel.release, "/modules.devname", NULL);
+        util_strscpyl(modules, sizeof(modules), ROOTPREFIX "/lib/modules/", kernel.release, "/modules.devname", NULL);
         f = fopen(modules, "r");
         if (f == NULL)
                 return;



More information about the systemd-commits mailing list