diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1997-08-13 14:24:03 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1997-08-13 14:24:03 +0000 |
commit | d3a188da66877f24cf438d9749c84f8fe542bdbc (patch) | |
tree | 32f628b85878446350f893b29a27e192f8d0e259 /sys/stand/boot/cmd.c | |
parent | f33c6e50002d716df12f9116355332e01891bfd4 (diff) |
s/kbd/pc/ for consistency with kernel. Do even better __asms for BIOS calls.
Adapt to new console probing and setting API. Do not try to probe pc0 via
the NVRAM. Fix some other buglets.
Diffstat (limited to 'sys/stand/boot/cmd.c')
-rw-r--r-- | sys/stand/boot/cmd.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sys/stand/boot/cmd.c b/sys/stand/boot/cmd.c index 0e35233aa36..58afb95d137 100644 --- a/sys/stand/boot/cmd.c +++ b/sys/stand/boot/cmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd.c,v 1.22 1997/08/13 03:49:28 mickey Exp $ */ +/* $OpenBSD: cmd.c,v 1.23 1997/08/13 14:24:00 niklas Exp $ */ /* * Copyright (c) 1997 Michael Shalayeff @@ -264,9 +264,11 @@ readline(buf, to) p = pe = buf; continue; case '\n': + case '\r': pe[1] = *pe = '\0'; break; case '\b': + case '\177': if (p > buf) { putchar('\177'); p--; @@ -405,11 +407,17 @@ Xaddr() static int Xtty() { + dev_t dev; + if (cmd.argc == 1) - printf(ttyname(0)); + printf("%s\n", ttyname(0)); else { + dev = ttydev(cmd.argv[1]); + if (dev == NODEV) + printf("%s not a console device\n", cmd.argv[1]); + else if (cnset(dev)) + printf("%s console not present\n", cmd.argv[1]); } - return 0; } |