libfstools: check for overlay mounting errors
authorRafał Miłecki <rafal@milecki.pl>
Tue, 4 Jan 2022 14:27:13 +0000 (15:27 +0100)
committerRafał Miłecki <rafal@milecki.pl>
Tue, 11 Jan 2022 17:50:14 +0000 (18:50 +0100)
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
libfstools/overlay.c

index 5de12c52b683a2655068ec6d4fe25abbc07d7f80..87fad1144397d99b735aa1418365c6aaeda1a8cf 100644 (file)
@@ -416,6 +416,7 @@ int fs_state_set(const char *dir, enum fs_state state)
 int mount_overlay(struct volume *v)
 {
        char *mp, *fs_name;
+       int err;
 
        if (!v)
                return -1;
@@ -426,7 +427,9 @@ int mount_overlay(struct volume *v)
                return -1;
        }
 
-       overlay_mount_fs(v);
+       err = overlay_mount_fs(v);
+       if (err)
+               return err;
 
        extroot_prefix = "/tmp/overlay";
        if (!mount_extroot()) {