summaryrefslogtreecommitdiff
path: root/archival/libunarchive/seek_by_jump.c
diff options
context:
space:
mode:
authorDenys Vlasenko2009-08-28 21:09:51 +0200
committerDenys Vlasenko2009-08-28 21:09:51 +0200
commit0a130d510dc5272dc2fc7bc5a116f0694c8bd2a9 (patch)
tree029e91a6302547df06524ae6d73ecb5b85e35360 /archival/libunarchive/seek_by_jump.c
parent7f2149489fe62373a13792d3de6c33c39725c76c (diff)
downloadbusybox-0a130d510dc5272dc2fc7bc5a116f0694c8bd2a9.zip
busybox-0a130d510dc5272dc2fc7bc5a116f0694c8bd2a9.tar.gz
rpm2cpio: handle unseekable input correctly
function old new delta data_skip 14 20 +6 seek_by_jump 67 72 +5 data_align 81 84 +3 seek_by_read 20 19 -1 skip_header 99 94 -5 rpm2cpio_main 183 177 -6 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/3 up/down: 14/-12) Total: 2 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'archival/libunarchive/seek_by_jump.c')
-rw-r--r--archival/libunarchive/seek_by_jump.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/archival/libunarchive/seek_by_jump.c b/archival/libunarchive/seek_by_jump.c
index 0a259c9..7181cb3 100644
--- a/archival/libunarchive/seek_by_jump.c
+++ b/archival/libunarchive/seek_by_jump.c
@@ -6,13 +6,13 @@
#include "libbb.h"
#include "unarchive.h"
-void FAST_FUNC seek_by_jump(const archive_handle_t *archive_handle, unsigned amount)
+void FAST_FUNC seek_by_jump(int fd, off_t amount)
{
if (amount
- && lseek(archive_handle->src_fd, (off_t) amount, SEEK_CUR) == (off_t) -1
+ && lseek(fd, amount, SEEK_CUR) == (off_t) -1
) {
if (errno == ESPIPE)
- seek_by_read(archive_handle, amount);
+ seek_by_read(fd, amount);
else
bb_perror_msg_and_die("seek failure");
}