Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Ltjqi-00084C-FY for mharc-grub-devel@gnu.org; Tue, 14 Apr 2009 10:42:56 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ltjqg-000840-N2 for grub-devel@gnu.org; Tue, 14 Apr 2009 10:42:54 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ltjqe-00083E-Lc for grub-devel@gnu.org; Tue, 14 Apr 2009 10:42:53 -0400 Received: from [199.232.76.173] (port=45351 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ltjqe-000834-Gf for grub-devel@gnu.org; Tue, 14 Apr 2009 10:42:52 -0400 Received: from mail.nexedi.com ([91.121.25.85]:53359 helo=nexedi.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ltjqd-0000fG-OP for grub-devel@gnu.org; Tue, 14 Apr 2009 10:42:52 -0400 Received: from [10.8.0.46] (unknown [10.8.0.46]) by nexedi.com (Postfix) with ESMTP id 54F853D9F7 for ; Tue, 14 Apr 2009 16:42:45 +0200 (CEST) From: "Yoshinori K. Okuji" Organization: enbug.org To: The development of GRUB 2 Date: Tue, 14 Apr 2009 23:42:52 +0900 User-Agent: KMail/1.9.10 References: <49DFDAB7.1080009@gmail.com> <49E0BAC7.2030503@gmail.com> <49E2228B.7040600@gmail.com> In-Reply-To: <49E2228B.7040600@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200904142342.52968.okuji@enbug.org> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Re: [PATCH] Preboot 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: Tue, 14 Apr 2009 14:42:54 -0000 On Monday 13 April 2009 02:19:07 phcoder wrote: > What about this one? - ChangeLog, loader.h and loader.c are not consistent. For example, loader.h declares grub_loader_unregister_preboot_hook, but loader.c defines grub_loader_remove_preboot. - I don't understand how preboot_func and preboot_rest_func are different. At least, not obvious. Can you elaborate on them? - This part: + + for (cur = preboots_head; cur; cur = cur->next) + if (err = cur->preboot_func (grub_loader_noreturn)) + { + for (cur = cur->prev; cur; cur = cur->prev) + cur->preboot_rest_func (); + return err; + } You should not set ERR inside the "if" clause. This is against the GNU Coding Standards. The main reason is that it is not friendly to debuggers (as you may not "step" between the assignment and the conditional jump). Regards, Okuji