 
	
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 07/13] libxl: convert libxl_domain_destroy to an AO op
 Roger Pau Monne writes ("[PATCH 07/13] libxl: convert libxl_domain_destroy to 
an AO op"):
> +struct libxl__ao_device {
> +    libxl__ao *ao;
> +    /* State in which the device is */
> +    libxl__device_state state;
> +    /* action being performed */
> +    libxl__device_action action;
> +    libxl__device *dev;
> +    int force;
> +    libxl__device_callback *callback;
> +    /* private for implementation */
> +    int rc;
> +    libxl__ev_devstate ds;
> +    void *base;
> +};
Perhaps this new functionality could be in a separate patch too ?  I
guess it won't share a great deal of code with the existing machinery.
> +/*----- device addition/removal -----*/
> +
> +/* During the init/destruction process, the device can be in several states:
> + *
> + * DEVICE_UNKNOWN: device in unknown state (default value when struct is
> + * initialized).
> + *
> + * DEVICE_WAIT_BACKEND: waiting for the backend to switch to XenbusStateInit 
> or
> + * XenbusStateClosed.
> + *
> + * DEVICE_WAIT_HOTPLUG: waiting for hotplug script to finish execution.
> + *
> + * DEVICE_FINISHED: device is connected/disconnected.
> + */
> +typedef enum {
> +    DEVICE_ACTIVE,
> +    DEVICE_FINISHED
> +} libxl__device_state;
This enum doesn't seem to correspond to the comment.  Also if it
really is a two-state enum why not just have a boolean called
"finished" ?
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
 
 | 
|  | Lists.xenproject.org is hosted with RackSpace, monitoring our |