block: add remount paramter
authorJohn Crispin <blogic@openwrt.org>
Wed, 27 Apr 2016 01:30:40 +0000 (03:30 +0200)
committerJohn Crispin <blogic@openwrt.org>
Wed, 27 Apr 2016 01:30:40 +0000 (03:30 +0200)
Signed-off-by: John Crispin <john@phrozen.org>
block.c

diff --git a/block.c b/block.c
index 2d44a8a59885d63310092c179902c406b2ba353b..ef5866542e71350fd10db40cab75923485359b48 100644 (file)
--- a/block.c
+++ b/block.c
@@ -1434,6 +1434,14 @@ int main(int argc, char **argv)
 
                if (!strcmp(argv[1], "umount"))
                        return main_umount(argc, argv);
+
+               if (!strcmp(argv[1], "remount")) {
+                       int ret = main_umount(argc, argv);
+
+                       if (!ret)
+                               ret = main_mount(argc, argv);
+                       return ret;
+               }
        }
 
        ULOG_ERR("Usage: block <info|mount|umount|detect>\n");