diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-10-05 20:29:31 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-10-05 20:29:31 +0000 |
commit | 91e80c2be7d53b116ef23072ecaa89168b8e5bfc (patch) | |
tree | c10b20b6d4c3221067b59365f51c114f6b5b0261 /archival | |
parent | 226002ea74a5285bb338b17419c13f43a1ff5a47 (diff) | |
download | busybox-w32-91e80c2be7d53b116ef23072ecaa89168b8e5bfc.tar.gz busybox-w32-91e80c2be7d53b116ef23072ecaa89168b8e5bfc.tar.bz2 busybox-w32-91e80c2be7d53b116ef23072ecaa89168b8e5bfc.zip |
delete now unused check_header_gzip.c
sum: do not use uintmax needlessly
Diffstat (limited to 'archival')
-rw-r--r-- | archival/libunarchive/check_header_gzip.c | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/archival/libunarchive/check_header_gzip.c b/archival/libunarchive/check_header_gzip.c deleted file mode 100644 index 66aa57460..000000000 --- a/archival/libunarchive/check_header_gzip.c +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | ||
2 | /* | ||
3 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | ||
4 | */ | ||
5 | |||
6 | #include "libbb.h" | ||
7 | #include "unarchive.h" /* for external decl of check_header_gzip_or_die */ | ||
8 | |||
9 | void check_header_gzip_or_die(int src_fd) | ||
10 | { | ||
11 | union { | ||
12 | unsigned char raw[8]; | ||
13 | struct { | ||
14 | unsigned char method; | ||
15 | unsigned char flags; | ||
16 | unsigned int mtime; | ||
17 | unsigned char xtra_flags; | ||
18 | unsigned char os_flags; | ||
19 | } formatted; | ||
20 | } header; | ||
21 | |||
22 | xread(src_fd, header.raw, 8); | ||
23 | |||
24 | /* Check the compression method */ | ||
25 | if (header.formatted.method != 8) { | ||
26 | bb_error_msg_and_die("unknown compression method %d", | ||
27 | header.formatted.method); | ||
28 | } | ||
29 | |||
30 | if (header.formatted.flags & 0x04) { | ||
31 | /* bit 2 set: extra field present */ | ||
32 | unsigned extra_short; | ||
33 | |||
34 | extra_short = xread_char(src_fd) + (xread_char(src_fd) << 8); | ||
35 | while (extra_short > 0) { | ||
36 | /* Ignore extra field */ | ||
37 | xread_char(src_fd); | ||
38 | extra_short--; | ||
39 | } | ||
40 | } | ||
41 | |||
42 | /* Discard original name if any */ | ||
43 | if (header.formatted.flags & 0x08) { | ||
44 | /* bit 3 set: original file name present */ | ||
45 | while (xread_char(src_fd) != 0); | ||
46 | } | ||
47 | |||
48 | /* Discard file comment if any */ | ||
49 | if (header.formatted.flags & 0x10) { | ||
50 | /* bit 4 set: file comment present */ | ||
51 | while (xread_char(src_fd) != 0); | ||
52 | } | ||
53 | |||
54 | /* Read the header checksum */ | ||
55 | if (header.formatted.flags & 0x02) { | ||
56 | xread_char(src_fd); | ||
57 | xread_char(src_fd); | ||
58 | } | ||
59 | } | ||