author | Denys Vlasenko <vda.linux@googlemail.com> | 2012-05-28 00:48:55 (GMT) |
---|---|---|
committer | Tanguy Pruvot <tanguy.pruvot@gmail.com> | 2012-05-28 01:29:02 (GMT) |
commit | c1b7d1db9b06e497be82dfa11c36cf2d596ff6e7 (patch) | |
tree | b5d05d10c824a8c88e59f04d62ecc8e0003ee1dc | |
parent | 024a6c40cc9a2d953785d2b63851b60ed57c5625 (diff) | |
download | busybox-c1b7d1db9b06e497be82dfa11c36cf2d596ff6e7.zip busybox-c1b7d1db9b06e497be82dfa11c36cf2d596ff6e7.tar.gz busybox-c1b7d1db9b06e497be82dfa11c36cf2d596ff6e7.tar.bz2 |
Apply post-1.20.0 patches, bump version to 1.20.1
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | archival/libarchive/Kbuild.src | 4 | ||||
-rw-r--r-- | findutils/find.c | 10 | ||||
-rw-r--r-- | libbb/lineedit.c | 6 | ||||
-rw-r--r-- | loginutils/getty.c | 6 | ||||
-rw-r--r-- | util-linux/mdev.c | 41 |
6 files changed, 44 insertions, 25 deletions
@@ -1,6 +1,6 @@ VERSION = 1 PATCHLEVEL = 20 -SUBLEVEL = 0 +SUBLEVEL = 1 EXTRAVERSION = -cm9 NAME = bionic diff --git a/archival/libarchive/Kbuild.src b/archival/libarchive/Kbuild.src index 9592217..58457fc 100644 --- a/archival/libarchive/Kbuild.src +++ b/archival/libarchive/Kbuild.src @@ -45,7 +45,7 @@ lib-$(CONFIG_UNXZ) += decompress_unxz.o lib-$(CONFIG_CPIO) += get_header_cpio.o lib-$(CONFIG_DPKG) += $(DPKG_FILES) lib-$(CONFIG_DPKG_DEB) += $(DPKG_FILES) -lib-$(CONFIG_GUNZIP) += decompress_gunzip.o +lib-$(CONFIG_GUNZIP) += open_transformer.o decompress_gunzip.o lib-$(CONFIG_RPM2CPIO) += decompress_gunzip.o get_header_cpio.o lib-$(CONFIG_RPM) += open_transformer.o decompress_gunzip.o get_header_cpio.o lib-$(CONFIG_TAR) += get_header_tar.o @@ -60,7 +60,7 @@ lib-$(CONFIG_FEATURE_SEAMLESS_GZ) += open_transformer.o decompress_gunzip. lib-$(CONFIG_FEATURE_SEAMLESS_BZ2) += open_transformer.o decompress_bunzip2.o lib-$(CONFIG_FEATURE_SEAMLESS_LZMA) += open_transformer.o decompress_unlzma.o lib-$(CONFIG_FEATURE_SEAMLESS_XZ) += open_transformer.o decompress_unxz.o -lib-$(CONFIG_FEATURE_COMPRESS_USAGE) += decompress_bunzip2.o +lib-$(CONFIG_FEATURE_COMPRESS_USAGE) += open_transformer.o decompress_bunzip2.o lib-$(CONFIG_FEATURE_COMPRESS_BBCONFIG) += decompress_bunzip2.o lib-$(CONFIG_FEATURE_TAR_TO_COMMAND) += data_extract_to_command.o diff --git a/findutils/find.c b/findutils/find.c index ce0b0ed..b5e366e 100644 --- a/findutils/find.c +++ b/findutils/find.c @@ -831,6 +831,11 @@ static action*** parse_params(char **argv) PARM_name , PARM_iname , IF_FEATURE_FIND_PATH( PARM_path ,) +#if ENABLE_DESKTOP + /* -wholename is a synonym for -path */ + /* We support it because Linux kernel's "make tags" uses it */ + IF_FEATURE_FIND_PATH( PARM_wholename ,) +#endif IF_FEATURE_FIND_PATH( PARM_ipath ,) IF_FEATURE_FIND_REGEX( PARM_regex ,) IF_FEATURE_FIND_TYPE( PARM_type ,) @@ -869,6 +874,9 @@ static action*** parse_params(char **argv) "-name\0" "-iname\0" IF_FEATURE_FIND_PATH( "-path\0" ) +#if ENABLE_DESKTOP + IF_FEATURE_FIND_PATH( "-wholename\0") +#endif IF_FEATURE_FIND_PATH( "-ipath\0" ) IF_FEATURE_FIND_REGEX( "-regex\0" ) IF_FEATURE_FIND_TYPE( "-type\0" ) @@ -1076,7 +1084,7 @@ static action*** parse_params(char **argv) ap->iname = (parm == PARM_iname); } #if ENABLE_FEATURE_FIND_PATH - else if (parm == PARM_path || parm == PARM_ipath) { + else if (parm == PARM_path IF_DESKTOP(|| parm == PARM_wholename) || parm == PARM_ipath) { action_path *ap; dbg("%d", __LINE__); ap = ALLOC_ACTION(path); diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 1a43b17..69a1e7d 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c @@ -1352,8 +1352,7 @@ static void load_history(line_input_t *st_parm) /* fill temp_h[], retaining only last MAX_HISTORY lines */ memset(temp_h, 0, sizeof(temp_h)); idx = 0; - if (!ENABLE_FEATURE_EDITING_SAVE_ON_EXIT) - st_parm->cnt_history_in_file = 0; + st_parm->cnt_history_in_file = 0; while ((line = xmalloc_fgetline(fp)) != NULL) { if (line[0] == '\0') { free(line); @@ -1361,8 +1360,7 @@ static void load_history(line_input_t *st_parm) } free(temp_h[idx]); temp_h[idx] = line; - if (!ENABLE_FEATURE_EDITING_SAVE_ON_EXIT) - st_parm->cnt_history_in_file++; + st_parm->cnt_history_in_file++; idx++; if (idx == st_parm->max_history) idx = 0; diff --git a/loginutils/getty.c b/loginutils/getty.c index afb411b..bbb5a96 100644 --- a/loginutils/getty.c +++ b/loginutils/getty.c @@ -561,8 +561,14 @@ int getty_main(int argc UNUSED_PARAM, char **argv) */ fd = open("/dev/tty", O_RDWR | O_NONBLOCK); if (fd >= 0) { + /* TIOCNOTTY sends SIGHUP to the foreground + * process group - which may include us! + * Make sure to not die on it: + */ + sighandler_t old = signal(SIGHUP, SIG_IGN); ioctl(fd, TIOCNOTTY); close(fd); + signal(SIGHUP, old); } } diff --git a/util-linux/mdev.c b/util-linux/mdev.c index 0a34122..c4829a5 100644 --- a/util-linux/mdev.c +++ b/util-linux/mdev.c @@ -661,37 +661,45 @@ static int FAST_FUNC dirAction(const char *fileName UNUSED_PARAM, static void load_firmware(const char *firmware, const char *sysfs_path) { int cnt; - int firmware_fd, loading_fd, data_fd; + int firmware_fd, loading_fd; /* check for /lib/firmware/$FIRMWARE */ xchdir("/lib/firmware"); - firmware_fd = xopen(firmware, O_RDONLY); - - /* in case we goto out ... */ - data_fd = -1; + firmware_fd = open(firmware, O_RDONLY); /* can fail */ /* check for /sys/$DEVPATH/loading ... give 30 seconds to appear */ xchdir(sysfs_path); for (cnt = 0; cnt < 30; ++cnt) { loading_fd = open("loading", O_WRONLY); - if (loading_fd != -1) + if (loading_fd >= 0) goto loading; sleep(1); } goto out; loading: - /* tell kernel we're loading by "echo 1 > /sys/$DEVPATH/loading" */ - if (full_write(loading_fd, "1", 1) != 1) - goto out; - - /* load firmware into /sys/$DEVPATH/data */ - data_fd = open("data", O_WRONLY); - if (data_fd == -1) - goto out; - cnt = bb_copyfd_eof(firmware_fd, data_fd); + cnt = 0; + if (firmware_fd >= 0) { + int data_fd; + + /* tell kernel we're loading by "echo 1 > /sys/$DEVPATH/loading" */ + if (full_write(loading_fd, "1", 1) != 1) + goto out; + + /* load firmware into /sys/$DEVPATH/data */ + data_fd = open("data", O_WRONLY); + if (data_fd < 0) + goto out; + cnt = bb_copyfd_eof(firmware_fd, data_fd); + if (ENABLE_FEATURE_CLEAN_UP) + close(data_fd); + } - /* tell kernel result by "echo [0|-1] > /sys/$DEVPATH/loading" */ + /* Tell kernel result by "echo [0|-1] > /sys/$DEVPATH/loading" + * Note: we emit -1 if firmware file wasn't found. + * There are cases when otherwise kernel would wait for minutes + * before timing out. + */ if (cnt > 0) full_write(loading_fd, "0", 1); else @@ -701,7 +709,6 @@ static void load_firmware(const char *firmware, const char *sysfs_path) if (ENABLE_FEATURE_CLEAN_UP) { close(firmware_fd); close(loading_fd); - close(data_fd); } } |