[syslinux:elflink] elflink: handle the NULL return of edit_cmdline
syslinux-bot for Liu Aleaxander
Aleaxander at gmail.com
Fri Mar 18 11:30:46 PDT 2011
Commit-ID: 1c5f52052c2452c159498fb1beb941d3b40d4661
Gitweb: http://syslinux.zytor.com/commit/1c5f52052c2452c159498fb1beb941d3b40d4661
Author: Liu Aleaxander <Aleaxander at gmail.com>
AuthorDate: Tue, 15 Mar 2011 20:55:09 +0000
Committer: Matt Fleming <matt.fleming at linux.intel.com>
CommitDate: Tue, 15 Mar 2011 21:16:32 +0000
elflink: handle the NULL return of edit_cmdline
When use ctrl-c to cancle the current input, the edit_cmdline
function will return a NULL string. While, the called didn't
handle that case, and an error would be happened.
Signed-off-by: Liu Aleaxander <Aleaxander at gmail.com>
Signed-off-by: Matt Fleming <matt.fleming at linux.intel.com>
---
com32/elflink/ldlinux/ldlinux.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/com32/elflink/ldlinux/ldlinux.c b/com32/elflink/ldlinux/ldlinux.c
index 9c5e248..5ebbd7f 100644
--- a/com32/elflink/ldlinux/ldlinux.c
+++ b/com32/elflink/ldlinux/ldlinux.c
@@ -18,6 +18,8 @@ static void enter_cmdline(void)
/* Enter endless command line prompt, should support "exit" */
while (1) {
cmdline = edit_cmdline("syslinux$", 1, NULL, NULL);
+ if (!cmdline)
+ continue;
/* feng: give up the aux check here */
//aux = list_entry(cli_history_head.next, typeof(*aux), list);
//if (strcmp(aux->command, cmdline)) {
More information about the Syslinux-commits
mailing list