[PATCH fstools 1/2] libfstools: check for overlay mounting errors

Rafał Miłecki zajec5 at gmail.com
Tue Jan 4 06:27:13 PST 2022


From: Rafał Miłecki <rafal at milecki.pl>

Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
---
 libfstools/overlay.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libfstools/overlay.c b/libfstools/overlay.c
index 5de12c5..87fad11 100644
--- a/libfstools/overlay.c
+++ b/libfstools/overlay.c
@@ -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()) {
-- 
2.31.1




More information about the openwrt-devel mailing list