[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 09/13] libxl: change disk to use generic getting list functions
On Tue, Jul 18, 2017 at 05:25:26PM +0300, Oleksandr Grytsov wrote: > From: Oleksandr Grytsov <oleksandr_grytsov@xxxxxxxx> > [...] > /* > * Insert a CD-ROM device. A device corresponding to disk must already > diff --git a/tools/libxl/libxl_checkpoint_device.c > b/tools/libxl/libxl_checkpoint_device.c > index 01e74b5..7bd832b 100644 > --- a/tools/libxl/libxl_checkpoint_device.c > +++ b/tools/libxl/libxl_checkpoint_device.c > @@ -66,7 +66,8 @@ void libxl__checkpoint_devices_setup(libxl__egc *egc, > cds->nics = libxl_device_nic_list(CTX, cds->domid, &cds->num_nics); > > if (cds->device_kind_flags & (1 << LIBXL__DEVICE_KIND_VBD)) > - cds->disks = libxl_device_disk_list(CTX, cds->domid, > &cds->num_disks); > + cds->disks = libxl__device_list(gc, &libxl__disk_devtype, cds->domid, > + "disk", &cds->num_disks); > > if (cds->num_nics == 0 && cds->num_disks == 0) > goto out; > @@ -221,9 +222,7 @@ static void devices_teardown_cb(libxl__egc *egc, > cds->num_nics = 0; > > /* clean disk */ > - for (i = 0; i < cds->num_disks; i++) > - libxl_device_disk_dispose(&cds->disks[i]); > - free(cds->disks); > + libxl__device_list_free(&libxl__vdispl_devtype, cds->disks, > cds->num_disks); Wrong type. > cds->disks = NULL; > cds->num_disks = 0; > [...] > @@ -1249,7 +1205,9 @@ static int libxl_device_disk_dm_needed(void *e, > unsigned domid) > DEFINE_DEVICE_TYPE_STRUCT(disk, > .merge = libxl_device_disk_merge, > .dm_needed = libxl_device_disk_dm_needed, > - .skip_attach = 1 > + .from_xenstore = (int (*)(libxl__gc *, const char *, libxl_devid, void > *)) > + libxl__disk_from_xenstore, > + .skip_attach = 1 Unrelated change. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |