main - cov: add internal error for missing arg
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=046d85af3d7a103573e56ef6861dc5d6ded9ecc7 Commit: 046d85af3d7a103573e56ef6861dc5d6ded9ecc7 Parent: 69379df8f35404269e5aa4a275a7686a87076f27 Author: Zdenek Kabelac <[email protected]> AuthorDate: Tue Jul 27 15:40:26 2021 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Wed Jul 28 00:49:28 2021 +0200
cov: add internal error for missing arg
Analyzer is happier.
--- tools/lvchange.c | 5 +++++ 1 file changed, 5 insertions(+)
tools/lvchange.c +5 -0
@@ -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 ;