summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/elf.c6
-rw-r--r--fs/fs.c3
2 files changed, 3 insertions, 6 deletions
diff --git a/fs/elf.c b/fs/elf.c
index f8e3f66..1a6fa89 100644
--- a/fs/elf.c
+++ b/fs/elf.c
@@ -2,10 +2,8 @@
#include <stdint.h>
#include "ext2.h"
-
#define EI_NIDENT 16
-
typedef uint32_t Elf32_Addr;
typedef uint32_t Elf32_Off;
typedef uint16_t Elf32_Section;
@@ -69,9 +67,9 @@ Elf32_Phdr;
// returns elf entry point
uint32_t load_elf(char *name, uint32_t *alloc)
{
- uint32_t ext2_ramimage= fs_get_root_ext2_ramimage();
-
+ uint32_t ext2_ramimage=fs_get_root_ext2_ramimage();
int inode_nr=ext2_filename_to_inode(ext2_ramimage,name);
+
if(inode_nr<1)return 0;
//TODO: load ELF binary and move this to own compilation unit
diff --git a/fs/fs.c b/fs/fs.c
index 03a522f..4d67d35 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -13,7 +13,6 @@ static uint32_t root_ext2_ramimage=0;
int fs_readdir(const char *name,fs_dirent *dirs,int max)
{
-
int inode_nr=ext2_filename_to_inode(root_ext2_ramimage,name);
if(inode_nr<1)return -1;
return ext2_read_dir(root_ext2_ramimage, inode_nr,dirs,max); // TODO: hardcoded, fix this
@@ -21,7 +20,7 @@ int fs_readdir(const char *name,fs_dirent *dirs,int max)
void fs_mount(multiboot_information *info)
{
- // deinit modules memory
+ // TODO: deinit modules memory: what??? why? then it will be gone right!?
if(info->flags&&1<<3)
{
multiboot_mod *mod=info->mods_addr;