Browse Source

Remove use of copy_stat() from sys_fstatat

The system call should return the stat struct in kernel format, not
libc format.
pull/222/head
Marcus Comstedt 5 years ago
parent
commit
c32ca41c81
  1. 2
      pk/syscall.c

2
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;

Loading…
Cancel
Save