DHDAXCW-Rockchip-OpenWrt/package/system/fstools/patches/0003-fix-lost-mount-point-when-first-boot.patch

28 lines
681 B
Diff

--- a/mount_root.c
+++ b/mount_root.c
@@ -101,6 +101,7 @@ stop(int argc, char *argv[1])
static int
done(int argc, char *argv[1])
{
+ int ret;
struct volume *v = volume_find("rootfs_data");
if (!v)
@@ -109,7 +110,15 @@ done(int argc, char *argv[1])
switch (volume_identify(v)) {
case FS_NONE:
case FS_DEADCODE:
- return jffs2_switch(v);
+ ret = jffs2_switch(v);
+ /*
+ * Devices mounted under /mnt will lost their mount point(see switch2jffs())
+ * if the filesystem's(/overlay) state is not FS_STATE_READY,
+ * this action can fix it.
+ */
+ if (!access("/sbin/block", X_OK))
+ system("/sbin/block mount");
+ return ret;
case FS_EXT4:
case FS_F2FS: