aboutsummaryrefslogtreecommitdiff
path: root/src/sg_sanitize.c
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2020-12-24 19:45:03 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2020-12-24 19:45:03 +0000
commit2f7e361640305f7bfa1addb5c8419562a45676a7 (patch)
treeafa75ef95e3eedeb649fa01e57bddff444437b9e /src/sg_sanitize.c
parente7df8f7726025d0738fb931cabd64cbbe1633ed0 (diff)
downloadsg3_utils-2f7e361640305f7bfa1addb5c8419562a45676a7.tar.gz
sg_sanitize + sg_format: when --verbose given once report probable success; without --verbose 'no news is good news'
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@871 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'src/sg_sanitize.c')
-rw-r--r--src/sg_sanitize.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/sg_sanitize.c b/src/sg_sanitize.c
index 00d6b59d..04a8ee90 100644
--- a/src/sg_sanitize.c
+++ b/src/sg_sanitize.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2019 Douglas Gilbert.
+ * Copyright (c) 2011-2020 Douglas Gilbert.
* All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the BSD_LICENSE file.
@@ -33,7 +33,7 @@
#include "sg_unaligned.h"
#include "sg_pr2serr.h"
-static const char * version_str = "1.14 20191220";
+static const char * version_str = "1.15 20201223";
/* Not all environments support the Unix sleep() */
#if defined(MSC_VER) || defined(__MINGW32__)
@@ -271,8 +271,12 @@ do_sanitize(int sg_fd, const struct opts_t * op, const void * param_lstp,
ret = sense_cat;
break;
}
- } else
+ } else {
ret = 0;
+ if (op->verbose)
+ pr2serr("Sanitize command %s without error\n",
+ (immed ? "launched" : "completed"));
+ }
destruct_scsi_pt_obj(ptvp);
return ret;
@@ -778,6 +782,9 @@ main(int argc, char * argv[])
if (vb > 1)
pr2serr("No progress indication found, iteration %d\n",
k + 1);
+ if ((0 == k) && vb)
+ pr2serr("Sanitize seems to be successful and finished "
+ "quickly\n");
/* N.B. exits first time there isn't a progress indication */
break;
} else