aboutsummaryrefslogtreecommitdiffstats
path: root/tools/ocaml/libs
diff options
context:
space:
mode:
Diffstat (limited to 'tools/ocaml/libs')
-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 f7edad0930..c73d40fb63 100644
--- a/tools/ocaml/libs/xl/genwrap.py
+++ b/tools/ocaml/libs/xl/genwrap.py
@@ -26,10 +26,7 @@ functions = { # ( name , [type1,type2,....] )
("clean_shutdown", ["domid", "unit"]),
("hard_shutdown", ["domid", "unit"]),
],
- "device_vkb": [ ("add", ["t", "domid", "unit"]),
- ("clean_shutdown", ["domid", "unit"]),
- ("hard_shutdown", ["domid", "unit"]),
- ],
+ "device_vkb": DEVICE_FUNCTIONS,
"device_disk": DEVICE_FUNCTIONS,
"device_nic": DEVICE_FUNCTIONS,
"device_pci": [ ("add", ["t", "domid", "unit"]),
diff --git a/tools/ocaml/libs/xl/xenlight_stubs.c b/tools/ocaml/libs/xl/xenlight_stubs.c
index 3cf889b661..eea91345d4 100644
--- a/tools/ocaml/libs/xl/xenlight_stubs.c
+++ b/tools/ocaml/libs/xl/xenlight_stubs.c
@@ -306,14 +306,17 @@ value stub_xl_device_vkb_add(value info, value domid)
CAMLreturn(Val_unit);
}
-value stub_xl_device_vkb_clean_shutdown(value domid)
+value stub_xl_device_vkb_remove(value info, value domid)
{
CAMLparam1(domid);
+ libxl_device_vkb c_info;
int ret;
INIT_STRUCT();
+ device_vkb_val(&gc, &lg, &c_info, info);
+
INIT_CTX();
- ret = libxl_device_vkb_clean_shutdown(ctx, Int_val(domid));
+ ret = libxl_device_vkb_remove(ctx, Int_val(domid), &c_info);
if (ret != 0)
failwith_xl("vkb_clean_shutdown", &lg);
FREE_CTX();
@@ -321,14 +324,17 @@ value stub_xl_device_vkb_clean_shutdown(value domid)
CAMLreturn(Val_unit);
}
-value stub_xl_device_vkb_hard_shutdown(value domid)
+value stub_xl_device_vkb_destroy(value info, value domid)
{
CAMLparam1(domid);
+ libxl_device_vkb c_info;
int ret;
INIT_STRUCT();
+ device_vkb_val(&gc, &lg, &c_info, info);
+
INIT_CTX();
- ret = libxl_device_vkb_hard_shutdown(ctx, Int_val(domid));
+ ret = libxl_device_vkb_destroy(ctx, Int_val(domid), &c_info);
if (ret != 0)
failwith_xl("vkb_hard_shutdown", &lg);
FREE_CTX();