-
Notifications
You must be signed in to change notification settings - Fork 0
/
initrd.h
30 lines (24 loc) · 812 Bytes
/
initrd.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// initrd.h -- Defines the interface for and structures relating to the
// initial ramdisk.
// Written for JamesM's kernel development tutorials.
#ifndef INITRD_H
#define INITRD_H
#include "common.h"
#include "fs.h"
#include "string.h"
#include "kheap.h"
typedef struct
{
u32int nfiles; // The number of files in the ramdisk
} initrd_header_t;
typedef struct
{
u8int magic; // Magic number, for error checking.
s8int name[64]; // Filename.
u32int offset; // Offset in the initrd that the file starts.
u32int length; // length of the file.
} initrd_file_header_t;
// Initialises the initial ramdisk. It gets passed the address of the multiboot
// module and returns a completed filesystem node.
fs_node_t *initialise_initrd(u32int location);
#endif // INITRD_H