Tito writes:
authorEric Andersen <andersen@codepoet.org>
Wed, 22 Oct 2003 10:10:50 +0000 (10:10 -0000)
committerEric Andersen <andersen@codepoet.org>
Wed, 22 Oct 2003 10:10:50 +0000 (10:10 -0000)
Hi to all,
I'm sorry but  I didn't spot this big fat bug until now,
Matteo Croce emailed me about it.
Please apply this patch as the devfsd applet is broken
and works only on a system booted with a standard devfsd
( the test I mostly did :-(   ), but if used at boot time
it DOESN'T WORK.

Thanks in advance and please apply
Tito

miscutils/devfsd.c

index e6316d686e12e55805e1031e35f77d6b15b51324..e5d550835907919713d835d6b7383050bc106641 100644 (file)
@@ -1426,15 +1426,14 @@ static int mksymlink (const char *oldpath, const char *newpath)
 
 static int make_dir_tree (const char *path)
 /*  [SUMMARY] Creating intervening directories for a path as required.
-    <path> The full pathname (including he leaf node).
+    <path> The full pathname (including the leaf node).
     [RETURNS] TRUE on success, else FALSE.
 */
 {
 #ifdef CONFIG_DEVFSD_DEBUG
        msg_logger( NO_DIE, LOG_INFO, "make_dir_tree()\n");
 #endif
-
-       if (bb_make_directory( (char *)path,  S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH , FILEUTILS_RECUR )==-1)
+       if (bb_make_directory( dirname((char *)path),  S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH ,FILEUTILS_RECUR )==-1)
        {
 #ifdef CONFIG_DEVFSD_VERBOSE
                msg_logger( NO_DIE, LOG_ERR, "make_dir_tree(): %s: %m\n", path);