diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2011-10-18 13:36:42 +0100 |
---|---|---|
committer | Ian Campbell <ian.campbell@citrix.com> | 2011-10-18 13:36:42 +0100 |
commit | d2bb9b7789a45c6d6d6ffb1fb3e0bc9657998e63 (patch) | |
tree | 3ca6247dbedd51a072d092ede5abe7dbeb2f2d3f /tools/ocaml | |
parent | e7466c721352eaa11d5abcc60a1d8e084b215429 (diff) | |
download | xen-d2bb9b7789a45c6d6d6ffb1fb3e0bc9657998e63.tar.gz xen-d2bb9b7789a45c6d6d6ffb1fb3e0bc9657998e63.tar.bz2 xen-d2bb9b7789a45c6d6d6ffb1fb3e0bc9657998e63.zip |
libxl: convert disk handling to device API
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson.citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Diffstat (limited to 'tools/ocaml')
-rw-r--r-- | tools/ocaml/libs/xl/genwrap.py | 9 | ||||
-rw-r--r-- | tools/ocaml/libs/xl/xenlight_stubs.c | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/tools/ocaml/libs/xl/genwrap.py b/tools/ocaml/libs/xl/genwrap.py index 30af16f988..f3e62c498f 100644 --- a/tools/ocaml/libs/xl/genwrap.py +++ b/tools/ocaml/libs/xl/genwrap.py @@ -16,6 +16,11 @@ builtins = { "libxl_hwcap": ("int32 array", None, "Val_hwcap(&%(c)s)"), } +DEVICE_FUNCTIONS = [ ("add", ["t", "domid", "unit"]), + ("remove", ["t", "domid", "unit"]), + ("destroy", ["t", "domid", "unit"]), + ] + functions = { # ( name , [type1,type2,....] ) "device_vfb": [ ("add", ["t", "domid", "unit"]), ("clean_shutdown", ["domid", "unit"]), @@ -27,9 +32,7 @@ functions = { # ( name , [type1,type2,....] ) ], "device_console": [ ("add", ["t", "domid", "unit"]), ], - "device_disk": [ ("add", ["t", "domid", "unit"]), - ("del", ["t", "domid", "unit"]), - ], + "device_disk": DEVICE_FUNCTIONS, "device_nic": [ ("add", ["t", "domid", "unit"]), ("del", ["t", "domid", "unit"]), ], diff --git a/tools/ocaml/libs/xl/xenlight_stubs.c b/tools/ocaml/libs/xl/xenlight_stubs.c index 3751fdc612..ed5b0388ae 100644 --- a/tools/ocaml/libs/xl/xenlight_stubs.c +++ b/tools/ocaml/libs/xl/xenlight_stubs.c @@ -247,7 +247,7 @@ value stub_xl_device_disk_del(value info, value domid) device_disk_val(&gc, &lg, &c_info, info); INIT_CTX(); - ret = libxl_device_disk_del(ctx, Int_val(domid), &c_info, 0); + ret = libxl_device_disk_remove(ctx, Int_val(domid), &c_info); if (ret != 0) failwith_xl("disk_del", &lg); FREE_CTX(); |