[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 3/4] libxl: add version_info function
On 18/04/10 22:26, Andre Przywara wrote: Xen provides a xen_version hypercall to query the values of several interesting things (like hypervisor version, commandline used, actual changeset, etc.). Create a user-friendly and efficient wrapper around the libxc function to provide values for xl info output. instead of this chain of if else, why don't you just init the structure to NULL at the beginning of the call, and not do any else ? also the query capability seems a bit too much; the info call is probably unlikely called into a tight loop, and I expect the number of call to this to be 1 per starting toolstack or 1 per vm (at worst). from an API point of view this would make it simpler too. last thing, is instead of using strdup, you should use libxl_sprintf(ctx, "%s", string) so that you don't have to worry about freeing memory at all, and you can just omit the free_version_info call completely. -- Vincent _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |