[systemd-devel] [PATCH 2/3] udevd: fix bogus mkdir invocation

Kay Sievers kay at vrfy.org
Sun Jul 1 18:02:01 PDT 2012


On Mon, Jul 2, 2012 at 1:37 AM, Dave Reisner <dreisner at archlinux.org> wrote:
> 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.
> ---
>  src/udev/udevd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/udev/udevd.c b/src/udev/udevd.c
> index e635795..bb33fb4 100644
> --- a/src/udev/udevd.c
> +++ b/src/udev/udevd.c
> @@ -900,7 +900,7 @@ static int convert_db(struct udev *udev)
>
>          /* make sure we do not get here again */
>          mkdir_parents("/run/udev/data", 0755);
> -        mkdir(filename, 0755);
> +        mkdir("/run/udev/data", 0755);

We can replace all that with a mkdir_p(), right?

Kay


More information about the systemd-devel mailing list