summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--miscutils/devfsd.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c
index e6316d6..e5d5508 100644
--- a/miscutils/devfsd.c
+++ b/miscutils/devfsd.c
@@ -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);