]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
volatile-root: add missing logging to volatile-root
authorLennart Poettering <lennart@poettering.net>
Wed, 19 Dec 2018 14:03:47 +0000 (15:03 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 1 Mar 2019 13:11:07 +0000 (14:11 +0100)
src/volatile-root/volatile-root.c

index 5da9ce1681de676de9217ee73b0cf23ed806e39c..5c30da0de83a7f8268cad4d83a39f38dbdc47de3 100644 (file)
@@ -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);