Compare commits

...
5 Commits
Author SHA1 Message Date
Denis Vlasenko 9e7ba6979c bump version to 1.5.2 2008-03-20 23:25:32 +00:00
Denis Vlasenko 3d90be2efe fix compile breakage 2008-03-20 23:25:04 +00:00
Denis Vlasenko b32502da83 applied post-1.5.0 fixes 2007-05-20 17:01:14 +00:00
Mike Frysinger 568d8c9a5c set default FLTFLAGS for a fatty stack 2007-04-05 21:13:55 +00:00
Mike Frysinger 05732281e4 also fix static selinux linking on branch 2007-03-31 03:32:05 +00:00
8 changed files with 55 additions and 52 deletions

No files matched your search

+6 -2
View File
@@ -1,6 +1,6 @@
VERSION = 1
PATCHLEVEL = 5
SUBLEVEL = 0
SUBLEVEL = 2
EXTRAVERSION =
NAME = Unnamed
@@ -302,6 +302,8 @@ AFLAGS_KERNEL =
CFLAGS := $(CFLAGS)
CPPFLAGS := $(CPPFLAGS)
AFLAGS := $(AFLAGS)
LDFLAGS := $(LDFLAGS)
LDLIBS :=
# Read KERNELRELEASE from .kernelrelease (if it exists)
KERNELRELEASE = $(shell cat .kernelrelease 2> /dev/null)
@@ -315,6 +317,7 @@ export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION \
export CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS
export CFLAGS CFLAGS_KERNEL CFLAGS_MODULE
export AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
export FLTFLAGS
# When compiling out-of-tree modules, put MODVERDIR in the module
# tree rather than in the kernel tree. The kernel tree might
@@ -565,7 +568,8 @@ quiet_cmd_busybox__ ?= LINK $@
cmd_busybox__ ?= $(srctree)/scripts/trylink $(CC) $(LDFLAGS) \
-o $@ -Wl,-M \
-Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \
-Wl,--start-group $(busybox-all) -Wl,--end-group
-Wl,--start-group $(busybox-all) -Wl,--end-group \
$(LDLIBS)
# Generate System.map
quiet_cmd_sysmap = SYSMAP
+5 -2
View File
@@ -52,10 +52,13 @@ CFLAGS += $(call cc-option,-g)
endif
ifeq ($(CONFIG_STATIC),y)
LDFLAGS += -static
LDLIBS += -static
endif
ifeq ($(CONFIG_SELINUX),y)
LDFLAGS += -lselinux -lsepol
LDLIBS += -lselinux -lsepol
endif
#LDFLAGS += -nostdlib
# Busybox is a stack-fatty so make sure we increase default size
FLTFLAGS += -s 20000
+1 -7
View File
@@ -32,16 +32,10 @@
#define DATE_OPT_TIMESPEC 0x20
#define DATE_OPT_HINT 0x40
static void xputenv(char *s)
{
if (putenv(s) != 0)
bb_error_msg_and_die(bb_msg_memory_exhausted);
}
static void maybe_set_utc(int opt)
{
if (opt & DATE_OPT_UTC)
xputenv((char*)"TZ=UTC0");
putenv((char*)"TZ=UTC0");
}
int date_main(int argc, char **argv);
+1 -1
View File
@@ -481,7 +481,7 @@ static void add_cmd(const char *cmdstr)
if (bbg.add_cmd_line) {
char *tp = xasprintf("%s\n%s", bbg.add_cmd_line, cmdstr);
free(bbg.add_cmd_line);
bbg.add_cmd_line = tp;
cmdstr = bbg.add_cmd_line = tp;
}
/* If this line ends with backslash, request next line. */
+2 -2
View File
@@ -1569,9 +1569,9 @@ static void process_dev(char *devname)
if (set_mult) {
print_flag(get_mult, "multcount", mult);
#ifdef HDIO_DRIVE_CMD
bb_ioctl(fd, HDIO_SET_MULTCOUNT, &mult, "HDIO_SET_MULTCOUNT");
bb_ioctl(fd, HDIO_SET_MULTCOUNT, (void *)mult, "HDIO_SET_MULTCOUNT");
#else
force_operation |= (!bb_ioctl(fd, HDIO_SET_MULTCOUNT, &mult, "HDIO_SET_MULTCOUNT"));
force_operation |= (!bb_ioctl(fd, HDIO_SET_MULTCOUNT, (void *)mult, "HDIO_SET_MULTCOUNT"));
#endif
}
if (set_readonly) {
+36 -36
View File
@@ -1083,15 +1083,32 @@ static llist_t *find_iface_state(llist_t *state_list, const char *iface)
return NULL;
}
/* read the previous state from the state file */
static llist_t *read_iface_state(void) {
llist_t *state_list = NULL;
FILE *state_fp;
state_fp = fopen("/var/run/ifstate", "r");
if (state_fp) {
char *start, *end_ptr;
while ((start = xmalloc_fgets(state_fp)) != NULL) {
/* We should only need to check for a single character */
end_ptr = start + strcspn(start, " \t\n");
*end_ptr = '\0';
llist_add_to(&state_list, start);
}
fclose(state_fp);
}
return state_list;
}
int ifupdown_main(int argc, char **argv);
int ifupdown_main(int argc, char **argv)
{
int (*cmds)(struct interface_defn_t *) = NULL;
struct interfaces_file_t *defn;
llist_t *state_list = NULL;
llist_t *target_list = NULL;
const char *interfaces = "/etc/network/interfaces";
FILE *state_fp;
bool any_failures = 0;
cmds = iface_down;
@@ -1118,32 +1135,9 @@ int ifupdown_main(int argc, char **argv)
startup_PATH = getenv("PATH");
if (!startup_PATH) startup_PATH = "";
/* Read the previous state from the state file */
state_fp = fopen("/var/run/ifstate", "r");
if (state_fp) {
char *start, *end_ptr;
while ((start = xmalloc_fgets(state_fp)) != NULL) {
/* We should only need to check for a single character */
end_ptr = start + strcspn(start, " \t\n");
*end_ptr = '\0';
llist_add_to(&state_list, start);
}
fclose(state_fp);
}
/* Create a list of interfaces to work on */
if (DO_ALL) {
if (cmds == iface_up) {
target_list = defn->autointerfaces;
} else {
/* iface_down */
const llist_t *list = state_list;
while (list) {
llist_add_to_end(&target_list, xstrdup(list->data));
list = list->link;
}
target_list = defn->autointerfaces;
}
target_list = defn->autointerfaces;
} else {
llist_add_to_end(&target_list, argv[optind]);
}
@@ -1170,6 +1164,7 @@ int ifupdown_main(int argc, char **argv)
}
if (!FORCE) {
llist_t *state_list = read_iface_state();
const llist_t *iface_state = find_iface_state(state_list, iface);
if (cmds == iface_up) {
@@ -1185,6 +1180,7 @@ int ifupdown_main(int argc, char **argv)
continue;
}
}
llist_free(state_list, free);
}
#if ENABLE_FEATURE_IFUPDOWN_MAPPING
@@ -1239,6 +1235,8 @@ int ifupdown_main(int argc, char **argv)
bb_error_msg("ignoring unknown interface %s", liface);
any_failures = 1;
} else {
/* update the state file */
llist_t *state_list = read_iface_state();
llist_t *iface_state = find_iface_state(state_list, iface);
if (cmds == iface_up) {
@@ -1254,19 +1252,21 @@ int ifupdown_main(int argc, char **argv)
llist_unlink(&state_list, iface_state);
free(llist_pop(&iface_state));
}
}
}
/* Actually write the new state */
if (!NO_ACT) {
state_fp = xfopen("/var/run/ifstate", "w");
while (state_list) {
if (state_list->data) {
fprintf(state_fp, "%s\n", state_list->data);
/* Actually write the new state */
if (!NO_ACT) {
FILE *state_fp = xfopen("/var/run/ifstate", "w");
llist_t *state = state_list;
while (state) {
if (state->data) {
fprintf(state_fp, "%s\n", state->data);
}
state = state->link;
}
fclose(state_fp);
}
state_list = state_list->link;
llist_free(state_list, free);
}
fclose(state_fp);
}
return any_failures;
+3 -1
View File
@@ -262,7 +262,9 @@ int ps_main(int argc, char **argv)
parse_o(default_o);
post_process();
terminal_width = INT_MAX;
/* Was INT_MAX, but some libc's go belly up with printf("%.*s")
* and such large widths */
terminal_width = 30000;
if (isatty(1)) {
get_terminal_width_height(1, &terminal_width, NULL);
terminal_width--;
+1 -1
View File
@@ -1840,7 +1840,7 @@ static int set_local_var(const char *s, int flg_export)
result = -1;
} else {
cur->name = strdup(name);
if (cur->name) {
if (!cur->name) {
free(cur);
result = -1;
} else {