From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1EX1TC-0005Be-In for mharc-grub-devel@gnu.org; Tue, 01 Nov 2005 14:06:54 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EX1TA-0005BI-LJ for grub-devel@gnu.org; Tue, 01 Nov 2005 14:06:52 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EX1T9-0005Aj-Mj for grub-devel@gnu.org; Tue, 01 Nov 2005 14:06:52 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EX1T9-0005AQ-HR for grub-devel@gnu.org; Tue, 01 Nov 2005 14:06:51 -0500 Received: from [145.74.66.11] (helo=mail-cn.han.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EX1T9-0004SW-CB for grub-devel@gnu.org; Tue, 01 Nov 2005 14:06:51 -0500 Received: from vscan-cn.han.nl (venus.han.nl [145.74.65.6]) by mail-cn.han.nl (Postfix) with ESMTP id 200DA8778 for ; Tue, 1 Nov 2005 20:06:50 +0100 (CET) Received: from mail-cn.han.nl ([145.74.66.11]) by vscan-cn.han.nl (venus.han.nl [145.74.65.6]) (amavisd-new, port 10024) with ESMTP id 00872-09; Tue, 1 Nov 2005 20:06:47 +0100 (CET) Received: from mail1.han.nl (mail1.han.nl [145.74.103.11]) by mail-cn.han.nl (Postfix) with ESMTP id 6E60E8B96; Tue, 1 Nov 2005 20:06:47 +0100 (CET) Received: from localhost.localdomain (mgerards.xs4all.nl [82.92.27.129]) by mail1.han.nl (Postfix) with ESMTP id EE547C04A; Tue, 1 Nov 2005 20:06:46 +0100 (CET) Mail-Copies-To: metgerards@student.han.nl To: The development of GRUB 2 References: <87u0f0t30k.fsf@student.han.nl> <871x22hg2x.fsf@student.han.nl> <200510310745.19549.okuji@enbug.org> <877jbtjyxi.fsf@student.han.nl> From: Marco Gerards Date: Tue, 01 Nov 2005 20:06:48 +0100 In-Reply-To: <877jbtjyxi.fsf@student.han.nl> (Marco Gerards's message of "Mon, 31 Oct 2005 19:58:49 +0100") Message-ID: <874q6wjign.fsf@student.han.nl> User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new (2.2.0) at vscan-cn.han.nl Cc: Subject: Re: Scripting support (PATCH) 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, 01 Nov 2005 19:06:53 -0000 Marco Gerards writes: > "Yoshinori K. Okuji" writes: > >> On Sunday 30 October 2005 10:04 pm, Marco Gerards wrote: >>> > I really don't like that each command has to explicitly set RESULT. As >>> > you note, it would be better if the return code from the command were >>> > automatically placed into the status environment variable. >>> >>> Most command return grub_err_t. The only commands that matter for us >>> are commands like `['. Would you propose every commands returns an >>> int and that on function return grub_errno is checked? >> >> I agree with Hollis. It should be automatic. What is wrong with setting $? to >> grub_errno? Isn't it enough to see if it is GRUB_ERR_NONE or not? > > Perhaps there is no problem with that. I just assumed it should be an > int. I will make this change. To which value should grub_err_t be set on function return in the case of the test command? I could add a new error `GRUB_ERR_TEST_RESULT' and make it 1. I would prefer some better suggestion though :). -- Marco