From: michael Date: Wed, 14 Mar 2007 23:22:50 +0000 (+0000) Subject: print errorstring when /dev/parportX can't be opened X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/usb-driver/commitdiff_plain/459c6ef7895902c3396567ad3b642b9000643646 print errorstring when /dev/parportX can't be opened --- diff --git a/usb-driver.c b/usb-driver.c index 881b67b..cd9807a 100644 --- a/usb-driver.c +++ b/usb-driver.c @@ -349,6 +349,9 @@ int do_wdioctl(int fd, unsigned int request, unsigned char *wdioctl) { DPRINTF("opening %s\n", ppdev); parportfd = open(ppdev, O_RDWR|O_EXCL); parportnum++; + + if (parportfd < 0) + fprintf(stderr,"Can't open %s: %s\n", ppdev, strerror(errno)); } if (parportfd >= 0) {