Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LbKCC-0002Hw-6K for mharc-grub-devel@gnu.org; Sun, 22 Feb 2009 14:41:00 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LbKCB-0002Gf-3u for grub-devel@gnu.org; Sun, 22 Feb 2009 14:40:59 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LbKC9-0002F0-HP for grub-devel@gnu.org; Sun, 22 Feb 2009 14:40:58 -0500 Received: from [199.232.76.173] (port=44139 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LbKC9-0002Eq-Aq for grub-devel@gnu.org; Sun, 22 Feb 2009 14:40:57 -0500 Received: from ti-out-0910.google.com ([209.85.142.185]:6318) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LbKC8-00033s-H9 for grub-devel@gnu.org; Sun, 22 Feb 2009 14:40:57 -0500 Received: by ti-out-0910.google.com with SMTP id j3so1048954tid.10 for ; Sun, 22 Feb 2009 11:40:52 -0800 (PST) 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:cc:content-type :content-transfer-encoding; bh=aAHRaCSR+//2wmnv0nQpSkOVIX4zGrknIuPSv6jtSz4=; b=oeSk7yCSCTB2aYcXftPlIJGeC+mrl1yGGDEj4Rny1bWM1Z77xF7AUgptZWRm4sGmJY TxT617uxYFvrbZzSCMAVHBm4yfk0KD1SV+SxGWr3JBVyL6N9SftTjt4EjYQVCY9xwgtv pvYgcIx1WE8HN/7TSO6A90x6oVtCeFuCfqTZs= 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 :cc:content-type:content-transfer-encoding; b=oII8yBfXYPKowmGCuiyOSS99bQT3wpbz088woTlVKbo+OiTb3xzQF1zJE9wdodLZtf a6arGTeNHL5f249rGrHazqR9EOz41KSu+D10qkFUqz2qvGeuW78T/FuJpBb0p3+PmGrU OEMFyOjytgcwG+gsubPk/vraSrkvx6fyojzIE= MIME-Version: 1.0 Received: by 10.110.63.17 with SMTP id l17mr4603133tia.46.1235331652916; Sun, 22 Feb 2009 11:40:52 -0800 (PST) In-Reply-To: References: <1234624271.3443.2.camel@fz.local> <4997C512.8040808@nic.fi> Date: Mon, 23 Feb 2009 03:40:52 +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) Cc: Subject: Re: [PATCH] Handler 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: Sun, 22 Feb 2009 19:40:59 -0000 Hi, Any comment about this ? On Sun, Feb 15, 2009 at 11:14 PM, Bean wrote: > Hi, > > The new version contains the following changes: > > 1, The handler module register commands terminal_input and > terminal_output. This is for backward compatible of grub.cfg. > Currently, the commands are registered manually, but this process > could be automated with a new command interface design. > > 2, Add a new class, grub_named_list, which represents a named list: > > struct grub_named_list > { > struct grub_named_list *next; > const char *name; > }; > > it also introduce a new function, grub_named_list_find, which can be > used to lookup a object by name. > > The relationship between different class: > > list - named list + - handler + - terminal input > | | > | + - terminal output > + - handler class > > You can use macros like GRUB_AS_LIST, GRUB_AS_NAMED_LIST and > GRUB_AS_HANDLER to cast pointer of a certain class to its ancestors. > > -- > Bean > -- Bean