|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 1/2] libxl: Introduce functions to add and remove USB devices to an HVM guest
On 17/04/13 10:54, Ian Campbell wrote: On Wed, 2013-04-17 at 10:36 +0100, George Dunlap wrote:+/* + * Just use plain numbers for now. Replace these with strings at some point. + */ +#define protocol_to_str(gc, t) libxl__sprintf((gc), "%d", (t)) +#define str_to_protocol(s) atoi((s)) +#define type_to_str(gc, t) libxl__sprintf((gc), "%d", (t))GCSPRINTF, although this macros are so simple that you might also replace them entirely with GCSPRINTF (altough it might make the code harder to understand).I might do that -- my original plan had actually been to actually print "pv" for LIBXL_DEVICE_USB_BACKEND_PV, "dm" for _DEVICEMODEL, and so on. Doing all the extra parsing was more work than I wanted to try to get done for the code freeze, but I left the functions so I could easily replaced them later. This is just an internal thing for libxl; it doesn't persist across reboots.Let me take a look at the functions you mentioned -- if they're really easy I'll just drop them in. Otherwise, the numeric values will be just fine, even if for some reason they end up being permanent.
Ack. -George _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |