HomeFreeBSD

nfsd: Return ENXIO instead of EPERM when nfsd(8) already running

Description

nfsd: Return ENXIO instead of EPERM when nfsd(8) already running

The nfsd(8) daemon generates an error message that does not
indicate that the nfsd daemon is already running when the nfssvc(2)
syscall fails for the NFSSVC_STABLERESTART. Also, the check for
running nfsd(8) in a vnet prison will return EPERM when it fails.

This patch replaces EPERM with ENXIO so that the nfsd(8) daemon
can generate more reasonable failure messages. The nfsd(8) daemon
will be patched in a future commit.

MFC after: 3 months

Details

Provenance
rmacklemAuthored on Feb 22 2023, 9:19 PM
Parents
rG30c91a3cee6d: byacc: Adjust expected test output to match our patches.
Branches
Unknown
Tags
Unknown