block: allow autofs and umount commands also on MTD/UBI
authorDaniel Golle <daniel@makrotopia.org>
Wed, 12 May 2021 22:54:47 +0000 (23:54 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Sat, 15 May 2021 23:29:07 +0000 (00:29 +0100)
As devices with large NAND flash are becoming more common, users may
use that resource for additional (UBI) volumes. To support that in
fstools, allow autofs and umount also on MTD/UBI devices.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
block.c

diff --git a/block.c b/block.c
index de6229d5644b32e04f0ad9630d8e185d99d91f2d..5b0517eb95c8a22b928aedd06eb85b4fa8191c0e 100644 (file)
--- a/block.c
+++ b/block.c
@@ -1187,7 +1187,7 @@ static int main_autofs(int argc, char **argv)
                if (config_load(NULL))
                        return -1;
 
-               cache_load(0);
+               cache_load(1);
                list_for_each_entry(pr, &devices, list) {
                        struct mount *m;
                        char *mp;
@@ -1630,7 +1630,7 @@ static int main_umount(int argc, char **argv)
 
        handle_swapfiles(false);
 
-       cache_load(0);
+       cache_load(1);
 
        if (argc == 3)
                all = !strcmp(argv[2], "-a");