[patch] nfsroot over plip

Michele Bini (mibin@tin.it)
Sun, 29 Nov 1998 21:44:37 +0100


Here is a patch that fixes net/ipv4/ipconfig.c
to make possible to use nfsroot over plip, (or
maybe even slip).

FYI i pass these options to the kernel to make
this work:

noinitrd
parport=0x378,7
plip=parport0
root=/dev/nfs
nfsroot=128.1.1.3:/nfsroot
ip=128.1.1.2:128.1.1.3:::wplip:plip0:off

The problem seems to be caused by the fact that
the code that tries to guess which network device
is the best to run nfsroot over skipping the plip
device even if it is explicitly specified by the
user.

--- net/ipv4/ipconfig.old Sat Nov 28 23:22:30 1998
+++ net/ipv4/ipconfig.c Sun Nov 29 20:54:48 1998
@@ -103,10 +103,15 @@

last = &ic_first_dev;
for (dev = dev_base; dev; dev = dev->next)
- if (dev->type < ARPHRD_SLIP &&
- !(dev->flags & (IFF_LOOPBACK | IFF_POINTOPOINT)) &&
- strncmp(dev->name, "dummy", 5) &&
- (!user_dev_name[0] || !strcmp(dev->name, user_dev_name))) {
+ if ((
+ strncmp(dev->name, "dummy", 5) &&
+ ) && (
+ dev->type < ARPHRD_SLIP &&
+ !(dev->flags & (IFF_LOOPBACK | IFF_POINTOPOINT))
+ ) || (
+ user_dev_name[0] &&
+ !strcmp(dev->name, user_dev_name)
+ )) {
oflags = dev->flags;
if (dev_change_flags(dev, oflags | IFF_UP) < 0) {
printk(KERN_ERR "IP-Config: Failed to open %s\n", dev->name);

P.S.: this is the first time i send a patch here.
I hope the format of the patch is fine.

-Michele

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/