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
This commit is contained in:
parent
21e68703ce
commit
dd1ccddf1b
@ -10,7 +10,7 @@ APPLETS_DIR:=$(top_builddir)/applets/
|
|||||||
endif
|
endif
|
||||||
srcdir=$(top_srcdir)/applets
|
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_OBJ:= $(patsubst $(srcdir)/%.c,$(APPLETS_DIR)%.o, $(APPLET_SRC))
|
||||||
|
|
||||||
APPLET_SRC-y+=$(APPLET_SRC)
|
APPLET_SRC-y+=$(APPLET_SRC)
|
||||||
|
@ -21,11 +21,7 @@
|
|||||||
#error "Sorry, this libc version is not supported :("
|
#error "Sorry, this libc version is not supported :("
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef BB_EXTRA_VERSION
|
extern const char BB_BANNER[];
|
||||||
#define BB_BANNER "BusyBox v" BB_VER " (" BB_BT ")"
|
|
||||||
#else
|
|
||||||
#define BB_BANNER "BusyBox v" BB_VER " (" BB_EXTRA_VERSION ")"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <features.h>
|
#include <features.h>
|
||||||
|
|
||||||
|
@ -22,7 +22,12 @@
|
|||||||
#include "libbb.h"
|
#include "libbb.h"
|
||||||
|
|
||||||
#ifdef L_full_version
|
#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
|
#endif
|
||||||
#ifdef L_memory_exhausted
|
#ifdef L_memory_exhausted
|
||||||
const char * const bb_msg_memory_exhausted = "memory exhausted";
|
const char * const bb_msg_memory_exhausted = "memory exhausted";
|
||||||
|
@ -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@simtreas.ru>
|
* Copyright (C) 2005,2006 by Vladimir Oleynik <dzo@simtreas.ru>
|
||||||
*
|
*
|
||||||
@ -1261,6 +1261,7 @@ static void parse_inc(const char *include, const char *fname)
|
|||||||
llist_t *lo;
|
llist_t *lo;
|
||||||
char *ap;
|
char *ap;
|
||||||
size_t key_sz;
|
size_t key_sz;
|
||||||
|
struct stat st;
|
||||||
|
|
||||||
if(*include == '/') {
|
if(*include == '/') {
|
||||||
lo = NULL;
|
lo = NULL;
|
||||||
@ -1284,8 +1285,18 @@ static void parse_inc(const char *include, const char *fname)
|
|||||||
free(ap);
|
free(ap);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(access(ap, F_OK) == 0) {
|
if(stat(ap, &st) == 0) {
|
||||||
/* found */
|
/* 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;
|
p_i = ap;
|
||||||
break;
|
break;
|
||||||
} else if(lo == NULL) {
|
} else if(lo == NULL) {
|
||||||
@ -1501,7 +1512,7 @@ parse_chd(const char *fe, const char *p, size_t dirlen)
|
|||||||
struct stat *config = (struct stat *)cfl->data;
|
struct stat *config = (struct stat *)cfl->data;
|
||||||
|
|
||||||
if (st.st_dev == config->st_dev && st.st_ino == config->st_ino) {
|
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;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11833,8 +11833,9 @@ setinteractive(int on)
|
|||||||
|
|
||||||
if(!do_banner) {
|
if(!do_banner) {
|
||||||
out1fmt(
|
out1fmt(
|
||||||
"\n\n" BB_BANNER " Built-in shell (ash)\n"
|
"\n\n%s Built-in shell (ash)\n"
|
||||||
"Enter 'help' for a list of built-in commands.\n\n");
|
"Enter 'help' for a list of built-in commands.\n\n",
|
||||||
|
BB_BANNER);
|
||||||
do_banner++;
|
do_banner++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -104,7 +104,7 @@
|
|||||||
#include "standalone.h"
|
#include "standalone.h"
|
||||||
#define hush_main main
|
#define hush_main main
|
||||||
#undef CONFIG_FEATURE_SH_FANCY_PROMPT
|
#undef CONFIG_FEATURE_SH_FANCY_PROMPT
|
||||||
#define BB_BANNER
|
#define BB_BANNER ""
|
||||||
#endif
|
#endif
|
||||||
#define SPECIAL_VAR_SYMBOL 03
|
#define SPECIAL_VAR_SYMBOL 03
|
||||||
#define FLAG_EXIT_FROM_LOOP 1
|
#define FLAG_EXIT_FROM_LOOP 1
|
||||||
@ -2812,7 +2812,8 @@ int hush_main(int argc, char **argv)
|
|||||||
if (interactive) {
|
if (interactive) {
|
||||||
/* Looks like they want an interactive shell */
|
/* Looks like they want an interactive shell */
|
||||||
#ifndef CONFIG_FEATURE_SH_EXTRA_QUIET
|
#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");
|
printf( "Enter 'help' for a list of built-in commands.\n\n");
|
||||||
#endif
|
#endif
|
||||||
setup_job_control();
|
setup_job_control();
|
||||||
|
@ -1661,7 +1661,7 @@ int lash_main(int argc_l, char **argv_l)
|
|||||||
//printf( "optind=%d argv[optind]='%s'\n", optind, argv[optind]);
|
//printf( "optind=%d argv[optind]='%s'\n", optind, argv[optind]);
|
||||||
/* Looks like they want an interactive shell */
|
/* Looks like they want an interactive shell */
|
||||||
#ifndef CONFIG_FEATURE_SH_EXTRA_QUIET
|
#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");
|
printf( "Enter 'help' for a list of built-in commands.\n\n");
|
||||||
#endif
|
#endif
|
||||||
} else if (local_pending_command==NULL) {
|
} else if (local_pending_command==NULL) {
|
||||||
|
@ -956,9 +956,9 @@ extern int msh_main(int argc, char **argv)
|
|||||||
interactive++;
|
interactive++;
|
||||||
#ifndef CONFIG_FEATURE_SH_EXTRA_QUIET
|
#ifndef CONFIG_FEATURE_SH_EXTRA_QUIET
|
||||||
#ifdef MSHDEBUG
|
#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
|
#else
|
||||||
printf("\n\n" BB_BANNER " Built-in shell (msh)\n");
|
printf("\n\n%s Built-in shell (msh)\n", BB_BANNER);
|
||||||
#endif
|
#endif
|
||||||
printf("Enter 'help' for a list of built-in commands.\n\n");
|
printf("Enter 'help' for a list of built-in commands.\n\n");
|
||||||
#endif
|
#endif
|
||||||
|
@ -61,7 +61,7 @@ static void doKlogd(const int console_log_level)
|
|||||||
if (console_log_level != -1)
|
if (console_log_level != -1)
|
||||||
klogctl(8, NULL, console_log_level);
|
klogctl(8, NULL, console_log_level);
|
||||||
|
|
||||||
syslog(LOG_NOTICE, "klogd started: " BB_BANNER);
|
syslog(LOG_NOTICE, "klogd started: %s", BB_BANNER);
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
/* Use kernel syscalls */
|
/* Use kernel syscalls */
|
||||||
|
@ -568,7 +568,7 @@ static void doSyslogd(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
logMessage(LOG_SYSLOG | LOG_INFO, "syslogd started: " BB_BANNER);
|
logMessage(LOG_SYSLOG | LOG_INFO, "syslogd started: " "BusyBox v" BB_VER );
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user