diff options
Diffstat (limited to 'sys/stand')
-rw-r--r-- | sys/stand/boot/boot.c | 6 | ||||
-rw-r--r-- | sys/stand/boot/cmd.c | 19 |
2 files changed, 17 insertions, 8 deletions
diff --git a/sys/stand/boot/boot.c b/sys/stand/boot/boot.c index 65d16c933d5..4c21944877b 100644 --- a/sys/stand/boot/boot.c +++ b/sys/stand/boot/boot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: boot.c,v 1.8 1997/04/26 17:50:07 mickey Exp $ */ +/* $OpenBSD: boot.c,v 1.9 1997/05/31 15:48:24 mickey Exp $ */ /* * Copyright (c) 1997 Michael Shalayeff @@ -49,7 +49,7 @@ extern const char version[]; int boothowto; u_int cnvmem, extmem; struct cmd_state cmd = { - "", "bsd", "/etc/boot.conf", "/", (void *)0x100000, 50, "" + "", "bsd", "/etc/boot.conf", "/", (void *)0x100000, 5, "" }; void @@ -91,7 +91,7 @@ boot(bootdev) else bootfile = kernels[i]; - cmd.timeout += 20; + cmd.timeout++; printf(" failed(%d). will try %s\n", errno, bootfile); strncpy(cmd.image, bootfile, sizeof(cmd.image)); } diff --git a/sys/stand/boot/cmd.c b/sys/stand/boot/cmd.c index 8af3d07085c..84f52e813cf 100644 --- a/sys/stand/boot/cmd.c +++ b/sys/stand/boot/cmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd.c,v 1.14 1997/05/31 01:35:58 mickey Exp $ */ +/* $OpenBSD: cmd.c,v 1.15 1997/05/31 15:48:25 mickey Exp $ */ /* * Copyright (c) 1997 Michael Shalayeff @@ -63,6 +63,7 @@ static int Xset __P((register struct cmd_state *)); static int Xhowto __P((register struct cmd_state *)); static int Xtty __P((register struct cmd_state *)); static int Xtime __P((register struct cmd_state *)); +static int Xdmesg __P((register struct cmd_state *)); struct cmd_table { char *cmd_name; @@ -86,6 +87,7 @@ static const struct cmd_table cmd_table[] = { {"boot", Xboot}, /* XXX must be first */ {"cd", Xcd}, {"cp", Xcp}, + {"dmesg", Xdmesg}, {"help", Xhelp}, {"ls", Xls}, {"nope", Xnope}, @@ -130,7 +132,7 @@ read_conf(cmd) int fd, eof = 0; if ((fd = open(qualify(cmd, cmd->conf), 0)) < 0) { - if (errno != ENOENT) { + if (errno != ENOENT && errno != ENXIO) { printf("open(%s): %s\n", cmd->path, strerror(errno)); return 0; } @@ -240,12 +242,12 @@ readline(buf, to) register char *buf; int to; { - char *p = buf, *pe = buf, ch; - int i; + register char *p = buf, *pe = buf, ch; + register int i; for (i = to; i-- && !ischar(); ) #ifndef _TEST - usleep(100000); + sleep(1); #else ; #endif @@ -422,6 +424,13 @@ Xtime(cmd) } static int +Xdmesg(cmd) + register struct cmd_state *cmd; +{ + return 0; +} + +static int Xls(cmd) register struct cmd_state *cmd; { |