Re: [PATCH] virsh: introduce name-uuid for list command

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

 



On Wed, Jun 15, 2016 at 05:36:05PM +0800, Chen Hanxiao wrote:
From: Chen Hanxiao <chenhanxiao@xxxxxxxxx>

This patch will show both name and UUID of domain:

Id    Name                           State      UUID
---------------------------------------------------------------------------------------
 3     f23                            running    918f1dd6-b19f-412b-ba17-d113bad89af8

Signed-off-by: Chen Hanxiao <chenhanxiao@xxxxxxxxx>
---
tools/virsh-domain-monitor.c | 27 ++++++++++++++++++++++++---
1 file changed, 24 insertions(+), 3 deletions(-)

diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c
index 0a93949..32e4ea4 100644
--- a/tools/virsh-domain-monitor.c
+++ b/tools/virsh-domain-monitor.c
@@ -1844,10 +1849,10 @@ cmdList(vshControl *ctl, const vshCmd *cmd)
    FILTER("state-shutoff", VIR_CONNECT_LIST_DOMAINS_SHUTOFF);
    FILTER("state-other",   VIR_CONNECT_LIST_DOMAINS_OTHER);

-    if (optTable + optName + optUUID > 1) {
+    if (optTable + optName + optUUID + optNameUuid > 1) {
        vshError(ctl, "%s",
-                 _("Only one argument from --table, --name and --uuid "
-                   "may be specified."));
+                 _("Only one argument from --table, --name, --uuid "
+                   "and --name-uuid may be specified."));

Allowing both --name and --uuid for the same functionality would be
nicer, is there a reason why we can't do that?

Jan
        return false;
    }


--
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]