Last change
on this file since 3335 was 3320, checked in by Bruno Cornec, 10 years ago |
- Re-add (thanks git BTW) the 2.2.9 branch which had been destroyed in
the move to 3.0
|
-
Property svn:eol-style
set to
native
|
File size:
1.0 KB
|
Rev | Line | |
---|
[3320] | 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 source tree.
|
---|
| 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"
|
---|
Note:
See
TracBrowser
for help on using the repository browser.