ia64/xen-unstable

changeset 12166:de31d79add5e

Implement VDI.resize message.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author Ewan Mellor <ewan@xensource.com>
date Thu Oct 26 15:57:29 2006 +0100 (2006-10-26)
parents 4b0326c75c5b
children 8f090c551b09
files tools/libxen/include/xen_vdi.h tools/libxen/src/xen_vdi.c
line diff
     1.1 --- a/tools/libxen/include/xen_vdi.h	Thu Oct 26 15:56:44 2006 +0100
     1.2 +++ b/tools/libxen/include/xen_vdi.h	Thu Oct 26 15:57:29 2006 +0100
     1.3 @@ -327,4 +327,11 @@ extern bool
     1.4  xen_vdi_snapshot(xen_session *session, xen_vdi *result, xen_vdi vdi);
     1.5  
     1.6  
     1.7 +/**
     1.8 + * Resize the vdi to the size.
     1.9 + */
    1.10 +extern bool
    1.11 +xen_vdi_resize(xen_session *session, xen_vdi vdi, uint64_t size);
    1.12 +
    1.13 +
    1.14  #endif
     2.1 --- a/tools/libxen/src/xen_vdi.c	Thu Oct 26 15:56:44 2006 +0100
     2.2 +++ b/tools/libxen/src/xen_vdi.c	Thu Oct 26 15:57:29 2006 +0100
     2.3 @@ -492,6 +492,22 @@ xen_vdi_snapshot(xen_session *session, x
     2.4  
     2.5  
     2.6  bool
     2.7 +xen_vdi_resize(xen_session *session, xen_vdi vdi, uint64_t size)
     2.8 +{
     2.9 +    abstract_value param_values[] =
    2.10 +        {
    2.11 +            { .type = &abstract_type_string,
    2.12 +              .u.string_val = vdi },
    2.13 +            { .type = &abstract_type_int,
    2.14 +              .u.int_val = size }
    2.15 +        };
    2.16 +
    2.17 +    xen_call_(session, "VDI.resize", param_values, 2, NULL, NULL);
    2.18 +    return session->ok;
    2.19 +}
    2.20 +
    2.21 +
    2.22 +bool
    2.23  xen_vdi_get_uuid(xen_session *session, char **result, xen_vdi vdi)
    2.24  {
    2.25      *result = session->ok ? xen_strdup_((char *)vdi) : NULL;