From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1EWers-0002r2-0O for mharc-grub-devel@gnu.org; Mon, 31 Oct 2005 13:58:52 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EWerp-0002oe-PG for grub-devel@gnu.org; Mon, 31 Oct 2005 13:58:49 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EWero-0002mN-5f for grub-devel@gnu.org; Mon, 31 Oct 2005 13:58:49 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EWero-0002mE-1v for grub-devel@gnu.org; Mon, 31 Oct 2005 13:58:48 -0500 Received: from [145.74.66.11] (helo=mail-cn.han.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EWero-000863-9h for grub-devel@gnu.org; Mon, 31 Oct 2005 13:58:48 -0500 Received: from vscan-cn.han.nl (venus.han.nl [145.74.65.6]) by mail-cn.han.nl (Postfix) with ESMTP id 414B788F5 for ; Mon, 31 Oct 2005 19:58:47 +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 12719-08 for ; Mon, 31 Oct 2005 19:58:46 +0100 (CET) Received: from mail1.han.nl (mail1.han.nl [145.74.103.11]) by mail-cn.han.nl (Postfix) with ESMTP id 65ECA8875 for ; Mon, 31 Oct 2005 19:58:46 +0100 (CET) Received: from localhost.localdomain (mgerards.xs4all.nl [82.92.27.129]) by mail1.han.nl (Postfix) with ESMTP id 36510C045 for ; Mon, 31 Oct 2005 19:58: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> From: Marco Gerards Date: Mon, 31 Oct 2005 19:58:49 +0100 In-Reply-To: <200510310745.19549.okuji@enbug.org> (Yoshinori K. Okuji's message of "Mon, 31 Oct 2005 08:45:19 +0200") Message-ID: <877jbtjyxi.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 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: Mon, 31 Oct 2005 18:58:49 -0000 "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. > BTW, you added lsb.c, but I don't like this very much. On Unix, the testing > command is "test", and "[" is just an aliases, isn't it? I prefer to use > commands/test.c, and register "[" as another name of test. You are right. I am not that familiar with shell scripting, so there might be more stupid mistakes you could all catch. Please tell me about them. Thanks, Marco