Skip to content

printer.device: pass on the driver's error from PRS_CLOSE - #1850

Open
terminills wants to merge 1 commit into
aros-development-team:masterfrom
terminills:printer-close-error
Open

terminills wants to merge 1 commit into
aros-development-team:masterfrom
terminills:printer-close-error

Conversation

@terminills

Copy link
Copy Markdown
Contributor

A driver that prints the page when the render is closed (TurboPrint-style drivers, Gutenprint) can only report a failure or a cancelled job from PRS_CLOSE, and printer.device discarded that return value: a job the user cancelled still completed with io_Error 0.

This uses the PRS_CLOSE result when nothing failed before. The in-tree drivers (postscript, skeleton) return PDERR_NOERR there, so their behaviour does not change.

Tested on pc-x86_64 in QEMU with the Gutenprint driver and its print preview, PRD_DUMPRPORT from a test program:

  • Print: io_Error 0 (unchanged)
  • Cancel in the preview: io_Error 0 before, io_Error 1 (PDERR_CANCEL) after
  • Print all (two pages) and print to printtofile.device: unchanged

A driver that prints the page when the render is closed (TurboPrint-style
drivers, Gutenprint) can only report a failure or a cancelled job from
PRS_CLOSE, and its return value was discarded: a cancelled job still
completed with io_Error 0. Use it when nothing failed before.

The in-tree drivers (postscript, skeleton) return PDERR_NOERR there, so
nothing changes for them.
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.

1 participant