|
iPXE
|
CPIO archives. More...
Go to the source code of this file.
Data Structures | |
| struct | cpio_header |
| A CPIO archive header. More... | |
Macros | |
| #define | CPIO_MAGIC "070701" |
| CPIO magic. More... | |
| #define | CPIO_MODE_FILE 0100000 |
| CPIO type for regular files. More... | |
| #define | CPIO_MODE_DIR 0040000 |
| CPIO type for directories. More... | |
| #define | CPIO_ALIGN 4 |
| CPIO header length alignment. More... | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| static const char * | cpio_name (struct image *image) |
| Get CPIO image name. More... | |
| static size_t | cpio_pad_len (size_t len) |
| Get CPIO header zero-padding length. More... | |
| size_t | cpio_header (struct image *image, unsigned int index, struct cpio_header *cpio) |
| Construct CPIO header for image, if applicable. More... | |
CPIO archives.
Definition in file cpio.h.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
inlinestatic |
Get CPIO image name.
| image | Image |
| name | Image name (not NUL terminated) |
Definition at line 70 of file cpio.h.
References image::cmdline.
Referenced by cpio_header(), cpio_max(), cpio_name_len(), cpio_okx(), efi_file_read_initrd(), and initrd_load().
Get CPIO header zero-padding length.
| len | Length of CPIO header (including name, excluding NUL) |
| pad_len | Padding length |
Definition at line 81 of file cpio.h.
References CPIO_ALIGN, and len.
Referenced by cpio_okx(), efi_file_read_initrd(), and initrd_load().
| size_t cpio_header | ( | struct image * | image, |
| unsigned int | index, | ||
| struct cpio_header * | cpio | ||
| ) |
Construct CPIO header for image, if applicable.
| image | Image |
| index | CPIO header index |
| cpio | CPIO header to fill in |
| len | Length of CPIO header (including name, excluding NUL) |
Definition at line 155 of file cpio.c.
References cpio_header::c_filesize, cpio_header::c_magic, cpio_header::c_mode, cpio_header::c_namesize, cpio_header::c_nlink, count, CPIO_DEFAULT_DIR_MODE, CPIO_MAGIC, cpio_max(), CPIO_MODE_DIR, CPIO_MODE_FILE, cpio_name(), cpio_name_len(), cpio_parse_cmdline(), cpio_set_field(), DBGC, DBGC2_HDA, index, image::len, len, max, memcpy(), memset(), mode, image::name, and name.
Referenced by cpio_okx(), efi_file_read_initrd(), and initrd_load().
1.8.15