Draft: lab 5 failed

This commit is contained in:
2025-05-03 20:45:34 +08:00
parent 981cae803b
commit e73f90395d
39 changed files with 588 additions and 429 deletions

View File

@@ -17,6 +17,8 @@ fdt_callback_t initrd_dtb_cb = {
void *initrd_start = 0x0;
void *initrd_end = 0x0;
file_node_t *initrd_root = 0x0;
void initrd_fdt_callback(const vector_t *props)
{
for (int i = 0; i < (int)props->size; ++i) {
@@ -87,7 +89,7 @@ static inline void _split(file_node_t *rt, const char *s,
cpio_newc_header_t *initrd_cur;
file_node_t *initrd_init(void)
void initrd_init(void)
{
cpio_newc_header_t *header;
char *filename;
@@ -128,8 +130,8 @@ file_node_t *initrd_init(void)
_split(root, filename, &ltr, &rtr);
root = _merge(ltr, _merge(newnode, rtr));
}
return root;
initrd_root = root;
}
static inline file_node_t *_node_bs(file_node_t *cur, const char *s)