diff options
author | Douglas Gilbert <dgilbert@interlog.com> | 2018-05-11 04:36:52 +0000 |
---|---|---|
committer | Douglas Gilbert <dgilbert@interlog.com> | 2018-05-11 04:36:52 +0000 |
commit | 71e56cc16387a76971a04fda4ff9306ec704daf9 (patch) | |
tree | 2c6e6ee4f1f6efd89a16a865ea5301967c6f34db /src/sg_copy_results.c | |
parent | 5a4b80a31b1caeb62fdab8d732582d898b3da9e0 (diff) | |
download | sg3_utils-71e56cc16387a76971a04fda4ff9306ec704daf9.tar.gz |
sg_lib: enhance exit status values and associated strings
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@771 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'src/sg_copy_results.c')
-rw-r--r-- | src/sg_copy_results.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/sg_copy_results.c b/src/sg_copy_results.c index 514a33b9..0c64cf61 100644 --- a/src/sg_copy_results.c +++ b/src/sg_copy_results.c @@ -38,7 +38,7 @@ and the optional list identifier passed as the list_id argument. */ -static const char * version_str = "1.20 20180428"; +static const char * version_str = "1.21 20180510"; #define MAX_XFER_LEN 10000 @@ -461,7 +461,12 @@ finish: if (res < 0) { pr2serr(ME "close error: %s\n", safe_strerror(-res)); if (0 == ret) - return SG_LIB_FILE_ERROR; + ret = sg_convert_errno(-res); + } + if (0 == verbose) { + if (! sg_if_can2stderr("sg_copy_results failed: ", ret)) + pr2serr("Some error occurred, try again with '-v' or '-vv' for " + "more information\n"); } return (ret >= 0) ? ret : SG_LIB_CAT_OTHER; } |