|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v5 2/2] xl: Add commands for usb hot-plug
On 18/04/13 18:41, Ian Jackson wrote:
I'm not really a fan of the "use position to specify arguments" when there is more than one or two arguments; but that's what block/net/pci do, so we should probably follow suit. Hmm, a bit strange that the libxl functions are "libxl_device_[foo]_add()", but the xl commands are "[foo]-attach". Ah well -- I'll change that around too. One of the reasons I didn't do this was because I didn't want to have to implement a parser to figure out which kind of device to implement. But an advantage of doing that is that we could at some point move from the sort of hacky, qemu-specific way of specifying usb devices for HVM guests in the config file (which basically passes them on directly to the qemu command-line via a deprecated interface), and move to a unified way to specify USB devices for either PV or HVM (with, for example, hot-unplug of devices which were added at boot time). Let me take a look and see if I can steal a parsing function from someone else. Any recommendations? :-)
I'll see about that when looking at the parsing functions. Ack. Sorry, for some reason didn't go through and check for stylistic things in this patch. +static int usb_add(uint32_t domid, libxl_device_usb_type type, + const char * device) Ack. Didn't re-indent after removing "hvm_host_" from the function name. + if ( (rc = libxl_device_usb_add(ctx, domid, &usbdev, NULL)) < 0 ) + fprintf(stderr, "libxl_device_usb_add failed.\n");Can't we have the call and the assignment to rc on its own line ? If you like. :-) -George _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |