diff options
Diffstat (limited to 'userspace')
| -rw-r--r-- | userspace/Makefile | 2 | ||||
| -rw-r--r-- | userspace/foolshell.c | 4 | ||||
| -rw-r--r-- | userspace/sys/sys/termios.h | 7 |
3 files changed, 10 insertions, 3 deletions
diff --git a/userspace/Makefile b/userspace/Makefile index d87b7a7..5590a42 100644 --- a/userspace/Makefile +++ b/userspace/Makefile @@ -29,7 +29,7 @@ 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-5.9-foolos-new/progs/* mnt/bin/ + cp ~/temp/fool-os-stuff/ncurses/ncurses-5.9-build/progs/* 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/foolshell.c b/userspace/foolshell.c index fa62094..ba73e1d 100644 --- a/userspace/foolshell.c +++ b/userspace/foolshell.c @@ -74,7 +74,7 @@ int main(int argc, char **argv) if(!silent)hello(); //char *buf=malloc(256); - char buf[256]; + char *buf=calloc(sizeof(char),256); while(1) { @@ -101,7 +101,7 @@ char **tokenize(char *buf) for(i=0;i<l;i++) { // init space for next token - token[c]=calloc(sizeof(char),256); + token[c]=malloc(256); //skip all the whitespace while(buf[i]==' '&&i<l)i++; diff --git a/userspace/sys/sys/termios.h b/userspace/sys/sys/termios.h index b6625be..9b9cdc4 100644 --- a/userspace/sys/sys/termios.h +++ b/userspace/sys/sys/termios.h @@ -1,3 +1,5 @@ +#include <stdint.h> + typedef uint32_t speed_t; typedef uint32_t DIR; @@ -18,3 +20,8 @@ typedef uint32_t DIR; #define B19200 0000016 #define B38400 0000017 +struct direct{ + char d_name[256]; + int d_namlen +}; + |
