]> xenbits.xensource.com Git - libvirt.git/commitdiff
virsh: Report name from edited object
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 14 Jun 2012 12:18:31 +0000 (14:18 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 14 Jun 2012 13:04:28 +0000 (15:04 +0200)
There is a little easter egg in virsh: one can easily clone
an object (domain, network, ...). Just 'virsh edit' change the name
and remove <uuid>. And then, in the end when reporting success
the new name was printed out.
However, with recent edit rewrite we lost the final part and are
still printing the original name out.

tools/virsh.c

index 6077d84b321dc9a2a31935f27e2be8e1251801c0..df0a3e9b8e8c64d00b8e7d6607603110820417e3 100644 (file)
@@ -8612,7 +8612,7 @@ cmdInterfaceEdit(vshControl *ctl, const vshCmd *cmd)
 #include "virsh-edit.c"
 
     vshPrint(ctl, _("Interface %s XML configuration edited.\n"),
-             virInterfaceGetName(iface));
+             virInterfaceGetName(iface_edited));
 
     ret = true;
 
@@ -10006,7 +10006,7 @@ cmdNWFilterEdit(vshControl *ctl, const vshCmd *cmd)
 #include "virsh-edit.c"
 
     vshPrint(ctl, _("Network filter %s XML configuration edited.\n"),
-             virNWFilterGetName(nwfilter));
+             virNWFilterGetName(nwfilter_edited));
 
     ret = true;
 
@@ -15811,7 +15811,7 @@ cmdEdit(vshControl *ctl, const vshCmd *cmd)
 #include "virsh-edit.c"
 
     vshPrint(ctl, _("Domain %s XML configuration edited.\n"),
-             virDomainGetName(dom));
+             virDomainGetName(dom_edited));
 
     ret = true;
 
@@ -15883,7 +15883,7 @@ cmdNetworkEdit(vshControl *ctl, const vshCmd *cmd)
 #include "virsh-edit.c"
 
     vshPrint(ctl, _("Network %s XML configuration edited.\n"),
-             virNetworkGetName(network));
+             virNetworkGetName(network_edited));
 
     ret = true;
 
@@ -15938,7 +15938,7 @@ cmdPoolEdit(vshControl *ctl, const vshCmd *cmd)
 #include "virsh-edit.c"
 
     vshPrint(ctl, _("Pool %s XML configuration edited.\n"),
-             virStoragePoolGetName(pool));
+             virStoragePoolGetName(pool_edited));
 
     ret = true;