diff options
| author | Michal Idziorek <m.i@gmx.at> | 2014-12-05 00:16:42 +0100 |
|---|---|---|
| committer | Michal Idziorek <m.i@gmx.at> | 2014-12-05 00:16:42 +0100 |
| commit | 743a4860cce117baec6ef3c40deb0f945529c34f (patch) | |
| tree | fe9f609521ac66331364d8a9c97ac9dcf5fcd46c /userspace | |
| parent | 41c3e0bc640f570831bd6c18fbfb8c7cec23a43d (diff) | |
struggling with paging exceptions!
Diffstat (limited to 'userspace')
| -rw-r--r-- | userspace/Makefile | 2 | ||||
| -rw-r--r-- | userspace/init.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/userspace/Makefile b/userspace/Makefile index 8516bc1..2434008 100644 --- a/userspace/Makefile +++ b/userspace/Makefile @@ -22,7 +22,7 @@ ext2.img: $(PROGS) cp $^ mnt/bin echo "++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++." > mnt/home/miguel/hello.brain # cp ~/temp/fool-os-stuff/binutils-build-host-foolos/binutils/readelf mnt/bin - cp ~/temp/fool-os-stuff/ncurses-5.9/progs/clear mnt/bin + cp ~/temp/fool-os-stuff/ncurses-5.9/progs/tput mnt/bin mkdir -p mnt/etc echo "127.0.0.1 localhost" > mnt/etc/hosts sync diff --git a/userspace/init.c b/userspace/init.c index 6dc6215..d152581 100644 --- a/userspace/init.c +++ b/userspace/init.c @@ -12,7 +12,9 @@ int main(int argc, char **argv) if(pid==0) { - execve("/bin/foolshell",0,0); // replace process with our foolshell :) + char *argv[]={"/bin/foolshell",0}; + char *env[]={"PS1=$","PWD=/home/miguel","PATH=/bin",0}; + execve("/bin/foolshell",argv,env); // replace process with our foolshell :) puts("FATAL ERROR: Something terrible happened. Unable to Execute SHELL!"); while(1);// hang |
