From 90ee1f3a0464bcb0eb9a186ab81236df721b6d27 Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Sat, 14 Jan 2006 20:45:02 +0000 Subject: [PATCH] Ignore spurious '\0' first character read on a serial console. This allows me to "boot -a" over a serial console. Tested on several machines. --- sys/libkern/gets.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/libkern/gets.c b/sys/libkern/gets.c index 423146ed5edb..4834da0f5b76 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)