You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

cpio.h 1.2KB

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