From b4cf0e8535981583199b838f7d7ca6becb3d668f Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Sat, 2 Jun 2012 08:39:45 +0100 Subject: ocaml: fix build after 25446:648508ee27a2, 25449:68d46c5ea0a3 et al. These renamed a type and the associated functions and the ocaml bindings were not updated to suit. This also highlighted that libxl_domain_sched_params should not be DIR_IN since it is also use as an output struct. Signed-off-by: Ian Campbell Committed-by: Ian Campbell --- tools/ocaml/libs/xl/genwrap.py | 5 +++-- tools/ocaml/libs/xl/xenlight_stubs.c | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 12 deletions(-) (limited to 'tools/ocaml') diff --git a/tools/ocaml/libs/xl/genwrap.py b/tools/ocaml/libs/xl/genwrap.py index 384ec5b4ea..b379b57108 100644 --- a/tools/ocaml/libs/xl/genwrap.py +++ b/tools/ocaml/libs/xl/genwrap.py @@ -32,8 +32,9 @@ functions = { # ( name , [type1,type2,....] ) ], "cputopology": [ ("get", ["unit", "t array"]), ], - "sched_credit": [ ("domain_get", ["domid", "t"]), - ("domain_set", ["domid", "t", "unit"]), + "domain_sched_params": + [ ("get", ["domid", "t"]), + ("set", ["domid", "t", "unit"]), ], } def stub_fn_name(ty, name): diff --git a/tools/ocaml/libs/xl/xenlight_stubs.c b/tools/ocaml/libs/xl/xenlight_stubs.c index 2ba07fc579..c712b2bd01 100644 --- a/tools/ocaml/libs/xl/xenlight_stubs.c +++ b/tools/ocaml/libs/xl/xenlight_stubs.c @@ -496,37 +496,37 @@ value stub_xl_cputopology_get(value unit) CAMLreturn(topology); } -value stub_xl_sched_credit_domain_get(value domid) +value stub_xl_domain_sched_params_get(value domid) { CAMLparam1(domid); CAMLlocal1(scinfo); - libxl_sched_credit_domain c_scinfo; + libxl_domain_sched_params c_scinfo; int ret; INIT_STRUCT(); INIT_CTX(); - ret = libxl_sched_credit_domain_get(ctx, Int_val(domid), &c_scinfo); + ret = libxl_domain_sched_params_get(ctx, Int_val(domid), &c_scinfo); if (ret != 0) - failwith_xl("sched_credit_domain_get", &lg); + failwith_xl("domain_sched_params_get", &lg); FREE_CTX(); - scinfo = Val_sched_credit_domain(&gc, &lg, &c_scinfo); + scinfo = Val_domain_sched_params(&gc, &lg, &c_scinfo); CAMLreturn(scinfo); } -value stub_xl_sched_credit_domain_set(value domid, value scinfo) +value stub_xl_domain_sched_params_set(value domid, value scinfo) { CAMLparam2(domid, scinfo); - libxl_sched_credit_domain c_scinfo; + libxl_domain_sched_params c_scinfo; int ret; INIT_STRUCT(); - sched_credit_domain_val(&gc, &lg, &c_scinfo, scinfo); + domain_sched_params_val(&gc, &lg, &c_scinfo, scinfo); INIT_CTX(); - ret = libxl_sched_credit_domain_set(ctx, Int_val(domid), &c_scinfo); + ret = libxl_domain_sched_params_set(ctx, Int_val(domid), &c_scinfo); if (ret != 0) - failwith_xl("sched_credit_domain_set", &lg); + failwith_xl("domain_sched_params_set", &lg); FREE_CTX(); CAMLreturn(Val_unit); -- cgit v1.2.3