HomeFreeBSD

getrusage(2): fix return value under 32-bit emulation

Description

getrusage(2): fix return value under 32-bit emulation

According to the man page, getrusage(2) should return EFAULT if the rusage
argument lies outside of the process's address space. But due to an
oversight in r100384, that's never been the case during 32-bit emulation.
Fix it.

PR: 230153
Reported by: tests(7)
Reviewed by: cem
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D16500

Details

Provenance
asomersAuthored on
Reviewer
cem
Differential Revision
D16500: getrusage(2): fix return value under 32-bit emulation
Parents
rS336870: Create a project branch for importing clang, llvm, lld, lldb,
Branches
Unknown
Tags
Unknown