Module Name:    src
Committed By:   riastradh
Date:           Sat Aug  4 03:51:28 UTC 2012

Modified Files:
        src/sys/arch/i386/stand/boot: boot2.c

Log Message:
Fix i386 `boot' command to try the usual set of kernel names.

Without this, the `boot' command will try only `netbsd', not
`netbsd.gz', `netbsd.old', &c.

Patch from PR port-i386/44562.


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/arch/i386/stand/boot/boot2.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/i386/stand/boot/boot2.c
diff -u src/sys/arch/i386/stand/boot/boot2.c:1.57 src/sys/arch/i386/stand/boot/boot2.c:1.58
--- src/sys/arch/i386/stand/boot/boot2.c:1.57	Sun Dec 25 06:09:09 2011
+++ src/sys/arch/i386/stand/boot/boot2.c	Sat Aug  4 03:51:27 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot2.c,v 1.57 2011/12/25 06:09:09 tsutsui Exp $	*/
+/*	$NetBSD: boot2.c,v 1.58 2012/08/04 03:51:27 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -429,10 +429,21 @@ void
 command_boot(char *arg)
 {
 	char *filename;
-	int howto;
+	int howto, tell;
 
-	if (parseboot(arg, &filename, &howto))
-		bootit(filename, howto, (howto & AB_VERBOSE) != 0);
+	if (!parseboot(arg, &filename, &howto))
+		return;
+
+	tell = ((howto & AB_VERBOSE) != 0);
+	if (filename != NULL) {
+		bootit(filename, howto, tell);
+	} else {
+		int i;
+		for (i = 0; i < NUMNAMES; i++) {
+			bootit(names[i][0], howto, tell);
+			bootit(names[i][1], howto, tell);
+		}
+	}
 }
 
 void

Reply via email to