2003-05-05 Theodore A. Roth * src/DAPA.C: When using direct IO for the lpt port, don't use a default device name (set ppdev_name to NULL) so that there is no attempt to open() the device. [Thanks to Pavel Celeda for reporting the problem and isolating a fix.] Index: src/DAPA.C =================================================================== RCS file: /cvsroot/uisp/uisp/src/DAPA.C,v retrieving revision 1.11 diff -u -r1.11 DAPA.C --- src/DAPA.C 18 Apr 2003 21:10:10 -0000 1.11 +++ src/DAPA.C 5 May 2003 19:50:06 -0000 @@ -1011,11 +1011,24 @@ /* Parse Command Line Switches */ #ifndef NO_DIRECT_IO if ((val = GetCmdParam("-dlpt")) != NULL) { - if (!strcmp(val, "1")){parport_base = 0x378;} - else if (!strcmp(val, "2")){parport_base = 0x278;} - else if (!strcmp(val, "3")){parport_base = 0x3bc;} - else if (*val != '/') { parport_base = strtol(val, NULL, 0); } - else { ppdev_name = val; } + if (!strcmp(val, "1")) { + parport_base = 0x378; + ppdev_name = NULL; + } + else if (!strcmp(val, "2")) { + parport_base = 0x278; + ppdev_name = NULL; + } + else if (!strcmp(val, "3")) { + parport_base = 0x3bc; + ppdev_name = NULL; + } + else if (*val != '/') { + parport_base = strtol(val, NULL, 0); + } + else { + ppdev_name = val; + } } if (!ppdev_name && !pa_type_is_serial) { if (parport_base!=0x278 && parport_base!=0x378 && parport_base!=0x3bc) {