Make the 'q' in ddb(4) pager actually abort the output, instead
of printing all the remaining lines without paging.
Details
Details
- Reviewers
jhb
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 12977 Build 13232: arc lint + arc unit
Event Timeline
Comment Actions
This is not inline with how db_pager_quit works where individual commands check the flag in loops. Is there a specific command you are using that doesn't honor 'q'? Several commands such as 'show ktr', 'show irq', etc. do honor it.
sys/ddb/db_output.c | ||
---|---|---|
253 | See comment here which documents the current usage. |
Comment Actions
Oh wow, it's been a year now. Anyway - I still do want to upstream it :-)
Now - I understand how db_pager_quit works right now. There are two reasons for the diff:
- Some of the places which check for it are not precise to the line. In other words - you press 'q' and still get a few lines more. It's mostly a cosmetic issue, though.
- Some places just fail to check for it. And you usually only realise it when you're trying to use it and then wait for minutes until the whole thing scrolls to the end. It's incredibly annoying. Sure, I can fix each of those, but honestly - handling it in db_printf() is just easier, there are no places to miss, and it won't rot over time.
Note that I don't intend to get rid of the existing behaviour - it's just it removes it to be an optimization, for the commands to exit early instead of trying to printf stuff that won't make it into the actual output.