[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH V3] libxl: write IO ABI for disk frontends
On 26/04/13 11:22, Ian Campbell wrote: On Fri, 2013-04-26 at 11:11 +0100, Wei Liu wrote:On Fri, Apr 26, 2013 at 10:52:35AM +0100, Ian Campbell wrote: [...]+ flexarray_append(front, p);GCSPRINTF would be the right way to do this, but actually you can pass protocol directly to flexarray_append, that is fine since the flexarray never frees the values which it contains so they either need to be gc'd, string constants or managed manually.Oh thanks for the hint. This saves serveral lines of code. The (void *) argument of flexarray_append misled me. ;-) Below is updated version of the patch. Casting "protocol" to (void *) is necessary to have it compiled. Otherwise gcc complains we discard the const quilifier.Oh, sorry, if this is the case the libxl__strdup(gc,protocol) is better than the cast. Sorry for misleading :-( Now you mention it I do seem to recall trying to correctly constify flexarray's at one point and not quite being able to make it work.Another version with libxl__strdup(). :-)Thanks! George, this is on your tracking list and is a bug fix and/or a regression from Xend. Are you happy to give it a freeze exception? Yes, I think this is fine to go in. -George _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |