From 8a665b53229ce8f563b88bb33aa1ab3db4c1c096 Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Mon, 25 May 2015 22:53:09 +0200 Subject: finally managed to port some simple ncurses test applications! --- userspace/Makefile | 5 ++++- userspace/init.c | 2 +- userspace/sys/sys.c | 12 ++++++++++-- 3 files changed, 15 insertions(+), 4 deletions(-) (limited to 'userspace') diff --git a/userspace/Makefile b/userspace/Makefile index 5590a42..dfe9ec3 100644 --- a/userspace/Makefile +++ b/userspace/Makefile @@ -29,7 +29,10 @@ ext2.img: $(PROGS) ../mp/mp.bin echo "++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++." > mnt/home/miguel/hello.brain # cp ~/temp/fool-os-stuff/binutils-build-host-foolos/binutils/readelf mnt/bin # cp ../font/binfont.bin mnt/ - cp ~/temp/fool-os-stuff/ncurses/ncurses-5.9-build/progs/* mnt/bin/ +# cp ~/temp/fool-os-stuff/ncurses/ncurses-5.9-build/progs/* mnt/bin/ + cp ~/opt/foolos/usr/bin/worm mnt/bin/ + cp ~/opt/foolos/usr/bin/dots mnt/bin/ + cp ~/opt/foolos/usr/bin/background mnt/bin/ cp ../mp/mp.bin mnt/boot/ mkdir -p mnt/etc echo "127.0.0.1 localhost" > mnt/etc/hosts diff --git a/userspace/init.c b/userspace/init.c index d3ab751..31f14e3 100644 --- a/userspace/init.c +++ b/userspace/init.c @@ -13,7 +13,7 @@ int main(int argc, char **argv) if(pid==0) { char *argv[]={"/bin/foolshell",0}; - char *env[]={"PS1=\033[34m$\033[37m","PWD=/home/miguel","PATH=/bin","TERM=linux",0}; + char *env[]={"PS1=\033[34m$\033[37m","PWD=/home/miguel","PATH=/bin","TERM=fool-term",0}; execve("/bin/foolshell",argv,env); // replace process with our foolshell :) //execve("/bin/clear",argv,env); // replace process with our foolshell :) puts("FATAL ERROR: Something terrible happened. Unable to Execute SHELL!"); diff --git a/userspace/sys/sys.c b/userspace/sys/sys.c index 7639307..5cd4396 100644 --- a/userspace/sys/sys.c +++ b/userspace/sys/sys.c @@ -169,13 +169,21 @@ char *getlogin(void) return NULL; } -int gtty() +int ioctl(int fd, unsigned long request, ...) { + printf("UNIMPL: ioctl\n"); return -1; } -int stty() +int gtty(int fd, void *buf) { + // printf("UNIMPL: gettty\n"); + return -1; +} + +int stty(int fd, void *buf) +{ + // printf("UNIMPL: settty\n"); return -1; } -- cgit v1.2.3