Browse Source

Plan 9 from Bell Labs 2008-08-14

David du Colombier 13 years ago
parent
commit
8f89422cbe
5 changed files with 23 additions and 24 deletions
  1. 2 2
      dist/replica/_plan9.db
  2. 2 2
      dist/replica/plan9.db
  3. 2 0
      dist/replica/plan9.log
  4. 1 20
      sys/src/boot/pc/bootp.c
  5. 16 0
      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 1218508001 13158
+sys/src/boot/pc/bootp.c - 664 sys sys 1218660611 12678
 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 1218507506 11060
+sys/src/boot/pc/load.c - 664 sys sys 1218660619 11499
 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 1218508001 13158
+sys/src/boot/pc/bootp.c - 664 sys sys 1218660611 12678
 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 1218507506 11060
+sys/src/boot/pc/load.c - 664 sys sys 1218660619 11499
 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

@@ -20168,3 +20168,5 @@
 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
+1218661204 0 c sys/src/boot/pc/bootp.c - 664 sys sys 1218660611 12678
+1218661204 1 c sys/src/boot/pc/load.c - 664 sys sys 1218660619 11499

+ 1 - 20
sys/src/boot/pc/bootp.c

@@ -437,7 +437,7 @@ tftpread(int ctlrno, Netaddr *a, Tftp *tftp, int dlen)
 }
 
 static int
-bootpopen1(int ctlrno, char *file, Bootp *rep, int dotftpopen)
+bootpopen(int ctlrno, char *file, Bootp *rep, int dotftpopen)
 {
 	Bootp req;
 	int i, n;
@@ -527,25 +527,6 @@ bootpopen1(int ctlrno, char *file, Bootp *rep, int dotftpopen)
 	return n;
 }
 
-static int
-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 &&
-	    persist != nil) {
-		print("pausing before retry...");
-		delay(30*1000);
-		print("\n");
-	}
-	return n;
-}
-
 int
 bootpboot(int ctlrno, char *file, Boot *b)
 {

+ 16 - 0
sys/src/boot/pc/load.c

@@ -432,6 +432,22 @@ done:
 	if(flag)
 		print("\n");
 
+	/*
+	 * e.g., *bootppersist=ether0
+	 *
+	 * previously, we looped in bootpopen if we were pxeload or if
+	 * *bootppersist was set.  that doesn't work well for pxeload where
+	 * bootp will never succeed on the first interface but only on another
+	 * interface.
+	 */
+	if (mode == Mauto && persist != nil &&
+	    (mp = parse(persist, &file)) != nil) {
+		boot(mp, file);
+		print("pausing before retry...");
+		delay(30*1000);
+		print("\n");
+	}
+
 	for(;;){
 		if(getstr("boot from", line, sizeof(line), def, (mode != Manual)*15) >= 0)
 			if(mp = parse(line, &file))