block: support skipping uuid check
authorLuca Barbato <lu_zero@gentoo.org>
Sat, 4 Mar 2023 10:46:33 +0000 (11:46 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Sun, 28 May 2023 16:03:05 +0000 (17:03 +0100)
Add a mean to avoid the uuid check by checking for the presence
of /etc/.extroot-default in the overlay.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
block.c

diff --git a/block.c b/block.c
index c015fe16a028b3df4c1726620bdf080b85dfd760..9b7c49ccb3a3bbb169e7f59cc5acba2d520a2210 100644 (file)
--- a/block.c
+++ b/block.c
@@ -1479,6 +1479,10 @@ static int check_extroot(char *path)
        FILE *fp;
        int err;
 
+       snprintf(tag, sizeof(tag), "%s/etc/.extroot-default", path);
+       if (stat(tag, &s))
+               return 0;
+
        err = find_root_dev(devpath, sizeof(devpath));
        if (err)
                err = find_block_mtd("\"rootfs\"", devpath, sizeof(devpath));