diff options
Diffstat (limited to 'userspace/simple.c')
| -rw-r--r-- | userspace/simple.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/userspace/simple.c b/userspace/simple.c index bd42d9c..e84b072 100644 --- a/userspace/simple.c +++ b/userspace/simple.c @@ -1,15 +1,14 @@ #include <stdlib.h> extern char **environ; + int main(int argc, char **argv) { printf("argv: 0x%08X\n",argv); - printf("env: 0x%08X\n",environ); - - putenv("test=11"); + printf("env: 0x%08X\n",environ); int i=0; while(environ[i]!=NULL) @@ -18,7 +17,15 @@ int main(int argc, char **argv) i++; } - puts("bye"); + putenv("supa=dupa"); + printf("env: 0x%08X\n",environ); + + i=0; + while(environ[i]!=NULL) + { + printf("envvar %s (0x%08X)\n" ,environ[i],environ[i]); + i++; + } return 0; } |
