mirror of
https://github.com/sheumann/hush.git
synced 2024-12-22 14:30:31 +00:00
0a130d510d
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>
20 lines
378 B
C
20 lines
378 B
C
/* vi: set sw=4 ts=4: */
|
|
/*
|
|
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
|
|
*/
|
|
|
|
#include "libbb.h"
|
|
#include "unarchive.h"
|
|
|
|
void FAST_FUNC seek_by_jump(int fd, off_t amount)
|
|
{
|
|
if (amount
|
|
&& lseek(fd, amount, SEEK_CUR) == (off_t) -1
|
|
) {
|
|
if (errno == ESPIPE)
|
|
seek_by_read(fd, amount);
|
|
else
|
|
bb_perror_msg_and_die("seek failure");
|
|
}
|
|
}
|