From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VJwta-0000A1-Tw for mharc-grub-devel@gnu.org; Wed, 11 Sep 2013 22:44:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJwtT-00009i-Vg for grub-devel@gnu.org; Wed, 11 Sep 2013 22:44:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VJwtK-0000Ox-RH for grub-devel@gnu.org; Wed, 11 Sep 2013 22:44:31 -0400 Received: from mail-lb0-x236.google.com ([2a00:1450:4010:c04::236]:57337) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJwtK-0000ON-Je for grub-devel@gnu.org; Wed, 11 Sep 2013 22:44:22 -0400 Received: by mail-lb0-f182.google.com with SMTP id c11so356559lbj.27 for ; Wed, 11 Sep 2013 19:44:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=OwWgDMOvUogzEGjcuzEzERBzkksmjwtlwA9E3t8OBJE=; b=fYRl0elEEZ7WnjfsZvMEzoDWlj9KhCsow5ebp4lnY7rEFXXJwPYxZbeAQZOYsHohFL lVxB7GI7AH2spMfjGyTgl89Sg4lCSABFwd5Z08zCDd7HHmH89nrZokeL7nsgP0obtr+t stlpHPo7FdrjJ/77GODOzGjfA7FF3uSwSFLMuRyTyT8Fcc0IjDNEyP3RQZS2YTtolai/ WSeRQLEdvFf/L9NBOr1npRWDvBy8p+jGcQGZg5GRUhblQZJIV6Zn1IMtfrqtnqJfAWeK 65iKP72R9ntDkgNfFpGayqpznpy0DllxsRG0hYfnsUi3LyTaWGazDZoCXJ37JOszkvJg w+Zg== X-Received: by 10.112.143.3 with SMTP id sa3mr5306594lbb.12.1378953861118; Wed, 11 Sep 2013 19:44:21 -0700 (PDT) Received: from opensuse.site (ppp79-139-160-84.pppoe.spdop.ru. [79.139.160.84]) by mx.google.com with ESMTPSA id i3sm452603laf.4.1969.12.31.16.00.00 (version=SSLv3 cipher=RC4-SHA bits=128/128); Wed, 11 Sep 2013 19:44:20 -0700 (PDT) Date: Thu, 12 Sep 2013 06:44:19 +0400 From: Andrey Borzenkov To: The development of GNU GRUB Subject: Re: [RFC][PATCH] Allow hotkeys to interrupt hidden menu Message-ID: <20130912064419.125c0bfa@opensuse.site> In-Reply-To: <20130911131804.GA10979@riva.ucam.org> References: <20130911131804.GA10979@riva.ucam.org> X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.18; x86_64-suse-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::236 Cc: Franz Hsieh , cjwatson@ubuntu.com 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, 12 Sep 2013 02:44:37 -0000 В Wed, 11 Sep 2013 14:18:04 +0100 Colin Watson пишет: > > +int > +grub_menu_get_hotkey (void) > +{ > + char *val; > + int hotkey; > + > + val = grub_env_get ("hotkey"); > + if (! val) > + return -1; > + > + grub_error_push(); > + > + hotkey = (int) grub_strtoul (val, 0, 10); > + > + /* If the value is invalid, unset the variable. */ Why only if invalid? This is one time event which should be reset as soon as it is consumed. Actually I'm not sure if user visible environment variable is needed at all - just make it a global variable in normal.mod.