diff options
| author | Ron Yorston <rmy@pobox.com> | 2015-01-23 09:50:40 +0000 |
|---|---|---|
| committer | Ron Yorston <rmy@pobox.com> | 2015-01-23 09:50:40 +0000 |
| commit | 63dbf1908bc51918d9d963f4d9b7657306b2970d (patch) | |
| tree | 781ebfdcbbb953688e06f3541ce9e0c71f1dadfa | |
| parent | 06900749637b925af1ebdf5030ba03a379f4f84f (diff) | |
| parent | 6968e081230fb6434a2a6f0eed39d538ea982f3f (diff) | |
| download | busybox-w32-63dbf1908bc51918d9d963f4d9b7657306b2970d.tar.gz busybox-w32-63dbf1908bc51918d9d963f4d9b7657306b2970d.tar.bz2 busybox-w32-63dbf1908bc51918d9d963f4d9b7657306b2970d.zip | |
Merge commit '1_23_0' into mergeTIG_1_23_0
Conflicts:
libbb/lineedit.c
| -rw-r--r-- | Makefile | 2 | ||||
| -rw-r--r-- | archival/tar.c | 8 | ||||
| -rw-r--r-- | include/libbb.h | 2 | ||||
| -rw-r--r-- | libbb/Kbuild.src | 1 | ||||
| -rw-r--r-- | libbb/sysconf.c | 10 | ||||
| -rw-r--r-- | miscutils/nandwrite.c | 11 | ||||
| -rw-r--r-- | networking/udhcp/dhcpc.c | 6 | ||||
| -rwxr-xr-x | testsuite/find.tests | 3 | ||||
| -rwxr-xr-x | testsuite/mdev.tests | 2 |
9 files changed, 31 insertions, 14 deletions
| @@ -1,7 +1,7 @@ | |||
| 1 | VERSION = 1 | 1 | VERSION = 1 |
| 2 | PATCHLEVEL = 23 | 2 | PATCHLEVEL = 23 |
| 3 | SUBLEVEL = 0 | 3 | SUBLEVEL = 0 |
| 4 | EXTRAVERSION = .git | 4 | EXTRAVERSION = |
| 5 | NAME = Unnamed | 5 | NAME = Unnamed |
| 6 | 6 | ||
| 7 | # *DOCUMENTATION* | 7 | # *DOCUMENTATION* |
diff --git a/archival/tar.c b/archival/tar.c index e00ed26a8..85551684b 100644 --- a/archival/tar.c +++ b/archival/tar.c | |||
| @@ -747,11 +747,9 @@ static NOINLINE int writeTarFile(int tar_fd, int verboseFlag, | |||
| 747 | #endif | 747 | #endif |
| 748 | return errorFlag; | 748 | return errorFlag; |
| 749 | } | 749 | } |
| 750 | #else | 750 | #else /* !FEATURE_TAR_CREATE */ |
| 751 | int writeTarFile(int tar_fd, int verboseFlag, | 751 | # define writeTarFile(...) 0 |
| 752 | int recurseFlags, const llist_t *include, | 752 | #endif |
| 753 | const llist_t *exclude, const char *gzip); | ||
| 754 | #endif /* FEATURE_TAR_CREATE */ | ||
| 755 | 753 | ||
| 756 | #if ENABLE_FEATURE_TAR_FROM | 754 | #if ENABLE_FEATURE_TAR_FROM |
| 757 | static llist_t *append_file_list_to_list(llist_t *list) | 755 | static llist_t *append_file_list_to_list(llist_t *list) |
diff --git a/include/libbb.h b/include/libbb.h index 802779932..2850b1d5a 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
| @@ -1287,7 +1287,9 @@ char *bb_simplify_path(const char *path) FAST_FUNC; | |||
| 1287 | /* Returns ptr to NUL */ | 1287 | /* Returns ptr to NUL */ |
| 1288 | char *bb_simplify_abs_path_inplace(char *path) FAST_FUNC; | 1288 | char *bb_simplify_abs_path_inplace(char *path) FAST_FUNC; |
| 1289 | 1289 | ||
| 1290 | #ifndef LOGIN_FAIL_DELAY | ||
| 1290 | #define LOGIN_FAIL_DELAY 3 | 1291 | #define LOGIN_FAIL_DELAY 3 |
| 1292 | #endif | ||
| 1291 | extern void bb_do_delay(int seconds) FAST_FUNC; | 1293 | extern void bb_do_delay(int seconds) FAST_FUNC; |
| 1292 | extern void change_identity(const struct passwd *pw) FAST_FUNC; | 1294 | extern void change_identity(const struct passwd *pw) FAST_FUNC; |
| 1293 | extern void run_shell(const char *shell, int loginshell, const char *command, const char **additional_args) NORETURN FAST_FUNC; | 1295 | extern void run_shell(const char *shell, int loginshell, const char *command, const char **additional_args) NORETURN FAST_FUNC; |
diff --git a/libbb/Kbuild.src b/libbb/Kbuild.src index 1be87b337..d94b65008 100644 --- a/libbb/Kbuild.src +++ b/libbb/Kbuild.src | |||
| @@ -144,6 +144,7 @@ lib-$(CONFIG_ADDUSER) += update_passwd.o | |||
| 144 | lib-$(CONFIG_DELGROUP) += update_passwd.o | 144 | lib-$(CONFIG_DELGROUP) += update_passwd.o |
| 145 | lib-$(CONFIG_DELUSER) += update_passwd.o | 145 | lib-$(CONFIG_DELUSER) += update_passwd.o |
| 146 | 146 | ||
| 147 | lib-$(CONFIG_FTPD) += correct_password.o | ||
| 147 | lib-$(CONFIG_PASSWD) += pw_encrypt.o update_passwd.o obscure.o | 148 | lib-$(CONFIG_PASSWD) += pw_encrypt.o update_passwd.o obscure.o |
| 148 | lib-$(CONFIG_CHPASSWD) += pw_encrypt.o update_passwd.o | 149 | lib-$(CONFIG_CHPASSWD) += pw_encrypt.o update_passwd.o |
| 149 | lib-$(CONFIG_CRYPTPW) += pw_encrypt.o | 150 | lib-$(CONFIG_CRYPTPW) += pw_encrypt.o |
diff --git a/libbb/sysconf.c b/libbb/sysconf.c index cfad9cdc0..8c1caef5c 100644 --- a/libbb/sysconf.c +++ b/libbb/sysconf.c | |||
| @@ -11,7 +11,15 @@ | |||
| 11 | #if !defined(bb_arg_max) | 11 | #if !defined(bb_arg_max) |
| 12 | unsigned FAST_FUNC bb_arg_max(void) | 12 | unsigned FAST_FUNC bb_arg_max(void) |
| 13 | { | 13 | { |
| 14 | return sysconf(_SC_ARG_MAX); | 14 | long r = sysconf(_SC_ARG_MAX); |
| 15 | |||
| 16 | /* I've seen a version of uclibc which returned -1. | ||
| 17 | * Guard about it, and also avoid insanely large values | ||
| 18 | */ | ||
| 19 | if ((unsigned long)r > 64*1024*1024) | ||
| 20 | r = 64*1024*1024; | ||
| 21 | |||
| 22 | return r; | ||
| 15 | } | 23 | } |
| 16 | #endif | 24 | #endif |
| 17 | 25 | ||
diff --git a/miscutils/nandwrite.c b/miscutils/nandwrite.c index 29ff351a3..247fc72f4 100644 --- a/miscutils/nandwrite.c +++ b/miscutils/nandwrite.c | |||
| @@ -36,16 +36,18 @@ | |||
| 36 | //usage: "\n -s ADDR Start address" | 36 | //usage: "\n -s ADDR Start address" |
| 37 | 37 | ||
| 38 | //usage:#define nanddump_trivial_usage | 38 | //usage:#define nanddump_trivial_usage |
| 39 | //usage: "[-o] [--bb=padbad|skipbad] [-s ADDR] [-l LEN] [-f FILE] MTD_DEVICE" | 39 | //usage: "[-o]" IF_LONG_OPTS(" [--bb=padbad|skipbad]") " [-s ADDR] [-l LEN] [-f FILE] MTD_DEVICE" |
| 40 | //usage:#define nanddump_full_usage "\n\n" | 40 | //usage:#define nanddump_full_usage "\n\n" |
| 41 | //usage: "Dump MTD_DEVICE\n" | 41 | //usage: "Dump MTD_DEVICE\n" |
| 42 | //usage: "\n -o Dump oob data" | 42 | //usage: "\n -o Dump oob data" |
| 43 | //usage: "\n -s ADDR Start address" | 43 | //usage: "\n -s ADDR Start address" |
| 44 | //usage: "\n -l LEN Length" | 44 | //usage: "\n -l LEN Length" |
| 45 | //usage: "\n -f FILE Dump to file ('-' for stdout)" | 45 | //usage: "\n -f FILE Dump to file ('-' for stdout)" |
| 46 | //usage: IF_LONG_OPTS( | ||
| 46 | //usage: "\n --bb=METHOD:" | 47 | //usage: "\n --bb=METHOD:" |
| 47 | //usage: "\n skipbad: skip bad blocks" | 48 | //usage: "\n skipbad: skip bad blocks" |
| 48 | //usage: "\n padbad: substitute bad blocks by 0xff (default)" | 49 | //usage: "\n padbad: substitute bad blocks by 0xff (default)" |
| 50 | //usage: ) | ||
| 49 | 51 | ||
| 50 | #include "libbb.h" | 52 | #include "libbb.h" |
| 51 | #include <mtd/mtd-user.h> | 53 | #include <mtd/mtd-user.h> |
| @@ -116,12 +118,13 @@ int nandwrite_main(int argc UNUSED_PARAM, char **argv) | |||
| 116 | struct mtd_oob_buf oob; | 118 | struct mtd_oob_buf oob; |
| 117 | unsigned char *filebuf; | 119 | unsigned char *filebuf; |
| 118 | const char *opt_s = "0", *opt_f = "-", *opt_l, *opt_bb; | 120 | const char *opt_s = "0", *opt_f = "-", *opt_l, *opt_bb; |
| 119 | static const char nanddump_longopts[] ALIGN1 = | ||
| 120 | "bb\0" Required_argument "\xff"; /* no short equivalent */ | ||
| 121 | 121 | ||
| 122 | if (IS_NANDDUMP) { | 122 | if (IS_NANDDUMP) { |
| 123 | opt_complementary = "=1"; | 123 | opt_complementary = "=1"; |
| 124 | applet_long_options = nanddump_longopts; | 124 | #if ENABLE_LONG_OPTS |
| 125 | applet_long_options = | ||
| 126 | "bb\0" Required_argument "\xff"; /* no short equivalent */ | ||
| 127 | #endif | ||
| 125 | opts = getopt32(argv, "os:f:l:", &opt_s, &opt_f, &opt_l, &opt_bb); | 128 | opts = getopt32(argv, "os:f:l:", &opt_s, &opt_f, &opt_l, &opt_bb); |
| 126 | } else { /* nandwrite */ | 129 | } else { /* nandwrite */ |
| 127 | opt_complementary = "-1:?2"; | 130 | opt_complementary = "-1:?2"; |
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c index 35e7c2070..a34829c3a 100644 --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c | |||
| @@ -1697,6 +1697,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv) | |||
| 1697 | case RENEW_REQUESTED: | 1697 | case RENEW_REQUESTED: |
| 1698 | case REBINDING: | 1698 | case REBINDING: |
| 1699 | if (*message == DHCPACK) { | 1699 | if (*message == DHCPACK) { |
| 1700 | unsigned start; | ||
| 1700 | uint32_t lease_seconds; | 1701 | uint32_t lease_seconds; |
| 1701 | struct in_addr temp_addr; | 1702 | struct in_addr temp_addr; |
| 1702 | uint8_t *temp; | 1703 | uint8_t *temp; |
| @@ -1756,7 +1757,10 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv) | |||
| 1756 | bb_info_msg("Lease of %s obtained, lease time %u", | 1757 | bb_info_msg("Lease of %s obtained, lease time %u", |
| 1757 | inet_ntoa(temp_addr), (unsigned)lease_seconds); | 1758 | inet_ntoa(temp_addr), (unsigned)lease_seconds); |
| 1758 | requested_ip = packet.yiaddr; | 1759 | requested_ip = packet.yiaddr; |
| 1760 | |||
| 1761 | start = monotonic_sec(); | ||
| 1759 | udhcp_run_script(&packet, state == REQUESTING ? "bound" : "renew"); | 1762 | udhcp_run_script(&packet, state == REQUESTING ? "bound" : "renew"); |
| 1763 | already_waited_sec = (unsigned)monotonic_sec() - start; | ||
| 1760 | 1764 | ||
| 1761 | state = BOUND; | 1765 | state = BOUND; |
| 1762 | change_listen_mode(LISTEN_NONE); | 1766 | change_listen_mode(LISTEN_NONE); |
| @@ -1774,7 +1778,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv) | |||
| 1774 | #endif | 1778 | #endif |
| 1775 | /* make future renew packets use different xid */ | 1779 | /* make future renew packets use different xid */ |
| 1776 | /* xid = random_xid(); ...but why bother? */ | 1780 | /* xid = random_xid(); ...but why bother? */ |
| 1777 | already_waited_sec = 0; | 1781 | |
| 1778 | continue; /* back to main loop */ | 1782 | continue; /* back to main loop */ |
| 1779 | } | 1783 | } |
| 1780 | if (*message == DHCPNAK) { | 1784 | if (*message == DHCPNAK) { |
diff --git a/testsuite/find.tests b/testsuite/find.tests index f041106c3..78dfa1230 100755 --- a/testsuite/find.tests +++ b/testsuite/find.tests | |||
| @@ -10,11 +10,12 @@ | |||
| 10 | mkdir -p find.tempdir | 10 | mkdir -p find.tempdir |
| 11 | touch find.tempdir/testfile | 11 | touch find.tempdir/testfile |
| 12 | 12 | ||
| 13 | optional FEATURE_FIND_TYPE | ||
| 13 | testing "find -type f" \ | 14 | testing "find -type f" \ |
| 14 | "cd find.tempdir && find -type f 2>&1" \ | 15 | "cd find.tempdir && find -type f 2>&1" \ |
| 15 | "./testfile\n" \ | 16 | "./testfile\n" \ |
| 16 | "" "" | 17 | "" "" |
| 17 | 18 | SKIP= | |
| 18 | optional FEATURE_FIND_EXEC | 19 | optional FEATURE_FIND_EXEC |
| 19 | testing "find -exec exitcode 1" \ | 20 | testing "find -exec exitcode 1" \ |
| 20 | "cd find.tempdir && find testfile -exec true {} \; 2>&1; echo \$?" \ | 21 | "cd find.tempdir && find testfile -exec true {} \; 2>&1; echo \$?" \ |
diff --git a/testsuite/mdev.tests b/testsuite/mdev.tests index 48d3dcc2c..59873011a 100755 --- a/testsuite/mdev.tests +++ b/testsuite/mdev.tests | |||
| @@ -168,7 +168,7 @@ SKIP= | |||
| 168 | # continuing to use directory structure from prev test | 168 | # continuing to use directory structure from prev test |
| 169 | rm -rf mdev.testdir/dev/* | 169 | rm -rf mdev.testdir/dev/* |
| 170 | echo "sda 0:0 644 @echo @echo TEST" >mdev.testdir/etc/mdev.conf | 170 | echo "sda 0:0 644 @echo @echo TEST" >mdev.testdir/etc/mdev.conf |
| 171 | optional STATIC FEATURE_MDEV_CONF FEATURE_MDEV_EXEC FEATURE_LS_RECURSIVE FEATURE_LS_TIMESTAMPS FEATURE_LS_USERNAME FEATURE_SH_IS_ASH | 171 | optional STATIC FEATURE_MDEV_CONF FEATURE_MDEV_EXEC FEATURE_LS_RECURSIVE FEATURE_LS_TIMESTAMPS FEATURE_LS_USERNAME FEATURE_SH_IS_ASH ASH_BUILTIN_ECHO |
| 172 | testing "mdev command" \ | 172 | testing "mdev command" \ |
| 173 | "env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1; | 173 | "env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1; |
| 174 | ls -lnR mdev.testdir/dev | $FILTER_LS" \ | 174 | ls -lnR mdev.testdir/dev | $FILTER_LS" \ |
