return _Syscall(SYS_REOPEN, ">i >s >i", FD, Path, Flags);
}
-size_t acess_read(int FD, size_t Bytes, void *Dest) {
+size_t acess_read(int FD, void *Dest, size_t Bytes) {
if(FD & NATIVE_FILE_MASK)
- return native_read(FD & (NATIVE_FILE_MASK-1), Bytes, Dest);
+ return native_read(FD & (NATIVE_FILE_MASK-1), Dest, Bytes);
DEBUG("read(0x%x, 0x%x, *%p)", FD, Bytes, Dest);
return _Syscall(SYS_READ, ">i >i <d", FD, Bytes, Bytes, Dest);
}
-size_t acess_write(int FD, size_t Bytes, const void *Src) {
+size_t acess_write(int FD, const void *Src, size_t Bytes) {
if(FD & NATIVE_FILE_MASK)
- return native_write(FD & (NATIVE_FILE_MASK-1), Bytes, Src);
+ return native_write(FD & (NATIVE_FILE_MASK-1), Src, Bytes);
DEBUG("write(0x%x, 0x%x, %p\"%.*s\")", FD, Bytes, Src, Bytes, (char*)Src);
return _Syscall(SYS_WRITE, ">i >i >d", FD, Bytes, Bytes, Src);
}
return _Syscall(SYS_IOCTL, ">i >i ?d", fd, id, 1024, data);
}
int acess_finfo(int fd, t_sysFInfo *info, int maxacls) {
+ DEBUG("offsetof(size, t_sysFInfo) = %i", offsetof(t_sysFInfo, size));
+ DEBUG("finfo(%i, %p, %i)", fd, info, maxacls);
return _Syscall(SYS_FINFO, ">i <d >i",
fd,
sizeof(t_sysFInfo)+maxacls*sizeof(t_sysACL), info,
- maxacls);
+ maxacls
+ );
}
int acess_readdir(int fd, char *dest) {
}
int acess__SysGetACL(int fd, t_sysACL *dest) {
- return _Syscall(SYS_GETACL, "<i >i <d", fd, sizeof(t_sysACL), dest);
+ return _Syscall(SYS_GETACL, ">i <d", fd, sizeof(t_sysACL), dest);
}
int acess__SysMount(const char *Device, const char *Directory, const char *Type, const char *Options) {
// --- Error Handler
-int acess__SysSetFaultHandler(int (*Handler)(int)) {
+int acess__SysSetFaultHandler(int (*Handler)(int)) {
printf("TODO: Set fault handler (asked to set to %p)\n", Handler);
return 0;
}