LPDEV

Section: Maintenance Commands (8)
Updated: July, 1993
Index Return to Main Contents
 

NAME

lpdev - installs the /dev/lp device  

SYNOPSIS

lpdev  

DESCRIPTION

lpdev will install /dev/lp , a buffered Centronics device driver. Typically, this command will be put in your mint.cnf file. This device is write-only; you won't be able to read anything from it (it will behave like /dev/null ). It's also very dumb: the bytes written into /dev/lp will be sent without modification to the Centronics port. In fact, the only service offered by /dev/lp is buffering: it should allow you to print without hogging the cpu. To take full advantage of buffering, you should write large blocks of data into /dev/lp , not one byte at a time, in order to reduce system call overhead. The default size of the buffer is 24 kbyte; jobs that print files bigger than that should be put in the background. The ioctl modes recognized by this device are:
FIONREAD, FIONWRITE
return the number of bytes that can be read from (always 0) or written to the device.
TIOCFLUSH
clears the buffer.
F_GETLK, F_SETLK, F_SETLKW
handle file locking on the device. You can only lock the whole device, and only with a write-lock; read-locks are ignored.
 

SEE ALSO

lpflush(1)  

DIAGNOSTICS

Error messages are reported on standard output, and lpdev exits with the appropriate return-code (usually EACCDN or ENSMEM).
lpdev: MiNT is not running
self-explanatory
lpdev: device "u:\dev\lp" already installed
self-explanatory
lpdev: Centronics interrupt already in use
The MFP interrupt source #0 is already active, probably because of another spooler.
lpdev: not enough memory
There's no memory left for the circular buffer.
lpdev: unable to install device
MiNT couldn't install the device for another reason that those mentioned above.
 

AUTHOR

Thierry Bousch (bousch@suntopo.matups.fr)  

BUGS

The /dev/lp device can't be opened in exclusive mode; you must open it, then apply a lock on the file descriptor. The file locking functions haven't been tested, so they won't work.


 

Index

NAME
SYNOPSIS
DESCRIPTION
SEE ALSO
DIAGNOSTICS
AUTHOR
BUGS

This document was created by man2html, using the manual pages.
Time: 08:35:43 GMT, February 14, 2025