]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ar: provide error exit status upon failure
authorEd Maste <emaste@FreeBSD.org>
Tue, 3 Aug 2021 18:30:06 +0000 (14:30 -0400)
committerEd Maste <emaste@FreeBSD.org>
Sat, 9 Oct 2021 00:28:31 +0000 (20:28 -0400)
commitd71103026de3ad27e6a16ecf91823540620c6024
tree4d47d5d973f57d56a1cb436eaacc3aa837a1a980
parentc17b2708f6321351a5277fcbe4ab77a8a6fe179a
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)
usr.bin/ar/acplex.l
usr.bin/ar/acpyacc.y
usr.bin/ar/ar.c
usr.bin/ar/ar.h
usr.bin/ar/read.c
usr.bin/ar/write.c