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.1KB

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