diff options
author | Rob Landley | 2006-07-16 08:14:35 +0000 |
---|---|---|
committer | Rob Landley | 2006-07-16 08:14:35 +0000 |
commit | 534374755d618c9c36c9940c82756241c4b25a67 (patch) | |
tree | fac906b4fa40a68c53cecf20215a7a25b3b1cab6 /archival/libunarchive/check_header_gzip.c | |
parent | afb94ecf2bb6c53ce2a381d6ce45a426243c76d9 (diff) | |
download | busybox-534374755d618c9c36c9940c82756241c4b25a67.zip busybox-534374755d618c9c36c9940c82756241c4b25a67.tar.gz |
Cleaup read() and write() variants, plus a couple of new functions like
xlseek and fdlength() for the new mkswap.
Diffstat (limited to 'archival/libunarchive/check_header_gzip.c')
-rw-r--r-- | archival/libunarchive/check_header_gzip.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/archival/libunarchive/check_header_gzip.c b/archival/libunarchive/check_header_gzip.c index 79477c6..77e1e6a 100644 --- a/archival/libunarchive/check_header_gzip.c +++ b/archival/libunarchive/check_header_gzip.c @@ -20,7 +20,7 @@ void check_header_gzip(int src_fd) } formated; } header; - bb_xread_all(src_fd, header.raw, 8); + xread(src_fd, header.raw, 8); /* Check the compression method */ if (header.formated.method != 8) { @@ -32,10 +32,10 @@ void check_header_gzip(int src_fd) /* bit 2 set: extra field present */ unsigned char extra_short; - extra_short = bb_xread_char(src_fd) + (bb_xread_char(src_fd) << 8); + extra_short = xread_char(src_fd) + (xread_char(src_fd) << 8); while (extra_short > 0) { /* Ignore extra field */ - bb_xread_char(src_fd); + xread_char(src_fd); extra_short--; } } @@ -43,19 +43,19 @@ void check_header_gzip(int src_fd) /* Discard original name if any */ if (header.formated.flags & 0x08) { /* bit 3 set: original file name present */ - while(bb_xread_char(src_fd) != 0); + while(xread_char(src_fd) != 0); } /* Discard file comment if any */ if (header.formated.flags & 0x10) { /* bit 4 set: file comment present */ - while(bb_xread_char(src_fd) != 0); + while(xread_char(src_fd) != 0); } /* Read the header checksum */ if (header.formated.flags & 0x02) { - bb_xread_char(src_fd); - bb_xread_char(src_fd); + xread_char(src_fd); + xread_char(src_fd); } return; |