summaryrefslogtreecommitdiff
path: root/userspace/simple.c
diff options
context:
space:
mode:
authorMichal Idziorek <m.i@gmx.at>2014-11-24 01:54:47 +0100
committerMichal Idziorek <m.i@gmx.at>2014-11-24 01:54:47 +0100
commit369c62119b9dd60db77fc28e8857ed9c4d498889 (patch)
treeea06cc9b95516863cc674bf700e27db601e0529b /userspace/simple.c
parent0d36b950f6a560a0312f2dcd326d3bb5362af370 (diff)
problems with ENV
Diffstat (limited to 'userspace/simple.c')
-rw-r--r--userspace/simple.c15
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;
}