[syslinux] [PATCH 3/3] ldlinux: Use stdcon instead of rawcon for the console

Matt Fleming matt at console-pimps.org
Fri Oct 19 08:11:12 PDT 2012


From: Matt Fleming <matt.fleming at intel.com>

Switch to the stdcon input device so things like fgets() work
correctly when reading from stdin.

I noticed this was broken when running dmitest.c32. fgets() was
returning NULL because there was no pending user input instead of
waiting for/buffering the input. Modules are expecting stdin to be a
line-oriented device, not a raw one where each module has to implement
its own line support.

Signed-off-by: Matt Fleming <matt.fleming at intel.com>
---
 com32/elflink/ldlinux/ldlinux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/com32/elflink/ldlinux/ldlinux.c b/com32/elflink/ldlinux/ldlinux.c
index f82b166..d963595 100644
--- a/com32/elflink/ldlinux/ldlinux.c
+++ b/com32/elflink/ldlinux/ldlinux.c
@@ -271,7 +271,7 @@ int main(int argc __unused, char **argv __unused)
 	size_t count = 0;
 	char *config_argv[2] = { NULL, NULL };
 
-	openconsole(&dev_rawcon_r, &dev_ansiserial_w);
+	openconsole(&dev_stdcon_r, &dev_ansiserial_w);
 
 	if (ConfigName[0])
 		config_argv[0] = ConfigName;
-- 
1.7.11.7




More information about the Syslinux mailing list