Unix copy-in/copy-out archive.
Overview
Each cpio member has a header and the file name, then data padded to 2 or 4 bytes. Formats include old binary, ODC (070707), newc (070701) and CRC (070702), and the archive ends with a member named TRAILER!!!.
Where it is used
- Linux initramfs images and RPM payloads.
History
- Created for Unix PWB/Unix in the 1970s.
Status today
- Still widely used for initramfs and packages.
Structures read by the implementation
Offsets are in bytes from the start of the buffer named in each heading. Field names are taken from the implementation and are not an official specification. Fixed-width integers are shown as u/i (unsigned/signed) followed by bit width and byte order.
No fixed-offset structures were found in the implementation.
Constants
General CpioArchiveModule
| Name | Value | Type | Notes |
|---|---|---|---|
| ModeDir | 0x4000 | int | S_IFDIR |
Implementation limits reader
| Class | Name | Value | Notes |
|---|---|---|---|
| CpioCarver | MaxEntries | 5_000_000 | |
| CpioCarver | MaxNameSize | 65536 | |
| CpioArchiveModule | MaxEntries | 5_000_000 |