mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 05:17:59 +03:00
virsh-nwfilter: Update nwfilter commands to use vshCommandOptStringReq
This commit is contained in:
parent
b2e8585555
commit
05af594bf7
@ -49,7 +49,7 @@ vshCommandOptNWFilterBy(vshControl *ctl, const vshCmd *cmd,
|
||||
if (!vshCmdHasOption(ctl, cmd, optname))
|
||||
return NULL;
|
||||
|
||||
if (vshCommandOptString(cmd, optname, &n) <= 0)
|
||||
if (vshCommandOptStringReq(ctl, cmd, optname, &n) < 0)
|
||||
return NULL;
|
||||
|
||||
vshDebug(ctl, VSH_ERR_INFO, "%s: found option <%s>: %s\n",
|
||||
@ -103,7 +103,7 @@ cmdNWFilterDefine(vshControl *ctl, const vshCmd *cmd)
|
||||
bool ret = true;
|
||||
char *buffer;
|
||||
|
||||
if (vshCommandOptString(cmd, "file", &from) <= 0)
|
||||
if (vshCommandOptStringReq(ctl, cmd, "file", &from) < 0)
|
||||
return false;
|
||||
|
||||
if (virFileReadAll(from, VSH_MAX_XML_FILE, &buffer) < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user