Module Name:    src
Committed By:   christos
Date:           Fri Jan 16 03:45:53 UTC 2015

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

Log Message:
Restore previous behavior: "boot -s" == "boot netbsd -s"
Instead of ignoring the flags and doing the default boot. Merge some
extraneous code.
XXX: Find the PR for this, close it and pullup to -7


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 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.63 src/sys/arch/i386/stand/boot/boot2.c:1.64
--- src/sys/arch/i386/stand/boot/boot2.c:1.63	Sat Jun 28 05:16:18 2014
+++ src/sys/arch/i386/stand/boot/boot2.c	Thu Jan 15 22:45:53 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot2.c,v 1.63 2014/06/28 09:16:18 rtr Exp $	*/
+/*	$NetBSD: boot2.c,v 1.64 2015/01/16 03:45:53 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -111,7 +111,7 @@ static int default_unit, default_partiti
 static const char *default_filename;
 
 char *sprint_bootsel(const char *);
-void bootit(const char *, int, int);
+static void bootit(const char *, int);
 void print_banner(void);
 void boot2(int, uint64_t);
 
@@ -244,16 +244,12 @@ clearit(void)
 		clear_pc_screen();
 }
 
-void
-bootit(const char *filename, int howto, int tell)
+static void
+bootit(const char *filename, int howto)
 {
-
-	if (tell) {
-		printf("booting %s", sprint_bootsel(filename));
-		if (howto)
-			printf(" (howto 0x%x)", howto);
-		printf("\n");
-	}
+	if (howto & AB_VERBOSE)
+		printf("booting %s (howto 0x%x)\n", sprint_bootsel(filename),
+		    howto);
 
 	if (exec_netbsd(filename, 0, howto, boot_biosdev < 0x80, clearit) < 0)
 		printf("boot: %s: %s\n", sprint_bootsel(filename),
@@ -389,9 +385,9 @@ boot2(int biosdev, uint64_t biossector)
 		 * try pairs of names[] entries, foo and foo.gz
 		 */
 		/* don't print "booting..." again */
-		bootit(names[currname][0], 0, 0);
+		bootit(names[currname][0], 0);
 		/* since it failed, try compressed bootfile. */
-		bootit(names[currname][1], 0, 1);
+		bootit(names[currname][1], AB_VERBOSE);
 	}
 
 	bootmenu();	/* does not return */
@@ -451,23 +447,23 @@ void
 command_boot(char *arg)
 {
 	char *filename;
-	int howto, tell;
+	int howto;
 
 	if (!parseboot(arg, &filename, &howto))
 		return;
 
-	tell = ((howto & AB_VERBOSE) != 0);
 	if (filename != NULL) {
-		bootit(filename, howto, tell);
+		bootit(filename, howto);
 	} else {
 		int i;
 
 #ifndef SMALL
-		bootdefault();
+		if (howto == 0)
+			bootdefault();
 #endif
 		for (i = 0; i < NUMNAMES; i++) {
-			bootit(names[i][0], howto, tell);
-			bootit(names[i][1], howto, tell);
+			bootit(names[i][0], howto);
+			bootit(names[i][1], howto);
 		}
 	}
 }

Reply via email to