diff options
Diffstat (limited to 'userspace/foolshell.c')
| -rw-r--r-- | userspace/foolshell.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/userspace/foolshell.c b/userspace/foolshell.c index 9002269..2a70940 100644 --- a/userspace/foolshell.c +++ b/userspace/foolshell.c @@ -105,7 +105,7 @@ int process(char *buf) if(!strcmp(command,"help")) { - puts("foolshell: supported built-in commands: 'help', 'echo [string]', 'malloc [bytes]', 'free [address]', 'getenv [var]', 'putenv [var] [val]'"); + puts("foolshell: supported built-in commands: 'help', 'echo [string]', 'malloc [bytes]', 'free [address]', 'getenv [var]', 'putenv [var] [val]', 'env'"); } else if(!strcmp(command,"echo")) { @@ -133,6 +133,16 @@ int process(char *buf) putenv(buf); printf("(0x%08X) set: %s = %s \n",environ,token[1],getenv(token[1])); } + else if(!strcmp(command,"env")) + { + int i=0; + printf("env: 0x%08X\n",environ); + while(environ[i]!=NULL) + { + printf("envvar %s (0x%08X)\n" ,environ[i],environ[i]); + i++; + } + } else { execve(token[0],token,0); |
