X-Git-Url: http://git.archive.openwrt.org/?p=project%2Ffstools.git;a=blobdiff_plain;f=block.c;h=71ffd0b87df57108a85f202b8547e5e7e15e25cd;hp=c6d1b9049145a453205372b93016572b4c332d4a;hb=7a967198b9b18d00526094a43248b1c0892eb4aa;hpb=86ebc116da42168a1b57204c98747c6cccebdc68 diff --git a/block.c b/block.c index c6d1b90..71ffd0b 100644 --- a/block.c +++ b/block.c @@ -627,7 +627,7 @@ static void check_filesystem(struct blkid_struct_probe *pr) { pid_t pid; struct stat statbuf; - char *e2fsck = "/usr/sbin/e2fsck"; + const char *e2fsck = "/usr/sbin/e2fsck"; /* UBIFS does not need stuff like fsck */ if (!strncmp(pr->id->name, "ubifs", 5)) @@ -1101,7 +1101,8 @@ static int mount_extroot(char *cfg) if (check_fs) check_filesystem(pr); - err = mount(pr->dev, path, pr->id->name, 0, (m->options) ? (m->options) : ("")); + err = mount(pr->dev, path, pr->id->name, m->flags, + (m->options) ? (m->options) : ("")); if (err) { ULOG_ERR("extroot: mounting %s (%s) on %s failed: %d (%s)\n", @@ -1433,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 \n");