]> 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>
Tue, 10 Aug 2021 21:08:10 +0000 (17:08 -0400)
commit38911b3c2c7dbb9a097b44856472ebbbedde71fc
treeb9d000b4f4722060a7da6a5ac6ebd2b12d344754
parentc6902e7796bc78df011131a2b8b024faed884b8f
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
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