diff --git a/src/sys/include/ubixfs/file.h b/src/sys/include/ubixfs/file.h index bbd1cf3..73ef045 100755 --- a/src/sys/include/ubixfs/file.h +++ b/src/sys/include/ubixfs/file.h @@ -44,7 +44,7 @@ uChar buffer[512]; }; -extern struct fileDescriptorTable fdTable[maxFd]; +extern struct fileDescriptorTable *fdTable; int fopen(const char *file,int mode); int fclose(int fd); diff --git a/src/sys/include/ubixos/types.h b/src/sys/include/ubixos/types.h index f6e5822..e004116 100755 --- a/src/sys/include/ubixos/types.h +++ b/src/sys/include/ubixos/types.h @@ -33,6 +33,8 @@ typedef unsigned short uShort; typedef unsigned int uInt; +#ifndef _STDLIB_H_ typedef enum { FALSE=0,TRUE=1 } bool; +#endif #endif \ No newline at end of file diff --git a/src/sys/kernel/exec.c b/src/sys/kernel/exec.c index 21d0298..0db5a0b 100755 --- a/src/sys/kernel/exec.c +++ b/src/sys/kernel/exec.c @@ -65,7 +65,6 @@ } eStart = binaryHeader->eEntry; i = (allocPage()+4095); -// execThread((void *)eStart,(allocPage()+4095),file); taskList[pid].tss.back_link = 0x0; taskList[pid].tss.esp0 = i; taskList[pid].tss.ss0 = 0x10; @@ -95,7 +94,7 @@ "movl %%cr0,%%eax \n" "orl $0x80000000,%%eax \n" "movl %%eax,%%cr0 \n" - : : "d" ((unsigned int *)(_current->tss.cr3)) + : : "d" ((unsigned int *)(*pd)) ); } diff --git a/src/sys/ubixfs/file.c b/src/sys/ubixfs/file.c index 2b61c61..a27e94b 100755 --- a/src/sys/ubixfs/file.c +++ b/src/sys/ubixfs/file.c @@ -25,7 +25,7 @@ #include #include -struct fileDescriptorTable fdTable[maxFd]; +struct fileDescriptorTable *fdTable = (struct fileDescriptorTable *)0xE7400000; int sprintf(char *buf,const char *fmt, ...);