lkml.org 
[lkml]   [2020]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/3] init: fall back on mounting raw root
Date
9p/virtio, virtiofs, and others can be mounted with no block device or
userspace helpers.

Signed-off-by: Alex Xu (Hello71) <alex_y_xu@yahoo.ca>
---
init/do_mounts.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/init/do_mounts.c b/init/do_mounts.c
index b5f9604d0c98..8aa38ec0bfec 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -568,7 +568,7 @@ void __init mount_root(void)
}
#endif
#ifdef CONFIG_BLOCK
- {
+ if (ROOT_DEV != 0) {
int err = create_dev("/dev/root", ROOT_DEV);

if (err < 0)
@@ -576,6 +576,7 @@ void __init mount_root(void)
mount_block_root("/dev/root", root_mountflags);
}
#endif
+ mount_block_root(saved_root_name, root_mountflags);
}

/*
--
2.29.2
\
 
 \ /
  Last update: 2020-12-07 19:51    [W:0.029 / U:0.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site