[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v1 08/12] libxl: add disk specific remove functions



Roger Pau Monne writes ("[Xen-devel] [PATCH v1 08/12] libxl: add disk specific 
remove functions"):
> Add a specific macro to generate libxl_device_disk_{remove/destroy}
> functions that passes the hotplug_version field down to the aodev
> struct.

> +/* Specific for disk devices, that have to set aodev->hotplug_version */
> +#define DEFINE_DISK_REMOVE(type, removedestroy, f)                      \
> +    int libxl_device_##type##_##removedestroy(libxl_ctx *ctx,           \

This macro is very similar to DEFINE_DEVICE_REMOVE.  The only
difference seems to be these extra lines:

> +        aodev->hotplug.version = type->hotplug_version;                 \
> +        LOG(DEBUG, "hotplug version: %d", aodev->hotplug.version);      \
> +        libxl__initiate_device_remove(egc, aodev);                      \

Perhaps the right answer would be to add a new formal parameter to
DEFINE_DEVICE_REMOVE which allows DEFINE_DEVICE_REMOVE's user to
specify some extra code here ?

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.