diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c index 64ec03dfc0cb17b9385162473d5f7eb8098c54b3..7dcf83378b1c35fbda5a2cd0b018873b15d90784 100644 --- a/tools/virsh-domain-monitor.c +++ b/tools/virsh-domain-monitor.c @@ -2243,9 +2243,9 @@ cmdDomIfAddr(vshControl *ctl, const vshCmd *cmd) if (!(dom = virshCommandOptDomain(ctl, cmd, NULL))) return false; - if (vshCommandOptString(ctl, cmd, "interface", &ifacestr) < 0) + if (vshCommandOptStringReq(ctl, cmd, "interface", &ifacestr) < 0) goto cleanup; - if (vshCommandOptString(ctl, cmd, "source", &sourcestr) < 0) + if (vshCommandOptStringReq(ctl, cmd, "source", &sourcestr) < 0) goto cleanup; if (sourcestr) { diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 413220ba09476659ed49ba851800d0fa74c37b5c..4d798902b53da407ae4dc078fffb7f04232a0378 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -2332,11 +2332,11 @@ cmdBlockCopy(vshControl *ctl, const vshCmd *cmd) if (vshCommandOptStringReq(ctl, cmd, "path", &path) < 0) return false; - if (vshCommandOptString(ctl, cmd, "dest", &dest) < 0) + if (vshCommandOptStringReq(ctl, cmd, "dest", &dest) < 0) return false; - if (vshCommandOptString(ctl, cmd, "xml", &xml) < 0) + if (vshCommandOptStringReq(ctl, cmd, "xml", &xml) < 0) return false; - if (vshCommandOptString(ctl, cmd, "format", &format) < 0) + if (vshCommandOptStringReq(ctl, cmd, "format", &format) < 0) return false; /* XXX: Parse bandwidth as scaled input, rather than forcing * MiB/s, and either reject negative input or treat it as 0 rather @@ -9241,7 +9241,7 @@ cmdQemuMonitorEvent(vshControl *ctl, const vshCmd *cmd) data.count = 0; if (vshCommandOptTimeoutToMs(ctl, cmd, &timeout) < 0) return false; - if (vshCommandOptString(ctl, cmd, "event", &event) < 0) + if (vshCommandOptStringReq(ctl, cmd, "event", &event) < 0) return false; if (vshCommandOptBool(cmd, "domain")) @@ -12568,7 +12568,7 @@ cmdEvent(vshControl *ctl, const vshCmd *cmd) return true; } - if (vshCommandOptString(ctl, cmd, "event", &eventName) < 0) + if (vshCommandOptStringReq(ctl, cmd, "event", &eventName) < 0) return false; if (eventName) { for (event = 0; event < VIR_DOMAIN_EVENT_ID_LAST; event++) diff --git a/tools/virsh-network.c b/tools/virsh-network.c index a0f7707b93319655a54c0749933d0011b14ce7d9..bd89c11a791326d5de42e20ec63f52e48fc38a83 100644 --- a/tools/virsh-network.c +++ b/tools/virsh-network.c @@ -1262,7 +1262,7 @@ cmdNetworkEvent(vshControl *ctl, const vshCmd *cmd) return true; } - if (vshCommandOptString(ctl, cmd, "event", &eventName) < 0) + if (vshCommandOptStringReq(ctl, cmd, "event", &eventName) < 0) return false; if (!eventName) { vshError(ctl, "%s", _("either --list or event type is required")); @@ -1372,7 +1372,7 @@ cmdNetworkDHCPLeases(vshControl *ctl, const vshCmd *cmd) unsigned int flags = 0; virNetworkPtr network = NULL; - if (vshCommandOptString(ctl, cmd, "mac", &mac) < 0) + if (vshCommandOptStringReq(ctl, cmd, "mac", &mac) < 0) return false; if (!(network = virshCommandOptNetwork(ctl, cmd, &name)))