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

cov: add internal error for missing arg

Analyzer is happier.
This commit is contained in:
Zdenek Kabelac 2021-07-27 15:40:26 +02:00
parent 69379df8f3
commit 046d85af3d

View File

@ -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;