diff options
| author | Simon Rettberg | 2021-07-22 14:36:35 +0200 |
|---|---|---|
| committer | Simon Rettberg | 2021-07-22 14:36:35 +0200 |
| commit | fc21afb08c7b827b3cd4a77618f36a7abdc13494 (patch) | |
| tree | f7909726a1d49cb834bfa9647621b29cb15caea4 /src/include/ipxe/cpio.h | |
| parent | Merge branch 'master' into openslx (diff) | |
| parent | [cloud] Retry DHCP aggressively in AWS EC2 (diff) | |
| download | ipxe-fc21afb08c7b827b3cd4a77618f36a7abdc13494.tar.gz ipxe-fc21afb08c7b827b3cd4a77618f36a7abdc13494.tar.xz ipxe-fc21afb08c7b827b3cd4a77618f36a7abdc13494.zip | |
Merge branch 'master' into openslx
Diffstat (limited to 'src/include/ipxe/cpio.h')
| -rw-r--r-- | src/include/ipxe/cpio.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/include/ipxe/cpio.h b/src/include/ipxe/cpio.h index 0637c531d..9c5e22d5a 100644 --- a/src/include/ipxe/cpio.h +++ b/src/include/ipxe/cpio.h @@ -9,6 +9,8 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); +#include <ipxe/image.h> + /** A CPIO archive header * * All field are hexadecimal ASCII numbers padded with '0' on the @@ -48,6 +50,25 @@ struct cpio_header { /** CPIO magic */ #define CPIO_MAGIC "070701" +/** CPIO header length alignment */ +#define CPIO_ALIGN 4 + +/** Alignment for CPIO archives within an initrd */ +#define INITRD_ALIGN 4096 + +/** + * Get CPIO image name + * + * @v image Image + * @ret name Image name (not NUL terminated) + */ +static inline __attribute__ (( always_inline )) const char * +cpio_name ( struct image *image ) { + return image->cmdline; +} + extern void cpio_set_field ( char *field, unsigned long value ); +extern size_t cpio_name_len ( struct image *image ); +extern size_t cpio_header ( struct image *image, struct cpio_header *cpio ); #endif /* _IPXE_CPIO_H */ |
