diff --git a/src/bin/ld-dyn/main.c b/src/bin/ld-dyn/main.c index 322ac90..4f6738e 100755 --- a/src/bin/ld-dyn/main.c +++ b/src/bin/ld-dyn/main.c @@ -34,4 +34,5 @@ elfPltInfo *pltInfo = 0x0; elfDynsym *dynSym = 0x0; */ + return(0); } diff --git a/src/bin/ls/main.c b/src/bin/ls/main.c index b2a5365..18ffdf2 100755 --- a/src/bin/ls/main.c +++ b/src/bin/ls/main.c @@ -78,8 +78,8 @@ if ((tmpPerms & permWrite) == permWrite) permsData[9] = 'W'; if ((tmpPerms & permExecute) == permExecute) permsData[10] = 'E'; if ((tmpPerms & permHidden) == permHidden) permsData[11] = 'H'; - printf("%s %i %i %i %s\n",permsData,dirEntry[i].uid,dirEntry[i].gid,dirEntry[i].size,dirEntry[i].fileName); + printf("%s %i %i %i %s\n",(char)permsData,(int)dirEntry[i].uid,(int)dirEntry[i].gid,(int)dirEntry[i].size,(char)dirEntry[i].fileName); } } - exit(1); + return(0); } diff --git a/src/bin/pwd/main.c b/src/bin/pwd/main.c index 5314e5b..157e73e 100755 --- a/src/bin/pwd/main.c +++ b/src/bin/pwd/main.c @@ -28,4 +28,5 @@ int main() { char cwd[256]; exit(printf("%s\n",getcwd(cwd,sizeof(cwd)))); + return(0); } diff --git a/src/bin/shell/input.c b/src/bin/shell/input.c index 16cdd31..87c921d 100755 --- a/src/bin/shell/input.c +++ b/src/bin/shell/input.c @@ -41,7 +41,7 @@ } } } - buffer->argv[0] = &buffer->argc; + buffer->argv[0] = (char *)&buffer->argc; for (i=1;i<=buffer->argc;i++) { printf("Data: (%i)[%s]\n",i,buffer->argv[i]); } diff --git a/src/bin/test/main.c b/src/bin/test/main.c index f4401fe..958667f 100755 --- a/src/bin/test/main.c +++ b/src/bin/test/main.c @@ -47,5 +47,5 @@ } } printf("Testing Complete\n"); - exit(1); + return(0); } diff --git a/src/sys/include/ubixos/panic.h b/src/sys/include/ubixos/panic.h new file mode 100755 index 0000000..fb38461 --- /dev/null +++ b/src/sys/include/ubixos/panic.h @@ -0,0 +1,31 @@ +/************************************************************************************** + Copyright (c) 2002 The UbixOS Project + All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of conditions, the following disclaimer and the list of authors. +Redistributions in binary form must reproduce the above copyright notice, this list of conditions, the following disclaimer and the list of authors +in the documentation and/or other materials provided with the distribution. Neither the name of the UbixOS Project nor the names of its +contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + $Id$ + +**************************************************************************************/ + +#ifndef _DMA_H +#define _DMA_H + +#include + +void panic(); + +#endif \ No newline at end of file diff --git a/src/sys/kernel/exec.c b/src/sys/kernel/exec.c index 113ae5b..18aafc1 100755 --- a/src/sys/kernel/exec.c +++ b/src/sys/kernel/exec.c @@ -27,6 +27,7 @@ #include #include #include +#include /************************************************************************ diff --git a/src/sys/kernel/panic.c b/src/sys/kernel/panic.c index 1bd9fc2..31fa0a1 100755 --- a/src/sys/kernel/panic.c +++ b/src/sys/kernel/panic.c @@ -21,9 +21,12 @@ **************************************************************************************/ +#include #include void panic() { - kprintf("System Panic!\nHalting Machine\n"); - while (1) { asm("hlt"); } + kprintf("System Panic!\nHalting Machine!\n"); + while (1) { + asm("hlt"); + } } \ No newline at end of file diff --git a/src/sys/ubixfs/file.c b/src/sys/ubixfs/file.c index 12cf827..acda3d9 100755 --- a/src/sys/ubixfs/file.c +++ b/src/sys/ubixfs/file.c @@ -29,7 +29,9 @@ fileDescriptor *fdTable = 0x0, *lastFd = 0x0; +//These Are Temporary int sprintf(char *buf,const char *fmt, ...); +char getch(); /************************************************************************ diff --git a/src/sys/ubixfs/ubixfs.c b/src/sys/ubixfs/ubixfs.c index 8856dd7..00944e2 100755 --- a/src/sys/ubixfs/ubixfs.c +++ b/src/sys/ubixfs/ubixfs.c @@ -53,23 +53,18 @@ } int kstrcmp(char *str1, char *str2) { - while(*str1 == *str2 && *str1!=0 && *str2!=0) { str1++; str2++; } - if(*str1 == *str2) return 0; - if(*str1 > *str2) return 1; - if(*str1 < *str2) return -1; - } -/* -int readFile(char *file) { - struct directoryEntry file[1]; - char data[2048]; - if (ft->start > 1000) { } - else { - readBlock(ft->start,data,ft->length); - kprint(data); + while (*str1 == *str2 && *str1!=0 && *str2!=0) { + str1++; + str2++; } - return(0); - } */ - + if (*str1 == *str2) + return(0); + else if (*str1 > *str2) + return(1); + else + return(-1); + //if(*str1 < *str2) return -1; + } /************************************************************************ diff --git a/src/sys/vmm/paging.c b/src/sys/vmm/paging.c index 79127d4..9543625 100755 --- a/src/sys/vmm/paging.c +++ b/src/sys/vmm/paging.c @@ -26,6 +26,7 @@ #include #include #include +#include #include uLong *pageDirectory = 0x0; diff --git a/ubixos.kdevprj b/ubixos.kdevprj index 5389088..897faf5 100755 --- a/ubixos.kdevprj +++ b/ubixos.kdevprj @@ -698,7 +698,7 @@ type=HEADER [src/sys/include/ubixos/Makefile.am] -files=src/sys/include/ubixos/gdt.h,src/sys/include/ubixos/io.h,src/sys/include/ubixos/idt.h,src/sys/include/ubixos/exec.h,src/sys/include/ubixos/schedule.h,src/sys/include/ubixos/types.h,src/sys/include/ubixos/dma.h,src/sys/include/ubixos/idlethread.h,src/sys/include/ubixos/elf.h,src/sys/include/ubixos/syscall.h,src/sys/include/ubixos/syscalls.h,src/sys/include/ubixos/a.out.h,src/sys/include/ubixos/fork.h,src/sys/include/ubixos/bios32.h,src/sys/include/ubixos/kmalloc.h,src/sys/include/ubixos/vitals.h,src/sys/include/ubixos/spinlock.h +files=src/sys/include/ubixos/gdt.h,src/sys/include/ubixos/io.h,src/sys/include/ubixos/idt.h,src/sys/include/ubixos/exec.h,src/sys/include/ubixos/schedule.h,src/sys/include/ubixos/types.h,src/sys/include/ubixos/dma.h,src/sys/include/ubixos/idlethread.h,src/sys/include/ubixos/elf.h,src/sys/include/ubixos/syscall.h,src/sys/include/ubixos/syscalls.h,src/sys/include/ubixos/a.out.h,src/sys/include/ubixos/fork.h,src/sys/include/ubixos/bios32.h,src/sys/include/ubixos/kmalloc.h,src/sys/include/ubixos/vitals.h,src/sys/include/ubixos/spinlock.h,src/sys/include/ubixos/panic.h sub_dirs= type=normal @@ -768,6 +768,12 @@ install_location= type=HEADER +[src/sys/include/ubixos/panic.h] +dist=true +install=false +install_location= +type=HEADER + [src/sys/include/ubixos/schedule.h] dist=true install=false