mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
virsh: domsetlaunchsecstate: report error if no options are passed
We already exit if they are not present. Report an error, but do not mark them as required in case a future version of this command will want to accept a different set of parameters. https://bugzilla.redhat.com/show_bug.cgi?id=2046024 Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
18813edbf2
commit
d248e3dca8
@ -9627,8 +9627,10 @@ cmdDomSetLaunchSecState(vshControl * ctl, const vshCmd * cmd)
|
|||||||
if (vshCommandOptStringReq(ctl, cmd, "secret", &secfile) < 0)
|
if (vshCommandOptStringReq(ctl, cmd, "secret", &secfile) < 0)
|
||||||
return false;
|
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;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (virFileReadAll(sechdrfile, 1024*64, &sechdr) < 0) {
|
if (virFileReadAll(sechdrfile, 1024*64, &sechdr) < 0) {
|
||||||
vshSaveLibvirtError();
|
vshSaveLibvirtError();
|
||||||
|
Loading…
Reference in New Issue
Block a user