diff options
author | Jens Remus <jremus@linux.ibm.com> | 2023-12-20 11:17:11 +0100 |
---|---|---|
committer | Andreas Krebbel <krebbel@linux.ibm.com> | 2023-12-20 11:50:32 +0100 |
commit | 730e7ddc243edff2755548c89dedac7293e5a5f6 (patch) | |
tree | 571d8a83fa18955ae5f96cd19f78cb7cea3ff6a0 /binutils/NEWS | |
parent | 2ff609b4ce8f3142b4e5592116f28c83a07066c3 (diff) | |
download | fsf-binutils-gdb-730e7ddc243edff2755548c89dedac7293e5a5f6.zip fsf-binutils-gdb-730e7ddc243edff2755548c89dedac7293e5a5f6.tar.gz fsf-binutils-gdb-730e7ddc243edff2755548c89dedac7293e5a5f6.tar.bz2 |
s390: Enhance error handling in s390-mkopc
When the s390-mkopc utility detects an error it prints an error message
to strerr and either continues processing or exists with a non-zero
return code. If it continues without detecting any further error the
final return code was zero, potentially hiding the detected error.
Introduce a global variable to hold the final return code and initialize
it to EXIT_SUCCESS. Introduce a helper function print_error() that
prints an error message to stderr and sets the final return code to
EXIT_FAILURE. Use it to print all error messages. Return the final
return code at the end of the processing.
While at it enhance error messages to state more clearly which mnemonic
an error was detected for. Also continue processing for cases where
subsequent mnemonics can be processed.
opcodes/
* s390-mkopc.c: Enhance error handling. Return EXIT_FAILURE
in case of an error, otherwise EXIT_SUCCESS.
Signed-off-by: Jens Remus <jremus@linux.ibm.com>
Reviewed-by: Andreas Krebbel <krebbel@linux.ibm.com>
Diffstat (limited to 'binutils/NEWS')
0 files changed, 0 insertions, 0 deletions