diff options
author | Ewan Mellor <ewan@xensource.com> | 2007-03-17 23:55:03 +0000 |
---|---|---|
committer | Ewan Mellor <ewan@xensource.com> | 2007-03-17 23:55:03 +0000 |
commit | 98321440ec5681052fc4cadfaed5471b01cfd451 (patch) | |
tree | 2781b355ce6569d1341c74dc33f3650369fd2501 /tools/libxen/include | |
parent | 716d0617c936b721deb6fc2212add0acca58af32 (diff) | |
download | xen-98321440ec5681052fc4cadfaed5471b01cfd451.tar.gz xen-98321440ec5681052fc4cadfaed5471b01cfd451.tar.bz2 xen-98321440ec5681052fc4cadfaed5471b01cfd451.zip |
Replace VDI.location with a more generic VDI.other_config map. Remove
VDI.sector_size.
Xend work by Tom Wilkie <tom.wilkie@gmail.com>.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
Diffstat (limited to 'tools/libxen/include')
-rw-r--r-- | tools/libxen/include/xen_vbd.h | 1 | ||||
-rw-r--r-- | tools/libxen/include/xen_vdi.h | 44 |
2 files changed, 34 insertions, 11 deletions
diff --git a/tools/libxen/include/xen_vbd.h b/tools/libxen/include/xen_vbd.h index 7b36266a04..14a6685a95 100644 --- a/tools/libxen/include/xen_vbd.h +++ b/tools/libxen/include/xen_vbd.h @@ -72,7 +72,6 @@ typedef struct xen_vbd_record struct xen_vm_record_opt *vm; struct xen_vdi_record_opt *vdi; char *device; - char *image; bool bootable; enum xen_vbd_mode mode; enum xen_vbd_type type; diff --git a/tools/libxen/include/xen_vdi.h b/tools/libxen/include/xen_vdi.h index 26e147250e..9ebb8fd9ee 100644 --- a/tools/libxen/include/xen_vdi.h +++ b/tools/libxen/include/xen_vdi.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, XenSource Inc. + * Copyright (c) 2006-2007, XenSource Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -22,6 +22,7 @@ #include "xen_common.h" #include "xen_crashdump_decl.h" #include "xen_sr_decl.h" +#include "xen_string_string_map.h" #include "xen_vbd_decl.h" #include "xen_vdi_decl.h" #include "xen_vdi_type.h" @@ -73,11 +74,10 @@ typedef struct xen_vdi_record struct xen_crashdump_record_opt_set *crash_dumps; int64_t virtual_size; int64_t physical_utilisation; - int64_t sector_size; - char *location; enum xen_vdi_type type; bool sharable; bool read_only; + xen_string_string_map *other_config; } xen_vdi_record; /** @@ -251,13 +251,6 @@ xen_vdi_get_physical_utilisation(xen_session *session, int64_t *result, xen_vdi /** - * Get the sector_size field of the given VDI. - */ -extern bool -xen_vdi_get_sector_size(xen_session *session, int64_t *result, xen_vdi vdi); - - -/** * Get the type field of the given VDI. */ extern bool @@ -279,6 +272,13 @@ xen_vdi_get_read_only(xen_session *session, bool *result, xen_vdi vdi); /** + * Get the other_config field of the given VDI. + */ +extern bool +xen_vdi_get_other_config(xen_session *session, xen_string_string_map **result, xen_vdi vdi); + + +/** * Set the name/label field of the given VDI. */ extern bool @@ -314,6 +314,30 @@ xen_vdi_set_read_only(xen_session *session, xen_vdi vdi, bool read_only); /** + * Set the other_config field of the given VDI. + */ +extern bool +xen_vdi_set_other_config(xen_session *session, xen_vdi vdi, xen_string_string_map *other_config); + + +/** + * Add the given key-value pair to the other_config field of the given + * VDI. + */ +extern bool +xen_vdi_add_to_other_config(xen_session *session, xen_vdi vdi, char *key, char *value); + + +/** + * Remove the given key and its corresponding value from the + * other_config field of the given VDI. If the key is not in that Map, then + * do nothing. + */ +extern bool +xen_vdi_remove_from_other_config(xen_session *session, xen_vdi vdi, char *key); + + +/** * Take an exact copy of the VDI; the snapshot lives in the same * Storage Repository as its parent. */ |