From 459c6ef7895902c3396567ad3b642b9000643646 Mon Sep 17 00:00:00 2001 From: michael Date: Wed, 14 Mar 2007 23:22:50 +0000 Subject: [PATCH] print errorstring when /dev/parportX can't be opened --- usb-driver.c | 3 +++ 1 file changed, 3 insertions(+) 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) { -- 2.39.5