diff --git a/src/bin/init/main.c b/src/bin/init/main.c index 35c548f..127deb3 100755 --- a/src/bin/init/main.c +++ b/src/bin/init/main.c @@ -45,5 +45,5 @@ while (pidStatus(i)) { asm("nop"); } goto startup; } - exit(1); + return(0); } diff --git a/src/bin/login/main.c b/src/bin/login/main.c index ad08541..8d6977e 100755 --- a/src/bin/login/main.c +++ b/src/bin/login/main.c @@ -43,7 +43,7 @@ char passWord[32]; struct passwd *data = 0x0; data = (struct passwd *)malloc(4096); - if (-1 == (fd = fopen("userdb","r"))) { + if (!(fd = fopen("userdb","r"))) { printf("Error Opening File"); memcpy(data[0].username,"root",4); memcpy(data[0].password,"user",4); diff --git a/src/bin/ls/main.c b/src/bin/ls/main.c index 18ffdf2..7904203 100755 --- a/src/bin/ls/main.c +++ b/src/bin/ls/main.c @@ -78,7 +78,7 @@ 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",(char)permsData,(int)dirEntry[i].uid,(int)dirEntry[i].gid,(int)dirEntry[i].size,(char)dirEntry[i].fileName); + printf("%s %i %i %i %s\n",permsData,(int)dirEntry[i].uid,(int)dirEntry[i].gid,(int)dirEntry[i].size,dirEntry[i].fileName); } } return(0); diff --git a/src/bin/shell/commands.c b/src/bin/shell/commands.c index 39033a6..116d13e 100755 --- a/src/bin/shell/commands.c +++ b/src/bin/shell/commands.c @@ -57,7 +57,7 @@ } } else if (memcmp(data->argv[1],"echo",4) == 0) { - for (i=2;i<=data->argv[0];i++) { + for (i=2;i<=(int)data->argv[0];i++) { printf("%s",data->argv[i]); } } @@ -71,4 +71,4 @@ return(0); } return(1); - } \ No newline at end of file + } diff --git a/src/bin/shell/main.c b/src/bin/shell/main.c index 44abadf..5ef7878 100755 --- a/src/bin/shell/main.c +++ b/src/bin/shell/main.c @@ -30,7 +30,6 @@ int main() { unsigned char buffer[256],*data; - int x = 0x0; inputBuffer *inBuf = (inputBuffer *)malloc(sizeof(inputBuffer)); while (1) { printf("UbixOS: "); @@ -45,4 +44,4 @@ } } exit(0); - } \ No newline at end of file + } diff --git a/src/bin/shell/shell.h b/src/bin/shell/shell.h index 1b52bea..c3749b6 100755 --- a/src/bin/shell/shell.h +++ b/src/bin/shell/shell.h @@ -1,4 +1,8 @@ typedef struct { int argc; char **argv; - } inputBuffer; \ No newline at end of file + } inputBuffer; + +void parseInput(inputBuffer *,char *); +int commands(inputBuffer *); +void execProgram(char *,int,char **); diff --git a/src/lib/libc/stdio/fopen.c b/src/lib/libc/stdio/fopen.c index 554c46c..0177740 100755 --- a/src/lib/libc/stdio/fopen.c +++ b/src/lib/libc/stdio/fopen.c @@ -31,6 +31,6 @@ "int %0\n" : : "i" (0x80),"a" (8),"b" (file),"c" (mode),"d" (fp) ); - printf("",fp->fd); + printf("\0",fp->fd); return((FILE *)fp); - } \ No newline at end of file + } diff --git a/src/lib/libc/stdlib/malloc.c b/src/lib/libc/stdlib/malloc.c index ce38271..8f7c37a 100755 --- a/src/lib/libc/stdlib/malloc.c +++ b/src/lib/libc/stdlib/malloc.c @@ -84,7 +84,6 @@ } void *malloc(uInt len) { - void *ret = 0x0; struct memDescriptor *tmpDesc = 0x0,*newDesc = 0x0; if (!kernDesc) { initMalloc(); @@ -128,4 +127,4 @@ } printf("Error Freeing!!!\n"); return; - } \ No newline at end of file + }