- Use errc() instead of manually setting errno before calling err().
- Change one warning into a fatal error.
- Drop some unnecessary casts.
- strlcat() bounds checks were off-by-one. This does not matter in practice because the subsequent code renders an overrun harmless.
- We were passing SSIZE_MAX to copy_file_range() instead of the requested size. This only matters if we're asked to install a file which is still being written to while we are copying it.
MFC after: 1 week
Sponsored by: Klara, Inc.