Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/i386/stand/boot Restore previous behavior: "boot -s...
details: https://anonhg.NetBSD.org/src/rev/0b33c28e57a0
branches: trunk
changeset: 335575:0b33c28e57a0
user: christos <christos%NetBSD.org@localhost>
date: Fri Jan 16 03:45:53 2015 +0000
description:
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
diffstat:
sys/arch/i386/stand/boot/boot2.c | 34 +++++++++++++++-------------------
1 files changed, 15 insertions(+), 19 deletions(-)
diffs (82 lines):
diff -r 1043188fa7a8 -r 0b33c28e57a0 sys/arch/i386/stand/boot/boot2.c
--- a/sys/arch/i386/stand/boot/boot2.c Thu Jan 15 22:29:52 2015 +0000
+++ b/sys/arch/i386/stand/boot/boot2.c Fri Jan 16 03:45:53 2015 +0000
@@ -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 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 @@
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 @@
* 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 @@
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);
}
}
}
Home |
Main Index |
Thread Index |
Old Index