On Thu, Jul 14, 2011 at 07:02:23PM -0600, Eric Blake wrote:
* include/libvirt/libvirt.h.in (virDomainCreateFlags): Add a flag.
(virDomainRestoreFlags): New prototype.
* src/libvirt.c (virDomainRestoreFlags): New function.
* src/libvirt_public.syms: Export it.
* src/driver.h (virDrvDomainRestoreFlags): New driver callback.
---
I'm debating whether to squash this into 1/8, or leave it separate.
include/libvirt/libvirt.h.in | 8 ++++-
src/driver.h | 6 +++
src/libvirt.c | 81 ++++++++++++++++++++++++++++++++++++++++++
src/libvirt_public.syms | 1 +
4 files changed, 95 insertions(+), 1 deletions(-)
diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
index d9a8694..43881b3 100644
--- a/include/libvirt/libvirt.h.in
+++ b/include/libvirt/libvirt.h.in
@@ -235,6 +235,7 @@ typedef enum {
VIR_DOMAIN_NONE = 0, /* Default behavior */
VIR_DOMAIN_START_PAUSED = 1 << 0, /* Launch guest in paused state */
VIR_DOMAIN_START_AUTODESTROY = 1 << 1, /* Automatically kill guest when
virConnectPtr is closed */
+ VIR_DOMAIN_START_DIRECT = 1 << 2, /* Use O_DIRECT while restoring */
} virDomainCreateFlags;
Same note about flag naming as first patch
@@ -945,7 +946,8 @@ int virDomainResume (virDomainPtr
domain);
/**
* virDomainSaveFlagValues:
- * Flags for use in virDomainSaveFlags and virDomainManagedSave.
+ * Flags for use in virDomainSaveFlags(), virDomainManagedSave(), and
+ * virDomainRestoreFlags().
*/
typedef enum {
VIR_DOMAIN_SAVE_DIRECT = 1 << 0, /* Use O_DIRECT while saving */
@@ -959,6 +961,10 @@ int virDomainSaveFlags (virDomainPtr
domain,
unsigned int flags);
int virDomainRestore (virConnectPtr conn,
const char *from);
+int virDomainRestoreFlags (virConnectPtr conn,
+ const char *from,
+ const char *dxml,
+ unsigned int flags);
ACK to new API
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|:
http://entangle-photo.org -o-
http://live.gnome.org/gtk-vnc :|