diff options
author | Marcus Comstedt <marcus@mc.pp.se> | 2020-11-17 08:20:48 +0100 |
---|---|---|
committer | Marcus Comstedt <marcus@mc.pp.se> | 2020-11-17 08:20:48 +0100 |
commit | c32ca41c81cb3f4eb55f06bcdaac21f202af6bec (patch) | |
tree | f7a3933f8a7b5beed226edb3ba05beb4e51f04f0 | |
parent | 33ae46f1cb7eb36a6eb28cd25cfb7f066d22618a (diff) | |
download | pk-c32ca41c81cb3f4eb55f06bcdaac21f202af6bec.zip pk-c32ca41c81cb3f4eb55f06bcdaac21f202af6bec.tar.gz pk-c32ca41c81cb3f4eb55f06bcdaac21f202af6bec.tar.bz2 |
Remove use of copy_stat() from sys_fstatat
The system call should return the stat struct in kernel format, not
libc format.
-rw-r--r-- | pk/syscall.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pk/syscall.c b/pk/syscall.c index 8101ec9..422b16c 100644 --- a/pk/syscall.c +++ b/pk/syscall.c @@ -226,7 +226,7 @@ long sys_fstatat(int dirfd, const char* name, void* st, int flags) struct frontend_stat buf; size_t name_size = strlen(name)+1; long ret = frontend_syscall(SYS_fstatat, kfd, va2pa(name), name_size, va2pa(&buf), flags, 0, 0); - copy_stat(st, &buf); + memcpy(st, &buf, sizeof(buf)); return ret; } return -EBADF; |