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]
This commit is contained in:
Dave Reisner 2012-07-02 03:09:18 +02:00 committed by Kay Sievers
parent b80680eda9
commit ddbe6850b2

View 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);