aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-02-14 08:52:30 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-02-14 08:52:30 +0000
commit12c0622231aa9b2e08b27364095d2e5bd4faf2c1 (patch)
treece364a4f053c6f759098a2dd52cc6fb80a285c08
parentb5ee8db9b55eeeab542d6263d67aac12ffcb5e5b (diff)
downloadbusybox-w32-12c0622231aa9b2e08b27364095d2e5bd4faf2c1.tar.gz
busybox-w32-12c0622231aa9b2e08b27364095d2e5bd4faf2c1.tar.bz2
busybox-w32-12c0622231aa9b2e08b27364095d2e5bd4faf2c1.zip
tar: do "short EOF" compat only if CONFIG_DESKTOP.
ash: add a comment about new minor bug
-rw-r--r--archival/libunarchive/get_header_tar.c9
-rw-r--r--shell/README4
2 files changed, 12 insertions, 1 deletions
diff --git a/archival/libunarchive/get_header_tar.c b/archival/libunarchive/get_header_tar.c
index 7493d910e..5a1f5948f 100644
--- a/archival/libunarchive/get_header_tar.c
+++ b/archival/libunarchive/get_header_tar.c
@@ -90,15 +90,22 @@ char get_header_tar(archive_handle_t *archive_handle)
90 90
91 again_after_align: 91 again_after_align:
92 92
93#if ENABLE_DESKTOP
93 i = full_read(archive_handle->src_fd, &tar, 512); 94 i = full_read(archive_handle->src_fd, &tar, 512);
94 /* if GNU tar sees EOF in above read, it says: 95 /* if GNU tar sees EOF in above read, it says:
95 * "tar: A lone zero block at N", where N = kilobyte 96 * "tar: A lone zero block at N", where N = kilobyte
96 * where EOF was met (not EOF block, actual EOF!), 97 * where EOF was met (not EOF block, actual EOF!),
97 * and tar will exit with error code 0! Mimic exit(0): */ 98 * and tar will exit with error code 0.
99 * We will mimic exit(0), although we will not mimic
100 * the message and we don't check whether we indeed
101 * saw zero block directly before this. */
98 if (i == 0) 102 if (i == 0)
99 xfunc_error_retval = 0; 103 xfunc_error_retval = 0;
100 if (i != 512) 104 if (i != 512)
101 bb_error_msg_and_die("short read"); 105 bb_error_msg_and_die("short read");
106#else
107 xread(archive_handle->src_fd, &tar, 512);
108#endif
102 archive_handle->offset += 512; 109 archive_handle->offset += 512;
103 110
104 /* If there is no filename its an empty header */ 111 /* If there is no filename its an empty header */
diff --git a/shell/README b/shell/README
index f78ed9d18..17e2cb802 100644
--- a/shell/README
+++ b/shell/README
@@ -1,5 +1,9 @@
1Various bits of what is known about busybox shells, in no particular order. 1Various bits of what is known about busybox shells, in no particular order.
2 2
32008-02-14
4ash: does not restore tty pgrp if killed by HUP. Symptom: Midnigth Commander
5is backgrounded if you started ash under it, and then killed it with HUP.
6
32007-11-23 72007-11-23
4hush: fixed bogus glob handling; fixed exec <"$1"; added test and echo builtins 8hush: fixed bogus glob handling; fixed exec <"$1"; added test and echo builtins
5 9