Previously we complained about ignoring lockspaces, but continue the
operation as usaual, so another program running the sanlk-reset tool
cannot detect the usage error.
Now this will fail with exit code 2 and this message:
too many lockspaces (max 64)
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
reset/sanlk_reset.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/reset/sanlk_reset.c b/reset/sanlk_reset.c
index 56cada3..6f4978f 100644
--- a/reset/sanlk_reset.c
+++ b/reset/sanlk_reset.c
@@ -559,7 +559,8 @@ int main(int argc, char *argv[])
if (i == optind) {
cmd = argv[i];
} else if (ls_count == MAX_LS) {
- fprintf(stderr, "ignore lockspace_name %s\n", argv[i]);
+ fprintf(stderr, "too many lockspaces (max %d)\n", MAX_LS);
+ exit(2);
} else {
ls_names[ls_count] = argv[i];
ls_count++;
--
1.8.3.1
Show replies by thread