print errorstring when /dev/parportX can't be opened
This commit is contained in:
parent
543579946c
commit
459c6ef789
@ -349,6 +349,9 @@ int do_wdioctl(int fd, unsigned int request, unsigned char *wdioctl) {
|
|||||||
DPRINTF("opening %s\n", ppdev);
|
DPRINTF("opening %s\n", ppdev);
|
||||||
parportfd = open(ppdev, O_RDWR|O_EXCL);
|
parportfd = open(ppdev, O_RDWR|O_EXCL);
|
||||||
parportnum++;
|
parportnum++;
|
||||||
|
|
||||||
|
if (parportfd < 0)
|
||||||
|
fprintf(stderr,"Can't open %s: %s\n", ppdev, strerror(errno));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parportfd >= 0) {
|
if (parportfd >= 0) {
|
||||||
|
Reference in New Issue
Block a user