summaryrefslogtreecommitdiff
path: root/fs/elf.c
diff options
context:
space:
mode:
authorMiguel <m.i@gmx.at>2018-08-23 03:20:56 +0200
committerMiguel <m.i@gmx.at>2018-08-23 03:20:56 +0200
commit4404fa9b3d98646f942e32146722a9d0a68edc13 (patch)
tree79e494ec81a462db0217fc763a7ddae1827c02bd /fs/elf.c
parent98bf7b67543b36b6fe49f2b68c115ebeaf630603 (diff)
never ending struggle with forking
Diffstat (limited to 'fs/elf.c')
-rw-r--r--fs/elf.c6
1 files changed, 2 insertions, 4 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