search for: edit_cmdline

Displaying 20 results from an estimated 20 matches for "edit_cmdline".

2010 Oct 03
3
[PATCH 0/3] elflink: Another small fixes on CLI
Hi, This is a another small set of fixes about CLI on elflink branch. Liu Aleaxander (3): elflink: use 'input' as the prompt of the CLI elflink: Add ctrl-R key bind support elflink: handle the NULL return of edit_cmdline core/elflink/cli.c | 88 +++++++++++++++++++++++++++++++++++++++++--- core/elflink/load_env32.c | 4 ++- 2 files changed, 85 insertions(+), 7 deletions(-) -- 1.7.2.3
2011 Mar 16
0
[GIT PULL] elflink changes
...Fix the wrong malloc size in enter_cmdline elflink: Do clear screen even if we have no pDraw_Menu method elflink: Add Ctrl-p + Ctrl-n key binds elflink: use 'input' as the prompt of the CLI elflink: Add ctrl-R key bind support elflink: handle the NULL return of edit_cmdline com32/elflink/ldlinux/cli.c | 102 ++++++++++++++++++++++++++++++++++----- com32/elflink/ldlinux/ldlinux.c | 4 +- 2 files changed, 92 insertions(+), 14 deletions(-) diff --git a/com32/elflink/ldlinux/cli.c b/com32/elflink/ldlinux/cli.c index 77d32cd..defc6d0 100644 --- a/com32/elflink/l...
2011 Apr 01
1
[GIT PULL] elflink ldlinux
The following changes since commit 8c576f1fe03e34879921311f46613a35c6530000: Merge remote-tracking branch 'mfleming/for-hpa/elflink/fix-compiler-warnings' into elflink (2011-03-16 12:53:58 -0700) are available in the git repository at: git://git.zytor.com/users/mfleming/syslinux.git for-hpa/elflink/ldlinux Matt Fleming (1): ldlinux: Perform auto-boot if NOESCAPE set in config
2015 Oct 13
2
[PATCH 1/1] ldlinux: Fix return pointer to local data
...il.com> --- com32/elflink/ldlinux/cli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com32/elflink/ldlinux/cli.c b/com32/elflink/ldlinux/cli.c index 6ff30c6..3119b11 100644 --- a/com32/elflink/ldlinux/cli.c +++ b/com32/elflink/ldlinux/cli.c @@ -125,7 +125,7 @@ const char *edit_cmdline(const char *input, int top /*, int width */ , int (*pDraw_Menu) (int, int, int), void (*show_fkey) (int), bool *timedout) { - char cmdline[MAX_CMDLINE_LEN] = { }; + static char cmdline[MAX_CMDLINE_LEN] = { }; int key, len, prev_len, cursor; int redraw = 0; int x, y;...
2011 Apr 01
0
[GIT PULL] elflink cmdline
...dex 172a9f6..0884525 100644 --- a/com32/elflink/ldlinux/cli.c +++ b/com32/elflink/ldlinux/cli.c @@ -18,6 +18,7 @@ #include "getkey.h" #include "menu.h" #include "cli.h" +#include "config.h" static jmp_buf timeout_jump; @@ -394,6 +395,26 @@ const char *edit_cmdline(const char *input, int top /*, int width */ , redraw = 1; } break; + case KEY_TAB: + { + const char *p; + size_t len; + + /* Label completion enabled? */ + if (nocomplete) + break; + + p = cmdline; + len = 0; + while(*p && !my_isspace(*p)) { +...
2010 Oct 02
4
[PATCH 0/4] some fixes on elflink branch
This is a small set of patches for elflink branch based on feng's elflink branch. hpa, It seems that I can't log on terminus by ssh at home. So I can't push these patches on my git tree. Liu Aleaxander (4): elflink: Cleanup some warnings elflink: Fix the wrong malloc size in enter_cmdline elflink: Do clear screen even if we have no pDraw_Menu method elflink: Add Ctrl-p +
2012 May 04
3
[GIT PULL] elflink fixes
...const char * cmd_reverse_search(int *cursor) eprintf("\033[1G\033[1;36m(reverse-i-search)`': \033[0m"); while (1) { - key = mygetkey(0); + key = mygetkey_timeout(kbd_to, tto); if (key == KEY_CTRL('C')) { return NULL; @@ -140,6 +129,8 @@ const char *edit_cmdline(const char *input, int top /*, int width */ , const char *ret; int width = 0; struct cli_command *comm_counter = NULL; + clock_t kbd_to = kbdtimeout; + clock_t tto = totaltimeout; if (!width) { int height; @@ -205,9 +196,13 @@ const char *edit_cmdline(const char *input...
2013 Sep 16
0
[PATCH 1/2] com32: Fix bugs on cmd_reverse_search (Triple fault dimension)
...) { p = strstr(last_found->command, buf); if (p) break; + + if (list_is_last(&last_found->list, &cli_history_head)) + break; + last_found = list_entry(last_found->list.next, typeof(*last_found), list); } @@ -391,7 +395,7 @@ const char *edit_cmdline(const char *input, int top /*, int width */ , len = strlen(cmdline); } else { cmdline[0] = '\0'; - len = 0; + cursor = len = 0; } redraw = 1; } @@ -441,6 +445,9 @@ const char *edit_cmdline(const char *input, int top /*, int...
2013 Sep 17
1
[PATCH 3/4 v2] com32: Fix bugs on cmd_reverse_search (Triple fault dimension)
...(last_found) { p = strstr(last_found->command, buf); if (p) break; + + if (list_is_last(&last_found->list, &cli_history_head)) + break; + last_found = list_entry(last_found->list.next, typeof(*last_found), list); } @@ -391,7 +395,7 @@ const char *edit_cmdline(const char *input, int top /*, int width */ , len = strlen(cmdline); } else { cmdline[0] = '\0'; - len = 0; + cursor = len = 0; } redraw = 1; } @@ -441,6 +445,9 @@ const char *edit_cmdline(const char *input, int top /*, int...
2013 Sep 16
1
[PATCH 2/2] com32: Fix a bug on history of commands.
...32/elflink/ldlinux/cli.c | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/com32/elflink/ldlinux/cli.c b/com32/elflink/ldlinux/cli.c index b70224a..d661119 100644 --- a/com32/elflink/ldlinux/cli.c +++ b/com32/elflink/ldlinux/cli.c @@ -461,11 +461,14 @@ const char *edit_cmdline(const char *input, int top /*, int width */ , printf("\033[?7h"); - /* Add the command to the history */ - comm_counter = malloc(sizeof(struct cli_command)); - comm_counter->command = malloc(sizeof(char) * (strlen(ret) + 1)); - strcpy(comm_counter->command, ret)...
2011 Feb 17
5
[PATCH 0/4] Reduce core size
From: Matt Fleming <matt.fleming at linux.intel.com> These patches are based on the elflink branch. This set of patches is my attempt at moving the command-line interface functionality out of the core and into an ELF module to reduce the size of the core. The most interesting patch is [PATCH 4/4] which moves the cli code out of core/elflink and into com32/elflink/modules. [PATCH 4/4] is
2012 Nov 02
10
[PATCH 0/9] elflink fixes
From: Matt Fleming <matt.fleming at intel.com> Here are the patches that I've got queued up based on the very helpful feedback I received from people testing Syslinux 5.00-pre9. Unless anyone has any concerns these will make it into Syslinux 5.00-pre10. Matt Fleming (9): pxe: Don't call open_config() from the pxe core ldlinux: Print a warning if no config file is found
2015 Oct 16
0
[PATCH 1/1] ldlinux: Fix return pointer to local data
...ux/cli.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/com32/elflink/ldlinux/cli.c b/com32/elflink/ldlinux/cli.c > index 6ff30c6..3119b11 100644 > --- a/com32/elflink/ldlinux/cli.c > +++ b/com32/elflink/ldlinux/cli.c > @@ -125,7 +125,7 @@ const char *edit_cmdline(const char *input, int top /*, int width */ , > int (*pDraw_Menu) (int, int, int), > void (*show_fkey) (int), bool *timedout) > { > - char cmdline[MAX_CMDLINE_LEN] = { }; > + static char cmdline[MAX_CMDLINE_LEN] = { }; > int key, len, prev_len, cursor; >...
2015 Oct 19
0
ldlinux: Fix return pointer to local data
...ux/cli.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/com32/elflink/ldlinux/cli.c b/com32/elflink/ldlinux/cli.c > index 6ff30c6..3119b11 100644 > --- a/com32/elflink/ldlinux/cli.c > +++ b/com32/elflink/ldlinux/cli.c > @@ -125,7 +125,7 @@ const char *edit_cmdline(const char *input, int top /*, int width */ , > int (*pDraw_Menu) (int, int, int), > void (*show_fkey) (int), bool *timedout) > { > - char cmdline[MAX_CMDLINE_LEN] = { }; > + static char cmdline[MAX_CMDLINE_LEN] = { }; > int key, len, prev_len, cursor; >...
2019 Apr 22
0
Fix: previous command at boot prompt not cleared
...mpt result in the completion of 'bogus' instead of completing all. Regards, Dany *Patch* --- syslinux-6.03/com32/elflink/ldlinux/cli.c.orig 2019-04-22 08:03:41.344301939 -0500 +++ syslinux-6.03/com32/elflink/ldlinux/cli.c 2019-04-22 08:04:49.188877232 -0500 @@ -145,6 +145,7 @@ const char *edit_cmdline(const char *inp len = cursor = 0; prev_len = 0; x = y = 0; + cmdline[0] = 0; /* * Before we start messing with the x,y coordinates print 'input'
2013 Sep 17
1
[PATCH 4/4 v2] com32: Fix a bug on history of commands.
...32/elflink/ldlinux/cli.c | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/com32/elflink/ldlinux/cli.c b/com32/elflink/ldlinux/cli.c index a50124c..6ff30c6 100644 --- a/com32/elflink/ldlinux/cli.c +++ b/com32/elflink/ldlinux/cli.c @@ -461,11 +461,14 @@ const char *edit_cmdline(const char *input, int top /*, int width */ , printf("\033[?7h"); - /* Add the command to the history */ - comm_counter = malloc(sizeof(struct cli_command)); - comm_counter->command = malloc(sizeof(char) * (strlen(ret) + 1)); - strcpy(comm_counter->command, ret);...
2011 Mar 09
14
[PATCH 00/12] elflink shrinkage
From: Matt Fleming <matt.fleming at linux.intel.com> This is a series of patches that, * shrink the core by moving things into an ldlinux ELF module * begin wiring up some of the C versions of various functions The core now only contains essential code and loads the ldlinux module to do everything else, like providing a command line interface and loading kernels. The config file parsing
2012 Apr 17
2
[GIT PULL] elflink warning fixes and auto extension support
...tic const char * cmd_reverse_search(int *cursor) break; } - while (last_found != &cli_history_head) { + while (!list_is_last(&last_found->list, &cli_history_head)) { p = strstr(last_found->command, buf); if (p) break; @@ -139,7 +139,7 @@ const char *edit_cmdline(const char *input, int top /*, int width */ , bool done = false; const char *ret; int width = 0; - struct cli_command *comm_counter; + struct cli_command *comm_counter = NULL; if (!width) { int height; diff --git a/com32/elflink/ldlinux/config.h b/com32/elflink/ldlinux...
2012 Mar 23
19
[PATCH 00/19][elflink] Improve compatibility with 4.x
From: Matt Fleming <matt.fleming at intel.com> The following patch series is available at, git://git.zytor.com/users/mfleming/syslinux.git elflink All patches are against the 'elflink' branch. This series fixes a few serious bugs and some behavioural incompatibilities with the 4.x series. Matt Fleming (19): ldlinux: Initialise 'p' before using it. ldlinux: Parse
2011 Apr 16
20
[PATCH 00/20] Switch to ELF modules
From: Matt Fleming <matt.fleming at linux.intel.com> This series fixes some bugs and switches the elflink branch to be entirely ELF modules. It applies on top of, http://syslinux.zytor.com/archives/2011-April/016369.html The deletions in the diff stat below are mainly from deleting com32/elflink/modules (finally!). Now there should be no duplicate code because we don't need COM32 and