cpio: add initcpio loading

Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
Michael Shaw 2026-07-07 00:02:02 +02:00
commit 8d2cb24237
3 changed files with 189 additions and 2 deletions

View file

@ -2,11 +2,12 @@
#ifndef _CPIO_H_
#define _CPIO_H_
#include <kernel/common.h>
#include <fs/vfs.h>
#define CPIO_NEWC_MAGIC "070701"
#define CPIO_TRAILER "TRAILER!!!"
#include <kernel/common.h>
struct cpio_newc_header {
char c_magic[6];
char c_ino[8];
@ -24,4 +25,6 @@ struct cpio_newc_header {
char c_check[8];
} PACKED;
int cpio_read_and_init(const char *file, size_t len, fs_t **out);
#endif /* _CPIO_H_ */