diff options
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/appletlib.c | 2 | ||||
-rw-r--r-- | libbb/dump.c | 6 | ||||
-rw-r--r-- | libbb/getopt32.c | 17 | ||||
-rw-r--r-- | libbb/u_signal_names.c | 4 |
4 files changed, 12 insertions, 17 deletions
diff --git a/libbb/appletlib.c b/libbb/appletlib.c index d6e042775..b1064d10a 100644 --- a/libbb/appletlib.c +++ b/libbb/appletlib.c | |||
@@ -933,7 +933,7 @@ int busybox_main(int argc UNUSED_PARAM, char **argv) | |||
933 | full_write1_str(" multi-call binary.\n"); /* reuse */ | 933 | full_write1_str(" multi-call binary.\n"); /* reuse */ |
934 | #endif | 934 | #endif |
935 | full_write1_str( | 935 | full_write1_str( |
936 | "BusyBox is copyrighted by many authors between 1998-2024.\n" | 936 | "BusyBox is copyrighted by many authors between 1998-2025.\n" |
937 | "Licensed under GPLv2. See source distribution for detailed\n" | 937 | "Licensed under GPLv2. See source distribution for detailed\n" |
938 | "copyright notices.\n" | 938 | "copyright notices.\n" |
939 | "\n" | 939 | "\n" |
diff --git a/libbb/dump.c b/libbb/dump.c index ffc46f6a7..aa57eca8c 100644 --- a/libbb/dump.c +++ b/libbb/dump.c | |||
@@ -204,9 +204,11 @@ static NOINLINE void rewrite(priv_dumper_t *dumper, FS *fs) | |||
204 | if (!e) | 204 | if (!e) |
205 | goto DO_BAD_CONV_CHAR; | 205 | goto DO_BAD_CONV_CHAR; |
206 | pr->flags = F_INT; | 206 | pr->flags = F_INT; |
207 | if (e > int_convs + 1) /* not d or i? */ | ||
208 | pr->flags = F_UINT; | ||
209 | byte_count_str = "\010\004\002\001"; | 207 | byte_count_str = "\010\004\002\001"; |
208 | if (e > int_convs + 1) { /* not d or i? */ | ||
209 | pr->flags = F_UINT; | ||
210 | byte_count_str++; | ||
211 | } | ||
210 | goto DO_BYTE_COUNT; | 212 | goto DO_BYTE_COUNT; |
211 | } else | 213 | } else |
212 | if (strchr(int_convs, *p1)) { /* %d etc */ | 214 | if (strchr(int_convs, *p1)) { /* %d etc */ |
diff --git a/libbb/getopt32.c b/libbb/getopt32.c index 56040e150..76d29d5eb 100644 --- a/libbb/getopt32.c +++ b/libbb/getopt32.c | |||
@@ -93,7 +93,7 @@ getopt32(char **argv, const char *applet_opts, ...) | |||
93 | 93 | ||
94 | "!" If the first character in the applet_opts string is a '!', | 94 | "!" If the first character in the applet_opts string is a '!', |
95 | report bad options, missing required options, | 95 | report bad options, missing required options, |
96 | inconsistent options with all-ones return value (instead of abort. | 96 | inconsistent options with all-ones return value instead of aborting. |
97 | 97 | ||
98 | "+" If the first character in the applet_opts string is a plus, | 98 | "+" If the first character in the applet_opts string is a plus, |
99 | then option processing will stop as soon as a non-option is | 99 | then option processing will stop as soon as a non-option is |
@@ -265,7 +265,7 @@ Special characters: | |||
265 | for "long options only" cases, such as tar --exclude=PATTERN, | 265 | for "long options only" cases, such as tar --exclude=PATTERN, |
266 | wget --header=HDR cases. | 266 | wget --header=HDR cases. |
267 | 267 | ||
268 | "a?b" A "?" between an option and a group of options means that | 268 | "a?bc" A "?" between an option and a group of options means that |
269 | at least one of them is required to occur if the first option | 269 | at least one of them is required to occur if the first option |
270 | occurs in preceding command line arguments. | 270 | occurs in preceding command line arguments. |
271 | 271 | ||
@@ -348,9 +348,6 @@ vgetopt32(char **argv, const char *applet_opts, const char *applet_long_options, | |||
348 | unsigned trigger; | 348 | unsigned trigger; |
349 | int min_arg = 0; | 349 | int min_arg = 0; |
350 | int max_arg = -1; | 350 | int max_arg = -1; |
351 | int spec_flgs = 0; | ||
352 | |||
353 | #define SHOW_USAGE_IF_ERROR 1 | ||
354 | 351 | ||
355 | on_off = complementary; | 352 | on_off = complementary; |
356 | memset(on_off, 0, sizeof(complementary)); | 353 | memset(on_off, 0, sizeof(complementary)); |
@@ -449,9 +446,7 @@ vgetopt32(char **argv, const char *applet_opts, const char *applet_long_options, | |||
449 | continue; | 446 | continue; |
450 | c = s[1]; | 447 | c = s[1]; |
451 | if (*s == '?') { | 448 | if (*s == '?') { |
452 | if (c < '0' || c > '9') { | 449 | if (c >= '0' && c <= '9') { |
453 | spec_flgs |= SHOW_USAGE_IF_ERROR; | ||
454 | } else { | ||
455 | max_arg = c - '0'; | 450 | max_arg = c - '0'; |
456 | s++; | 451 | s++; |
457 | } | 452 | } |
@@ -465,8 +460,10 @@ vgetopt32(char **argv, const char *applet_opts, const char *applet_long_options, | |||
465 | continue; | 460 | continue; |
466 | } | 461 | } |
467 | if (*s == '=') { | 462 | if (*s == '=') { |
468 | min_arg = max_arg = c - '0'; | 463 | if (c >= '0' && c <= '9') { |
469 | s++; | 464 | min_arg = max_arg = c - '0'; |
465 | s++; | ||
466 | } | ||
470 | continue; | 467 | continue; |
471 | } | 468 | } |
472 | for (on_off = complementary; on_off->opt_char; on_off++) | 469 | for (on_off = complementary; on_off->opt_char; on_off++) |
diff --git a/libbb/u_signal_names.c b/libbb/u_signal_names.c index ef2b6f891..e233849c5 100644 --- a/libbb/u_signal_names.c +++ b/libbb/u_signal_names.c | |||
@@ -27,10 +27,6 @@ | |||
27 | 27 | ||
28 | #include "libbb.h" | 28 | #include "libbb.h" |
29 | 29 | ||
30 | #if ENABLE_PLATFORM_MINGW32 | ||
31 | # undef SIGPIPE | ||
32 | #endif | ||
33 | |||
34 | #if ENABLE_PLATFORM_POSIX || defined(SIGSTKFLT) || defined(SIGVTALRM) | 30 | #if ENABLE_PLATFORM_POSIX || defined(SIGSTKFLT) || defined(SIGVTALRM) |
35 | # define SIGLEN 7 | 31 | # define SIGLEN 7 |
36 | #elif defined(SIGWINCH) || (ENABLE_FEATURE_RTMINMAX && \ | 32 | #elif defined(SIGWINCH) || (ENABLE_FEATURE_RTMINMAX && \ |