Subject: Re: Son of diskless boot
To: None <drochner@zelux6.zel.kfa-juelich.de>
From: maximum entropy <entropy@zippy.bernstein.com>
List: port-i386
Date: 05/23/1997 11:30:56
>From: Matthias Drochner <drochner@zelux6.zel.kfa-juelich.de>
>
>This IS a bug in "config".cfcrosscheck() assumes only disks,
>it tries to interpret a non-existent minor number.
>As an experiment, try with "ep31". This will work because
>minor(-1) / maxpartitions == 31.
>The reason it worked in some setups is that there was always
>a starred device declaration.

ep31 doesn't work either: the program currently (mostly) ignores unit
numbers for ethernet devices.

Here's a patch which fixes my problem...I'm not completely sure that
this won't have consequences in some other part of the program, but it
does seem to do the right thing.

--- /usr/src/usr.sbin/config/sem.c~	Sat Mar 15 07:26:28 1997
+++ /usr/src/usr.sbin/config/sem.c	Fri May 23 11:22:21 1997
@@ -655,10 +655,10 @@
 
 	/*
 	 * Check for the magic network interface attribute, and
-	 * don't bother making a device number.
+	 * make a bogus device number.
 	 */
 	if (has_attr(dev->d_attrs, s_ifnet))
-		nv->nv_int = NODEV;
+		nv->nv_int = makedev(NODEV, unit * maxpartitions);
 	else {
 		if (dev->d_major == NODEV) {
 			error("%s: can't make %s device from `%s'",


--
entropy -- it's not just a good idea, it's the second law.