Fix kbuild bugs noticed by Bernhard Fischer <rep.nop@aon.at>

This commit is contained in:
Denis Vlasenko 2006-11-02 22:09:37 +00:00
parent dd539f7687
commit 9d4533ede1
3 changed files with 14 additions and 15 deletions

View File

@ -53,7 +53,7 @@ config FTPPUT
config FEATURE_FTPGETPUT_LONG_OPTIONS config FEATURE_FTPGETPUT_LONG_OPTIONS
bool "Enable long options in ftpget/ftpput" bool "Enable long options in ftpget/ftpput"
default n default n
depends on GETOPT_LONG && (CONFIG_FTPGET || FTPPUT) depends on GETOPT_LONG && (FTPGET || FTPPUT)
help help
Support long options for the ftpget/ftpput applet. Support long options for the ftpget/ftpput applet.
@ -239,20 +239,20 @@ config FEATURE_IFUPDOWN_IP_BUILTIN
help help
Use the busybox iproute "ip" applet to implement "ifupdown". Use the busybox iproute "ip" applet to implement "ifupdown".
If leave this disabled, you must install the full-blown iproute2 If left disabled, you must install the full-blown iproute2
utility or the "ifup" and "ifdown" applets will not work. utility or the "ifup" and "ifdown" applets will not work.
config FEATURE_IFUPDOWN_IP_BUILTIN config FEATURE_IFUPDOWN_IFCONFIG_BUILTIN
bool "Use busybox ifconfig and route applets" bool "Use busybox ifconfig and route applets"
default y default y
depends on IFUPDOWN && !CONFIG_FEATURE_IFUPDOWN_IP depends on IFUPDOWN && !FEATURE_IFUPDOWN_IP
select IFCONFIG select IFCONFIG
select ROUTE select ROUTE
help help
Use the busybox iproute "ifconfig" and "route" applets to Use the busybox iproute "ifconfig" and "route" applets to
implement the "ifup" and "ifdown" utilities. implement the "ifup" and "ifdown" utilities.
If leave this disabled, you must install the full-blown ifconfig If left disabled, you must install the full-blown ifconfig
and route utilities, or the "ifup" and "ifdown" applets will not and route utilities, or the "ifup" and "ifdown" applets will not
work. work.

View File

@ -257,6 +257,7 @@ config FEATURE_COMMAND_EDITING_VI
config FEATURE_COMMAND_HISTORY config FEATURE_COMMAND_HISTORY
int "History size" int "History size"
range 0 99999
default 15 default 15
depends on FEATURE_COMMAND_EDITING depends on FEATURE_COMMAND_EDITING
help help

View File

@ -83,12 +83,10 @@
#ifndef CONFIG_FEATURE_COMMAND_HISTORY #ifndef CONFIG_FEATURE_COMMAND_HISTORY
#define MAX_HISTORY 15 #define MAX_HISTORY 15
#else #else
#define MAX_HISTORY CONFIG_FEATURE_COMMAND_HISTORY #define MAX_HISTORY (CONFIG_FEATURE_COMMAND_HISTORY + 0)
#endif #endif
#if MAX_HISTORY < 1 #if MAX_HISTORY > 0
#warning cmdedit: You set MAX_HISTORY < 1. The history algorithm switched off.
#else
static char *history[MAX_HISTORY+1]; /* history + current */ static char *history[MAX_HISTORY+1]; /* history + current */
/* saved history lines */ /* saved history lines */
static int n_history; static int n_history;
@ -1166,7 +1164,7 @@ static void input_tab(int *lastWasTab)
} }
#endif /* CONFIG_FEATURE_COMMAND_TAB_COMPLETION */ #endif /* CONFIG_FEATURE_COMMAND_TAB_COMPLETION */
#if MAX_HISTORY >= 1 #if MAX_HISTORY > 0
static void get_previous_history(void) static void get_previous_history(void)
{ {
if(command_ps[0] != 0 || history[cur_history] == 0) { if(command_ps[0] != 0 || history[cur_history] == 0) {
@ -1529,7 +1527,7 @@ prepare_to_die:
printf("\033[H"); printf("\033[H");
redraw(0, len-cursor); redraw(0, len-cursor);
break; break;
#if MAX_HISTORY >= 1 #if MAX_HISTORY > 0
case CNTRL('N'): case CNTRL('N'):
vi_case( case CNTRL('N')|vbit: ) vi_case( case CNTRL('N')|vbit: )
vi_case( case 'j'|vbit: ) vi_case( case 'j'|vbit: )
@ -1730,7 +1728,7 @@ prepare_to_die:
input_tab(&lastWasTab); input_tab(&lastWasTab);
break; break;
#endif #endif
#if MAX_HISTORY >= 1 #if MAX_HISTORY > 0
case 'A': case 'A':
/* Up Arrow -- Get previous command from history */ /* Up Arrow -- Get previous command from history */
if (cur_history > 0) { if (cur_history > 0) {
@ -1838,7 +1836,7 @@ rewrite_line:
setTermSettings(0, (void *) &initial_settings); setTermSettings(0, (void *) &initial_settings);
handlers_sets &= ~SET_RESET_TERM; handlers_sets &= ~SET_RESET_TERM;
#if MAX_HISTORY >= 1 #if MAX_HISTORY > 0
/* Handle command history log */ /* Handle command history log */
/* cleanup may be saved current command line */ /* cleanup may be saved current command line */
if (len> 0) { /* no put empty line */ if (len> 0) { /* no put empty line */
@ -1859,13 +1857,13 @@ rewrite_line:
num_ok_lines++; num_ok_lines++;
#endif #endif
} }
#else /* MAX_HISTORY < 1 */ #else /* MAX_HISTORY == 0 */
#if defined(CONFIG_FEATURE_SH_FANCY_PROMPT) #if defined(CONFIG_FEATURE_SH_FANCY_PROMPT)
if (len > 0) { /* no put empty line */ if (len > 0) { /* no put empty line */
num_ok_lines++; num_ok_lines++;
} }
#endif #endif
#endif /* MAX_HISTORY >= 1 */ #endif /* MAX_HISTORY > 0 */
if (break_out > 0) { if (break_out > 0) {
command[len++] = '\n'; /* set '\n' */ command[len++] = '\n'; /* set '\n' */
command[len] = 0; command[len] = 0;