From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1L6MeL-0001af-Jt for mharc-grub-devel@gnu.org; Sat, 29 Nov 2008 05:02:05 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L6MeH-0001YU-UT for grub-devel@gnu.org; Sat, 29 Nov 2008 05:02:02 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L6MeG-0001X6-BT for grub-devel@gnu.org; Sat, 29 Nov 2008 05:02:01 -0500 Received: from [199.232.76.173] (port=53709 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L6MeG-0001X1-7g for grub-devel@gnu.org; Sat, 29 Nov 2008 05:02:00 -0500 Received: from mta-out.inet.fi ([195.156.147.13]:59590 helo=kirsi1.inet.fi) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L6MeF-0001hl-Ho for grub-devel@gnu.org; Sat, 29 Nov 2008 05:01:59 -0500 Received: from [192.168.1.102] (84.248.105.254) by kirsi1.inet.fi (8.5.014) id 48FC5AC901D84DE7 for grub-devel@gnu.org; Sat, 29 Nov 2008 12:01:54 +0200 Message-ID: <49311312.2090502@nic.fi> Date: Sat, 29 Nov 2008 12:01:54 +0200 From: =?ISO-8859-1?Q?Vesa_J=E4=E4skel=E4inen?= User-Agent: Thunderbird 2.0.0.18 (Windows/20081105) MIME-Version: 1.0 To: The development of GRUB 2 References: <20081122153509.GA576@thorin> <200811252217.18586.okuji@enbug.org> <20081128193727.GA7980@thorin> In-Reply-To: <20081128193727.GA7980@thorin> X-Enigmail-Version: 0.95.7 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, 3) Subject: Re: [PATCH] (ata.mod) avoid passing grub_errno to upper layer 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: Sat, 29 Nov 2008 10:02:02 -0000 Robert Millan wrote: > On Tue, Nov 25, 2008 at 10:17:17PM +0100, Yoshinori K. Okuji wrote: >> On Saturday 22 November 2008 16:35:09 Robert Millan wrote: >>> When an error is detected by ata.mod during drive scan, it will pass it to >>> the upper layer. This results in GRUB aborting when trying to enter normal >>> mode, even if the error is not critical (e.g. affects a drive not used >>> during boot). >>> >>> There are a number of places in ata.mod where these errors could be >>> handled, so I'm not sure if my proposed change would be the best approach. >>> Some comment would be appreciated. >> This is one way, but I think the upper layer should be more robust against >> errors raised from modules. For example, we can unload a module, and clear >> GRUB_ERRNO, if the init function in this module return an error. > > But if the error is specific to a device unit, unloading the module would > result in all units of this device class being disabled, which is most likely > not what we want. > Perhaps this should then be handled on generic code performing the scan? Just give unique error type and just ignore the error (or dump it to screen) and continue to next device/operation.