Mercurial > lcfOS
comparison cos/kernel/initrd.c @ 43:e47bfef80baf
Fixed build by commenting out initrd code
author | windel |
---|---|
date | Sat, 18 Feb 2012 16:18:03 +0100 |
parents | 35cc54e078dd |
children |
comparison
equal
deleted
inserted
replaced
42:980b2f14c9be | 43:e47bfef80baf |
---|---|
3 * */ | 3 * */ |
4 | 4 |
5 #include "kernel.h" | 5 #include "kernel.h" |
6 | 6 |
7 // Global data struct: | 7 // Global data struct: |
8 initrd_file_header_t *files; | 8 //initrd_file_header_t *files; |
9 | 9 |
10 /* | |
10 fs_node_t* initialize_initrd(uint64_t location) | 11 fs_node_t* initialize_initrd(uint64_t location) |
11 { | 12 { |
12 uint32_t *u32ptr; | 13 uint32_t *u32ptr; |
13 | 14 |
14 u32ptr = (uint32_t*)location; | 15 u32ptr = (uint32_t*)location; |
37 } | 38 } |
38 | 39 |
39 return root; | 40 return root; |
40 } | 41 } |
41 | 42 |
43 */ | |
44 | |
42 void load_ramdisk() | 45 void load_ramdisk() |
43 { | 46 { |
44 printf("Ramdisk location: %p\n", ramdisk_location); | 47 printf("Ramdisk location: %p\n", ramdisk_location); |
45 | 48 |
49 /* | |
46 fs_node_t *root = initialize_initrd(ramdisk_location); | 50 fs_node_t *root = initialize_initrd(ramdisk_location); |
47 | 51 |
48 if (root != 0) | 52 if (root != 0) |
49 { | 53 { |
50 fs_node_t *node = 0; | 54 fs_node_t *node = 0; |
52 while ( (node = readdir_fs(root, i)) != 0) | 56 while ( (node = readdir_fs(root, i)) != 0) |
53 { | 57 { |
54 printf("File %s\n", node->name); | 58 printf("File %s\n", node->name); |
55 } | 59 } |
56 } | 60 } |
61 */ | |
57 } | 62 } |
58 | 63 |
64 /* | |
59 static uint64_t initrd_read(fs_node_t *node, uint64_t offset, uint64_t size, void *buffer) | 65 static uint64_t initrd_read(fs_node_t *node, uint64_t offset, uint64_t size, void *buffer) |
60 { | 66 { |
61 // TODO: check errors | 67 // TODO: check errors |
62 | 68 |
63 if (size > node->length) | 69 if (size > node->length) |
79 if (index >= dir->length) | 85 if (index >= dir->length) |
80 { | 86 { |
81 return 0; | 87 return 0; |
82 } | 88 } |
83 } | 89 } |
90 */ | |
84 | 91 |