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

[Xen-changelog] [xen-unstable] Implement VDI.resize message.



# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Node ID de31d79add5e591bca6c37d122d4ab060eea53bc
# Parent  4b0326c75c5b00ba782dade920a46f68f09dba30
Implement VDI.resize message.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
 tools/libxen/include/xen_vdi.h |    7 +++++++
 tools/libxen/src/xen_vdi.c     |   16 ++++++++++++++++
 2 files changed, 23 insertions(+)

diff -r 4b0326c75c5b -r de31d79add5e tools/libxen/include/xen_vdi.h
--- a/tools/libxen/include/xen_vdi.h    Thu Oct 26 15:56:44 2006 +0100
+++ b/tools/libxen/include/xen_vdi.h    Thu Oct 26 15:57:29 2006 +0100
@@ -327,4 +327,11 @@ xen_vdi_snapshot(xen_session *session, x
 xen_vdi_snapshot(xen_session *session, xen_vdi *result, xen_vdi vdi);
 
 
+/**
+ * Resize the vdi to the size.
+ */
+extern bool
+xen_vdi_resize(xen_session *session, xen_vdi vdi, uint64_t size);
+
+
 #endif
diff -r 4b0326c75c5b -r de31d79add5e tools/libxen/src/xen_vdi.c
--- a/tools/libxen/src/xen_vdi.c        Thu Oct 26 15:56:44 2006 +0100
+++ b/tools/libxen/src/xen_vdi.c        Thu Oct 26 15:57:29 2006 +0100
@@ -492,6 +492,22 @@ xen_vdi_snapshot(xen_session *session, x
 
 
 bool
+xen_vdi_resize(xen_session *session, xen_vdi vdi, uint64_t size)
+{
+    abstract_value param_values[] =
+        {
+            { .type = &abstract_type_string,
+              .u.string_val = vdi },
+            { .type = &abstract_type_int,
+              .u.int_val = size }
+        };
+
+    xen_call_(session, "VDI.resize", param_values, 2, NULL, NULL);
+    return session->ok;
+}
+
+
+bool
 xen_vdi_get_uuid(xen_session *session, char **result, xen_vdi vdi)
 {
     *result = session->ok ? xen_strdup_((char *)vdi) : NULL;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.