diff options
Diffstat (limited to 'util-linux/switch_root.c')
-rw-r--r-- | util-linux/switch_root.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/util-linux/switch_root.c b/util-linux/switch_root.c index ae9d412d1..a483893ed 100644 --- a/util-linux/switch_root.c +++ b/util-linux/switch_root.c | |||
@@ -117,7 +117,7 @@ static void drop_capset(int cap_idx) | |||
117 | getcaps(&caps); | 117 | getcaps(&caps); |
118 | caps.data[CAP_TO_INDEX(cap_idx)].inheritable &= ~CAP_TO_MASK(cap_idx); | 118 | caps.data[CAP_TO_INDEX(cap_idx)].inheritable &= ~CAP_TO_MASK(cap_idx); |
119 | if (capset(&caps.header, caps.data) != 0) | 119 | if (capset(&caps.header, caps.data) != 0) |
120 | bb_perror_msg_and_die("capset"); | 120 | bb_simple_perror_msg_and_die("capset"); |
121 | } | 121 | } |
122 | 122 | ||
123 | static void drop_bounding_set(int cap_idx) | 123 | static void drop_bounding_set(int cap_idx) |
@@ -253,7 +253,7 @@ int switch_root_main(int argc UNUSED_PARAM, char **argv) | |||
253 | if ((unsigned)stfs.f_type != RAMFS_MAGIC | 253 | if ((unsigned)stfs.f_type != RAMFS_MAGIC |
254 | && (unsigned)stfs.f_type != TMPFS_MAGIC | 254 | && (unsigned)stfs.f_type != TMPFS_MAGIC |
255 | ) { | 255 | ) { |
256 | bb_error_msg_and_die("root filesystem is not ramfs/tmpfs"); | 256 | bb_simple_error_msg_and_die("root filesystem is not ramfs/tmpfs"); |
257 | } | 257 | } |
258 | 258 | ||
259 | if (!dry_run) { | 259 | if (!dry_run) { |
@@ -263,7 +263,7 @@ int switch_root_main(int argc UNUSED_PARAM, char **argv) | |||
263 | // Overmount / with newdir and chroot into it | 263 | // Overmount / with newdir and chroot into it |
264 | if (mount(".", "/", NULL, MS_MOVE, NULL)) { | 264 | if (mount(".", "/", NULL, MS_MOVE, NULL)) { |
265 | // For example, fails when newroot is not a mountpoint | 265 | // For example, fails when newroot is not a mountpoint |
266 | bb_perror_msg_and_die("error moving root"); | 266 | bb_simple_perror_msg_and_die("error moving root"); |
267 | } | 267 | } |
268 | } | 268 | } |
269 | xchroot("."); | 269 | xchroot("."); |