[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 3/4] libxl: add version_info function [and 1 more messages]
On 21/04/10 13:10, Andre Przywara wrote: I just wanted to avoid introducing a lot of functions which could be actually one. And if a user passes a wrong mask, then well, he is just doing the wrong thing and cannot expect it to work. If Xen provides a possibility to query single parts of the information, why should we hide this capability from the upper layers? well that's just for simplicity. But when I was looking at the libxl_sprintf thing, I realized that all the information in the info structure is static and will never change during runtime. Am I right? If so, we can solve this whole thing by not only storing the strings in libxl_ctx, but the whole structure. The first call to the function would query all the members, subsequent calls would just return the pointer. This avoids duplication should the function be called multiple times. It would be automatically freed when destroying the xl context. What do you think of this? I think that's quite reasonable and a good idea all in all. the API stays simple, and most potential performance issues are just dealt with. -- Vincent _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |