realpath: Report correct path on failure
If lstat() fails with EACCES or ENOTDIR, the path we need to return in
the caller-provided buffer is that of the parent directory (which is
either unreadable or not a directory; the latter can only happen in the
case of a race) rather than that of the child we attempted to stat.
Sponsored by: Klara, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D53025
realpath: Belatedly document POSIX conformance
We've been mostly POSIX-conforming since r236400 and fully since r240410,
which fixed a corner case where a missing non-leaf directory would be
reported as ENOTDIR instead of ENOENT.
Sponsored by: Klara, Inc.
Fixes: 7877ed7ce33e ("Avoid mapping ENOENT to ENOTDIR for non-existent path components.")
Reviewed by: ziaee, markj
Differential Revision: https://reviews.freebsd.org/D53027
realpath: Additional test cases
* Passing NULL should result in EINVAL
* Passing an empty path should result in ENOENT
* Failure with a non-null buffer should leave a partial result. As
pointed out in a comment in the test case, this reveals a discrepancy
between the documentation and reality.
Sponsored by: Klara, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D53024
bridge.4: Improve VLAN documentation
Document how bridge implements VLANs, and provide an example of
configuring a bridge with VLAN filtering.
MFC after: 3 days
Reviewed by: ziaee, pauamma_gundo.com (previous version)
Sponsored by: https://www.patreon.com/bsdivy
Differential Revision: https://reviews.freebsd.org/D51185
arm: Use proper prototype for SYSINIT functions
The only possible return value of function module_info_init() is 0. Make
it return void to match the prototype of SYSINIT.
MFC after: 1 week
sys/sysent.h: Remove an unneeded type cast
The function exec_sysvec_init() already has the right prototype.
While here, remove an extra semicolon from the macro INIT_SYSENTVEC.
MFC after: 1 week
ipfw: Use proper prototype for SYSINIT functions
The only possible return value of function ipfw_init() is 0. Make it
return void to match the prototype of SYSINIT.
MFC after: 1 week
jail: Use proper prototype for SYSINIT functions
The only possible return value of function jm_sysinit() and jm_sysuninit()
is 0. Make them return void to match the prototype of SYSINIT.
MFC after: 1 week