diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-12-19 15:03:47 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2019-03-01 14:11:07 +0100 |
commit | 85fb5bb2cb074b75e79e348bb0ab2bdc0111de91 (patch) | |
tree | 1ff3fae7afbaf3f92747820a2992f5e750c5b35b /src | |
parent | volatile-util: tweak query_volatile_mode() a bit (diff) | |
download | systemd-85fb5bb2cb074b75e79e348bb0ab2bdc0111de91.tar.xz systemd-85fb5bb2cb074b75e79e348bb0ab2bdc0111de91.zip |
volatile-root: add missing logging to volatile-root
Diffstat (limited to 'src')
-rw-r--r-- | src/volatile-root/volatile-root.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/volatile-root/volatile-root.c b/src/volatile-root/volatile-root.c index 5da9ce1681..5c30da0de8 100644 --- a/src/volatile-root/volatile-root.c +++ b/src/volatile-root/volatile-root.c @@ -45,7 +45,7 @@ static int make_volatile(const char *path) { goto finish_rmdir; if (mkdir("/run/systemd/volatile-sysroot/usr", 0755) < 0) { - r = -errno; + r = log_error_errno(errno, "Failed to create /usr directory: %m"); goto finish_umount; } @@ -54,8 +54,10 @@ static int make_volatile(const char *path) { goto finish_umount; r = bind_remount_recursive("/run/systemd/volatile-sysroot/usr", true, NULL); - if (r < 0) + if (r < 0) { + log_error_errno(r, "Failed to remount /usr read-only: %m"); goto finish_umount; + } r = umount_recursive(path, 0); if (r < 0) { @@ -64,7 +66,7 @@ static int make_volatile(const char *path) { } if (mount(NULL, "/", NULL, MS_SLAVE|MS_REC, NULL) < 0) - log_warning_errno(errno, "Failed to remount %s MS_SLAVE|MS_REC: %m", path); + log_warning_errno(errno, "Failed to remount %s MS_SLAVE|MS_REC, ignoring: %m", path); r = mount_verbose(LOG_ERR, "/run/systemd/volatile-sysroot", path, NULL, MS_MOVE, NULL); |