PATCH: Don't check NFS root when root= is given

From: H . J . Lu (hjl@lucon.org)
Date: Tue Nov 20 2001 - 17:15:51 EST


When the kernel is configured with NFS root, we should be able to pass
root=/dev/sda1 to kernel. mount_root in fs/super.c checks:

#ifdef CONFIG_ROOT_NFS
        if (MAJOR(ROOT_DEV) != UNNAMED_MAJOR)
                goto skip_nfs;
        ....

I think net/ipv4/ipconfig.c should do same.

H.J.
--- linux/net/ipv4/ipconfig.c~ Tue Nov 20 14:11:09 2001
+++ linux/net/ipv4/ipconfig.c Tue Nov 20 11:10:01 2001
@@ -1144,7 +1144,9 @@ static int __init ip_auto_config(void)
          */
         if (ic_myaddr == INADDR_NONE ||
 #ifdef CONFIG_ROOT_NFS
- (root_server_addr == INADDR_NONE && ic_servaddr == INADDR_NONE) ||
+ (MAJOR(ROOT_DEV) == UNNAMED_MAJOR
+ && root_server_addr == INADDR_NONE
+ && ic_servaddr == INADDR_NONE) ||
 #endif
             ic_first_dev->next) {
 #ifdef IPCONFIG_DYNAMIC
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Nov 23 2001 - 21:00:25 EST