print errorstring when /dev/parportX can't be opened
authormichael <michael>
Wed, 14 Mar 2007 23:22:50 +0000 (23:22 +0000)
committermichael <michael>
Wed, 14 Mar 2007 23:22:50 +0000 (23:22 +0000)
usb-driver.c

index 881b67bf050fb19f5a45efe0620062e729d63a07..cd9807a9017d5391df1e650abf50c1e80b0426b0 100644 (file)
@@ -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) {
Impressum, Datenschutz