Fix openat mode argument on x86_64
This commit is contained in:
parent
39e797f937
commit
eda1bbca23
@ -55,7 +55,7 @@ uint32_t fork() {
|
||||
int32_t openat(int32_t fd, const char* filename, uint32_t flags, uint32_t mode) {
|
||||
int32_t file;
|
||||
asm volatile (
|
||||
"mov %%r10, %5\n"
|
||||
"mov %5, %%r10\n"
|
||||
"syscall\n"
|
||||
: "=a"(file)
|
||||
: "a"(SYS_OPENAT), "D"(fd), "S"(filename), "d"(flags), "r"((uint64_t)mode) // RDI, RSI, RDX are used in x86-64 for write args
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user