usb-host: attach only to running guest
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
30e9d4120f
commit
a844ed842d
@ -1737,6 +1737,7 @@ static void usb_host_auto_check(void *unused)
|
|||||||
struct USBHostDevice *s;
|
struct USBHostDevice *s;
|
||||||
int unconnected = 0;
|
int unconnected = 0;
|
||||||
|
|
||||||
|
if (runstate_is_running()) {
|
||||||
usb_host_scan(NULL, usb_host_auto_scan);
|
usb_host_scan(NULL, usb_host_auto_scan);
|
||||||
|
|
||||||
QTAILQ_FOREACH(s, &hostdevs, next) {
|
QTAILQ_FOREACH(s, &hostdevs, next) {
|
||||||
@ -1757,6 +1758,7 @@ static void usb_host_auto_check(void *unused)
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!usb_auto_timer) {
|
if (!usb_auto_timer) {
|
||||||
usb_auto_timer = qemu_new_timer_ms(rt_clock, usb_host_auto_check, NULL);
|
usb_auto_timer = qemu_new_timer_ms(rt_clock, usb_host_auto_check, NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user