[PATCH 04/12] virsh: Apply macro for current VSH_OT_STRING "domain" options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



These VSH_OT_STRING "domain" options support domain name completion now.

Signed-off-by: Lin Ma <lma@xxxxxxxx>
---
 tools/virsh-domain.c | 18 +++++-------------
 1 file changed, 5 insertions(+), 13 deletions(-)

diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 8a63761fab..689f9d686b 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -9601,10 +9601,8 @@ static const vshCmdInfo info_qemu_monitor_event[] = {
 };
 
 static const vshCmdOptDef opts_qemu_monitor_event[] = {
-    {.name = "domain",
-     .type = VSH_OT_STRING,
-     .help = N_("filter by domain name, id or uuid")
-    },
+    VIRSH_COMMON_OPT_DOMAIN_OT_STRING(N_("filter by domain name, id or uuid"),
+                                      0),
     {.name = "event",
      .type = VSH_OT_STRING,
      .help = N_("filter by event name")
@@ -10157,11 +10155,7 @@ static const vshCmdOptDef opts_domxmltonative[] = {
      .flags = VSH_OFLAG_REQ,
      .help = N_("target config data type format")
     },
-    {.name = "domain",
-     .type = VSH_OT_STRING,
-     .flags = VSH_OFLAG_REQ_OPT,
-     .help = N_("domain name, id or uuid")
-    },
+    VIRSH_COMMON_OPT_DOMAIN_OT_STRING_FULL(0),
     {.name = "xml",
      .type = VSH_OT_STRING,
      .help = N_("xml data file to export from")
@@ -13348,10 +13342,8 @@ static const vshCmdInfo info_event[] = {
 };
 
 static const vshCmdOptDef opts_event[] = {
-    {.name = "domain",
-     .type = VSH_OT_STRING,
-     .help = N_("filter by domain name, id, or uuid")
-    },
+    VIRSH_COMMON_OPT_DOMAIN_OT_STRING(N_("filter by domain name, id or uuid"),
+                                      0),
     {.name = "event",
      .type = VSH_OT_STRING,
      .help = N_("which event type to wait for")
-- 
2.15.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux