Page MenuHomeFreeBSD

Fix vt(4)'s response to Device Status Report escape sequences
Needs ReviewPublic

Authored by smahadevan_freebsdfoundation.org on Aug 7 2017, 8:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 9 2024, 12:39 PM
Unknown Object (File)
Dec 20 2023, 6:27 AM
Unknown Object (File)
Dec 10 2023, 10:26 PM
Unknown Object (File)
Nov 24 2023, 1:20 AM
Unknown Object (File)
Nov 10 2023, 8:05 AM
Unknown Object (File)
Nov 8 2023, 8:08 AM
Unknown Object (File)
Nov 7 2023, 8:51 PM
Unknown Object (File)
Nov 5 2023, 10:10 AM
Subscribers

Details

Reviewers
emaste
ray
Summary

Fixes bug 220507.

Libteken would correctly compute the cursor position for a CPR escape sequence ("[6n"), but wouldn't write it back to the TTY device.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

The problem with this change is that I'm not 100% sure this won't cause an infinite amount of recursion in the TTY layer. Basically, this is what's happening:

Write to TTY -> Write to struct terminal -> Processed by libteken -> Result pushed back into the TTY.

But what if the TTY has echoing enabled? The response will be pushed through the terminal layer once more.

For this to work, we'll need to introduce another version of rint() that is guaranteed to ignore echoing. Alternatively, we should add a callout/taskqueue/... to push the response back into the TTY layer asynchronously.

  • Add a check for the maximum history size. This maximum is set to the same value as the maximum in syscons(4).
  • Fix the error string on a negative number argument

Accidentally updated wrong review, reverting back to previous diff