Displaying 14 results from an estimated 14 matches for "cli_history_head".
2011 Mar 16
0
[GIT PULL] elflink changes
...@ int mygetkey(clock_t timeout)
}
}
+static const char * cmd_reverse_search(int *cursor)
+{
+ int key;
+ int i = 0;
+ char buf[MAX_CMDLINE_LEN];
+ const char *p = NULL;
+ struct cli_command *last_found;
+ struct cli_command *last_good = NULL;
+
+ last_found = list_entry(cli_history_head.next, typeof(*last_found), list);
+
+ memset(buf, 0, MAX_CMDLINE_LEN);
+
+ printf("\033[1G\033[1;36m(reverse-i-search)`': \033[0m");
+ while (1) {
+ key = mygetkey(0);
+
+ if (key == KEY_CTRL('C')) {
+ return NULL;
+ } else if (key == KEY_CTRL('R'))...
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
2013 Sep 16
1
[PATCH 2/2] com32: Fix a bug on history of commands.
...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);
- list_add(&(comm_counter->list), &cli_history_head);
+ /* Add the command to the history if its length is larger than 0 */
+ len = strlen(ret);
+ if (len > 0) {
+ comm_counter = malloc(sizeof(struct cli_command));
+ comm_counter->command = malloc(sizeof(char) * (len + 1));
+ strcpy(comm_counter->command, ret);
+ list_add(&(com...
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
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 +
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
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
2013 Sep 16
0
[PATCH 1/2] com32: Fix bugs on cmd_reverse_search (Triple fault dimension)
...nux/cli.c b/com32/elflink/ldlinux/cli.c
index 7c4f14c..b70224a 100644
--- a/com32/elflink/ldlinux/cli.c
+++ b/com32/elflink/ldlinux/cli.c
@@ -89,10 +89,14 @@ static const char * cmd_reverse_search(int *cursor, clock_t *kbd_to,
break;
}
- while (!list_is_last(&last_found->list, &cli_history_head)) {
+ while (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,...
2013 Sep 17
1
[PATCH 4/4 v2] com32: Fix a bug on history of commands.
...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);
- list_add(&(comm_counter->list), &cli_history_head);
+ /* Add the command to the history if its length is larger than 0 */
+ len = strlen(ret);
+ if (len > 0) {
+ comm_counter = malloc(sizeof(struct cli_command));
+ comm_counter->command = malloc(sizeof(char) * (len + 1));
+ strcpy(comm_counter->command, ret);
+ list_add(&(com...
2013 Sep 17
1
[PATCH 3/4 v2] com32: Fix bugs on cmd_reverse_search (Triple fault dimension)
...inux/cli.c b/com32/elflink/ldlinux/cli.c
index 7c4f14c..a50124c 100644
--- a/com32/elflink/ldlinux/cli.c
+++ b/com32/elflink/ldlinux/cli.c
@@ -89,10 +89,14 @@ static const char * cmd_reverse_search(int *cursor, clock_t *kbd_to,
break;
}
- while (!list_is_last(&last_found->list, &cli_history_head)) {
+ while (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 @@...
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 May 04
3
[GIT PULL] elflink fixes
...--git a/com32/elflink/ldlinux/cli.c b/com32/elflink/ldlinux/cli.c
index 498644e..211a796 100644
--- a/com32/elflink/ldlinux/cli.c
+++ b/com32/elflink/ldlinux/cli.c
@@ -19,8 +19,6 @@
#include "cli.h"
#include "config.h"
-static jmp_buf timeout_jump;
-
static struct list_head cli_history_head;
void clear_screen(void)
@@ -29,46 +27,37 @@ void clear_screen(void)
fputs("\033e\033%@\033)0\033(B\1#0\033[?25l\033[2J", stdout);
}
-int mygetkey(clock_t timeout)
+static int mygetkey_timeout(clock_t *kbd_to, clock_t *tto)
{
- clock_t t0, t;
- clock_t tto, to;
+ cloc...
2012 Apr 17
2
[GIT PULL] elflink warning fixes and auto extension support
...2sys_t reg;
diff --git a/com32/elflink/ldlinux/cli.c b/com32/elflink/ldlinux/cli.c
index fb041ae..498644e 100644
--- a/com32/elflink/ldlinux/cli.c
+++ b/com32/elflink/ldlinux/cli.c
@@ -99,7 +99,7 @@ static 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;
in...
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