chiark / gitweb /
udevd: fix bogus mkdir invocation
authorDave Reisner <dreisner@archlinux.org>
Mon, 2 Jul 2012 01:09:18 +0000 (03:09 +0200)
committerKay Sievers <kay@vrfy.org>
Mon, 2 Jul 2012 01:09:18 +0000 (03:09 +0200)
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]

src/udev/udevd.c

index 1d6b23087bcc69db6814ef79180f9d36d4651e8f..a5478a754ed8ab270bf1e0a4c9f533a95ae4b834 100644 (file)
@@ -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);