aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxl/libxl_utils.c
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/libxl/libxl_utils.c
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/libxl/libxl_utils.c')
-rw-r--r--tools/libxl/libxl_utils.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/tools/libxl/libxl_utils.c b/tools/libxl/libxl_utils.c
index 678c9eebd2..4e59fe6365 100644
--- a/tools/libxl/libxl_utils.c
+++ b/tools/libxl/libxl_utils.c
@@ -476,7 +476,6 @@ int libxl_mac_to_device_nic(libxl_ctx *ctx, uint32_t domid,
;
if ((b >= mac_n + 6) && (*a == *b)) {
nic->backend_domid = nics[i].backend_id;
- nic->domid = nics[i].frontend_id;
nic->devid = nics[i].devid;
memcpy(nic->mac, nics[i].mac, sizeof (nic->mac));
nic->script = strdup(nics[i].script);
@@ -551,7 +550,6 @@ int libxl_devid_to_device_disk(libxl_ctx *ctx, uint32_t domid,
if (!val)
goto out;
disk->backend_domid = strtoul(val, NULL, 10);
- disk->domid = domid;
be_path = libxl__xs_read(&gc, XBT_NULL, libxl__sprintf(&gc, "%s/backend", diskpath));
disk->pdev_path = libxl__xs_read(&gc, XBT_NULL, libxl__sprintf(&gc, "%s/params", be_path));
val = libxl__xs_read(&gc, XBT_NULL, libxl__sprintf(&gc, "%s/type", be_path));