diff options
author | Kamala Narasimhan <kamala.narasimhan@citrix.com> | 2011-02-15 19:59:37 +0000 |
---|---|---|
committer | Kamala Narasimhan <kamala.narasimhan@citrix.com> | 2011-02-15 19:59:37 +0000 |
commit | 546a7640451fc359212ba23bc2d6a9497e1ed6d9 (patch) | |
tree | 74ca2514207c377da35f3068557784f4b99526c1 /tools/python | |
parent | a7fd96dfbd3cfe5509420c28ec47e8229a773b76 (diff) | |
download | xen-546a7640451fc359212ba23bc2d6a9497e1ed6d9.tar.gz xen-546a7640451fc359212ba23bc2d6a9497e1ed6d9.tar.bz2 xen-546a7640451fc359212ba23bc2d6a9497e1ed6d9.zip |
libxl: disk specification interface change
Currently we pile all the backend and format information pertaining to
disk option in a single enum. This check-in separates the two and
uses two enums, one for disk format and another for disk backend.
This helps clearly differentiate between disk format and backend
within the implementation and also helps cleanup the code in this area
in preparation for the impending parser revamping to be done post 4.1.
Along with separating format and backend, this check-in also removes
unwanted types and renames variables in the disk interface and fixes
the code affected by the interface changes.
In specific, here are the disk interface changes made - In
libxl_device_disk structure physpath was renamed to pdev_path,
virtpath was renamed to vdev, phystype was removed and replaced with
backend and format enums. Also previously a single enum
libxl_disk_phystype held the values for qcow, qcow2, vhd, aio, file,
phy, empty and that got refactored into two enums, libxl_disk_format
to hold unknown, qcow, qcow2, vhd, raw, empty and libxl_disk_backend
to hold unknown, phy, tap and qdisk.
Signed-off-by: Kamala Narasimhan <kamala.narasimhan@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/python')
-rw-r--r-- | tools/python/xen/lowlevel/xl/xl.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/tools/python/xen/lowlevel/xl/xl.c b/tools/python/xen/lowlevel/xl/xl.c index 7bdc8c0927..14ad809f0f 100644 --- a/tools/python/xen/lowlevel/xl/xl.c +++ b/tools/python/xen/lowlevel/xl/xl.c @@ -779,12 +779,17 @@ PyMODINIT_FUNC initxl(void) _INT_CONST_LIBXL(m, CONSBACK_XENCONSOLED); _INT_CONST_LIBXL(m, CONSBACK_IOEMU); - _INT_CONST(m, PHYSTYPE_QCOW); - _INT_CONST(m, PHYSTYPE_QCOW2); - _INT_CONST(m, PHYSTYPE_VHD); - _INT_CONST(m, PHYSTYPE_AIO); - _INT_CONST(m, PHYSTYPE_FILE); - _INT_CONST(m, PHYSTYPE_PHY); + _INT_CONST(m, DISK_FORMAT_UNKNOWN); + _INT_CONST(m, DISK_FORMAT_QCOW); + _INT_CONST(m, DISK_FORMAT_QCOW2); + _INT_CONST(m, DISK_FORMAT_VHD); + _INT_CONST(m, DISK_FORMAT_RAW); + _INT_CONST(m, DISK_FORMAT_EMPTY); + + _INT_CONST(m, DISK_BACKEND_UNKNOWN); + _INT_CONST(m, DISK_BACKEND_PHY); + _INT_CONST(m, DISK_BACKEND_TAP); + _INT_CONST(m, DISK_BACKEND_QDISK); _INT_CONST(m, NICTYPE_IOEMU); _INT_CONST(m, NICTYPE_VIF); |