hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From eec50bea3233834b8ef15cb22ef288baca895bcd Mon Sep 17 00:00:00 2001
From: Jeffy Chen <jeffy.chen@rock-chips.com>
Date: Fri, 9 Nov 2018 12:14:29 +0800
Subject: [PATCH 1/7] init/do_mounts.c: Retry all fs after failed to mount with
 "rootfstype="
 
Retry all filesystems when failed to mount with specified ones.
 
Change-Id: Ic1b794cc61d61f1d0715e3b32400b3e96b0dddea
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---
 init/do_mounts.c | 9 +++++++++
 1 file changed, 9 insertions(+)
 
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 1902a1c80831..f521f6ac82c8 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -431,6 +431,15 @@ retry:
     for (p = fs_names; *p; p += strlen(p)+1)
         printk(" %s", p);
     printk("\n");
+
+    /* Retry all filesystems when failed to mount with specified ones */
+    if (root_fs_names) {
+        printk("Retrying all filesystems\n");
+        root_fs_names = NULL;
+        get_fs_names(fs_names);
+        goto retry;
+    }
+
 #ifdef CONFIG_BLOCK
     __bdevname(ROOT_DEV, b);
 #endif
-- 
2.20.1