virUSBDeviceNew: Construct vroot path properly
When starting an LXC container, the /dev entries are created under temp root (/var/run/libvirt/lxc/$name.dev), relabelled and then the root is pivoted. However, when it comes to USB devices which keep path to the device in the structure we need a way to override the default /dev/usb/... path because we want to work with the one under temp root. That's what @vroot argument is for in virUSBDeviceNew. However, what is being passed there is: vroot = /var/run/libvirt/lxc/lxc_0.dev/bus/usb Therefore, constructed path is wrong: dev->path = //var/run/libvirt/lxc/lxc_0.dev/bus/usb//dev/bus/usb/002/002 Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
Showing
想要评论请 注册 或 登录