svn commit: trunk/busybox: applets include libbb scripts shell sysk etc...
vodz at busybox.net
vodz at busybox.net
Thu Feb 16 15:40:29 UTC 2006
Author: vodz
Date: 2006-02-16 07:40:24 -0800 (Thu, 16 Feb 2006)
New Revision: 14080
Log:
moved BB_BANNER to applets/version.c file: make kernel like version,
removed depend loop: busybox.h depend with BB_BT, and all sources depend with busybox.h
Modified:
trunk/busybox/applets/Makefile.in
trunk/busybox/include/busybox.h
trunk/busybox/libbb/messages.c
trunk/busybox/scripts/bb_mkdep.c
trunk/busybox/shell/ash.c
trunk/busybox/shell/hush.c
trunk/busybox/shell/lash.c
trunk/busybox/shell/msh.c
trunk/busybox/sysklogd/klogd.c
trunk/busybox/sysklogd/syslogd.c
Changeset:
Modified: trunk/busybox/applets/Makefile.in
===================================================================
--- trunk/busybox/applets/Makefile.in 2006-02-16 15:32:30 UTC (rev 14079)
+++ trunk/busybox/applets/Makefile.in 2006-02-16 15:40:24 UTC (rev 14080)
@@ -10,7 +10,7 @@
endif
srcdir=$(top_srcdir)/applets
-APPLET_SRC:= $(patsubst %,$(srcdir)/%,applets.c busybox.c)
+APPLET_SRC:= $(patsubst %,$(srcdir)/%,applets.c busybox.c version.c)
APPLET_OBJ:= $(patsubst $(srcdir)/%.c,$(APPLETS_DIR)%.o, $(APPLET_SRC))
APPLET_SRC-y+=$(APPLET_SRC)
Modified: trunk/busybox/include/busybox.h
===================================================================
--- trunk/busybox/include/busybox.h 2006-02-16 15:32:30 UTC (rev 14079)
+++ trunk/busybox/include/busybox.h 2006-02-16 15:40:24 UTC (rev 14080)
@@ -21,11 +21,7 @@
#error "Sorry, this libc version is not supported :("
#endif
-#ifndef BB_EXTRA_VERSION
-#define BB_BANNER "BusyBox v" BB_VER " (" BB_BT ")"
-#else
-#define BB_BANNER "BusyBox v" BB_VER " (" BB_EXTRA_VERSION ")"
-#endif
+extern const char BB_BANNER[];
#include <features.h>
Modified: trunk/busybox/libbb/messages.c
===================================================================
--- trunk/busybox/libbb/messages.c 2006-02-16 15:32:30 UTC (rev 14079)
+++ trunk/busybox/libbb/messages.c 2006-02-16 15:40:24 UTC (rev 14080)
@@ -22,8 +22,13 @@
#include "libbb.h"
#ifdef L_full_version
- const char * const bb_msg_full_version = BB_BANNER " multi-call binary";
+#ifndef BB_EXTRA_VERSION
+#define LIBBB_BANNER "BusyBox's library v" BB_VER " (" BB_BT ")"
+#else
+#define LIBBB_BANNER "BusyBox's library v" BB_VER " (" BB_EXTRA_VERSION ")"
#endif
+ const char * const libbb_msg_full_version = LIBBB_BANNER;
+#endif
#ifdef L_memory_exhausted
const char * const bb_msg_memory_exhausted = "memory exhausted";
#endif
Modified: trunk/busybox/scripts/bb_mkdep.c
===================================================================
--- trunk/busybox/scripts/bb_mkdep.c 2006-02-16 15:32:30 UTC (rev 14079)
+++ trunk/busybox/scripts/bb_mkdep.c 2006-02-16 15:40:24 UTC (rev 14080)
@@ -1,5 +1,5 @@
/*
- * Another fast dependencies generator for Makefiles, Version 4.1
+ * Another fast dependencies generator for Makefiles, Version 4.2
*
* Copyright (C) 2005,2006 by Vladimir Oleynik <dzo at simtreas.ru>
*
@@ -1261,6 +1261,7 @@
llist_t *lo;
char *ap;
size_t key_sz;
+ struct stat st;
if(*include == '/') {
lo = NULL;
@@ -1284,8 +1285,18 @@
free(ap);
return;
}
- if(access(ap, F_OK) == 0) {
+ if(stat(ap, &st) == 0) {
/* found */
+ llist_t *cfl;
+
+ for(cfl = configs; cfl; cfl = cfl->link) {
+ struct stat *config = (struct stat *)cfl->data;
+
+ if (st.st_dev == config->st_dev && st.st_ino == config->st_ino) {
+ /* skip depend with bb_configs.h */
+ return NULL;
+ }
+ }
p_i = ap;
break;
} else if(lo == NULL) {
@@ -1501,7 +1512,7 @@
struct stat *config = (struct stat *)cfl->data;
if (st.st_dev == config->st_dev && st.st_ino == config->st_ino) {
- /* skip already parsed configs.h */
+ /* skip already parsed bb_configs.h */
return NULL;
}
}
Modified: trunk/busybox/shell/ash.c
===================================================================
--- trunk/busybox/shell/ash.c 2006-02-16 15:32:30 UTC (rev 14079)
+++ trunk/busybox/shell/ash.c 2006-02-16 15:40:24 UTC (rev 14080)
@@ -11833,8 +11833,9 @@
if(!do_banner) {
out1fmt(
- "\n\n" BB_BANNER " Built-in shell (ash)\n"
- "Enter 'help' for a list of built-in commands.\n\n");
+ "\n\n%s Built-in shell (ash)\n"
+ "Enter 'help' for a list of built-in commands.\n\n",
+ BB_BANNER);
do_banner++;
}
}
Modified: trunk/busybox/shell/hush.c
===================================================================
--- trunk/busybox/shell/hush.c 2006-02-16 15:32:30 UTC (rev 14079)
+++ trunk/busybox/shell/hush.c 2006-02-16 15:40:24 UTC (rev 14080)
@@ -104,7 +104,7 @@
#include "standalone.h"
#define hush_main main
#undef CONFIG_FEATURE_SH_FANCY_PROMPT
-#define BB_BANNER
+#define BB_BANNER ""
#endif
#define SPECIAL_VAR_SYMBOL 03
#define FLAG_EXIT_FROM_LOOP 1
@@ -2812,7 +2812,8 @@
if (interactive) {
/* Looks like they want an interactive shell */
#ifndef CONFIG_FEATURE_SH_EXTRA_QUIET
- printf( "\n\n" BB_BANNER " hush - the humble shell v0.01 (testing)\n");
+ printf( "\n\n%s hush - the humble shell v0.01 (testing)\n",
+ BB_BANNER);
printf( "Enter 'help' for a list of built-in commands.\n\n");
#endif
setup_job_control();
Modified: trunk/busybox/shell/lash.c
===================================================================
--- trunk/busybox/shell/lash.c 2006-02-16 15:32:30 UTC (rev 14079)
+++ trunk/busybox/shell/lash.c 2006-02-16 15:40:24 UTC (rev 14080)
@@ -1661,7 +1661,7 @@
//printf( "optind=%d argv[optind]='%s'\n", optind, argv[optind]);
/* Looks like they want an interactive shell */
#ifndef CONFIG_FEATURE_SH_EXTRA_QUIET
- printf( "\n\n" BB_BANNER " Built-in shell (lash)\n");
+ printf( "\n\n%s Built-in shell (lash)\n", BB_BANNER);
printf( "Enter 'help' for a list of built-in commands.\n\n");
#endif
} else if (local_pending_command==NULL) {
Modified: trunk/busybox/shell/msh.c
===================================================================
--- trunk/busybox/shell/msh.c 2006-02-16 15:32:30 UTC (rev 14079)
+++ trunk/busybox/shell/msh.c 2006-02-16 15:40:24 UTC (rev 14080)
@@ -956,9 +956,9 @@
interactive++;
#ifndef CONFIG_FEATURE_SH_EXTRA_QUIET
#ifdef MSHDEBUG
- printf("\n\n" BB_BANNER " Built-in shell (msh with debug)\n");
+ printf("\n\n%s Built-in shell (msh with debug)\n", BB_BANNER);
#else
- printf("\n\n" BB_BANNER " Built-in shell (msh)\n");
+ printf("\n\n%s Built-in shell (msh)\n", BB_BANNER);
#endif
printf("Enter 'help' for a list of built-in commands.\n\n");
#endif
Modified: trunk/busybox/sysklogd/klogd.c
===================================================================
--- trunk/busybox/sysklogd/klogd.c 2006-02-16 15:32:30 UTC (rev 14079)
+++ trunk/busybox/sysklogd/klogd.c 2006-02-16 15:40:24 UTC (rev 14080)
@@ -61,7 +61,7 @@
if (console_log_level != -1)
klogctl(8, NULL, console_log_level);
- syslog(LOG_NOTICE, "klogd started: " BB_BANNER);
+ syslog(LOG_NOTICE, "klogd started: %s", BB_BANNER);
while (1) {
/* Use kernel syscalls */
Modified: trunk/busybox/sysklogd/syslogd.c
===================================================================
--- trunk/busybox/sysklogd/syslogd.c 2006-02-16 15:32:30 UTC (rev 14079)
+++ trunk/busybox/sysklogd/syslogd.c 2006-02-16 15:40:24 UTC (rev 14080)
@@ -568,7 +568,7 @@
}
#endif
- logMessage(LOG_SYSLOG | LOG_INFO, "syslogd started: " BB_BANNER);
+ logMessage(LOG_SYSLOG | LOG_INFO, "syslogd started: " "BusyBox v" BB_VER );
for (;;) {
More information about the busybox-cvs
mailing list