[syslinux:elflink] ldlinux: Use stdcon instead of rawcon for the console

syslinux-bot for Matt Fleming matt.fleming at intel.com
Tue Oct 23 04:09:07 PDT 2012


Commit-ID:  4503e6260c032db9bb24843f51fdcd8985ef5768
Gitweb:     http://www.syslinux.org/commit/4503e6260c032db9bb24843f51fdcd8985ef5768
Author:     Matt Fleming <matt.fleming at intel.com>
AuthorDate: Fri, 19 Oct 2012 14:41:12 +0100
Committer:  Matt Fleming <matt.fleming at intel.com>
CommitDate: Fri, 19 Oct 2012 16:02:57 +0100

ldlinux: Use stdcon instead of rawcon for the console

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 files changed, 1 insertions(+), 1 deletions(-)

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;


More information about the Syslinux-commits mailing list