diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-02-03 02:42:47 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-02-03 02:42:47 +0000 |
commit | e968fcd562da08591b0f7990b839174ad93fc7b4 (patch) | |
tree | b384ef17e45d26a9e73b60c04eeb2935211661ef | |
parent | 4921b54f37125a58d5ea1a8aac886ae781517bc1 (diff) | |
download | busybox-w32-e968fcd562da08591b0f7990b839174ad93fc7b4.tar.gz busybox-w32-e968fcd562da08591b0f7990b839174ad93fc7b4.tar.bz2 busybox-w32-e968fcd562da08591b0f7990b839174ad93fc7b4.zip |
lineedit: add missing #if/#endif
init: fix warnings
-rw-r--r-- | init/init.c | 9 | ||||
-rw-r--r-- | libbb/lineedit.c | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/init/init.c b/init/init.c index 110af8566..b652bc1f4 100644 --- a/init/init.c +++ b/init/init.c | |||
@@ -727,20 +727,19 @@ static void exec_signal(int sig ATTRIBUTE_UNUSED) | |||
727 | 727 | ||
728 | static void shutdown_signal(int sig) | 728 | static void shutdown_signal(int sig) |
729 | { | 729 | { |
730 | char *m; | 730 | const char *m; |
731 | int rb; | 731 | int rb; |
732 | 732 | ||
733 | shutdown_system(); | 733 | shutdown_system(); |
734 | 734 | ||
735 | m = "halt"; | ||
736 | rb = RB_HALT_SYSTEM; | ||
735 | if (sig == SIGTERM) { | 737 | if (sig == SIGTERM) { |
736 | m = "reboot"; | 738 | m = "reboot"; |
737 | rb = RB_AUTOBOOT; | 739 | rb = RB_AUTOBOOT; |
738 | } else if (sig == SIGUSR2) { | 740 | } else if (sig == SIGUSR2) { |
739 | m = "poweroff"; | 741 | m = "poweroff"; |
740 | rb = RB_POWER_OFF; | 742 | rb = RB_POWER_OFF; |
741 | } else { | ||
742 | m = "halt"; | ||
743 | rb = RB_HALT_SYSTEM; | ||
744 | } | 743 | } |
745 | message(CONSOLE | LOG, "Requesting system %s.", m); | 744 | message(CONSOLE | LOG, "Requesting system %s.", m); |
746 | sync(); | 745 | sync(); |
@@ -775,7 +774,7 @@ static void cont_handler(int sig ATTRIBUTE_UNUSED) | |||
775 | got_cont = 1; | 774 | got_cont = 1; |
776 | } | 775 | } |
777 | 776 | ||
778 | #endif /* ! ENABLE_DEBUG_INIT */ | 777 | #endif /* !ENABLE_DEBUG_INIT */ |
779 | 778 | ||
780 | static void new_init_action(int action, const char *command, const char *cons) | 779 | static void new_init_action(int action, const char *command, const char *cons) |
781 | { | 780 | { |
diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 343890868..937d70d1f 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c | |||
@@ -1269,8 +1269,10 @@ int read_line_input(const char* prompt, char* command, int maxsize, line_input_t | |||
1269 | 1269 | ||
1270 | /* With null flags, no other fields are ever used */ | 1270 | /* With null flags, no other fields are ever used */ |
1271 | state = st ? st : (line_input_t*) &const_int_0; | 1271 | state = st ? st : (line_input_t*) &const_int_0; |
1272 | #if ENABLE_FEATURE_EDITING_SAVEHISTORY | ||
1272 | if (state->flags & SAVE_HISTORY) | 1273 | if (state->flags & SAVE_HISTORY) |
1273 | load_history(state->hist_file); | 1274 | load_history(state->hist_file); |
1275 | #endif | ||
1274 | 1276 | ||
1275 | /* prepare before init handlers */ | 1277 | /* prepare before init handlers */ |
1276 | cmdedit_y = 0; /* quasireal y, not true if line > xt*yt */ | 1278 | cmdedit_y = 0; /* quasireal y, not true if line > xt*yt */ |