diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-05-06 14:19:19 +0000 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-05-06 14:19:19 +0000 |
commit | 27653adc8b7ebe44bd357511de53d0c14eef0894 (patch) | |
tree | d1c9b0facbcca408a18d75f93aa507e96927ef31 /archival/rpm.h | |
parent | b8ba6b66f5d730efcf13dbbb3f9362dd6840d93b (diff) | |
download | busybox-w32-27653adc8b7ebe44bd357511de53d0c14eef0894.tar.gz busybox-w32-27653adc8b7ebe44bd357511de53d0c14eef0894.tar.bz2 busybox-w32-27653adc8b7ebe44bd357511de53d0c14eef0894.zip |
rpm: code shrink. Now uses open_zipped's logic (factored out into setup_unzip_on_fd())
function old new delta
setup_unzip_on_fd - 80 +80
open_zipped 176 113 -63
rpm_main 1672 1355 -317
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/2 up/down: 80/-380) Total: -300 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'archival/rpm.h')
-rw-r--r-- | archival/rpm.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/archival/rpm.h b/archival/rpm.h new file mode 100644 index 000000000..f7c6fc2fa --- /dev/null +++ b/archival/rpm.h | |||
@@ -0,0 +1,38 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | ||
2 | /* | ||
3 | * RPM structs and consts | ||
4 | * | ||
5 | * Copyright (C) 2001 by Laurence Anderson | ||
6 | * | ||
7 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | ||
8 | */ | ||
9 | |||
10 | /* RPM file starts with this struct: */ | ||
11 | struct rpm_lead { | ||
12 | uint32_t magic; | ||
13 | uint8_t major, minor; | ||
14 | uint16_t type; | ||
15 | uint16_t archnum; | ||
16 | char name[66]; | ||
17 | uint16_t osnum; | ||
18 | uint16_t signature_type; | ||
19 | char reserved[16]; | ||
20 | }; | ||
21 | struct BUG_rpm_lead { | ||
22 | char bug[sizeof(struct rpm_lead) == 96 ? 1 : -1]; | ||
23 | }; | ||
24 | #define RPM_LEAD_MAGIC 0xedabeedb | ||
25 | #define RPM_LEAD_MAGIC_STR "\355\253\356\333" | ||
26 | |||
27 | /* Then follows the header: */ | ||
28 | struct rpm_header { | ||
29 | uint32_t magic_and_ver; /* 3 byte magic: 0x8e 0xad 0xe8; 1 byte version: 0x01 */ | ||
30 | uint32_t reserved; /* 4 bytes reserved */ | ||
31 | uint32_t entries; /* Number of entries in header (4 bytes) */ | ||
32 | uint32_t size; /* Size of store (4 bytes) */ | ||
33 | }; | ||
34 | struct BUG_rpm_header { | ||
35 | char bug[sizeof(struct rpm_header) == 16 ? 1 : -1]; | ||
36 | }; | ||
37 | #define RPM_HEADER_MAGICnVER 0x8eade801 | ||
38 | #define RPM_HEADER_MAGIC_STR "\216\255\350" | ||