aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Jackson <ian.jackson@eu.citrix.com>2012-08-03 09:54:11 +0100
committerIan Jackson <ian.jackson@eu.citrix.com>2012-08-03 09:54:11 +0100
commit2928d7465ac7e5d0ee4255f32f0ccd7cf4afd327 (patch)
treef8acc36e5621c31f91e34aa3495f75175f94e046
parentc32293d1dd3a4e7e9da4b09f460587532e7b5607 (diff)
downloadxen-2928d7465ac7e5d0ee4255f32f0ccd7cf4afd327.tar.gz
xen-2928d7465ac7e5d0ee4255f32f0ccd7cf4afd327.tar.bz2
xen-2928d7465ac7e5d0ee4255f32f0ccd7cf4afd327.zip
libxl: abolish useless `start' parameter to libxl__add_*
0 is always passed for this parameter and the code doesn't, actually, use it, now. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
-rw-r--r--tools/libxl/libxl_create.c4
-rw-r--r--tools/libxl/libxl_device.c7
-rw-r--r--tools/libxl/libxl_dm.c4
-rw-r--r--tools/libxl/libxl_internal.h8
4 files changed, 10 insertions, 13 deletions
diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
index 3265d69132..52753738f1 100644
--- a/tools/libxl/libxl_create.c
+++ b/tools/libxl/libxl_create.c
@@ -911,7 +911,7 @@ static void domcreate_rebuild_done(libxl__egc *egc,
libxl__multidev_begin(ao, &dcs->aodevs);
dcs->aodevs.callback = domcreate_launch_dm;
- libxl__add_disks(egc, ao, domid, 0, d_config, &dcs->aodevs);
+ libxl__add_disks(egc, ao, domid, d_config, &dcs->aodevs);
libxl__multidev_prepared(egc, &dcs->aodevs, 0);
return;
@@ -1041,7 +1041,7 @@ static void domcreate_devmodel_started(libxl__egc *egc,
/* Attach nics */
libxl__multidev_begin(ao, &dcs->aodevs);
dcs->aodevs.callback = domcreate_attach_pci;
- libxl__add_nics(egc, ao, domid, 0, d_config, &dcs->aodevs);
+ libxl__add_nics(egc, ao, domid, d_config, &dcs->aodevs);
libxl__multidev_prepared(egc, &dcs->aodevs, 0);
return;
}
diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c
index 4a531811d7..27fbd21ce5 100644
--- a/tools/libxl/libxl_device.c
+++ b/tools/libxl/libxl_device.c
@@ -485,15 +485,14 @@ void libxl__multidev_prepared(libxl__egc *egc, libxl__ao_devices *aodevs,
#define DEFINE_DEVICES_ADD(type) \
void libxl__add_##type##s(libxl__egc *egc, libxl__ao *ao, uint32_t domid, \
- int start, libxl_domain_config *d_config, \
+ libxl_domain_config *d_config, \
libxl__ao_devices *aodevs) \
{ \
AO_GC; \
int i; \
- int end = start + d_config->num_##type##s; \
- for (i = start; i < end; i++) { \
+ for (i = 0; i < d_config->num_##type##s; i++) { \
libxl__ao_device *aodev = libxl__multidev_prepare(aodevs); \
- libxl__device_##type##_add(egc, domid, &d_config->type##s[i-start], \
+ libxl__device_##type##_add(egc, domid, &d_config->type##s[i], \
aodev); \
} \
}
diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index 177642b497..66aa45ed63 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -858,7 +858,7 @@ retry_transaction:
libxl__multidev_begin(ao, &sdss->aodevs);
sdss->aodevs.callback = spawn_stub_launch_dm;
- libxl__add_disks(egc, ao, dm_domid, 0, dm_config, &sdss->aodevs);
+ libxl__add_disks(egc, ao, dm_domid, dm_config, &sdss->aodevs);
libxl__multidev_prepared(egc, &sdss->aodevs, 0);
free(args);
@@ -984,7 +984,7 @@ static void spawn_stubdom_pvqemu_cb(libxl__egc *egc,
if (d_config->num_nics > 0) {
libxl__multidev_begin(ao, &sdss->aodevs);
sdss->aodevs.callback = stubdom_pvqemu_cb;
- libxl__add_nics(egc, ao, dm_domid, 0, d_config, &sdss->aodevs);
+ libxl__add_nics(egc, ao, dm_domid, d_config, &sdss->aodevs);
libxl__multidev_prepared(egc, &sdss->aodevs, 0);
return;
}
diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
index 07e92fbc35..bb3eb5f1c5 100644
--- a/tools/libxl/libxl_internal.h
+++ b/tools/libxl/libxl_internal.h
@@ -2388,19 +2388,17 @@ _hidden void libxl__devices_destroy(libxl__egc *egc,
/* Helper function to add a bunch of disks. This should be used when
* the caller is inside an async op. "devices" will NOT be prepared by
* this function, so the caller must make sure to call
- * libxl__multidev_begin before calling this function. The start
- * parameter contains the position inside the aodevs array that should
- * be used to store the state of this devices.
+ * libxl__multidev_begin before calling this function.
*
* The "callback" will be called for each device, and the user is responsible
* for calling libxl__ao_device_check_last on the callback.
*/
_hidden void libxl__add_disks(libxl__egc *egc, libxl__ao *ao, uint32_t domid,
- int start, libxl_domain_config *d_config,
+ libxl_domain_config *d_config,
libxl__ao_devices *aodevs);
_hidden void libxl__add_nics(libxl__egc *egc, libxl__ao *ao, uint32_t domid,
- int start, libxl_domain_config *d_config,
+ libxl_domain_config *d_config,
libxl__ao_devices *aodevs);
/*----- device model creation -----*/