From: Peter Krempa Date: Mon, 21 Jan 2013 17:18:41 +0000 (+0100) Subject: virsh-nwfilter: Update nwfilter commands to use vshCommandOptStringReq X-Git-Tag: v1.0.3-rc1~242 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=05af594bf7b3a926278425c3b38c4a31872d7913;p=thirdparty%2Flibvirt.git virsh-nwfilter: Update nwfilter commands to use vshCommandOptStringReq --- diff --git a/tools/virsh-nwfilter.c b/tools/virsh-nwfilter.c index 61ec34c401..9407d3846d 100644 --- a/tools/virsh-nwfilter.c +++ b/tools/virsh-nwfilter.c @@ -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)