reset/sanlk_reset.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
New commits: commit 401c5816aa16f28798510b0b77ab9b2abd1b23b7 Author: Nir Soffer nsoffer@redhat.com Date: Mon Aug 18 23:52:48 2014 +0300
reset: Require lockspace name for local deamon operations
sanlk-reset required lockspace name for the reset command, but did not require it for reg, end, and clear commands. Running a comment without did nothing and exit with zero exit code.
Now a lockspace name is required for all commands and the tool exit with exit code 2 if not available.
Signed-off-by: Nir Soffer nsoffer@redhat.com
diff --git a/reset/sanlk_reset.c b/reset/sanlk_reset.c index 6bff43e..56cada3 100644 --- a/reset/sanlk_reset.c +++ b/reset/sanlk_reset.c @@ -566,6 +566,11 @@ int main(int argc, char *argv[]) } }
+ if (!ls_count) { + fprintf(stderr, "lockspace_name is required\n"); + exit(2); + } + /* * Update local sanlk-resetd. */ @@ -583,11 +588,6 @@ int main(int argc, char *argv[]) exit(2); }
- if (!ls_count) { - fprintf(stderr, "lockspace_name is required\n"); - exit(2); - } - if ((ls_count > 1) && (target_host_id || target_generation)) { fprintf(stderr, "-i and -g options are only allowed with a single lockspace_name\n"); exit(2);
sanlock-devel@lists.fedorahosted.org