Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NJFTa-0004ZS-RH for mharc-grub-devel@gnu.org; Fri, 11 Dec 2009 19:04:46 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NJFTZ-0004Wz-9A for grub-devel@gnu.org; Fri, 11 Dec 2009 19:04:45 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NJFTU-0004Qm-NA for grub-devel@gnu.org; Fri, 11 Dec 2009 19:04:44 -0500 Received: from [199.232.76.173] (port=47575 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NJFTU-0004Qj-Kn for grub-devel@gnu.org; Fri, 11 Dec 2009 19:04:40 -0500 Received: from 197.red-80-32-81.staticip.rima-tde.net ([80.32.81.197]:48429 helo=mail.pina.cat) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NJFTU-0005hd-7V for grub-devel@gnu.org; Fri, 11 Dec 2009 19:04:40 -0500 Received: from pinux (82-45-164-87.cable.ubr06.hari.blueyonder.co.uk [82.45.164.87]) by mail.pina.cat (Postfix) with ESMTP id B29F3288FBA2F for ; Sat, 12 Dec 2009 01:04:36 +0100 (CET) Received: by pinux (Postfix, from userid 1000) id 905E569A8; Sat, 12 Dec 2009 00:04:51 +0000 (GMT) Date: Sat, 12 Dec 2009 00:04:51 +0000 From: Carles Pina i Estany To: The development of GNU GRUB Message-ID: <20091212000451.GB13597@pina.cat> References: <20091129183936.GB19323@pina.cat> <20091204212100.GK1528@thorin> <20091204215558.GA13421@pina.cat> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091204215558.GA13421@pina.cat> User-Agent: Mutt/1.5.20 (2009-06-14) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Re: var=foo should be valid? X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 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: Sat, 12 Dec 2009 00:04:45 -0000 Hi, On Dec/04/2009, Carles Pina i Estany wrote: > > Hi, > > On Dec/04/2009, Robert Millan wrote: > > On Sun, Nov 29, 2009 at 06:39:36PM +0000, Carles Pina i Estany wrote: > > > (first one has a bug but very easy to fix, even thought I would maybe > > > refactor this code to implement in other way) > > > > Can you give more details about this bug and the refactor that would be > > needed? > > Find attached the simple patch (without refactoring) (it resets > grub_errno _before_ grub_env_set, because grub_env_set calls the hooked > functions). We should fix it. We have three options (maintaining the current behaviour for the user): a) simple_patch (just swapping that two lines) b) refactoring patch (calls the same function with set as command and the passed command as arguments, etc. should be possible but I haven't implemented) c) play with the grammatic of the language instead of fallback in the execution of the each line. Not sure how feasible it is since I haven't look into it. a) would be the patch that I attached, b) I would do it in a couple of days, hopefully. c) I would not do it for quite long time and I think that some other people could fix it. If we go for c) maybe we could commit a) as a temporary fix waiting for some other changes in teh grammar. Even, for c) would be nice to have the unit tests to see if we break other things. Thanks, -- Carles Pina i Estany http://pinux.info