diff --git a/.cproject b/.cproject index edb5d25..815670f 100644 --- a/.cproject +++ b/.cproject @@ -23,13 +23,13 @@ - - - - @@ -67,7 +67,7 @@ - + diff --git a/Makefile b/Makefile index 2c0089b..51709f6 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ WORLD_INC="-I${CURDIR}/include_old -I${CURDIR}/lib/objgfx40/ -I${CURDIR}/lib/libcpp/include" WORLD_FLAGS=_ARCH=${_ARCH} CC="cc" CXX="c++" AS="as" AR="ar" LD="ld" NM=nm OBJDUMP= OBJCOPY="objcopy" RANLIB=ranlib -WMAKE= ${MAKE} ${WORLD_FLAGS} INCLUDE=${WORLD_INC} BUILD_DIR=${CURDIR}/build +WMAKE=${MAKE} ${WORLD_FLAGS} INCLUDE=${WORLD_INC} BUILD_DIR=${CURDIR}/build TMP_PATH=${PATH} ROOT=/ubixos diff --git a/Makefile.incl b/Makefile.incl index 30939ec..cd34834 100644 --- a/Makefile.incl +++ b/Makefile.incl @@ -1,4 +1,4 @@ -# $Id: Makefile.inc 89 2016-01-12 00:20:40Z reddawg $ +# The System Makefile (C) 2002, 2017 The UbixOS Project # Global 'Source' Options # allow you to change your default compiler without affecting your other work diff --git a/sys/init/main.c b/sys/init/main.c index 8b4ebbe..1e19071 100644 --- a/sys/init/main.c +++ b/sys/init/main.c @@ -1,3 +1,4 @@ +b /*- * Copyright (c) 2002-2018 The UbixOS Project. * All rights reserved. @@ -109,8 +110,17 @@ union descriptorTableUnion *gdt __attribute__ ((packed)); } loadGDT = { (11 * sizeof(union descriptorTableUnion) - 1), ubixGDT }; -static char *argv_init[2] = { "init", NULL, }; // ARGV For Initial Proccess -static char *envp_init[6] = { "HOME=/", "PWD=/", "PATH=/bin:/sbin:/usr/bin:/usr/sbin", "USER=root", "GROUP=admin", NULL, }; //ENVP For Initial Proccess +static char *argv_init[2] = { + "init", + NULL, }; /* ARGV For Initial Process */ + +static char *envp_init[6] = { + "HOME=/", + "PWD=/", + "PATH=/bin:/sbin:/usr/bin:/usr/sbin", + "USER=root", + "GROUP=admin", + NULL, }; /* ENVP For Initial Process */ struct bootinfo _bootinfo; char _kernelname[512]; @@ -136,9 +146,9 @@ } /* New Root Mount Point */ - //Old 2 new 10 + /* Old 2 new 10 */ kprintf("[0x%X][0x%X:0x%X:0x%X:0x%X:0x%X:0x%X]\n", B_ADAPTOR(rootdev), B_CONTROLLER(rootdev), B_SLICE(rootdev), B_UNIT(rootdev), B_PARTITION(rootdev), B_TYPE(rootdev)); - //if ( vfs_mount( B_UNIT(_bootdev), B_PARTITION(_bootdev), 0x0, 0xAA, "sys", "rw" ) != 0x0 ) { + /* if ( vfs_mount( B_UNIT(_bootdev), B_PARTITION(_bootdev), 0x0, 0xAA, "sys", "rw" ) != 0x0 ) { */ if (vfs_mount(0x1, 0x2, 0x0, 0xAA, "sys", "rw") != 0x0) { kprintf("Problem Mounting sys Mount Point\n"); } @@ -162,8 +172,8 @@ - //kprintf("SDE Thread Start! [0x%X]\n", &sdeThread); - //execThread(&sdeThread, 0x2000,0x0); + /* kprintf("SDE Thread Start! [0x%X]\n", &sdeThread); */ + /* execThread(&sdeThread, 0x2000,0x0); */ kprintf("Kernel Name: [%s], Boot How To [0x%X], Boot Dev: [0x%X]\n", _kernelname, _boothowto, _bootdev); kprintf("B_TYPE(0x%X), B_SLICE(0x%X), B_UNIT(0x%X), B_PARTITION(0x%X)\n", B_TYPE(_bootdev), B_SLICE(_bootdev), B_UNIT(_bootdev), B_PARTITION(_bootdev)); diff --git a/sys/lib/kprintf.c b/sys/lib/kprintf.c index 66d096a..6d0c8a4 100644 --- a/sys/lib/kprintf.c +++ b/sys/lib/kprintf.c @@ -279,7 +279,7 @@ va_list args; int i; va_start(args, fmt); -//i = vsprintf( buf, fmt, args ); + /* i = vsprintf( buf, fmt, args ); */ i = kvprintf(fmt, NULL, buf, 10, args); va_end(args); return (i); diff --git a/sys/net/core/def.c b/sys/net/core/def.c index bfa98af..3d5469f 100644 --- a/sys/net/core/def.c +++ b/sys/net/core/def.c @@ -11,7 +11,7 @@ * \#define lwip_htonl(x) your_htonl * * Note lwip_ntohs() and lwip_ntohl() are merely references to the htonx counterparts. - * + * * If you \#define them to htons() and htonl(), you should * \#define LWIP_DONT_PROVIDE_BYTEORDER_FUNCTIONS to prevent lwIP from * defining htonx/ntohx compatibility macros. @@ -72,10 +72,8 @@ * @param n u16_t in host byte order * @return n in network byte order */ -u16_t -lwip_htons(u16_t n) -{ - return (u16_t)PP_HTONS(n); +u16_t lwip_htons(u16_t n) { + return ((u16_t) PP_HTONS(n)); } #endif /* lwip_htons */ @@ -89,7 +87,7 @@ u32_t lwip_htonl(u32_t n) { - return (u32_t)PP_HTONL(n); + return ((u32_t) PP_HTONL(n)); } #endif /* lwip_htonl */ @@ -114,7 +112,7 @@ return LWIP_CONST_CAST(char *, p); } } - return NULL; + return (NULL); } #endif @@ -141,15 +139,15 @@ if (c1_upc != c2_upc) { /* still not equal */ /* don't care for < or > */ - return 1; + return (1); } } else { /* characters are not equal but none is in the alphabet range */ - return 1; + return (1); } } } while (c1 != 0); - return 0; + return (0); } #endif @@ -176,15 +174,15 @@ if (c1_upc != c2_upc) { /* still not equal */ /* don't care for < or > */ - return 1; + return (1); } } else { /* characters are not equal but none is in the alphabet range */ - return 1; + return (1); } } } while (len-- && c1 != 0); - return 0; + return (0); } #endif diff --git a/sys/vmm/vmm_memory.c b/sys/vmm/vmm_memory.c index 56e2ac8..6139d61 100644 --- a/sys/vmm/vmm_memory.c +++ b/sys/vmm/vmm_memory.c @@ -40,7 +40,7 @@ static uint32_t freePages = 0; static struct spinLock vmmSpinLock = SPIN_LOCK_INITIALIZER; -static struct spinLock vmmCowSpinLock = SPIN_LOCK_INITIALIZER; +//static struct spinLock vmmCowSpinLock = SPIN_LOCK_INITIALIZER; int numPages = 0x0; @@ -344,7 +344,7 @@ ************************************************************************/ -/* TODO: This can be greatly immproved for performance but it gets the job done */ +/* TODO: This can be greatly improved for performance but it gets the job done */ void vmm_freeProcessPages(pidType pid) { int i = 0, x = 0; uint32_t *tmpPageTable = 0x0; @@ -353,7 +353,7 @@ spinLock(&vmmSpinLock); /* Check Page Directory For An Avail Page Table */ - //NOTE: Thie cleans all memory space up to kernel space + //NOTE: This cleans all memory space up to kernel space #ifdef _IGNORE for (i = 0; i < (PAGE_SIZE - (PAGE_SIZE / 4)); i++) {