mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-28 15:34:33 +00:00
Fix linux_stat
This commit is contained in:
parent
a8333048c8
commit
954e5a2d02
@ -150,7 +150,11 @@ static int linux_stat(SysFrm *, const char *pathname, struct stat *statbuf)
|
|||||||
if (pPathname == nullptr)
|
if (pPathname == nullptr)
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
return fdt->_stat(pPathname, statbuf);
|
auto pStatbuf = vma->UserCheckAndGetAddress(statbuf);
|
||||||
|
if (pStatbuf == nullptr)
|
||||||
|
return -EFAULT;
|
||||||
|
|
||||||
|
return fdt->_stat(pPathname, pStatbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* https://man7.org/linux/man-pages/man2/fstat.2.html */
|
/* https://man7.org/linux/man-pages/man2/fstat.2.html */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user