AcessNative - Mouse implimented, woot!
[tpg/acess2.git] / AcessNative / acesskernel_src / syscalls.c
index 9b9fda4..86c6d71 100644 (file)
@@ -137,7 +137,7 @@ SYSCALL2(Syscall_ReadDir, "id", int, char *,
                return -1;
        return VFS_ReadDir(a0, a1);
 );
-SYSCALL6(Syscall_select, "iddddi", int, fd_set *, fd_set *, fd_set *, time_t *, unsigned int,
+SYSCALL6(Syscall_select, "iddddi", int, fd_set *, fd_set *, fd_set *, tTime *, unsigned int,
        return VFS_Select(a0, a1, a2, a3, a4, a5, 0);
 );
 SYSCALL3(Syscall_OpenChild, "isi", int, const char *, int,
@@ -203,11 +203,11 @@ SYSCALL2(Syscall_GetMessage, "dd", uint32_t *, void *,
        Uint    tmp;
         int    rv;
        if( a0 ) {
-               rv = Proc_GetMessage(&tmp, a1);
+               rv = Proc_GetMessage(&tmp, Sizes[1], a1);
                *a0 = tmp;
        }
        else
-               rv = Proc_GetMessage(NULL, a1);
+               rv = Proc_GetMessage(NULL, Sizes[1], a1);
        return rv;
 );
 
@@ -384,11 +384,12 @@ tRequestHeader *SyscallRecieve(tRequestHeader *Request, int *ReturnLength)
        }
        
        // Allocate the return
-       ret = malloc(sizeof(tRequestHeader) + retValueCount * sizeof(tRequestValue)
-               + retDataLen);
+       size_t  msglen = sizeof(tRequestHeader) + retValueCount * sizeof(tRequestValue) + retDataLen;
+       ret = malloc(msglen);
        ret->ClientID = Request->ClientID;
        ret->CallID = Request->CallID;
        ret->NParams = retValueCount;
+       ret->MessageLength = msglen;
        inData = (char*)&ret->Params[ ret->NParams ];
        
        // Static Uint64 return value

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