HomeFreeBSD

ar: provide error exit status upon failure

Description

ar: provide error exit status upon failure

Previously ar and ranlib returned with exit status 0 (success) in the
case of a missing file or other error. Update to use error handling
similar to that added by ELF Tool Chain after that project forked
FreeBSD's ar.

PR: PR257599 [exp-run]
Reported by: Shawn Webb, gehmehgeh (on HardenedBSD IRC)
Reviewed by: markj
Obtained from: elftoolchain
MFC after: 2 months
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31402

(cherry picked from commit 38911b3c2c7dbb9a097b44856472ebbbedde71fc)

Details

Provenance
emasteAuthored on Aug 3 2021, 6:30 PM
Reviewer
markj
Differential Revision
D31402: ar: add error handling
Parents
rGe02bf0022e90: freebsd-update(8): Add -j flag to support jails
Branches
Unknown
Tags
Unknown