00001 #ifndef _GPXE_CPIO_H 00002 #define _GPXE_CPIO_H 00003 00004 /** @file 00005 * 00006 * CPIO archives 00007 * 00008 */ 00009 00010 FILE_LICENCE ( GPL2_OR_LATER ); 00011 00012 /** A CPIO archive header 00013 * 00014 * All field are hexadecimal ASCII numbers padded with '0' on the 00015 * left to the full width of the field. 00016 */ 00017 struct cpio_header { 00018 /** The string "070701" or "070702" */ 00019 char c_magic[6]; 00020 /** File inode number */ 00021 char c_ino[8]; 00022 /** File mode and permissions */ 00023 char c_mode[8]; 00024 /** File uid */ 00025 char c_uid[8]; 00026 /** File gid */ 00027 char c_gid[8]; 00028 /** Number of links */ 00029 char c_nlink[8]; 00030 /** Modification time */ 00031 char c_mtime[8]; 00032 /** Size of data field */ 00033 char c_filesize[8]; 00034 /** Major part of file device number */ 00035 char c_maj[8]; 00036 /** Minor part of file device number */ 00037 char c_min[8]; 00038 /** Major part of device node reference */ 00039 char c_rmaj[8]; 00040 /** Minor part of device node reference */ 00041 char c_rmin[8]; 00042 /** Length of filename, including final NUL */ 00043 char c_namesize[8]; 00044 /** Checksum of data field if c_magic is 070702, othersize zero */ 00045 char c_chksum[8]; 00046 } __attribute__ (( packed )); 00047 00048 /** CPIO magic */ 00049 #define CPIO_MAGIC "070701" 00050 00051 extern void cpio_set_field ( char *field, unsigned long value ); 00052 00053 #endif /* _GPXE_CPIO_H */
1.5.7.1