[MTD] Allow alternate JFFS2 mount variant for root filesystem.

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Tue May 30 09:59:03 EDT 2006


Commit:     e9482b4374e2596e6f3f1ab30c4ea469f4ac6311
Parent:     73c619ea0e49c9306afa7ea53c3362fbc56ffd70
Author:     Joern Engel <joern at wh.fh-wedel.de>
AuthorDate: Tue May 30 14:25:46 2006 +0200
Commit:     Joern Engel <joern at wh.fh-wedel.de>
CommitDate: Tue May 30 14:25:46 2006 +0200

    [MTD] Allow alternate JFFS2 mount variant for root filesystem.
    
    With this patch, "root=mtd3" and "root=mtd:foo" work for a JFFS2 rootfs.
    
    Signed-off-by: Joern Engel <joern at wh.fh-wedel.de>

 init/do_mounts.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/init/do_mounts.c b/init/do_mounts.c
index f4b7b9d..21b3b8f 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -409,6 +409,10 @@ void __init prepare_namespace(void)
 
 	if (saved_root_name[0]) {
 		root_device_name = saved_root_name;
+		if (!strncmp(root_device_name, "mtd", 3)) {
+			mount_block_root(root_device_name, root_mountflags);
+			goto out;
+		}
 		ROOT_DEV = name_to_dev_t(root_device_name);
 		if (strncmp(root_device_name, "/dev/", 5) == 0)
 			root_device_name += 5;



More information about the linux-mtd-cvs mailing list