Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1K7ang-0002Ge-Pj for mharc-grub-devel@gnu.org; Sat, 14 Jun 2008 14:48:32 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K7and-0002Eg-Hg for grub-devel@gnu.org; Sat, 14 Jun 2008 14:48:29 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K7anc-0002CU-2Y for grub-devel@gnu.org; Sat, 14 Jun 2008 14:48:29 -0400 Received: from [199.232.76.173] (port=46692 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K7anb-0002CF-GH for grub-devel@gnu.org; Sat, 14 Jun 2008 14:48:27 -0400 Received: from aybabtu.com ([69.60.117.155]:51151) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1K7anb-0003Hi-5K for grub-devel@gnu.org; Sat, 14 Jun 2008 14:48:27 -0400 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1K7alZ-0001GA-3p for grub-devel@gnu.org; Sat, 14 Jun 2008 20:46:21 +0200 Received: from rmh by thorin with local (Exim 4.63) (envelope-from ) id 1K7an7-0006P8-Hk for grub-devel@gnu.org; Sat, 14 Jun 2008 20:47:57 +0200 Date: Sat, 14 Jun 2008 20:47:57 +0200 From: Robert Millan To: The development of GRUB 2 Message-ID: <20080614184757.GH5636@thorin> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.13 (2006-08-11) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: [PATCH] Save/Load environment variable support 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: Sat, 14 Jun 2008 18:48:29 -0000 On Fri, Jun 13, 2008 at 03:07:54PM +0800, Bean wrote: > Hi, > > I separate the save/load environment variable function from my > previous patch on environment block. It contains the command > save_env/load_env/list_env and tool grub-editenv, but without the > kernel patch. > -- > Bean > > diff --git a/commands/loadenv.c b/commands/loadenv.c > new file mode 100755 > index 0000000..970baf3 > --- /dev/null > +++ b/commands/loadenv.c > @@ -0,0 +1,250 @@ > +/* loadenv.c - command to load/save environment variable. */ Is this useful as a standalone command? If we're in a stage in which commands can be executed, the same effect could be archieved with the "." command on a grub.cfg-like formatted file? IIRC you explained that this feature could be useful as the basis for findroot style search, or to override existing variables like "root", "prefix" or "default". In both cases (if I understood correctly) you want it to be run automaticaly as the init routine for your module. However if your code is small enough, maybe it could replace the existing use of grub_prefix (I commented this on the other mail), thereby reducing kernel size and making it preferable to be part of kernel than a separate module. Do you think that's possible? -- Robert Millan I know my rights; I want my phone call! What good is a phone call… if you are unable to speak? (as seen on /.)