Pointed out by Eric. Thanks.
---
 tools/virsh.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/tools/virsh.c b/tools/virsh.c
index b7cea58..b43af70 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -12375,8 +12375,13 @@ vshCommandOptString(const vshCmd *cmd, const char 
*name, const char **value)
             vshError(NULL, _("Missing required option '%s'"), name);
             ret = -1;
         } else {
-            /* Treat "--option ''" as if option had not been specified. */
-            ret = 0;
+            /* --option '' */
+            if (arg->def->flag & VSH_OFLAG_EMPTY_OK) {
+                ret = 0;
+            } else {
+                vshError(NULL, _("option '%s' is empty"), name);
+                ret = -1;
+            }
         }
     }
 
-- 
1.7.5.1

--
libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to