diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2011-09-06 04:31:16 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-09-06 04:31:16 +0200 |
commit | ed058016bf8fc98271de2e58bfb650de9e9d304d (patch) | |
tree | b6554880a7224a86c27429aaebfa6a5b16349b59 | |
parent | cc272b06eefb87030bb85b686abdbc22b5ed1c34 (diff) | |
download | busybox-w32-1_19_2.tar.gz busybox-w32-1_19_2.tar.bz2 busybox-w32-1_19_2.zip |
Apply post-1.19.1 patches, bump version to 1.19.21_19_2
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | editors/patch.c | 8 | ||||
-rw-r--r-- | libbb/lineedit.c | 2 | ||||
-rw-r--r-- | libbb/match_fstype.c | 4 | ||||
-rw-r--r-- | shell/hush.c | 18 |
5 files changed, 18 insertions, 16 deletions
@@ -1,6 +1,6 @@ | |||
1 | VERSION = 1 | 1 | VERSION = 1 |
2 | PATCHLEVEL = 19 | 2 | PATCHLEVEL = 19 |
3 | SUBLEVEL = 1 | 3 | SUBLEVEL = 2 |
4 | EXTRAVERSION = | 4 | EXTRAVERSION = |
5 | NAME = Unnamed | 5 | NAME = Unnamed |
6 | 6 | ||
diff --git a/editors/patch.c b/editors/patch.c index ec5b8e7ad..1f2a49b66 100644 --- a/editors/patch.c +++ b/editors/patch.c | |||
@@ -70,8 +70,7 @@ struct double_list { | |||
70 | 70 | ||
71 | // Free all the elements of a linked list | 71 | // Free all the elements of a linked list |
72 | // Call freeit() on each element before freeing it. | 72 | // Call freeit() on each element before freeing it. |
73 | static | 73 | static void dlist_free(struct double_list *list, void (*freeit)(void *data)) |
74 | void dlist_free(struct double_list *list, void (*freeit)(void *data)) | ||
75 | { | 74 | { |
76 | while (list) { | 75 | while (list) { |
77 | void *pop = list; | 76 | void *pop = list; |
@@ -83,8 +82,7 @@ void dlist_free(struct double_list *list, void (*freeit)(void *data)) | |||
83 | } | 82 | } |
84 | 83 | ||
85 | // Add an entry before "list" element in (circular) doubly linked list | 84 | // Add an entry before "list" element in (circular) doubly linked list |
86 | static | 85 | static struct double_list *dlist_add(struct double_list **list, char *data) |
87 | struct double_list *dlist_add(struct double_list **list, char *data) | ||
88 | { | 86 | { |
89 | struct double_list *llist; | 87 | struct double_list *llist; |
90 | struct double_list *line = xmalloc(sizeof(*line)); | 88 | struct double_list *line = xmalloc(sizeof(*line)); |
@@ -232,7 +230,7 @@ static int apply_one_hunk(void) | |||
232 | else matcheof = 0; | 230 | else matcheof = 0; |
233 | if (PATCH_DEBUG) fdprintf(2, "HUNK:%s\n", plist->data); | 231 | if (PATCH_DEBUG) fdprintf(2, "HUNK:%s\n", plist->data); |
234 | } | 232 | } |
235 | matcheof = matcheof < TT.context; | 233 | matcheof = !matcheof || matcheof < TT.context; |
236 | 234 | ||
237 | if (PATCH_DEBUG) fdprintf(2,"MATCHEOF=%c\n", matcheof ? 'Y' : 'N'); | 235 | if (PATCH_DEBUG) fdprintf(2,"MATCHEOF=%c\n", matcheof ? 'Y' : 'N'); |
238 | 236 | ||
diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 10265192e..2ea373c2c 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c | |||
@@ -1425,7 +1425,7 @@ static void save_history(char *str) | |||
1425 | 1425 | ||
1426 | /* write out temp file and replace hist_file atomically */ | 1426 | /* write out temp file and replace hist_file atomically */ |
1427 | new_name = xasprintf("%s.%u.new", state->hist_file, (int) getpid()); | 1427 | new_name = xasprintf("%s.%u.new", state->hist_file, (int) getpid()); |
1428 | fd = open(state->hist_file, O_WRONLY | O_CREAT | O_TRUNC, 0600); | 1428 | fd = open(new_name, O_WRONLY | O_CREAT | O_TRUNC, 0600); |
1429 | if (fd >= 0) { | 1429 | if (fd >= 0) { |
1430 | FILE *fp; | 1430 | FILE *fp; |
1431 | int i; | 1431 | int i; |
diff --git a/libbb/match_fstype.c b/libbb/match_fstype.c index c792d13b3..32c3d7f18 100644 --- a/libbb/match_fstype.c +++ b/libbb/match_fstype.c | |||
@@ -10,10 +10,10 @@ | |||
10 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 10 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #ifdef HAVE_MNTENT_H | ||
14 | |||
15 | #include "libbb.h" | 13 | #include "libbb.h" |
16 | 14 | ||
15 | #ifdef HAVE_MNTENT_H | ||
16 | |||
17 | int FAST_FUNC match_fstype(const struct mntent *mt, const char *t_fstype) | 17 | int FAST_FUNC match_fstype(const struct mntent *mt, const char *t_fstype) |
18 | { | 18 | { |
19 | int match = 1; | 19 | int match = 1; |
diff --git a/shell/hush.c b/shell/hush.c index e4138adf7..de0af9cec 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -7817,20 +7817,24 @@ int hush_main(int argc, char **argv) | |||
7817 | 7817 | ||
7818 | #if ENABLE_FEATURE_EDITING | 7818 | #if ENABLE_FEATURE_EDITING |
7819 | G.line_input_state = new_line_input_t(FOR_SHELL); | 7819 | G.line_input_state = new_line_input_t(FOR_SHELL); |
7820 | # if defined MAX_HISTORY && MAX_HISTORY > 0 && ENABLE_HUSH_SAVEHISTORY | 7820 | # if MAX_HISTORY > 0 && ENABLE_HUSH_SAVEHISTORY |
7821 | { | 7821 | { |
7822 | const char *hp = get_local_var_value("HISTFILE"); | 7822 | const char *hp = get_local_var_value("HISTFILE"); |
7823 | if (!hp) { | 7823 | if (!hp) { |
7824 | hp = get_local_var_value("HOME"); | 7824 | hp = get_local_var_value("HOME"); |
7825 | if (hp) { | 7825 | if (hp) |
7826 | G.line_input_state->hist_file = concat_path_file(hp, ".hush_history"); | 7826 | hp = concat_path_file(hp, ".hush_history"); |
7827 | //set_local_var(xasprintf("HISTFILE=%s", ...)); | 7827 | } else { |
7828 | } | 7828 | hp = xstrdup(hp); |
7829 | } | 7829 | } |
7830 | # if ENABLE_FEATURE_SH_HISTFILESIZE | 7830 | if (hp) { |
7831 | G.line_input_state->hist_file = hp; | ||
7832 | //set_local_var(xasprintf("HISTFILE=%s", ...)); | ||
7833 | } | ||
7834 | # if ENABLE_FEATURE_SH_HISTFILESIZE | ||
7831 | hp = get_local_var_value("HISTFILESIZE"); | 7835 | hp = get_local_var_value("HISTFILESIZE"); |
7832 | G.line_input_state->max_history = size_from_HISTFILESIZE(hp); | 7836 | G.line_input_state->max_history = size_from_HISTFILESIZE(hp); |
7833 | # endif | 7837 | # endif |
7834 | } | 7838 | } |
7835 | # endif | 7839 | # endif |
7836 | #endif | 7840 | #endif |