diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2009-04-21 00:29:17 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2009-04-21 00:29:17 +0000 |
commit | 0ad82344743e990e6985a8ee1b39a85fc4126084 (patch) | |
tree | c56e7cdb46ad73dd819ce77ed78827651d4253ec /util-linux/switch_root.c | |
parent | 1b47bbdfa485aa7361c44718ddb29ba75a9cfe7b (diff) | |
download | busybox-w32-0ad82344743e990e6985a8ee1b39a85fc4126084.tar.gz busybox-w32-0ad82344743e990e6985a8ee1b39a85fc4126084.tar.bz2 busybox-w32-0ad82344743e990e6985a8ee1b39a85fc4126084.zip |
switch_root: print errno on failure
Diffstat (limited to 'util-linux/switch_root.c')
-rw-r--r-- | util-linux/switch_root.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util-linux/switch_root.c b/util-linux/switch_root.c index 21cc99229..08aa72597 100644 --- a/util-linux/switch_root.c +++ b/util-linux/switch_root.c | |||
@@ -97,7 +97,7 @@ int switch_root_main(int argc UNUSED_PARAM, char **argv) | |||
97 | // Overmount / with newdir and chroot into it. The chdir is needed to | 97 | // Overmount / with newdir and chroot into it. The chdir is needed to |
98 | // recalculate "." and ".." links. | 98 | // recalculate "." and ".." links. |
99 | if (mount(".", "/", NULL, MS_MOVE, NULL)) | 99 | if (mount(".", "/", NULL, MS_MOVE, NULL)) |
100 | bb_error_msg_and_die("error moving root"); | 100 | bb_perror_msg_and_die("error moving root"); |
101 | xchroot("."); | 101 | xchroot("."); |
102 | xchdir("/"); | 102 | xchdir("/"); |
103 | 103 | ||