diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index b56f6a90f5..43d310f2af 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -9627,8 +9627,10 @@ cmdDomSetLaunchSecState(vshControl * ctl, const vshCmd * cmd) if (vshCommandOptStringReq(ctl, cmd, "secret", &secfile) < 0) return false; - if (sechdrfile == NULL || secfile == NULL) + if (sechdrfile == NULL || secfile == NULL) { + vshError(ctl, "%s", _("Both secret and the secret header are required")); return false; + } if (virFileReadAll(sechdrfile, 1024*64, &sechdr) < 0) { vshSaveLibvirtError();