aboutsummaryrefslogtreecommitdiffstats
path: root/tools/ocaml
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2011-10-18 13:36:43 +0100
committerIan Campbell <ian.campbell@citrix.com>2011-10-18 13:36:43 +0100
commit6417c4560a1226aa926156150d3bc324a10ede41 (patch)
tree7c83488e2d0515539e802bcfc6cfa74f131ed603 /tools/ocaml
parent00580c3a1aa502133cc72d830bdfdaf89ae22eb0 (diff)
downloadxen-6417c4560a1226aa926156150d3bc324a10ede41.tar.gz
xen-6417c4560a1226aa926156150d3bc324a10ede41.tar.bz2
xen-6417c4560a1226aa926156150d3bc324a10ede41.zip
libxl: convert VFB 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.py5
-rw-r--r--tools/ocaml/libs/xl/xenlight_stubs.c14
2 files changed, 11 insertions, 8 deletions
diff --git a/tools/ocaml/libs/xl/genwrap.py b/tools/ocaml/libs/xl/genwrap.py
index c73d40fb63..f9e2e81e95 100644
--- a/tools/ocaml/libs/xl/genwrap.py
+++ b/tools/ocaml/libs/xl/genwrap.py
@@ -22,10 +22,7 @@ DEVICE_FUNCTIONS = [ ("add", ["t", "domid", "unit"]),
]
functions = { # ( name , [type1,type2,....] )
- "device_vfb": [ ("add", ["t", "domid", "unit"]),
- ("clean_shutdown", ["domid", "unit"]),
- ("hard_shutdown", ["domid", "unit"]),
- ],
+ "device_vfb": DEVICE_FUNCTIONS,
"device_vkb": DEVICE_FUNCTIONS,
"device_disk": DEVICE_FUNCTIONS,
"device_nic": DEVICE_FUNCTIONS,
diff --git a/tools/ocaml/libs/xl/xenlight_stubs.c b/tools/ocaml/libs/xl/xenlight_stubs.c
index eea91345d4..f7790b7dd0 100644
--- a/tools/ocaml/libs/xl/xenlight_stubs.c
+++ b/tools/ocaml/libs/xl/xenlight_stubs.c
@@ -360,14 +360,17 @@ value stub_xl_device_vfb_add(value info, value domid)
CAMLreturn(Val_unit);
}
-value stub_xl_device_vfb_clean_shutdown(value domid)
+value stub_xl_device_vfb_remove(value info, value domid)
{
CAMLparam1(domid);
+ libxl_device_vfb c_info;
int ret;
INIT_STRUCT();
+ device_vfb_val(&gc, &lg, &c_info, info);
+
INIT_CTX();
- ret = libxl_device_vfb_clean_shutdown(ctx, Int_val(domid));
+ ret = libxl_device_vfb_remove(ctx, Int_val(domid), &c_info);
if (ret != 0)
failwith_xl("vfb_clean_shutdown", &lg);
FREE_CTX();
@@ -375,14 +378,17 @@ value stub_xl_device_vfb_clean_shutdown(value domid)
CAMLreturn(Val_unit);
}
-value stub_xl_device_vfb_hard_shutdown(value domid)
+value stub_xl_device_vfb_destroy(value info, value domid)
{
CAMLparam1(domid);
+ libxl_device_vfb c_info;
int ret;
INIT_STRUCT();
+ device_vfb_val(&gc, &lg, &c_info, info);
+
INIT_CTX();
- ret = libxl_device_vfb_hard_shutdown(ctx, Int_val(domid));
+ ret = libxl_device_vfb_destroy(ctx, Int_val(domid), &c_info);
if (ret != 0)
failwith_xl("vfb_hard_shutdown", &lg);
FREE_CTX();