chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
587f21d
)
switch-root: not only mkdir the parents but the target dir
author
Harald Hoyer
<harald@redhat.com>
Wed, 13 Aug 2014 14:45:53 +0000
(16:45 +0200)
committer
Harald Hoyer
<harald@redhat.com>
Wed, 13 Aug 2014 14:45:53 +0000
(16:45 +0200)
switch-root would only mkdir the parents of the mount move directories.
With this patch, the mount move target directory is created to make
switch-root to an empty root directory work.
src/core/switch-root.c
patch
|
blob
|
history
diff --git
a/src/core/switch-root.c
b/src/core/switch-root.c
index f508cc203006273d2a086b91750cdecc4284fdd1..0ea61dbb290f8413fba8cc0f28990bde4ca76966 100644
(file)
--- a/
src/core/switch-root.c
+++ b/
src/core/switch-root.c
@@
-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);
- mkdir_p
arents
(new_mount, 0755);
+ mkdir_p(new_mount, 0755);
if ((stat(new_mount, &sb) < 0) ||
sb.st_dev != new_root_stat.st_dev) {