summaryrefslogtreecommitdiff
path: root/kernel/syscalls.c
diff options
context:
space:
mode:
authorMichal Idziorek <m.i@gmx.at>2014-12-05 00:38:06 +0100
committerMichal Idziorek <m.i@gmx.at>2014-12-05 00:38:06 +0100
commit233289b9abfa3ca8e96f8f89dbb87f9040858afc (patch)
tree088643b99a2701e55dcc53876f70c5e2d7c163a6 /kernel/syscalls.c
parent743a4860cce117baec6ef3c40deb0f945529c34f (diff)
struggling with tput
Diffstat (limited to 'kernel/syscalls.c')
-rw-r--r--kernel/syscalls.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/syscalls.c b/kernel/syscalls.c
index 62b924f..9cabf25 100644
--- a/kernel/syscalls.c
+++ b/kernel/syscalls.c
@@ -165,8 +165,10 @@ int syscall_execve(char *name, char **argv1, char **env1)
log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"execve (name=0x%08X(%s), argvs=0x%08X, env=0x%08X)", name,name,argv1,env1);
#endif
+ uint32_t alloc;
+ *entry=load_elf(name,&alloc);
- if(!entry)
+ if(!*entry)
{
#ifdef LOG_SYSCALLS
log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"execve: bailing out!");
@@ -178,8 +180,6 @@ int syscall_execve(char *name, char **argv1, char **env1)
//asm volatile("jmp .");
asm volatile("mov $0x8fff000,%esp"); // set stack at high end of process image
- uint32_t alloc;
- *entry=load_elf(name,&alloc);
// TODO: avoid code duplication for argv and env!!
char **env_new=alloc;