From: Zbigniew Jędrzejewski-Szmek Date: Mon, 19 Jun 2023 11:35:00 +0000 (+0200) Subject: shared: improve messages about switch root operations X-Git-Tag: v254-rc1~172^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=12cc96016374b5eca072d9f94542c3145def313f;p=thirdparty%2Fsystemd.git shared: improve messages about switch root operations "change" is not clear without context. --- diff --git a/src/shared/mount-util.c b/src/shared/mount-util.c index 366f59ee82b..61144ce0b6b 100644 --- a/src/shared/mount-util.c +++ b/src/shared/mount-util.c @@ -459,7 +459,7 @@ static int mount_switch_root_pivot(int fd_newroot, const char *path) { /* Change into the new rootfs. */ if (fchdir(fd_newroot) < 0) - return log_debug_errno(errno, "Failed to change into new rootfs '%s': %m", path); + return log_debug_errno(errno, "Failed to chdir into new rootfs '%s': %m", path); /* Let the kernel tuck the new root under the old one. */ if (pivot_root(".", ".") < 0) @@ -479,13 +479,13 @@ static int mount_switch_root_move(int fd_newroot, const char *path) { /* Change into the new rootfs. */ if (fchdir(fd_newroot) < 0) - return log_debug_errno(errno, "Failed to change into new rootfs '%s': %m", path); + return log_debug_errno(errno, "Failed to chdir into new rootfs '%s': %m", path); /* Move the new root fs */ if (mount(".", "/", NULL, MS_MOVE, NULL) < 0) return log_debug_errno(errno, "Failed to move new rootfs '%s': %m", path); - /* Also change chroot dir */ + /* Also change root dir */ if (chroot(".") < 0) return log_debug_errno(errno, "Failed to chroot to new rootfs '%s': %m", path);