[syslinux] menu timeout restarted with single item (4.06-pre14)
H. Peter Anvin
hpa at zytor.com
Wed Oct 17 11:31:59 PDT 2012
On 10/17/2012 03:35 AM, Matt Fleming wrote:
>>
>> Adding another menu item restores the correct behaviour: the timeout
>> cancels on keypress (arrow).
>
> This bug report scared me at first because I thought that this was a
> newly introduced bug, likely brought about by some of my recent commits
> to com32/menu.
>
> But it turns that this bug is *old*, like 7 years old and looks to have
> been introduced with the following commit,
>
>
> commit da20539a79fe070350a43503b8db954c50980e18
> Author: hpa <hpa>
> Date: Tue Aug 30 22:36:49 2005 +0000
>
> New "totaltimeout" option; change the menu behaviour on timeout.
>
>
> Now, I suspect this is a bug and I can certainly understand why people
> would expect a one entry menu to work the same way as a multi-entry menu
> with regards to TIMEOUT. Peter, is this a bug or some "undocumented
> feature"?
>
Well, it presumably happens because the cursor doesn't actually move.
As I remember the history of this patch the issue was that line noise on
a serial port could cancel the timeout; however, the right solution to
this is "totaltimeout".
The fix is probably to make the cursor keys cancel the timeout, rather
than cursor movement:
+ /* Cursor movement cancels timeout */
+ if ( entry != defentry )
+ key_timeout = 0;
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
More information about the Syslinux
mailing list