Re: Slow dosemu printing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

the attached patch causes
$_lpt2=""
to completely disable LPT2, independent of any $_port setting.

It also flushes every second. Let me know if it helps.

Bart
Index: src/base/dev/misc/lpt.c
===================================================================
--- src/base/dev/misc/lpt.c	(revision 1716)
+++ src/base/dev/misc/lpt.c	(working copy)
@@ -221,11 +221,11 @@
     lpt[i].remaining = -1;	/* mark not accessed yet */
     if (lpt[i].dev)
       lpt[i].fops = dev_pfops;
-    else
+    else if (lpt[i].prtcmd)
       lpt[i].fops = pipe_pfops;
     if (i >= config.num_lpt) lpt[i].base_port = 0;
 
-    if (lpt[i].base_port) {
+    if (lpt[i].base_port != 0 && lpt[i].fops.open) {
       io_device.start_addr = lpt[i].base_port;
       io_device.end_addr   = lpt[i].base_port + 2;
       port_register_handler(io_device, 0);
@@ -258,6 +258,8 @@
 	lpt[i].remaining--;
 	if (!lpt[i].remaining)
 	  printer_close(i);
+	else if (lpt[i].file != NULL)
+	  fflush(lpt[i].file);
       }
     }
   }

[Index of Archives]     [Linux Console]     [Linux Audio]     [Linux for Hams]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite Camping]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Samba]     [Linux Media]     [Fedora Users]

  Powered by Linux