[syslinux] [PATCH 3/3] elflink: handle the NULL return of edit_cmdline
Liu Aleaxander
aleaxander at gmail.com
Sun Oct 3 08:54:06 PDT 2010
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>
---
core/elflink/load_env32.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/core/elflink/load_env32.c b/core/elflink/load_env32.c
index 26ad01f..8e1cfbb 100644
--- a/core/elflink/load_env32.c
+++ b/core/elflink/load_env32.c
@@ -73,6 +73,8 @@ 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)) {
--
1.7.2.3
More information about the Syslinux
mailing list