grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Support abort of 'cat' even if in paging mode


From: Valentin Dornauer
Subject: Support abort of 'cat' even if in paging mode
Date: Wed, 14 Jan 2015 11:49:57 +0100

Hello,
we needed a way for GRUB to show a rather large text file in pager
mode (set pager=1) while still allowing the user to abort without
scrolling all the way to the bottom of the file.

>From the original commit message:
 [...] The reason is that "cat" scans for key strokes but does not
 block waiting for them. This results in a race between the pager
 that eats all the keystrokes and "cat" that scans for them in
 non-blocking mode.

 To fix this, we let the pager report if a keypress was ESC, 'q'
 or 'Q'.  The caller can check for this and stop the printing of
 data. The behaviour of the pager itself is not affected by this.

Please note that this is a rather quick fix and there might be a
better solution (possibly entirely inside the term layer?). If anyone
has a better solution, please let me know. Otherwise I could submit
a proper patch using this fix.

Original patch by Christian Ehrhardt <address@hidden>.

Thanks
Valentin

Attachment: 0001-Support-abort-of-cat-even-if-in-paging-mode.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]