diff options
| author | Michal Idziorek <m.i@gmx.at> | 2014-11-24 01:54:47 +0100 |
|---|---|---|
| committer | Michal Idziorek <m.i@gmx.at> | 2014-11-24 01:54:47 +0100 |
| commit | 369c62119b9dd60db77fc28e8857ed9c4d498889 (patch) | |
| tree | ea06cc9b95516863cc674bf700e27db601e0529b /userspace/foolshell.c | |
| parent | 0d36b950f6a560a0312f2dcd326d3bb5362af370 (diff) | |
problems with ENV
Diffstat (limited to 'userspace/foolshell.c')
| -rw-r--r-- | userspace/foolshell.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/userspace/foolshell.c b/userspace/foolshell.c index 7a4f616..9002269 100644 --- a/userspace/foolshell.c +++ b/userspace/foolshell.c @@ -26,7 +26,6 @@ void hello() void prompt() { printf("%s",getenv("PS1")); - printf("%s",getenv("PS1")); } int main(int argc, char **argv) @@ -125,14 +124,14 @@ int process(char *buf) } else if(!strcmp(command,"getenv")) { - printf("%s = %s(0x%08X) \n",token[1],getenv(token[1]),getenv(token[1])); + printf("(0x%08X) put: %s = %s(0x%08X) \n",environ,token[1],getenv(token[1]),getenv(token[1])); } else if(!strcmp(command,"putenv")) { char buf[256]; sprintf(buf,"%s=%s",token[1],token[2]); putenv(buf); - printf("set: %s = %s \n",token[1],getenv(token[1])); + printf("(0x%08X) set: %s = %s \n",environ,token[1],getenv(token[1])); } else { |
