iPXE
cpio.h
Go to the documentation of this file.
1 #ifndef _IPXE_CPIO_H
2 #define _IPXE_CPIO_H
3 
4 /** @file
5  *
6  * CPIO archives
7  *
8  */
9 
10 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11 
12 /** A CPIO archive header
13  *
14  * All field are hexadecimal ASCII numbers padded with '0' on the
15  * left to the full width of the field.
16  */
17 struct cpio_header {
18  /** The string "070701" or "070702" */
19  char c_magic[6];
20  /** File inode number */
21  char c_ino[8];
22  /** File mode and permissions */
23  char c_mode[8];
24  /** File uid */
25  char c_uid[8];
26  /** File gid */
27  char c_gid[8];
28  /** Number of links */
29  char c_nlink[8];
30  /** Modification time */
31  char c_mtime[8];
32  /** Size of data field */
33  char c_filesize[8];
34  /** Major part of file device number */
35  char c_maj[8];
36  /** Minor part of file device number */
37  char c_min[8];
38  /** Major part of device node reference */
39  char c_rmaj[8];
40  /** Minor part of device node reference */
41  char c_rmin[8];
42  /** Length of filename, including final NUL */
43  char c_namesize[8];
44  /** Checksum of data field if c_magic is 070702, othersize zero */
45  char c_chksum[8];
46 } __attribute__ (( packed ));
47 
48 /** CPIO magic */
49 #define CPIO_MAGIC "070701"
50 
51 extern void cpio_set_field ( char *field, unsigned long value );
52 
53 #endif /* _IPXE_CPIO_H */
char c_ino[8]
File inode number.
Definition: cpio.h:21
char c_maj[8]
Major part of file device number.
Definition: cpio.h:35
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
char c_filesize[8]
Size of data field.
Definition: cpio.h:33
A CPIO archive header.
Definition: cpio.h:17
char c_mtime[8]
Modification time.
Definition: cpio.h:31
char c_uid[8]
File uid.
Definition: cpio.h:25
char c_gid[8]
File gid.
Definition: cpio.h:27
pseudo_bit_t value[0x00020]
Definition: arbel.h:13
char c_min[8]
Minor part of file device number.
Definition: cpio.h:37
char c_rmin[8]
Minor part of device node reference.
Definition: cpio.h:41
char c_mode[8]
File mode and permissions.
Definition: cpio.h:23
void cpio_set_field(char *field, unsigned long value)
Set field within a CPIO header.
Definition: cpio.c:42
char c_namesize[8]
Length of filename, including final NUL.
Definition: cpio.h:43
char c_nlink[8]
Number of links.
Definition: cpio.h:29
char c_magic[6]
The string "070701" or "070702".
Definition: cpio.h:19
char c_chksum[8]
Checksum of data field if c_magic is 070702, othersize zero.
Definition: cpio.h:45
char c_rmaj[8]
Major part of device node reference.
Definition: cpio.h:39
struct cpio_header __attribute__((packed))