diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2021-07-27 15:40:26 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2021-07-28 00:49:28 +0200 |
commit | 046d85af3d7a103573e56ef6861dc5d6ded9ecc7 (patch) | |
tree | f37b4fb822ac445b9655fa1970b5b94d1077d726 | |
parent | 69379df8f35404269e5aa4a275a7686a87076f27 (diff) | |
download | lvm2-046d85af3d7a103573e56ef6861dc5d6ded9ecc7.tar.gz |
cov: add internal error for missing arg
Analyzer is happier.
-rw-r--r-- | tools/lvchange.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/lvchange.c b/tools/lvchange.c index 8293f5035..bfd464d5c 100644 --- a/tools/lvchange.c +++ b/tools/lvchange.c @@ -1685,6 +1685,11 @@ static int _lvchange_syncaction_single(struct cmd_context *cmd, { const char *msg = arg_str_value(cmd, syncaction_ARG, NULL); + if (!msg) { + log_error(INTERNAL_ERROR "Missing syncaction arg."); + return ECMD_FAILED; + } + if (lv_raid_has_integrity(lv) && !strcmp(msg, "repair")) { log_error("Use syncaction check to detect and correct integrity checksum mismatches."); return ECMD_FAILED; |