X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=archival%2Flibunarchive%2Fseek_by_jump.c;h=5288c1d73657714be031a6abced054eede3876f4;hb=bc1918a7a278195709387fc586dbbf5a56867364;hp=d605f61dd4a103f8e917ecc55bbbaefbf3c0194b;hpb=e1a0d486e4804eae098571f1a6788394c2ee51ae;p=oweals%2Fbusybox.git diff --git a/archival/libunarchive/seek_by_jump.c b/archival/libunarchive/seek_by_jump.c index d605f61dd..5288c1d73 100644 --- a/archival/libunarchive/seek_by_jump.c +++ b/archival/libunarchive/seek_by_jump.c @@ -3,22 +3,15 @@ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. */ -#include -#include -#include -#include - #include "libbb.h" #include "unarchive.h" -void seek_by_jump(const archive_handle_t *archive_handle, const unsigned int amount) +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) { -#ifdef CONFIG_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"); } }