Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MDEmU-0005pz-1H for mharc-grub-devel@gnu.org; Sun, 07 Jun 2009 05:35:10 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MDEmS-0005oN-7d for grub-devel@gnu.org; Sun, 07 Jun 2009 05:35:08 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MDEmN-0005kR-9y for grub-devel@gnu.org; Sun, 07 Jun 2009 05:35:07 -0400 Received: from [199.232.76.173] (port=55332 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MDEmM-0005kC-VU for grub-devel@gnu.org; Sun, 07 Jun 2009 05:35:02 -0400 Received: from mail-gx0-f218.google.com ([209.85.217.218]:59745) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MDEmM-0002IK-Io for grub-devel@gnu.org; Sun, 07 Jun 2009 05:35:02 -0400 Received: by gxk18 with SMTP id 18so624238gxk.18 for ; Sun, 07 Jun 2009 02:35:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=OjkfpSZA+c8rVax3+UUndkUnvqtzWHSuXXPRduB4NvE=; b=CEiBcw9LCDd5+hq86S7yu0tJyk7/vb11w9PJZHOyTTQQEWcMdxK1KxMd4yGX+18/Fj uHS1rhAoH2OdW0j08qH5SA0raPZKdoNGLYyf0TB85w5eJYZQdQvgB1G0WppdnA8Dw1la tzXz4zmzLl/v+dRFM7bA/xpEA6SjT5lFUTdao= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=kBgMmLJU50sFXwTm9ZrVULofacvNzAoK/HbPCA41SWUpWRIqSCTyhnhzYVlAoeKgWx VksTSdeKgskKwZTDGxOgUCznR6UfQ1WaX3ot8fwOQsqTj7kB7ME9uDa3q7zO/VzK+wVE u2nGFVbEGN2VPGHy0zlDs3s3pquPTkLCnZJ4g= MIME-Version: 1.0 Received: by 10.90.66.14 with SMTP id o14mr4662848aga.73.1244367301070; Sun, 07 Jun 2009 02:35:01 -0700 (PDT) In-Reply-To: References: Date: Sun, 7 Jun 2009 17:35:01 +0800 Message-ID: From: Bean To: The development of GRUB 2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [PATCH] savedefault 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, 07 Jun 2009 09:35:08 -0000 Hi, Actually, I'm thinking about a more generic method to implement this feature with events. The menu viewer fire events at certain circumstance, and we can configure the commands to execute. For example, we could have a menu.select event fire when a menu item is selected, and use something like this in grub.cfg: event add menu.select save_env saved_entry Command "save_env saved_entry" would be run automatically, no need to patch up the menu items. One advantage with the event model is that it can handle password at the same time, for example, we could write something like this: event add menu.select_check password event add menu.commandline_check password password command is run when user tries to select the menu item or enter command line. On Mon, Jun 1, 2009 at 6:48 PM, Vladimir 'phcoder' Serbinenko wrote: > Hello. Here is a long-awaited savedefault patch. Works correctly only > if my scripting fix is applied > > -- > Regards > Vladimir 'phcoder' Serbinenko > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel > > -- Bean