libfstools: check for overlay mounting errors
[project/fstools.git] / 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()) {