Revision c06c68c9
b/hw/usb/host-linux.c | ||
---|---|---|
1738 | 1738 |
} |
1739 | 1739 |
|
1740 | 1740 |
static QEMUTimer *usb_auto_timer; |
1741 |
static VMChangeStateEntry *usb_vmstate; |
|
1741 | 1742 |
|
1742 | 1743 |
static int usb_host_auto_scan(void *opaque, int bus_num, |
1743 | 1744 |
int addr, const char *port, |
... | ... | |
1792 | 1793 |
return 0; |
1793 | 1794 |
} |
1794 | 1795 |
|
1796 |
static void usb_host_vm_state(void *unused, int running, RunState state) |
|
1797 |
{ |
|
1798 |
if (running) { |
|
1799 |
usb_host_auto_check(unused); |
|
1800 |
} |
|
1801 |
} |
|
1802 |
|
|
1795 | 1803 |
static void usb_host_auto_check(void *unused) |
1796 | 1804 |
{ |
1797 | 1805 |
struct USBHostDevice *s; |
... | ... | |
1820 | 1828 |
} |
1821 | 1829 |
} |
1822 | 1830 |
|
1831 |
if (!usb_vmstate) { |
|
1832 |
usb_vmstate = qemu_add_vm_change_state_handler(usb_host_vm_state, NULL); |
|
1833 |
} |
|
1823 | 1834 |
if (!usb_auto_timer) { |
1824 | 1835 |
usb_auto_timer = qemu_new_timer_ms(rt_clock, usb_host_auto_check, NULL); |
1825 | 1836 |
if (!usb_auto_timer) { |
Also available in: Unified diff