+ // --- Send syscall request
+ if( SendRequest(req, dataLength, retLength) < 0 ) {
+ fprintf(stderr, "syscalls.c: SendRequest failed (SyscallID = %i)\n", SyscallID);
+ exit(127);
+ }
+
+ if( !(req->NParams >= 2) ) {
+ fprintf(stderr, "syscalls.c: Too few return params (%i)", req->NParams);
+ exit(127);
+ }
+ dataPtr = (void*)&req->Params[req->NParams];
+ // return
+ assert(req->Params[0].Type == ARG_TYPE_INT64);
+ assert(req->Params[0].Length == sizeof(uint64_t));
+ retValue = *(uint64_t*)dataPtr;
+ dataPtr += sizeof(uint64_t);
+ // errno
+ assert(req->Params[1].Type == ARG_TYPE_INT32);
+ assert(req->Params[1].Length == sizeof(uint32_t));
+ acess__errno = *(uint32_t*)dataPtr;
+ dataPtr += sizeof(uint32_t);