aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author"Vladimir N. Oleynik" <dzo@simtreas.ru>2006-02-16 15:40:24 +0000
committer"Vladimir N. Oleynik" <dzo@simtreas.ru>2006-02-16 15:40:24 +0000
commitdd1ccddf1b33972966760857092eb9b659b7a40a (patch)
tree311c032dd6a55cc3923e744d8e888d9edd9ede44
parent21e68703ce35805ff8b9590c22a400de05155ac2 (diff)
downloadbusybox-w32-dd1ccddf1b33972966760857092eb9b659b7a40a.tar.gz
busybox-w32-dd1ccddf1b33972966760857092eb9b659b7a40a.tar.bz2
busybox-w32-dd1ccddf1b33972966760857092eb9b659b7a40a.zip
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
-rw-r--r--applets/Makefile.in2
-rw-r--r--include/busybox.h6
-rw-r--r--libbb/messages.c7
-rw-r--r--scripts/bb_mkdep.c17
-rw-r--r--shell/ash.c5
-rw-r--r--shell/hush.c5
-rw-r--r--shell/lash.c2
-rw-r--r--shell/msh.c4
-rw-r--r--sysklogd/klogd.c2
-rw-r--r--sysklogd/syslogd.c2
10 files changed, 33 insertions, 19 deletions
diff --git a/applets/Makefile.in b/applets/Makefile.in
index a4890c2fb..02bcda93b 100644
--- a/applets/Makefile.in
+++ b/applets/Makefile.in
@@ -10,7 +10,7 @@ APPLETS_DIR:=$(top_builddir)/applets/
10endif 10endif
11srcdir=$(top_srcdir)/applets 11srcdir=$(top_srcdir)/applets
12 12
13APPLET_SRC:= $(patsubst %,$(srcdir)/%,applets.c busybox.c) 13APPLET_SRC:= $(patsubst %,$(srcdir)/%,applets.c busybox.c version.c)
14APPLET_OBJ:= $(patsubst $(srcdir)/%.c,$(APPLETS_DIR)%.o, $(APPLET_SRC)) 14APPLET_OBJ:= $(patsubst $(srcdir)/%.c,$(APPLETS_DIR)%.o, $(APPLET_SRC))
15 15
16APPLET_SRC-y+=$(APPLET_SRC) 16APPLET_SRC-y+=$(APPLET_SRC)
diff --git a/include/busybox.h b/include/busybox.h
index 9fb95036e..18f9dd56e 100644
--- a/include/busybox.h
+++ b/include/busybox.h
@@ -21,11 +21,7 @@
21#error "Sorry, this libc version is not supported :(" 21#error "Sorry, this libc version is not supported :("
22#endif 22#endif
23 23
24#ifndef BB_EXTRA_VERSION 24extern const char BB_BANNER[];
25#define BB_BANNER "BusyBox v" BB_VER " (" BB_BT ")"
26#else
27#define BB_BANNER "BusyBox v" BB_VER " (" BB_EXTRA_VERSION ")"
28#endif
29 25
30#include <features.h> 26#include <features.h>
31 27
diff --git a/libbb/messages.c b/libbb/messages.c
index e11dddc50..23f0ea2ba 100644
--- a/libbb/messages.c
+++ b/libbb/messages.c
@@ -22,7 +22,12 @@
22#include "libbb.h" 22#include "libbb.h"
23 23
24#ifdef L_full_version 24#ifdef L_full_version
25 const char * const bb_msg_full_version = BB_BANNER " multi-call binary"; 25#ifndef BB_EXTRA_VERSION
26#define LIBBB_BANNER "BusyBox's library v" BB_VER " (" BB_BT ")"
27#else
28#define LIBBB_BANNER "BusyBox's library v" BB_VER " (" BB_EXTRA_VERSION ")"
29#endif
30 const char * const libbb_msg_full_version = LIBBB_BANNER;
26#endif 31#endif
27#ifdef L_memory_exhausted 32#ifdef L_memory_exhausted
28 const char * const bb_msg_memory_exhausted = "memory exhausted"; 33 const char * const bb_msg_memory_exhausted = "memory exhausted";
diff --git a/scripts/bb_mkdep.c b/scripts/bb_mkdep.c
index a4f97c211..943745e28 100644
--- a/scripts/bb_mkdep.c
+++ b/scripts/bb_mkdep.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Another fast dependencies generator for Makefiles, Version 4.1 2 * Another fast dependencies generator for Makefiles, Version 4.2
3 * 3 *
4 * Copyright (C) 2005,2006 by Vladimir Oleynik <dzo@simtreas.ru> 4 * Copyright (C) 2005,2006 by Vladimir Oleynik <dzo@simtreas.ru>
5 * 5 *
@@ -1261,6 +1261,7 @@ static void parse_inc(const char *include, const char *fname)
1261 llist_t *lo; 1261 llist_t *lo;
1262 char *ap; 1262 char *ap;
1263 size_t key_sz; 1263 size_t key_sz;
1264 struct stat st;
1264 1265
1265 if(*include == '/') { 1266 if(*include == '/') {
1266 lo = NULL; 1267 lo = NULL;
@@ -1284,8 +1285,18 @@ static void parse_inc(const char *include, const char *fname)
1284 free(ap); 1285 free(ap);
1285 return; 1286 return;
1286 } 1287 }
1287 if(access(ap, F_OK) == 0) { 1288 if(stat(ap, &st) == 0) {
1288 /* found */ 1289 /* found */
1290 llist_t *cfl;
1291
1292 for(cfl = configs; cfl; cfl = cfl->link) {
1293 struct stat *config = (struct stat *)cfl->data;
1294
1295 if (st.st_dev == config->st_dev && st.st_ino == config->st_ino) {
1296 /* skip depend with bb_configs.h */
1297 return NULL;
1298 }
1299 }
1289 p_i = ap; 1300 p_i = ap;
1290 break; 1301 break;
1291 } else if(lo == NULL) { 1302 } else if(lo == NULL) {
@@ -1501,7 +1512,7 @@ parse_chd(const char *fe, const char *p, size_t dirlen)
1501 struct stat *config = (struct stat *)cfl->data; 1512 struct stat *config = (struct stat *)cfl->data;
1502 1513
1503 if (st.st_dev == config->st_dev && st.st_ino == config->st_ino) { 1514 if (st.st_dev == config->st_dev && st.st_ino == config->st_ino) {
1504 /* skip already parsed configs.h */ 1515 /* skip already parsed bb_configs.h */
1505 return NULL; 1516 return NULL;
1506 } 1517 }
1507 } 1518 }
diff --git a/shell/ash.c b/shell/ash.c
index e9e6def22..9eb395fd9 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -11833,8 +11833,9 @@ setinteractive(int on)
11833 11833
11834 if(!do_banner) { 11834 if(!do_banner) {
11835 out1fmt( 11835 out1fmt(
11836 "\n\n" BB_BANNER " Built-in shell (ash)\n" 11836 "\n\n%s Built-in shell (ash)\n"
11837 "Enter 'help' for a list of built-in commands.\n\n"); 11837 "Enter 'help' for a list of built-in commands.\n\n",
11838 BB_BANNER);
11838 do_banner++; 11839 do_banner++;
11839 } 11840 }
11840 } 11841 }
diff --git a/shell/hush.c b/shell/hush.c
index 8b6cbe7c9..387b6cd7a 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -104,7 +104,7 @@
104#include "standalone.h" 104#include "standalone.h"
105#define hush_main main 105#define hush_main main
106#undef CONFIG_FEATURE_SH_FANCY_PROMPT 106#undef CONFIG_FEATURE_SH_FANCY_PROMPT
107#define BB_BANNER 107#define BB_BANNER ""
108#endif 108#endif
109#define SPECIAL_VAR_SYMBOL 03 109#define SPECIAL_VAR_SYMBOL 03
110#define FLAG_EXIT_FROM_LOOP 1 110#define FLAG_EXIT_FROM_LOOP 1
@@ -2812,7 +2812,8 @@ int hush_main(int argc, char **argv)
2812 if (interactive) { 2812 if (interactive) {
2813 /* Looks like they want an interactive shell */ 2813 /* Looks like they want an interactive shell */
2814#ifndef CONFIG_FEATURE_SH_EXTRA_QUIET 2814#ifndef CONFIG_FEATURE_SH_EXTRA_QUIET
2815 printf( "\n\n" BB_BANNER " hush - the humble shell v0.01 (testing)\n"); 2815 printf( "\n\n%s hush - the humble shell v0.01 (testing)\n",
2816 BB_BANNER);
2816 printf( "Enter 'help' for a list of built-in commands.\n\n"); 2817 printf( "Enter 'help' for a list of built-in commands.\n\n");
2817#endif 2818#endif
2818 setup_job_control(); 2819 setup_job_control();
diff --git a/shell/lash.c b/shell/lash.c
index 1b8aca506..968396e41 100644
--- a/shell/lash.c
+++ b/shell/lash.c
@@ -1661,7 +1661,7 @@ int lash_main(int argc_l, char **argv_l)
1661 //printf( "optind=%d argv[optind]='%s'\n", optind, argv[optind]); 1661 //printf( "optind=%d argv[optind]='%s'\n", optind, argv[optind]);
1662 /* Looks like they want an interactive shell */ 1662 /* Looks like they want an interactive shell */
1663#ifndef CONFIG_FEATURE_SH_EXTRA_QUIET 1663#ifndef CONFIG_FEATURE_SH_EXTRA_QUIET
1664 printf( "\n\n" BB_BANNER " Built-in shell (lash)\n"); 1664 printf( "\n\n%s Built-in shell (lash)\n", BB_BANNER);
1665 printf( "Enter 'help' for a list of built-in commands.\n\n"); 1665 printf( "Enter 'help' for a list of built-in commands.\n\n");
1666#endif 1666#endif
1667 } else if (local_pending_command==NULL) { 1667 } else if (local_pending_command==NULL) {
diff --git a/shell/msh.c b/shell/msh.c
index d56db5714..375b1266e 100644
--- a/shell/msh.c
+++ b/shell/msh.c
@@ -956,9 +956,9 @@ extern int msh_main(int argc, char **argv)
956 interactive++; 956 interactive++;
957#ifndef CONFIG_FEATURE_SH_EXTRA_QUIET 957#ifndef CONFIG_FEATURE_SH_EXTRA_QUIET
958#ifdef MSHDEBUG 958#ifdef MSHDEBUG
959 printf("\n\n" BB_BANNER " Built-in shell (msh with debug)\n"); 959 printf("\n\n%s Built-in shell (msh with debug)\n", BB_BANNER);
960#else 960#else
961 printf("\n\n" BB_BANNER " Built-in shell (msh)\n"); 961 printf("\n\n%s Built-in shell (msh)\n", BB_BANNER);
962#endif 962#endif
963 printf("Enter 'help' for a list of built-in commands.\n\n"); 963 printf("Enter 'help' for a list of built-in commands.\n\n");
964#endif 964#endif
diff --git a/sysklogd/klogd.c b/sysklogd/klogd.c
index b8d69c445..5be833f5b 100644
--- a/sysklogd/klogd.c
+++ b/sysklogd/klogd.c
@@ -61,7 +61,7 @@ static void doKlogd(const int console_log_level)
61 if (console_log_level != -1) 61 if (console_log_level != -1)
62 klogctl(8, NULL, console_log_level); 62 klogctl(8, NULL, console_log_level);
63 63
64 syslog(LOG_NOTICE, "klogd started: " BB_BANNER); 64 syslog(LOG_NOTICE, "klogd started: %s", BB_BANNER);
65 65
66 while (1) { 66 while (1) {
67 /* Use kernel syscalls */ 67 /* Use kernel syscalls */
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c
index c827fd85a..447d891bd 100644
--- a/sysklogd/syslogd.c
+++ b/sysklogd/syslogd.c
@@ -568,7 +568,7 @@ static void doSyslogd(void)
568 } 568 }
569#endif 569#endif
570 570
571 logMessage(LOG_SYSLOG | LOG_INFO, "syslogd started: " BB_BANNER); 571 logMessage(LOG_SYSLOG | LOG_INFO, "syslogd started: " "BusyBox v" BB_VER );
572 572
573 for (;;) { 573 for (;;) {
574 574