Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JQkL8-0002xT-Vo for mharc-grub-devel@gnu.org; Sun, 17 Feb 2008 09:17:59 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JQkL7-0002x2-Ds for grub-devel@gnu.org; Sun, 17 Feb 2008 09:17:57 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JQkL5-0002w0-OK for grub-devel@gnu.org; Sun, 17 Feb 2008 09:17:56 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JQkL5-0002vr-H3 for grub-devel@gnu.org; Sun, 17 Feb 2008 09:17:55 -0500 Received: from bigbox.boeglin.org ([88.191.20.48]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JQkL5-0005ZN-65 for grub-devel@gnu.org; Sun, 17 Feb 2008 09:17:55 -0500 Received: by bigbox.boeglin.org (Postfix, from userid 1000) id 3FAF69408A; Sun, 17 Feb 2008 15:18:23 +0100 (CET) Date: Sun, 17 Feb 2008 15:18:23 +0100 From: Alexandre Boeglin To: The development of GRUB 2 Message-ID: <20080217141823.GE8497@boeglin.org> References: <20080208161534.GA19324@thorin> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20080208161534.GA19324@thorin> User-Agent: Mutt/1.5.17+20080114 (2008-01-14) Content-Transfer-Encoding: quoted-printable X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) Subject: Re: [PATCH] sleep.mod X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2008 14:17:58 -0000 Le ven 08 f=E9v 2008 =E0 17:15:35 +0100, Robert Millan a =E9crit : > +static int > +grub_interruptible_millisleep (grub_uint32_t ms) > +{ > + grub_uint32_t end_at; > + =20 > + end_at =3D grub_get_rtc () + grub_div_roundup (ms * GRUB_TICKS_PER_S= ECOND, 1000); > + =20 > + while (grub_get_rtc () < end_at) > + if (GRUB_TERM_ASCII_CHAR (grub_checkkey ()) =3D=3D GRUB_TERM_ESC) > + return 1; > + > + return 0; > +} I have a few issues with this on a EFI machine: - if I press any other key but ESC, the sleep command is not interruptibl= e anymore - the keys I press are read when the command returns Does this happen on other machines as well ? Alex