diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 1997-08-21 22:04:34 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 1997-08-21 22:04:34 +0000 |
commit | 47a6f03a90bed19d5c10450395498908ed2ce17c (patch) | |
tree | 80a243157fd73db86e4a93e82e43f9c9c65105c1 /sys/arch | |
parent | 19ff666f30f3d3d2ace91ec62537f58b28064292 (diff) |
boothowto is local to boot
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/i386/stand/boot/boot.c | 10 | ||||
-rw-r--r-- | sys/arch/i386/stand/boot/cmd.c | 18 | ||||
-rw-r--r-- | sys/arch/i386/stand/boot/cmd.h | 3 | ||||
-rw-r--r-- | sys/arch/i386/stand/libsa/libsa.h | 3 |
4 files changed, 17 insertions, 17 deletions
diff --git a/sys/arch/i386/stand/boot/boot.c b/sys/arch/i386/stand/boot/boot.c index ebccaacfdd2..5cd3b02598b 100644 --- a/sys/arch/i386/stand/boot/boot.c +++ b/sys/arch/i386/stand/boot/boot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: boot.c,v 1.13 1997/08/13 04:35:42 mickey Exp $ */ +/* $OpenBSD: boot.c,v 1.14 1997/08/21 22:04:31 mickey Exp $ */ /* * Copyright (c) 1997 Michael Shalayeff @@ -45,7 +45,6 @@ const char *const kernels[] = { }; extern const char version[]; -int boothowto; u_int cnvmem, extmem; struct cmd_state cmd; @@ -58,16 +57,17 @@ boot(bootdev) machdep(); + devboot(bootdev, cmd.bootdev); strncpy(cmd.image, bootfile, sizeof(cmd.image)); + cmd.boothowto = 0; cmd.conf = "/etc/boot.conf"; cmd.cwd[0] = '/'; cmd.cwd[1] = '\0'; cmd.addr = (void *)0x100000; cmd.timeout = 5; - devboot(bootdev, cmd.bootdev); f = read_conf(); - printf(">> OpenBSD BOOT: %u/%u k [%s]\n", cnvmem, extmem, version); + printf(">> OpenBSD BOOT %s\n", version); while (1) { if (f <= 0) /* no boot.conf, or no boot cmd in there */ @@ -77,7 +77,7 @@ boot(bootdev) f = 0; printf("booting %s: ", cmd.path); - exec(cmd.path, cmd.addr, boothowto); + exec(cmd.path, cmd.addr, cmd.boothowto); if (kernels[++i] == NULL) bootfile = kernels[i=0]; diff --git a/sys/arch/i386/stand/boot/cmd.c b/sys/arch/i386/stand/boot/cmd.c index fff1891640c..4c13de98db0 100644 --- a/sys/arch/i386/stand/boot/cmd.c +++ b/sys/arch/i386/stand/boot/cmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd.c,v 1.25 1997/08/21 21:40:24 mickey Exp $ */ +/* $OpenBSD: cmd.c,v 1.26 1997/08/21 22:04:32 mickey Exp $ */ /* * Copyright (c) 1997 Michael Shalayeff @@ -490,17 +490,17 @@ static int Xhowto() { if (cmd.argc < 2) { - if (boothowto) { + if (cmd.boothowto) { putchar('-'); - if (boothowto & RB_ASKNAME) + if (cmd.boothowto & RB_ASKNAME) putchar('a'); - if (boothowto & RB_HALT) + if (cmd.boothowto & RB_HALT) putchar('b'); - if (boothowto & RB_CONFIG) + if (cmd.boothowto & RB_CONFIG) putchar('c'); - if (boothowto & RB_SINGLE) + if (cmd.boothowto & RB_SINGLE) putchar('s'); - if (boothowto & RB_KDB) + if (cmd.boothowto & RB_KDB) putchar('d'); } } else @@ -554,7 +554,7 @@ bootparse(i) int i; { register char *cp; - int howto = boothowto; + int howto = cmd.boothowto; for (; i < cmd.argc; i++) { cp = cmd.argv[i]; @@ -586,7 +586,7 @@ bootparse(i) return 1; } } - boothowto = howto; + cmd.boothowto = howto; return 0; } diff --git a/sys/arch/i386/stand/boot/cmd.h b/sys/arch/i386/stand/boot/cmd.h index a50ec4f4cde..84ab6a361c8 100644 --- a/sys/arch/i386/stand/boot/cmd.h +++ b/sys/arch/i386/stand/boot/cmd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd.h,v 1.6 1997/08/06 18:45:03 mickey Exp $ */ +/* $OpenBSD: cmd.h,v 1.7 1997/08/21 22:04:32 mickey Exp $ */ /* * Copyright (c) 1997 Michael Shalayeff @@ -36,6 +36,7 @@ struct cmd_table; struct cmd_state { char bootdev[16]; /* device */ char image[32]; /* image */ + int boothowto; /* howto */ char *conf; /* /etc/boot.conf normally */ char cwd[MAXPATHLEN - 32 - 16]; void *addr; /* load here */ diff --git a/sys/arch/i386/stand/libsa/libsa.h b/sys/arch/i386/stand/libsa/libsa.h index e8f65ce5bb2..8cc5ef7f49b 100644 --- a/sys/arch/i386/stand/libsa/libsa.h +++ b/sys/arch/i386/stand/libsa/libsa.h @@ -1,4 +1,4 @@ -/* $OpenBSD: libsa.h,v 1.13 1997/08/13 03:35:08 mickey Exp $ */ +/* $OpenBSD: libsa.h,v 1.14 1997/08/21 22:04:33 mickey Exp $ */ /* * Copyright (c) 1996 Michael Shalayeff @@ -42,7 +42,6 @@ void machdep __P((void)); int kentry __P((u_int, u_int)); void time_print __P((void)); -extern int boothowto; /* XXX filled in assumption that last file opened is kernel */ extern int bootdev, bootdev_geometry; extern u_int cnvmem, extmem; |