Skip to content

Conversation

@ccoffing
Copy link
Contributor

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.

elks-lp

- 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.
@ghaerr
Copy link
Owner

ghaerr commented Feb 15, 2024

Hi @ccoffing,

Wow, very nice major rewrite and cleanup of the lp driver and utilities, thanks!! This was definitely needed.
Can't wait to try it :)

I'd like to improve the lp* tools, but that's future.

A very old pr that I used to use added a header/footer with date stamp, filename and page number which was nice for printing listings, etc. Perhaps that can be added to lp if you get around to it.

I tested on a 386SX, both with using the BIOS-defined ports and probing.

So when does probing get used now, versus using the BIOS-defined ports? [EDIT: I see now, when !BIOS_PORTS.]

@ghaerr ghaerr merged commit 55aea13 into ghaerr:master Feb 15, 2024
@ccoffing
Copy link
Contributor Author

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.

@ccoffing ccoffing deleted the lp branch February 16, 2024 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants