From: John Hodge Date: Tue, 13 Jul 2010 13:06:26 +0000 (+0800) Subject: Nice job, making umoddi3 call umoddi3 in the usermode stuff :( X-Git-Tag: rel0.06~113 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=368c14e71abbef4d1a5863330312b80bfeb2ea7c;p=tpg%2Facess2.git Nice job, making umoddi3 call umoddi3 in the usermode stuff :( --- diff --git a/Kernel/binary.c b/Kernel/binary.c index de4d813b..193ff14b 100644 --- a/Kernel/binary.c +++ b/Kernel/binary.c @@ -342,7 +342,7 @@ Uint Binary_MapIn(tBinary *binary) } - //Log("Mapped '%s' to 0x%x", binary->TruePath, base); + Log_Debug("Binary", "PID %i - Mapped '%s' to 0x%x", Threads_GetPID(), binary->TruePath, base); //LOG("*0x%x = 0x%x\n", binary->Pages[0].Virtual, *(Uint*)binary->Pages[0].Virtual); diff --git a/Usermode/Applications/ifconfig_src/main.c b/Usermode/Applications/ifconfig_src/main.c index 2fe0f24f..1047ca34 100644 --- a/Usermode/Applications/ifconfig_src/main.c +++ b/Usermode/Applications/ifconfig_src/main.c @@ -56,7 +56,7 @@ void DumpInterfaces(int DumpAll) { int dp, fd; int type; - char path[sizeof(IPSTACK_ROOT)+1+FILENAME_MAX] = IPSTACK_ROOT"/"; + char path[sizeof(IPSTACK_ROOT)+1+FILENAME_MAX+1] = IPSTACK_ROOT"/"; char *filename = &path[sizeof(IPSTACK_ROOT)]; dp = open(IPSTACK_ROOT, OPENFLAG_READ); @@ -67,16 +67,18 @@ void DumpInterfaces(int DumpAll) fd = open(path, OPENFLAG_READ); if(fd == -1) { - printf("%s:\tUnable to open ('%s'\n\n", filename, path); + printf("%s:\tUnable to open ('%s')\n", filename, path); + continue ; } type = ioctl(fd, 4, NULL); printf("%s:\t", filename); { - int len = ioctl(fd, ioctl(fd, 3, "get_device"), NULL); + int call = ioctl(fd, 3, "get_device"); + int len = ioctl(fd, call, NULL); char *buf = malloc(len+1); - ioctl(fd, ioctl(fd, 3, "get_device"), buf); + ioctl(fd, call, buf); printf("'%s'\t", buf); free(buf); } diff --git a/Usermode/Libraries/libgcc.so_src/libgcc.c b/Usermode/Libraries/libgcc.so_src/libgcc.c index bd5d1f3a..f88b6632 100644 --- a/Usermode/Libraries/libgcc.so_src/libgcc.c +++ b/Usermode/Libraries/libgcc.so_src/libgcc.c @@ -116,7 +116,7 @@ uint64_t __umoddi3(uint64_t Num, uint64_t Den) if(Num < Den) return Num; if(Num == Den) return 0; if(Num <= 0xFFFFFFFF && Den <= 0xFFFFFFFF) - return Num % Den; + return (uint32_t)Num % (uint32_t)Den; // Speedups for common operations if(Den == 1) return 0;