Browse Source

Plan 9 from Bell Labs 2008-08-12

David du Colombier 12 years ago
parent
commit
4938f4d57b
5 changed files with 25 additions and 14 deletions
  1. 2 2
      dist/replica/_plan9.db
  2. 2 2
      dist/replica/plan9.db
  3. 2 0
      dist/replica/plan9.log
  4. 9 2
      sys/src/boot/pc/bootp.c
  5. 10 8
      sys/src/boot/pc/load.c

+ 2 - 2
dist/replica/_plan9.db

@@ -9183,7 +9183,7 @@ sys/src/boot/pc/apm.c - 664 sys sys 1015007947 289
 sys/src/boot/pc/bcom.c - 664 sys sys 1217188102 6470
 sys/src/boot/pc/boot.c - 664 sys sys 1130887226 8421
 sys/src/boot/pc/bootld.c - 664 sys sys 1015007948 1801
-sys/src/boot/pc/bootp.c - 664 sys sys 1216859040 12923
+sys/src/boot/pc/bootp.c - 664 sys sys 1218508001 13158
 sys/src/boot/pc/cga.c - 664 sys sys 1015007948 1362
 sys/src/boot/pc/cis.c - 664 sys sys 1144961189 9232
 sys/src/boot/pc/clock.c - 664 sys sys 1212010463 6825
@@ -9237,7 +9237,7 @@ sys/src/boot/pc/kfs.h - 664 sys sys 1032215924 861
 sys/src/boot/pc/kfsboot.c - 664 sys sys 1032215914 4788
 sys/src/boot/pc/l.s - 664 sys sys 1216786858 18260
 sys/src/boot/pc/lib.h - 664 sys sys 1212090562 3280
-sys/src/boot/pc/load.c - 664 sys sys 1216858654 11008
+sys/src/boot/pc/load.c - 664 sys sys 1218507506 11060
 sys/src/boot/pc/mbr.s - 664 sys sys 1015007953 6234
 sys/src/boot/pc/mem.h - 664 sys sys 1190921475 3437
 sys/src/boot/pc/memory.c - 664 sys sys 1212010326 10266

+ 2 - 2
dist/replica/plan9.db

@@ -9183,7 +9183,7 @@ sys/src/boot/pc/apm.c - 664 sys sys 1015007947 289
 sys/src/boot/pc/bcom.c - 664 sys sys 1217188102 6470
 sys/src/boot/pc/boot.c - 664 sys sys 1130887226 8421
 sys/src/boot/pc/bootld.c - 664 sys sys 1015007948 1801
-sys/src/boot/pc/bootp.c - 664 sys sys 1216859040 12923
+sys/src/boot/pc/bootp.c - 664 sys sys 1218508001 13158
 sys/src/boot/pc/cga.c - 664 sys sys 1015007948 1362
 sys/src/boot/pc/cis.c - 664 sys sys 1144961189 9232
 sys/src/boot/pc/clock.c - 664 sys sys 1212010463 6825
@@ -9237,7 +9237,7 @@ sys/src/boot/pc/kfs.h - 664 sys sys 1032215924 861
 sys/src/boot/pc/kfsboot.c - 664 sys sys 1032215914 4788
 sys/src/boot/pc/l.s - 664 sys sys 1216786858 18260
 sys/src/boot/pc/lib.h - 664 sys sys 1212090562 3280
-sys/src/boot/pc/load.c - 664 sys sys 1216858654 11008
+sys/src/boot/pc/load.c - 664 sys sys 1218507506 11060
 sys/src/boot/pc/mbr.s - 664 sys sys 1015007953 6234
 sys/src/boot/pc/mem.h - 664 sys sys 1190921475 3437
 sys/src/boot/pc/memory.c - 664 sys sys 1212010326 10266

+ 2 - 0
dist/replica/plan9.log

@@ -20166,3 +20166,5 @@
 1218342604 32 c sys/src/9/port/taslock.c - 664 sys sys 1218341995 4459
 1218342604 33 c sys/src/9/port/devaoe.c - 664 sys sys 1218341718 42083
 1218342604 34 c sys/src/9/port/sdaoe.c - 664 sys sys 1218341980 9919
+1218508204 0 c sys/src/boot/pc/bootp.c - 664 sys sys 1218508001 13158
+1218508204 1 c sys/src/boot/pc/load.c - 664 sys sys 1218507506 11060

+ 9 - 2
sys/src/boot/pc/bootp.c

@@ -8,6 +8,7 @@
 #include "ip.h"
 
 extern int debugload;
+extern char *persist;
 
 uchar broadcast[Eaddrlen] = {
 	0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
@@ -531,10 +532,16 @@ bootpopen(int ctlrno, char *file, Bootp *rep, int dotftpopen)
 {
 	int n;
 
+	/*
+	 * originally, we looped if we were pxeload or if *bootppersist was set.
+	 * this doesn't work well for pxeload where bootp will never succeed
+	 * on the first interface, so don't loop just because we're pxeload.
+	 */
 	while ((n = bootpopen1(ctlrno, file, rep, dotftpopen)) < 0 &&
-	    (pxe || getconf("*bootppersist") != nil)) {
-		print("pausing before retry\n");
+	    persist != nil) {
+		print("pausing before retry...");
 		delay(30*1000);
+		print("\n");
 	}
 	return n;
 }

+ 10 - 8
sys/src/boot/pc/load.c

@@ -90,14 +90,6 @@ static char *typenm[] = {
 	[Tbios]		"bios",
 };
 
-static char *
-typename(int type)
-{
-	if (type < 0 || type >= nelem(typenm) || typenm[type] == nil)
-		return "**gok**";
-	return typenm[type];
-}
-
 extern SDifc sdataifc;
 extern SDifc sdiahciifc;
 extern SDifc sdaoeifc;
@@ -181,6 +173,15 @@ char *defaultpartition;
 int iniread;
 int debugload;
 int vga;
+char *persist;
+
+static char *
+typename(int type)
+{
+	if (type < 0 || type >= nelem(typenm) || typenm[type] == nil)
+		return "**gok**";
+	return typenm[type];
+}
 
 static Medium*
 parse(char *line, char **file)
@@ -361,6 +362,7 @@ main(void)
 	/*
 	 * we should now have read plan9.ini, if any.
 	 */
+	persist = getconf("*bootppersist");
 	debugload = getconf("*debugload") != nil;
 	if((p = getconf("console")) != nil)
 		consinit(p, getconf("baud"));