diff options
author | Tom Cosgrove <tom@cvs.openbsd.org> | 2004-01-29 00:54:09 +0000 |
---|---|---|
committer | Tom Cosgrove <tom@cvs.openbsd.org> | 2004-01-29 00:54:09 +0000 |
commit | 7457a320f6802dfe7a4512de256878ea2bea673b (patch) | |
tree | d20e49a8f429b99a7663a8068f3936f6b4e1350d | |
parent | f1d02a06a8f9048d5876f56ba5d2a0c15f61023c (diff) |
Allow the machine-dependent part of BOOT to change the program name.
ok weingart@, deraadt@
-rw-r--r-- | sys/stand/boot/boot.c | 9 | ||||
-rw-r--r-- | sys/stand/boot/vars.c | 6 |
2 files changed, 10 insertions, 5 deletions
diff --git a/sys/stand/boot/boot.c b/sys/stand/boot/boot.c index 3e7fb3af6e1..84e3885b22b 100644 --- a/sys/stand/boot/boot.c +++ b/sys/stand/boot/boot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: boot.c,v 1.29 2003/08/11 06:23:07 deraadt Exp $ */ +/* $OpenBSD: boot.c,v 1.30 2004/01/29 00:54:08 tom Exp $ */ /* * Copyright (c) 2003 Dale Rahn @@ -44,6 +44,9 @@ static const char *const kernels[] = { NULL }; +char prog_ident[40]; +char *progname = "BOOT"; + extern const char version[]; struct cmd_state cmd; int bootprompt = 1; @@ -57,7 +60,9 @@ boot(dev_t bootdev) machdep(); - printf(">> OpenBSD/" MACHINE " BOOT %s\n", version); + snprintf(prog_ident, sizeof(prog_ident), + ">> OpenBSD/" MACHINE " %s %s", progname, version); + printf("%s\n", prog_ident); devboot(bootdev, cmd.bootdev); strlcpy(cmd.image, bootfile, sizeof(cmd.image)); diff --git a/sys/stand/boot/vars.c b/sys/stand/boot/vars.c index 0706ac03c03..5fc04ed4355 100644 --- a/sys/stand/boot/vars.c +++ b/sys/stand/boot/vars.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vars.c,v 1.10 2003/08/11 06:23:07 deraadt Exp $ */ +/* $OpenBSD: vars.c,v 1.11 2004/01/29 00:54:08 tom Exp $ */ /* * Copyright (c) 1998-2000 Michael Shalayeff @@ -33,7 +33,7 @@ #include <lib/libkern/funcs.h> #include "cmd.h" -extern const char version[]; +extern char prog_ident[]; extern int debug; static int Xaddr(void); @@ -91,7 +91,7 @@ Xset(void) { const struct cmd_table *ct; - printf(">> OpenBSD/" MACHINE_ARCH " BOOT %s\n", version); + printf("%s\n", prog_ident); for (ct = cmd_set; ct->cmd_name != NULL; ct++) { printf("%s\t ", ct->cmd_name); (*ct->cmd_exec)(); |