HomeFreeBSD

install: Assorted nitpickery.

Description

install: Assorted nitpickery.

  • 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.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D44810

Details

Provenance
desAuthored on Wed, Apr 17, 1:36 AM
Reviewer
markj
Differential Revision
D44810: install: Assorted nitpickery.
Parents
rGa0439a1b820f: install: Remove the mmap(2) option.
Branches
Unknown
Tags
Unknown