lkml.org 
[lkml]   [2000]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
SubjectRe: [patch-2.4.0-test13-pre3] rootfs boot param. support

[Tigran Aivazian]
> no, because it would cause a "spurious" call to get_fs_type("") which
> we don't want to happen (by default i.e. -- if user _really_ wants it
> that is ok). The default of "ext2" is fine.

I still disagree -- super.c is no place to dictate the default root
filesystem. And I agree with Andries that 'rootfs=' is confusing.

Peter

--- 2.4.0test13pre3+rootfs/fs/super.c~ Mon Dec 18 09:06:47 2000
+++ 2.4.0test13pre3+rootfs/fs/super.c Mon Dec 18 09:09:48 2000
@@ -18,7 +18,7 @@
* Torbjörn Lindh (torbjorn.lindh@gopta.se), April 14, 1996.
* Added devfs support: Richard Gooch <rgooch@atnf.csiro.au>, 13-JAN-1998
* Heavily rewritten for 'one fs - one tree' dcache architecture. AV, Mar 2000
- * Added rootfs boot param. used by mount_root(): Tigran Aivazian. Dec 2000.
+ * Added rootfstype boot param. used by mount_root(): Tigran Aivazian. Dec 2000.
*/

#include <linux/config.h>
@@ -59,11 +59,11 @@
/* this is initialized in init/main.c */
kdev_t ROOT_DEV;

-/* this can be set at boot time, e.g. rootfs=ext2
+/* this can be set at boot time, e.g. rootfstype=ext2
* if set to invalid value or if read_super() fails on the specified
* filesystem type then mount_root() will go through all registered filesystems.
*/
-static char rootfs[128] __initdata = "ext2";
+static char rootfstype[32] __initdata = "";

int nr_super_blocks;
int max_super_blocks = NR_SUPER;
@@ -90,11 +90,11 @@
int n = strlen(line) + 1;

if (n > 1 && n < 128)
- strncpy(rootfs, line, n);
+ strncpy(rootfstype, line, n);
return 1;
}

-__setup("rootfs=", rootfs_setup);
+__setup("rootfstype=", rootfs_setup);

/* WARNING: This can be used only if we _already_ own a reference */
static void get_filesystem(struct file_system_type *fs)
@@ -1479,7 +1479,7 @@

void __init mount_root(void)
{
- struct file_system_type * fs_type;
+ struct file_system_type * fs_type = NULL;
struct super_block * sb;
struct vfsmount *vfsmnt;
struct block_device *bdev = NULL;
@@ -1597,7 +1597,8 @@
goto mount_it;
}

- fs_type = get_fs_type(rootfs);
+ if (*rootfstype)
+ fs_type = get_fs_type(rootfstype);
if (fs_type) {
sb = read_super(ROOT_DEV,bdev,fs_type,root_mountflags,NULL,1);
if (sb)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 12:52    [W:0.111 / U:0.248 seconds]
©2003-2011 Jasper Spaans