[syslinux] [GIT PULL] elflink fixes
Paulo Alcantara
pcacjr at zytor.com
Fri May 4 08:07:58 PDT 2012
Hi Matt,
From: Matt Fleming <matt at console-pimps.org>
Date: Fri, 04 May 2012 11:05:43 +0100
> -static const char * cmd_reverse_search(int *cursor)
> +static const char * cmd_reverse_search(int *cursor, clock_t *kbd_to,
> + clock_t *tto)
Please, fix coding style here.
E.g.: change "static const char * cmd_reserve..." to "static const char *cmd_reverse..."
> const char *default_cmd = NULL; //"default" command line
> const char *onerror = NULL; //"onerror" command line
> +const char *ontimeout = NULL; //"ontimeout" command line
Syslinux style for comments is the C89 /* ... */ style.
So could you please change these comments above accordingly ?
>
> /* Empty refstring */
> const char *empty_string;
> @@ -79,6 +80,7 @@ struct menu *root_menu, *start_menu, *hide_menu, *menu_list, *default_menu;
> int shiftkey = 0; /* Only display menu if shift key pressed */
> int hiddenmenu = 0;
> long long totaltimeout = 0;
> +unsigned int kbdtimeout = 0;
>
> /* Keep track of global default */
> static int has_ui = 0; /* DEFAULT only counts if UI is found */
> @@ -1081,13 +1083,14 @@ do_include:
> //dprintf("got a kernel: %s, type = %d", ld.kernel, ld.type);
> }
> } else if (looking_at(p, "timeout")) {
> - m->timeout = (atoi(skipspace(p + 7)) * CLK_TCK + 9) / 10;
> + kbdtimeout = (atoi(skipspace(p + 7)) * CLK_TCK + 9) / 10;
> } else if (looking_at(p, "totaltimeout")) {
> totaltimeout = (atoll(skipspace(p + 13)) * CLK_TCK + 9) / 10;
> } else if (looking_at(p, "ontimeout")) {
> - m->ontimeout = refstrdup(skipspace(p + 9));
> + ontimeout = refstrdup(skipspace(p + 9));
> + ontimeoutlen = strlen(ontimeout);
> } else if (looking_at(p, "allowoptions")) {
> - m->allowedit = !!atoi(skipspace(p + 12));
> + allowoptions = !!atoi(skipspace(p + 12));
> } else if (looking_at(p, "ipappend")) {
> if (ld.label)
> ld.ipappend = atoi(skipspace(p + 8));
> diff --git a/com32/include/menu.h b/com32/include/menu.h
> index 1db4d7c..ba6b9ce 100644
> --- a/com32/include/menu.h
> +++ b/com32/include/menu.h
> @@ -187,6 +187,7 @@ extern int shiftkey;
> extern int hiddenmenu;
> extern int clearmenu;
> extern long long totaltimeout;
> +extern clock_t kbdtimeout;
> extern const char *hide_key[KEY_MAX];
>
> void parse_configs(char **argv);
>
Looks good to me.
Thanks for the fixes!
Reviewed-by: Paulo Alcantara <pcacjr at zytor.com>
Paulo
More information about the Syslinux
mailing list