summaryrefslogtreecommitdiff
path: root/src/kernel/vfs/initrd.h
diff options
context:
space:
mode:
authorAlex AUVOLAT <alexis211@gmail.com>2012-05-18 14:47:44 +0200
committerAlex AUVOLAT <alexis211@gmail.com>2012-05-18 14:47:44 +0200
commit7d5a38ada35ac196919c26675f211adb995b84ae (patch)
tree60d9733a1ca44ff873dbac610ea367863d5c648b /src/kernel/vfs/initrd.h
parent1ecb3fb821f49450ba4b08ad7d7a23d3acb75c47 (diff)
downloadTCE-7d5a38ada35ac196919c26675f211adb995b84ae.tar.gz
TCE-7d5a38ada35ac196919c26675f211adb995b84ae.zip
Added initrd. Status: VFS support, totally useless shell.
Diffstat (limited to 'src/kernel/vfs/initrd.h')
-rw-r--r--src/kernel/vfs/initrd.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/kernel/vfs/initrd.h b/src/kernel/vfs/initrd.h
new file mode 100644
index 0000000..0cabccf
--- /dev/null
+++ b/src/kernel/vfs/initrd.h
@@ -0,0 +1,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