[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH RFC V2 4/5] xl: add pvusb commands
On Mon, 2015-01-19 at 16:28 +0800, Chunyan Liu wrote: > Add pvusb commands. > > To attach a usb device to guest through pvusb, one could follow > following example: > > #xl usb-ctrl-attach test_vm version=1 num_ports=8 > > #xl usb-list test_vm > will show the usb controllers and port usage under the domain. > > #xl usb-assignable-list > will list all assignable usb devices now in host, with their > sysfs interface. (This is very useful since later we will use > sysfs interface to attach a usb devie to guest) > > #xl usb-attach test_vm 2-1.1 > will find the first usable controller:port, and attach usb > device with sysfs interface 2-1.1 (sys/bus/usb/devices/2-1.1) > to it. One could also specify which <controller> and which <port> > > #xl usb-detach test_vm 2-1.1 > > #xl usb-ctrl-detach test_vm dev_id > will destroy the controller with dev_id as specified. Dev_id > can be traced in usb-list info > > Signed-off-by: Chunyan Liu <cyliu@xxxxxxxx> > Signed-off-by: Simon Cao <caobosimon@xxxxxxxxx> > --- > tools/libxl/xl.h | 6 ++ > tools/libxl/xl_cmdimpl.c | 256 > ++++++++++++++++++++++++++++++++++++++++++++++ > tools/libxl/xl_cmdtable.c | 30 ++++++ This patch should also touch docs/man/xl*.pod I think. > +int main_usbassignable_list(int argc, char **argv) > +{ > + int opt; > + > + SWITCH_FOREACH_OPT(opt, "", NULL, "usb-assignable-list", 0) { > + /* No options */ > + } > + > + usb_assignable_list(); Unless there are other callers or a good reason to factor it out (e.g. complexity) you can just do the operation inline here if you like. The rest of it seems pretty straightforward and looked ok to me. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |