Re: [PATCH 1/2] virsh: don't reject undefine on active domain

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

 



On 08/11/2011 09:11 PM, Daniel Veillard wrote:
On Thu, Aug 11, 2011 at 08:39:22PM -0600, Eric Blake wrote:
The public API documents that undefine may be used to transition a
running persistent domain into a transient one.  Many drivers still
do not support this usage, but virsh shouldn't be getting in the
way of those that do support it.


@@ -1449,19 +1448,7 @@ cmdUndefine(vshControl *ctl, const vshCmd *cmd)
      if (vshCommandOptString(cmd, "domain",&name)<= 0)
          return false;

This guarantees name is non-NULL,


-    if (name&&  virStrToLong_i(name, NULL, 10,&id) == 0

so yes, this was a redundant check


  ACK, it also fix the lookup since we are sure to have a name,
maybe that should go in the commit log

Pushed with a slight commit log tweak.

--
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

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