Nice job, making umoddi3 call umoddi3 in the usermode stuff :(
authorJohn Hodge <[email protected]>
Tue, 13 Jul 2010 13:06:26 +0000 (21:06 +0800)
committerJohn Hodge <[email protected]>
Tue, 13 Jul 2010 13:06:26 +0000 (21:06 +0800)
Kernel/binary.c
Usermode/Applications/ifconfig_src/main.c
Usermode/Libraries/libgcc.so_src/libgcc.c

index de4d813..193ff14 100644 (file)
@@ -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);
        
index 2fe0f24..1047ca3 100644 (file)
@@ -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);
                }
index bd5d1f3..f88b663 100644 (file)
@@ -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;

UCC git Repository :: git.ucc.asn.au