summaryrefslogtreecommitdiff
path: root/src/kernel/vfs/initrd.h
blob: 0cabccf23c985265aecf794e23d629c316f9f214 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#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