Conversation
- build them - fix warnings - const-ify - don't have syslog
The lp driver was non-functional primarily due to not checking the busy status before writing a character. The old code was only checking for errors, not busy, and then blasting ahead and dropping characters. I added the busy check and structured it a bit more like the Linux 1.0 kernel. This also means that write() now correctly sets errno. Also added a scheduling timeout when writing large buffers, and cleaned up some port probing.
|
Hi @ccoffing, Wow, very nice major rewrite and cleanup of the lp driver and utilities, thanks!! This was definitely needed.
A very old
So when does probing get used now, versus using the BIOS-defined ports? [EDIT: I see now, when !BIOS_PORTS.] |
Right; it's still hardcoded as before. I manually toggled it both ways to prove each works (at least for my specific system). Maybe this BIOS_PORTS configuration should be derived from the CONFIG_ARCH_* setting, or perhaps it should be exposed as another tunable under Kernel & Hardware > System. I assume that some more custom systems would not have the same BIOS and would want to probe instead. |
Basic queuing and printing now works.
I tested on a 386SX, both with using the BIOS-defined ports and probing. lp and lpd both function.
I have an original IBM PC that I will eventually get around to testing on, and I'd like to improve the lp* tools, but that's future.