aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Waterman <andrew@sifive.com>2020-11-16 23:28:43 -0800
committerGitHub <noreply@github.com>2020-11-16 23:28:43 -0800
commitf0959f9d18c3bd04f601867e57fdf55bc2dba8d2 (patch)
treef7a3933f8a7b5beed226edb3ba05beb4e51f04f0
parent33ae46f1cb7eb36a6eb28cd25cfb7f066d22618a (diff)
parentc32ca41c81cb3f4eb55f06bcdaac21f202af6bec (diff)
downloadpk-f0959f9d18c3bd04f601867e57fdf55bc2dba8d2.zip
pk-f0959f9d18c3bd04f601867e57fdf55bc2dba8d2.tar.gz
pk-f0959f9d18c3bd04f601867e57fdf55bc2dba8d2.tar.bz2
Merge pull request #222 from zeldin/stat-struct-format
Remove use of copy_stat() from sys_fstatat
-rw-r--r--pk/syscall.c2
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;