diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-04-05 06:44:30 +0400 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-04-05 06:44:30 +0400 |
commit | 1af00eda92e9a036ff217b11ff45ebe559de66f9 (patch) | |
tree | 67472bb3e4eddce347cfe7fa753c24f07faa5c4a /archival/libunarchive/seek_by_jump.c | |
parent | 1a95e3960ca7dde16bda26ec9dad986199bae3c3 (diff) |
cpio: fix a bug where we do not extract zero-sized hardlinks
(spotted at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=466771).
Add testsuite entry for that, and another one for another bug:
we do not list hardlinks in cpio -t (not fixed).
function old new delta
get_header_cpio 884 909 +25
static.saved_hardlinks_created - 4 +4
static.pending_hardlinks 4 - -4
static.inode 4 - -4
cpio_main 1122 1060 -62
Diffstat (limited to 'archival/libunarchive/seek_by_jump.c')
-rw-r--r-- | archival/libunarchive/seek_by_jump.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/archival/libunarchive/seek_by_jump.c b/archival/libunarchive/seek_by_jump.c index 8b5f3e887..5288c1d73 100644 --- a/archival/libunarchive/seek_by_jump.c +++ b/archival/libunarchive/seek_by_jump.c @@ -9,11 +9,9 @@ void seek_by_jump(const archive_handle_t *archive_handle, unsigned amount) { if (lseek(archive_handle->src_fd, (off_t) amount, SEEK_CUR) == (off_t) -1) { -#if ENABLE_FEATURE_UNARCHIVE_TAPE - if (errno == ESPIPE) { + if (errno == ESPIPE) seek_by_read(archive_handle, amount); - } else -#endif + else bb_perror_msg_and_die("seek failure"); } } |