summaryrefslogblamecommitdiff
path: root/src/kernel/vfs/initrd.h
blob: 0cabccf23c985265aecf794e23d629c316f9f214 (plain) (tree)





















                                                                                                 
#ifndef DEF_VFS_INITRD_H
#define DEF_VFS_INITRD_H

#include "node.h"
#include "vdir.h"

struct initrd_header {
	unsigned int magic;	//For error checking
	unsigned int files;
};

struct initrd_file_header {
	unsigned int name_length;
	unsigned int file_length;
};

#define INITRD_MAGIC 0x12379846

int initrd_check(uint8_t *data);			// returns 0 if initrd file, -1 otherwise
int initrd_load(uint8_t *data, vdir *root);

#endif