1
0
mirror of https://github.com/openbsd/src.git synced 2026-05-01 17:46:35 +00:00

Echo the 1st key: "boot> sd.rd" => "boot> bsd.rd"

ok visa@
This commit is contained in:
gkoehler
2025-08-23 16:48:17 +00:00
parent 89d12c54c1
commit b2576f5c9a
2 changed files with 8 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
/* $OpenBSD: cmd.c,v 1.5 2024/08/08 13:59:11 miod Exp $ */
/* $OpenBSD: cmd.c,v 1.6 2025/08/23 16:48:17 gkoehler Exp $ */
/*
* Copyright (c) 1997-1999 Michael Shalayeff
@@ -252,7 +252,7 @@ readline(char *buf, size_t n, int to)
struct timeval tv;
fd_set fdset;
char *p;
int timed_out = 0;
int c, timed_out = 0;
#ifdef DEBUG
extern int debug;
#endif
@@ -271,6 +271,10 @@ readline(char *buf, size_t n, int to)
tv.tv_usec = 0;
if (select(STDIN_FILENO + 1, &fdset, NULL, NULL, &tv) == 0)
timed_out = 1;
else if ((c = getchar()) != EOF) {
putchar(c); /* Echo. */
ungetc(c, stdin);
}
/* Restore canonical mode. */
tcsetattr(STDIN_FILENO, TCSANOW, &saved_tio);

View File

@@ -1,4 +1,4 @@
/* $OpenBSD: rdboot.c,v 1.9 2023/10/20 19:55:49 kn Exp $ */
/* $OpenBSD: rdboot.c,v 1.10 2025/08/23 16:48:17 gkoehler Exp $ */
/*
* Copyright (c) 2019-2020 Visa Hankala
@@ -51,7 +51,7 @@ void kexec(int);
struct cmd_state cmd;
int octbootfd = -1;
const char version[] = "1.4";
const char version[] = "1.5";
int
main(void)