summaryrefslogtreecommitdiff
path: root/userspace
diff options
context:
space:
mode:
authorMichal Idziorek <m.i@gmx.at>2015-05-25 22:53:09 +0200
committerMichal Idziorek <m.i@gmx.at>2015-05-25 22:53:09 +0200
commit8a665b53229ce8f563b88bb33aa1ab3db4c1c096 (patch)
treee813008300446b1925dc91e85713732fbd932bdd /userspace
parent1252a288665a7d07dcf5f0e468dc67b9440132d0 (diff)
finally managed to port some simple ncurses test applications!
Diffstat (limited to 'userspace')
-rw-r--r--userspace/Makefile5
-rw-r--r--userspace/init.c2
-rw-r--r--userspace/sys/sys.c12
3 files changed, 15 insertions, 4 deletions
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;
}