 
	
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v6 05/13] libxl: convert libxl__device_disk_local_attach to an async op
 Ian Jackson wrote: 
 Thanks for the review! diff --git a/tools/libxl/libxl_bootloader.c b/tools/libxl/libxl_bootloader.c index 7ebc0df..182a975 100644 --- a/tools/libxl/libxl_bootloader.c +++ b/tools/libxl/libxl_bootloader.c...+static void bootloader_fisnihed_cb(libxl__egc *egc, Probably copy-pasted it wrong everywhere, fixed. 
 I'm not sure the "attached" in the name is correct, because the device might have failed to attach, and still we are going to call this function. How about "libxl__device_disk_local_initiate_detach"? (still quite long). Then the attach function should be renamed to libxl__device_disk_local_initiate_attach. If so then this would be simpler and wouldn't need to test bl->diskpath. Ok, I've moved the test for bl->dls.diskpath to libxl__device_disk_local_detach, so we have a more linear flow of callbacks. +static void bootloader_disk_attached_cb(libxl__egc *egc, + libxl__disk_local_state *dls, + int rc)...+ bl->diskpath = bl->dls.diskpath;Now that we have a bl->dls.diskpath, surely we can do away with bl->diskpath ? I'm not a fan of having multiple variables with the same information in them, unless it's essential. It just leads to confusion and error. Done. +/* + * Make a disk available in this (the control) domain. Calls dls->callback + * when finished. + */ +_hidden void libxl__device_disk_local_attach(libxl__egc *egc, + libxl__disk_local_state *dls); +_hidden void libxl__device_disk_local_detach(libxl__egc *egc, + libxl__disk_local_state *dls); Ok, I've added the init function and the description of what this functions do, together with the rename it should be a little bit more clear. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel 
 
 | 
|  | Lists.xenproject.org is hosted with RackSpace, monitoring our |