This message was put in place to aid libusb-compat-0.1 users, who
may run into the change that libusb-0.1 allowed you to usb_open() a
device that you don't have write access to, but libusb-1.0 does not.
As explained on the ticket this change is dangerous so it should go through
the usual logging mechanism. I also added a similar regular log message
to libusb-compat-0.1.
hpriv->fd = open(filename, O_RDWR);
if (hpriv->fd < 0) {
if (errno == EACCES) {
- fprintf(stderr, "libusb couldn't open USB device %s: "
- "Permission denied.\n"
- "libusb requires write access to USB device nodes.\n",
- filename);
+ usbi_err("libusb couldn't open USB device %s: "
+ "Permission denied.", filename);
+ usbi_err("libusb requires write access to USB device nodes.");
return LIBUSB_ERROR_ACCESS;
} else if (errno == ENOENT) {
return LIBUSB_ERROR_NO_DEVICE;