From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VMXjQ-0006iX-Q7 for mharc-grub-devel@gnu.org; Thu, 19 Sep 2013 02:28:52 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41389) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMXjJ-0006iL-EH for grub-devel@gnu.org; Thu, 19 Sep 2013 02:28:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VMXjD-0008ND-Sr for grub-devel@gnu.org; Thu, 19 Sep 2013 02:28:45 -0400 Received: from mail-ea0-x22e.google.com ([2a00:1450:4013:c01::22e]:38702) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMXjD-0008N5-LX for grub-devel@gnu.org; Thu, 19 Sep 2013 02:28:39 -0400 Received: by mail-ea0-f174.google.com with SMTP id z15so3890670ead.19 for ; Wed, 18 Sep 2013 23:28:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=jwVKNn2On/iJZWY8m36LncrSI976yDVon4LqBFx7Sww=; b=a9UVfYhhYlCCjJZHzui69014URxEmfMGc7N6rIWmhU/akIK1JYs8j76LdXCCAUv9up 3Kry1ROvdVGb3RbUryt3uiuVumgrr+gZsJzcrZtLlf/1PMXXrOxDX9+n4Cn4c4uiFb7T +VtlTjeuYwuyyte8yvxdiqvUm9d+kVYV6+xLcMa9pA/oET7CgiOz8/ZM+gNIRay7SUuK isLkPBb3doKQuhkEcLt2crNepHlM5geAwR89Tj8+qOfQjXnjO91RNIHU7+q22Ap+mFiu TEwSOSCdbpoaMqpa8CRUkd6dDdS3yZoedqMk2g0ng6eGG5dFEUs+oJNJxQS1xqzXmSYF Lnfw== X-Received: by 10.15.22.67 with SMTP id e43mr25888774eeu.47.1379572118866; Wed, 18 Sep 2013 23:28:38 -0700 (PDT) Received: from [192.168.42.249] (55-236.197-178.cust.bluewin.ch. [178.197.236.55]) by mx.google.com with ESMTPSA id j7sm8567705eeo.15.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 18 Sep 2013 23:28:37 -0700 (PDT) Message-ID: <523A998B.9090104@gmail.com> Date: Thu, 19 Sep 2013 08:28:27 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130821 Icedove/17.0.8 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: [RFC][PATCH] Allow hotkeys to interrupt hidden menu References: <20130911131804.GA10979@riva.ucam.org> <20130911133129.GB10979@riva.ucam.org> In-Reply-To: X-Enigmail-Version: 1.5.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="----enig2EKWERPOWQOOBSXODTMOB" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c01::22e X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Sep 2013 06:28:51 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2EKWERPOWQOOBSXODTMOB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 13.09.2013 11:18, Franz Hsieh wrote: >=20 >=20 >=20 > On Wed, Sep 11, 2013 at 9:31 PM, Colin Watson > wrote: >=20 > Hi Franz, >=20 > Throughout this patch, please take care to adhere to the GRUB codin= g > style. This is definitely an improvement over previous versions I'= ve > reviewed, but it still has a number of places where functions are c= alled > or declared with no space before the opening parenthesis. That is,= > "function()" should become "function ()". I know it's a minor poin= t, > but it makes code much easier to read when it's all in the same sty= le. >=20 > On Wed, Sep 11, 2013 at 02:18:04PM +0100, Franz Hsieh (via Colin Wa= tson) > wrote: > > +static struct > > +{ > > + char *name; > > + int key; > > +} function_key_aliases[] =3D > > + { > > + {"f1", GRUB_TERM_KEY_F1}, > > + {"f2", GRUB_TERM_KEY_F2}, > > + {"f3", GRUB_TERM_KEY_F3}, > > + {"f4", GRUB_TERM_KEY_F4}, > > + {"f5", GRUB_TERM_KEY_F5}, > > + {"f6", GRUB_TERM_KEY_F6}, > > + {"f7", GRUB_TERM_KEY_F7}, > > + {"f8", GRUB_TERM_KEY_F8}, > > + {"f9", GRUB_TERM_KEY_F9}, > > + {"f10", GRUB_TERM_KEY_F10}, > > + {"f11", GRUB_TERM_KEY_F11}, > > + {"f12", GRUB_TERM_KEY_F12}, > > + }; > > + >=20 > This is essentially a copy of hotkey_aliases from > grub-core/commands/menuentry.c, and there's duplicated lookup code = as > well. Can you find any way to share it? Since we certainly don't = want > to put this in the kernel, and neither the sleep module nor the nor= mal > module really ought to depend on the other, I suspect that doing so= > would require a new module for shared menu code, which may well be > overkill for this, but it's worth a look. >=20 >=20 > I also agree to remove duplicate code, but seems not easy to do it unle= ss > we have a shared module, right? Well it would take me some time to eval= uate. Why not just allow any key interrupt sleep and if it's not escape using ungetc-like code (with real ungetc code or global variable of some kind)?= ------enig2EKWERPOWQOOBSXODTMOB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) Comment: Using GnuPG with Icedove - http://www.enigmail.net/ iF4EAREKAAYFAlI6mZMACgkQNak7dOguQglGPgD/bkCK8M/CwauH+oFMAqCclVIc ASFzTxjke0eMifSziKgA/2xK3DsIv+QA+cs6j8Bh3kpUP4GeI+HGaL2OwvzURTEy =TJlS -----END PGP SIGNATURE----- ------enig2EKWERPOWQOOBSXODTMOB--