chiark / gitweb /
switch-root: not only mkdir the parents but the target dir
[elogind.git] / src / core / switch-root.c
index f508cc203006273d2a086b91750cdecc4284fdd1..0ea61dbb290f8413fba8cc0f28990bde4ca76966 100644 (file)
@@ -84,7 +84,7 @@ int switch_root(const char *new_root) {
                 snprintf(new_mount, sizeof(new_mount), "%s%s", new_root, i);
                 char_array_0(new_mount);
 
                 snprintf(new_mount, sizeof(new_mount), "%s%s", new_root, i);
                 char_array_0(new_mount);
 
-                mkdir_parents(new_mount, 0755);
+                mkdir_p(new_mount, 0755);
 
                 if ((stat(new_mount, &sb) < 0) ||
                     sb.st_dev != new_root_stat.st_dev) {
 
                 if ((stat(new_mount, &sb) < 0) ||
                     sb.st_dev != new_root_stat.st_dev) {