From 463736887fbb6439fe5e676f6fd7990adc6bb727 Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Thu, 23 Oct 2014 08:41:34 +0200 Subject: added execve syscall --- userspace/foolshell.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'userspace/foolshell.c') 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")) { @@ -100,6 +100,11 @@ int process(char *buf) printf("foolshell: %i %s%c\n",dirs[i].inode, dirs[i].name, ((dirs[i].type==FS_FILE_TYPE_DIR)?'/':' ')); } + } + else if(!strcmp(command,"exec")) + { + execve(atoi(token[1]),0,0); + } else if(!strcmp(command,"echo")) { -- cgit v1.2.3