Browse Source

Plan 9 from Bell Labs 2013-06-28

David du Colombier 10 years ago
parent
commit
806bea0c21
2 changed files with 6 additions and 4 deletions
  1. 4 2
      sys/src/9/boot/aux.c
  2. 2 2
      sys/src/9/boot/bootip.c

+ 4 - 2
sys/src/9/boot/aux.c

@@ -66,12 +66,14 @@ warning(char *s)
 void
 fatal(char *s)
 {
+	char *msg;
 	char buf[ERRMAX];
 
 	buf[0] = '\0';
 	errstr(buf, sizeof buf);
-	fprint(2, "boot: %s: %s\n", s, buf);
-	exits(0);
+	msg = smprint("%s: %s", s, buf);
+	fprint(2, "boot: %s\n", msg);
+	exits(msg);			/* this will trigger a panic */
 }
 
 int

+ 2 - 2
sys/src/9/boot/bootip.c

@@ -64,10 +64,10 @@ configip(int bargc, char **bargv, int needfs)
 	/* let ipconfig configure the ip interface */
 	switch(pid = fork()){
 	case -1:
-		fatal("configuring ip");
+		fatal("fork configuring ip: %r");
 	case 0:
 		exec("/boot/ipconfig", arg);
-		fatal("execing /ipconfig");
+		fatal("execing /boot/ipconfig: %r");
 	default:
 		break;
 	}