summaryrefslogtreecommitdiffstats
path: root/sys/libkern
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2006-01-14 20:45:02 +0000
committerru <ru@FreeBSD.org>2006-01-14 20:45:02 +0000
commit0cba5143c7e5e35d1e9143b09c04e15a559684ee (patch)
tree3cb38bbc57e5f03afab94538edba7b0fbe8d4c3e /sys/libkern
parent2fb685782c5c22231bad6f477c3ddec6cf317760 (diff)
downloadFreeBSD-src-0cba5143c7e5e35d1e9143b09c04e15a559684ee.zip
FreeBSD-src-0cba5143c7e5e35d1e9143b09c04e15a559684ee.tar.gz
Ignore spurious '\0' first character read on a serial console.
This allows me to "boot -a" over a serial console. Tested on several machines.
Diffstat (limited to 'sys/libkern')
-rw-r--r--sys/libkern/gets.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/libkern/gets.c b/sys/libkern/gets.c
index 423146e..4834da0 100644
--- a/sys/libkern/gets.c
+++ b/sys/libkern/gets.c
@@ -56,6 +56,8 @@ gets(char *cp, size_t size, int visible)
lp--;
}
continue;
+ case '\0':
+ continue;
default:
if (lp < end) {
if (visible)
OpenPOWER on IntegriCloud