Magellan Linux

Contents of /trunk/mkinitrd-magellan/busybox/archival/rpm.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1123 - (show annotations) (download)
Wed Aug 18 21:56:57 2010 UTC (13 years, 8 months ago) by niro
File MIME type: text/plain
File size: 1049 byte(s)
-updated to busybox-1.17.1
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"