diff options
author | Tom Cosgrove <tom@cvs.openbsd.org> | 2007-06-24 14:58:13 +0000 |
---|---|---|
committer | Tom Cosgrove <tom@cvs.openbsd.org> | 2007-06-24 14:58:13 +0000 |
commit | 7b62b49ce293def1e4402f8aac61d7648d86efc3 (patch) | |
tree | 6618244b6206adab5095618128cecfc1d3d0529f | |
parent | 9ab0a146fbb286f6c042c2f44a7a9cacc4b31fae (diff) |
When bootfile was made global so that macppc could modify it, it
clashed with a global variable already used by the bootblocks.
Therefore rename bootfile here to kernelfile.
ok drahn@
-rw-r--r-- | sys/arch/macppc/stand/main.c | 6 | ||||
-rw-r--r-- | sys/stand/boot/boot.c | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/sys/arch/macppc/stand/main.c b/sys/arch/macppc/stand/main.c index 21b70b8a278..a705651e585 100644 --- a/sys/arch/macppc/stand/main.c +++ b/sys/arch/macppc/stand/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.2 2007/06/14 03:32:53 drahn Exp $ */ +/* $OpenBSD: main.c,v 1.3 2007/06/24 14:58:12 tom Exp $ */ /* $NetBSD: boot.c,v 1.1 1997/04/16 20:29:17 thorpej Exp $ */ /* @@ -170,7 +170,7 @@ chain(void (*entry)(), char *args, void *ssym, void *esym) char bootline[512]; -extern const char *bootfile; +extern char *kernelfile; int main() { @@ -191,7 +191,7 @@ main() prom2boot(bootdev); get_alt_bootdev(bootdev, sizeof(bootdev), bootline, sizeof(bootline)); if (bootline[0] != '\0') - bootfile = bootline; + kernelfile = bootline; OF_claim((void *)0x00100000, CLAIM_LIMIT, 0); /* XXX */ boot(0); diff --git a/sys/stand/boot/boot.c b/sys/stand/boot/boot.c index d36189d983b..bc2b0bebb28 100644 --- a/sys/stand/boot/boot.c +++ b/sys/stand/boot/boot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: boot.c,v 1.34 2007/06/13 02:17:32 drahn Exp $ */ +/* $OpenBSD: boot.c,v 1.35 2007/06/24 14:58:12 tom Exp $ */ /* * Copyright (c) 2003 Dale Rahn @@ -49,7 +49,7 @@ struct cmd_state cmd; /* bootprompt can be set by MD code to avoid prompt first time round */ int bootprompt = 1; -const char *bootfile = KERNEL; +char *kernelfile = KERNEL; /* can be changed by MD code */ void boot(dev_t bootdev) @@ -64,7 +64,7 @@ boot(dev_t bootdev) printf("%s\n", prog_ident); devboot(bootdev, cmd.bootdev); - strlcpy(cmd.image, bootfile, sizeof(cmd.image)); + strlcpy(cmd.image, kernelfile, sizeof(cmd.image)); cmd.boothowto = 0; cmd.conf = "/etc/boot.conf"; cmd.addr = (void *)DEFAULT_KERNEL_ADDRESS; @@ -89,10 +89,10 @@ boot(dev_t bootdev) if (loadfile(cmd.path, marks, LOAD_ALL) >= 0) break; - bootfile = KERNEL; + kernelfile = KERNEL; try++; - strlcpy(cmd.image, bootfile, sizeof(cmd.image)); - printf(" failed(%d). will try %s\n", errno, bootfile); + strlcpy(cmd.image, kernelfile, sizeof(cmd.image)); + printf(" failed(%d). will try %s\n", errno, kernelfile); if (try < 2) { if (cmd.timeout > 0) |