The `creat` has been registered as non-raw a long time ago, back
when the registration policy was different. Now, all system calls
should be registered as raw. Do so for `creat` as well and make it
call the `uk_syscall_do_` variant of `open` in order to avoid
invoking the system call enter/exit tables twice.
Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
Approved-by: Andrei Tatar <andrei@unikraft.io>
Reviewed-by: Andrei Tatar <andrei@unikraft.io>
GitHub-Closes: #1591
LFS64(openat);
#endif /* UK_LIBC_SYSCALLS */
-UK_SYSCALL_DEFINE(int, creat, const char*, pathname, mode_t, mode)
+UK_SYSCALL_R_DEFINE(int, creat, const char*, pathname, mode_t, mode)
{
- return uk_syscall_e_open((long int) pathname,
- O_CREAT|O_WRONLY|O_TRUNC, mode);
+ return uk_syscall_do_open((long int)pathname,
+ O_CREAT | O_WRONLY | O_TRUNC,
+ mode);
}
#ifdef creat64