mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-gtk
synced 2026-02-05 14:22:36 +00:00
usb-device-manager: warn if a device to remove was not found
Also changed a bit the warning text on device-add to differentiate the two.
This commit is contained in:
parent
9edc788526
commit
b22a0976f4
@ -576,7 +576,7 @@ static void spice_usb_device_manager_add_dev(SpiceUsbDeviceManager *self,
|
||||
libusb_free_device_list(dev_list, 1);
|
||||
|
||||
if (!device) {
|
||||
g_warning("Could not find USB device at busnum %d devaddr %d",
|
||||
g_warning("Could not find USB device to add at busnum %d devaddr %d",
|
||||
bus, address);
|
||||
return;
|
||||
}
|
||||
@ -624,8 +624,12 @@ static void spice_usb_device_manager_remove_dev(SpiceUsbDeviceManager *self,
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!device)
|
||||
|
||||
if (!device) {
|
||||
g_warning("Could not find USB device to remove at busnum %d devaddr %d",
|
||||
bus, address);
|
||||
return;
|
||||
}
|
||||
|
||||
spice_usb_device_manager_disconnect_device(self, (SpiceUsbDevice *)device);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user