svn commit: trunk/busybox: init libbb
vda at busybox.net
vda at busybox.net
Fri Feb 2 18:42:49 PST 2007
Author: vda
Date: 2007-02-02 18:42:47 -0800 (Fri, 02 Feb 2007)
New Revision: 17734
Log:
lineedit: add missing #if/#endif
init: fix warnings
Modified:
trunk/busybox/init/init.c
trunk/busybox/libbb/lineedit.c
Changeset:
Modified: trunk/busybox/init/init.c
===================================================================
--- trunk/busybox/init/init.c 2007-02-03 02:17:41 UTC (rev 17733)
+++ trunk/busybox/init/init.c 2007-02-03 02:42:47 UTC (rev 17734)
@@ -727,20 +727,19 @@
static void shutdown_signal(int sig)
{
- char *m;
+ const char *m;
int rb;
shutdown_system();
+ m = "halt";
+ rb = RB_HALT_SYSTEM;
if (sig == SIGTERM) {
m = "reboot";
rb = RB_AUTOBOOT;
} else if (sig == SIGUSR2) {
m = "poweroff";
rb = RB_POWER_OFF;
- } else {
- m = "halt";
- rb = RB_HALT_SYSTEM;
}
message(CONSOLE | LOG, "Requesting system %s.", m);
sync();
@@ -775,7 +774,7 @@
got_cont = 1;
}
-#endif /* ! ENABLE_DEBUG_INIT */
+#endif /* !ENABLE_DEBUG_INIT */
static void new_init_action(int action, const char *command, const char *cons)
{
Modified: trunk/busybox/libbb/lineedit.c
===================================================================
--- trunk/busybox/libbb/lineedit.c 2007-02-03 02:17:41 UTC (rev 17733)
+++ trunk/busybox/libbb/lineedit.c 2007-02-03 02:42:47 UTC (rev 17734)
@@ -1269,8 +1269,10 @@
/* With null flags, no other fields are ever used */
state = st ? st : (line_input_t*) &const_int_0;
+#if ENABLE_FEATURE_EDITING_SAVEHISTORY
if (state->flags & SAVE_HISTORY)
load_history(state->hist_file);
+#endif
/* prepare before init handlers */
cmdedit_y = 0; /* quasireal y, not true if line > xt*yt */
More information about the busybox-cvs
mailing list