aboutsummaryrefslogtreecommitdiffstats
path: root/tools/ocaml
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2011-04-08 16:36:20 +0100
committerIan Campbell <ian.campbell@citrix.com>2011-04-08 16:36:20 +0100
commitd658d039cd1c92d2d87fe137919197fd1a8f6a23 (patch)
tree1e0a5a2640e832ae64aa60e39428216ec2362d4b /tools/ocaml
parent138c8514f9e0a8bb2fe8436c3ba68943658756dc (diff)
downloadxen-d658d039cd1c92d2d87fe137919197fd1a8f6a23.tar.gz
xen-d658d039cd1c92d2d87fe137919197fd1a8f6a23.tar.bz2
xen-d658d039cd1c92d2d87fe137919197fd1a8f6a23.zip
libxl: drop domid field from libxl_device_*
All functions which add a device to a domain already take a domid argument and the callers typically write the same value to the structure right before making the call. Functions which delete a device typically do not but adding this field makes the interface more consistent anyway and all callers have the domid to hand. All functions which return a libxl device structure are given a domid as a paramter and the caller therefore already knows which domain it is dealing with. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/ocaml')
-rw-r--r--tools/ocaml/libs/xl/xl_stubs.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/tools/ocaml/libs/xl/xl_stubs.c b/tools/ocaml/libs/xl/xl_stubs.c
index 81c8ea2afd..b135e98ae7 100644
--- a/tools/ocaml/libs/xl/xl_stubs.c
+++ b/tools/ocaml/libs/xl/xl_stubs.c
@@ -376,7 +376,6 @@ value stub_xl_disk_add(value info, value domid)
INIT_STRUCT();
device_disk_val(&gc, &c_info, info);
- c_info.domid = Int_val(domid);
INIT_CTX();
ret = libxl_device_disk_add(ctx, Int_val(domid), &c_info);
@@ -394,10 +393,9 @@ value stub_xl_disk_remove(value info, value domid)
INIT_STRUCT();
device_disk_val(&gc, &c_info, info);
- c_info.domid = Int_val(domid);
INIT_CTX();
- ret = libxl_device_disk_del(ctx, &c_info, 0);
+ ret = libxl_device_disk_del(ctx, Int_val(domid), &c_info, 0);
if (ret != 0)
failwith_xl("disk_remove", &lg);
FREE_CTX();
@@ -412,7 +410,6 @@ value stub_xl_nic_add(value info, value domid)
INIT_STRUCT();
device_nic_val(&gc, &c_info, info);
- c_info.domid = Int_val(domid);
INIT_CTX();
ret = libxl_device_nic_add(ctx, Int_val(domid), &c_info);
@@ -430,10 +427,9 @@ value stub_xl_nic_remove(value info, value domid)
INIT_STRUCT();
device_nic_val(&gc, &c_info, info);
- c_info.domid = Int_val(domid);
INIT_CTX();
- ret = libxl_device_nic_del(ctx, &c_info, 0);
+ ret = libxl_device_nic_del(ctx, Int_val(domid), &c_info, 0);
if (ret != 0)
failwith_xl("nic_remove", &lg);
FREE_CTX();
@@ -450,7 +446,6 @@ value stub_xl_console_add(value info, value state, value domid)
device_console_val(&gc, &c_info, info);
domain_build_state_val(&gc, &c_state, state);
- c_info.domid = Int_val(domid);
c_info.build_state = &c_state;
INIT_CTX();
@@ -469,7 +464,6 @@ value stub_xl_vkb_add(value info, value domid)
INIT_STRUCT();
device_vkb_val(&gc, &c_info, info);
- c_info.domid = Int_val(domid);
INIT_CTX();
ret = libxl_device_vkb_add(ctx, Int_val(domid), &c_info);
@@ -518,7 +512,6 @@ value stub_xl_vfb_add(value info, value domid)
INIT_STRUCT();
device_vfb_val(&gc, &c_info, info);
- c_info.domid = Int_val(domid);
INIT_CTX();
ret = libxl_device_vfb_add(ctx, Int_val(domid), &c_info);