diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-07-01 07:12:28 +0400 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-07-01 07:12:28 +0400 |
commit | 45f66167fe96de219aac91d842f3e64d857340f6 (patch) | |
tree | c141f2aa8213089258125b370a7427bf14937aaf /archival/rpm2cpio.c | |
parent | 620e863ba24fe9e0126d1540e89a531264021a77 (diff) |
xz compression detection: avoid the need to seek
function old new delta
unpack_unxz 12 67 +55
unpack_xz_stream 2357 2373 +16
xmalloc_read 197 199 +2
setup_unzip_on_fd 118 99 -19
rpm2cpio_main 222 203 -19
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/2 up/down: 73/-38) Total: 35 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'archival/rpm2cpio.c')
-rw-r--r-- | archival/rpm2cpio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/archival/rpm2cpio.c b/archival/rpm2cpio.c index 1f67fa887..b23d5afa9 100644 --- a/archival/rpm2cpio.c +++ b/archival/rpm2cpio.c @@ -92,8 +92,8 @@ int rpm2cpio_main(int argc UNUSED_PARAM, char **argv) xread(rpm_fd, magic.b32, sizeof(magic.b32[0])); if (magic.b32[0] != XZ_MAGIC2) goto no_magic; - /* unpack_xz_stream wants fd at position 0 */ - xlseek(rpm_fd, -6, SEEK_CUR); + /* unpack_xz_stream wants fd at position 6, no need to seek */ + //xlseek(rpm_fd, -6, SEEK_CUR); unpack = unpack_xz_stream; } else { no_magic: |