From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1EkqHU-0005Hg-5g for mharc-grub-devel@gnu.org; Fri, 09 Dec 2005 16:59:56 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EkqHQ-0005Gj-Jn for grub-devel@gnu.org; Fri, 09 Dec 2005 16:59:52 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EkqH4-0005Cj-4L for grub-devel@gnu.org; Fri, 09 Dec 2005 16:59:51 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EkqH4-0005Cg-1I for grub-devel@gnu.org; Fri, 09 Dec 2005 16:59:30 -0500 Received: from [157.24.2.30] (helo=smtp1.cc.lut.fi) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EkqII-0003Q0-T7 for grub-devel@gnu.org; Fri, 09 Dec 2005 17:00:47 -0500 Received: from localhost (smtp1 [127.0.0.1]) by smtp1.cc.lut.fi (Postfix) with ESMTP id 64A4370210 for ; Fri, 9 Dec 2005 23:58:25 +0200 (EET) Received: from smtp1.cc.lut.fi ([127.0.0.1]) by localhost (smtp1.cc.lut.fi [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 06992-06 for ; Fri, 9 Dec 2005 23:58:25 +0200 (EET) Received: from [192.168.1.100] (lk4-a-4-1.lnet.lut.fi [157.24.102.107]) by smtp1.cc.lut.fi (Postfix) with ESMTP id 0D783701E4 for ; Fri, 9 Dec 2005 23:58:22 +0200 (EET) Message-ID: <4399FE01.7010402@nic.fi> Date: Fri, 09 Dec 2005 23:58:25 +0200 From: =?UTF-8?B?VmVzYSBKw6TDpHNrZWzDpGluZW4=?= User-Agent: Thunderbird 1.4.1 (Windows/20051006) MIME-Version: 1.0 To: The development of GRUB 2 X-Enigmail-Version: 0.93.0.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by lut.fi Subject: problem in usage of grub_errno... 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: Fri, 09 Dec 2005 21:59:53 -0000 Some folks might have overlooked my earlier post as I wrote it to video subsystem thread. As this problem needs some kind of resolution and it affects larger area of code than just video subsystem it needs to be discussed first. Problem is this: 1. error occures and grub_errno is being set to something else than GRUB_ERR_NONE (0). 2. now some operation needs to read from disk, but it will fail as gurb_errno was set. Real world example: Let's assume that there is a file not found exception. There is graphics mode activated and not all fonts are cached in memory (as is currently the case). Now as file not found exception sets grub_errno to GRUB_ERR_FILE_NOT_FOUND and most likely sets some string to grub_errmsg. All is good so far. But when the actual rendering happens, and font manager tries to read font data from disk it fails, because grub_errno is set. In many place there is code like this "if (grub_errno) return grub_errno;" in file system code and in disk drivers. Now if grub_errno is set else where this code will fail, even if there wasn't really i/o error. There could be other places where before printing out the error message could come another error message and it would replace older error message and it not get users attention. This could at best hide the real problem from user and make it harder for user fixing the issue. This problem _must_ be solved somehow. Either implementing more advanced error reporting system and/or file system & disk code must be corrected. I can try to modify those myself, but I think it would be wise if someone how knows fs/disk code better would fix those.