view cos/kernel/initrd.c @ 36:91f91ff07ea8

Removed test variables
author windel
date Mon, 16 Jan 2012 20:47:05 +0100
parents 3a6a9b929db0
children 35cc54e078dd
line wrap: on
line source

/*
 * Initial ramdisk filesystem driver.
 * */

#include "kernel.h"

fs_node_t *initrd_root = 0;

typedef struct
{
   uint32_t magic;
   uint32_t numfiles;
} initrd_header_t;

fs_node_t* initialize_initrd(uint64_t location)
{
   // We need a valid malloc here!
   initrd_root = (fs_node_t*)kmalloc(sizeof(fs_node_t));

   initrd_header_t *header = (initrd_header_t*)location;
   initrd_root->length = header->numfiles;

   return initrd_root;
}