1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

pvck: Use non-zero exit status after failure.

This commit is contained in:
Alasdair G Kergon 2014-11-13 12:26:43 +00:00
parent c3e2990359
commit efe5245e47
2 changed files with 9 additions and 4 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.113 -
=====================================
Exit with non-zero status code when pvck encounters a problem.
Fix clean_tree after activation/resume for cache target (2.02.112).
Version 2.02.112 - 11th November 2014

View File

@ -18,9 +18,11 @@
int pvck(struct cmd_context *cmd, int argc, char **argv)
{
int i;
int ret_max = ECMD_PROCESSED;
/* FIXME: validate cmdline options */
/* FIXME: what does the cmdline look like? */
/*
* Use what's on the cmdline directly, and avoid calling into
* some of the other infrastructure functions, so as to avoid
@ -32,10 +34,12 @@ int pvck(struct cmd_context *cmd, int argc, char **argv)
log_verbose("Scanning %s", argv[i]);
dm_unescape_colons_and_at_signs(argv[i], NULL, NULL);
pv_analyze(cmd, argv[i],
arg_uint64_value(cmd, labelsector_ARG,
UINT64_C(0)));
if (!pv_analyze(cmd, argv[i],
arg_uint64_value(cmd, labelsector_ARG, UINT64_C(0)))) {
stack;
ret_max = ECMD_FAILED;
}
}
return ECMD_PROCESSED;
return ret_max;
}