summaryrefslogtreecommitdiff
path: root/userspace/foolshell.c
diff options
context:
space:
mode:
authorMichal Idziorek <m.i@gmx.at>2014-10-23 08:41:34 +0200
committerMichal Idziorek <m.i@gmx.at>2014-10-23 08:41:34 +0200
commit463736887fbb6439fe5e676f6fd7990adc6bb727 (patch)
tree00dcb1fb5d426d13ef854820a8672470e49530a7 /userspace/foolshell.c
parentfde24d20cd6a7d5fd1f1df71515e377586b91e24 (diff)
added execve syscall
Diffstat (limited to 'userspace/foolshell.c')
-rw-r--r--userspace/foolshell.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/userspace/foolshell.c b/userspace/foolshell.c
index 8bf8288..3fe7353 100644
--- a/userspace/foolshell.c
+++ b/userspace/foolshell.c
@@ -86,7 +86,7 @@ int process(char *buf)
if(!strcmp(command,"help"))
{
- puts("foolshell: supported built-in commands: 'help', 'echo [string]', 'ls [inode_nr]', 'malloc [bytes]', 'free [address]', ");
+ puts("foolshell: supported built-in commands: 'help', 'echo [string]', 'ls [inode_nr]', exec [inode_nr],'malloc [bytes]', 'free [address]'");
}
else if(!strcmp(command,"ls"))
{
@@ -101,6 +101,11 @@ int process(char *buf)
}
}
+ else if(!strcmp(command,"exec"))
+ {
+ execve(atoi(token[1]),0,0);
+
+ }
else if(!strcmp(command,"echo"))
{
printf("foolshell: \"%s\"\n",token[1]);