]> xenbits.xensource.com Git - libvirt.git/commit
snapshot: require existence before returning success
authorEric Blake <eblake@redhat.com>
Fri, 25 May 2012 02:28:54 +0000 (20:28 -0600)
committerEric Blake <eblake@redhat.com>
Wed, 20 Jun 2012 16:27:57 +0000 (10:27 -0600)
commite3fe4102c1210a21afc32769f2adb7c53e9a208a
tree70b0196cbc0d067b809d2a9af0be1991756677a7
parent33dc8cf018e41c0e973a4a46a108d5ff30cbbf49
snapshot: require existence before returning success

Blindly returning success is misleading if the object no longer
exists; it is a bit better to check for existence up front before
returning information about that object.  This pattern matches the
fact that most of our other APIs check for existence as a side
effect prior to getting at the real piece of information being
queried.

* src/esx/esx_driver.c (esxDomainIsUpdated, esxDomainIsPersistent):
Add existence checks.
* src/vbox/vbox_tmpl.c (vboxDomainIsPersistent)
(vboxDomainIsUpdated): Likewise.
src/esx/esx_driver.c
src/vbox/vbox_tmpl.c