On Wed, Mar 31, 2010 at 06:16:12PM +0200, Jiri Denemark wrote:
...
> /* Get a handle to the current in-use snapshot for the domain */
> virDomainSnapshotPtr virDomainSnapshotCurrent(virDomainPtr domain,
> unsigned int flags);
This call needs to be changed a bit to allow distinguishing between an error
and a domain with no snapshots (i.e., no current snapshot):
int virDomainSnapshotCurrent(virDomainPtr domain,
virDomainSnapshotPtr *snapshot,
unsigned int flags);
I think it'd be nicer to keep the first syntax, but add a way to query if
a guest has a current snapshot
int virDomainSnapshotHasCurrent(virDomainPtr dom);
That way, virDomainSnapshotCurrent() has no need to distingush between the
'no snapshots' error and other types of errors.
Daniel
--
|: Red Hat, Engineering, London -o-
http://people.redhat.com/berrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org -o-
http://deltacloud.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|