summaryrefslogtreecommitdiff
path: root/libgphoto2_port
diff options
context:
space:
mode:
authorLutz Mueller <lutz@users.sourceforge.net>2001-11-14 10:32:28 +0000
committerLutz Mueller <lutz@users.sourceforge.net>2001-11-14 10:32:28 +0000
commit1f3dddd76d26527eefca08f0caac803626b6f11c (patch)
tree80c361184f8190c8d8665b7e5fa71432bc97625c /libgphoto2_port
parente7b136bd190cfc39e04243c38aefa5cd32c8ab2e (diff)
downloadlibgphoto2-1f3dddd76d26527eefca08f0caac803626b6f11c.tar.gz
Improve error reporting.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@3018 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'libgphoto2_port')
-rw-r--r--libgphoto2_port/usb/libusb.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/libgphoto2_port/usb/libusb.c b/libgphoto2_port/usb/libusb.c
index b03ffdc20..004aa0cae 100644
--- a/libgphoto2_port/usb/libusb.c
+++ b/libgphoto2_port/usb/libusb.c
@@ -327,12 +327,8 @@ gp_port_usb_find_device_lib(GPPort *port, int idvendor, int idproduct)
* Should the USB layer report that ? I don't know.
* Better to check here.
*/
- if ((idvendor == 0) || (idproduct == 0)) {
- gp_port_set_error (port, "NOT looking for illegal USB device "
- "(vendor 0x%x, product 0x%x)...",
- idvendor, idproduct);
+ if (!idvendor || !idproduct)
return GP_ERROR_BAD_PARAMETERS;
- }
for (bus = usb_busses; bus; bus = bus->next) {
for (dev = bus->devices; dev; dev = dev->next) {
@@ -348,9 +344,9 @@ gp_port_usb_find_device_lib(GPPort *port, int idvendor, int idproduct)
}
}
- gp_port_set_error (port, "Looking for USB device "
- "(vendor 0x%x, product 0x%x)... not found.",
- idvendor, idproduct);
+ gp_port_set_error (port, _("Could not find USB device "
+ "(vendor 0x%x, product 0x%x). Make sure this device "
+ "is connected to the computer."), idvendor, idproduct);
return GP_ERROR_IO_USB_FIND;
}