Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JUchp-0003NG-8c for mharc-grub-devel@gnu.org; Thu, 28 Feb 2008 01:57:25 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JUchn-0003Mh-Sf for grub-devel@gnu.org; Thu, 28 Feb 2008 01:57:23 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JUchm-0003LK-Hz for grub-devel@gnu.org; Thu, 28 Feb 2008 01:57:23 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JUchm-0003L7-8A for grub-devel@gnu.org; Thu, 28 Feb 2008 01:57:22 -0500 Received: from ti-out-0910.google.com ([209.85.142.187]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JUchl-0003IV-Jl for grub-devel@gnu.org; Thu, 28 Feb 2008 01:57:21 -0500 Received: by ti-out-0910.google.com with SMTP id a20so2775784tia.10 for ; Wed, 27 Feb 2008 22:57:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=Ak5vLKzoAhRk3eGvo3TgBnRSmnC/4hjJFO6l4zRb8Qg=; b=h/1hyjEKFXinLC1VuFlgwSLv61NrFNQ/kqu7dot3ZPfdq9RqS+gTOYylVXbVKq+EukSwx1RJK7T8PKHsyJK+W4qqpYUunS2muHIvZ9+woZD9PISAMUn8yoT4UCIqT1WzkQQqgg+gVs/odg7DCY1Vn5clCuE8F3CclK4dtrIVXqo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=SzdvIgimB8OsVBmG7rCdVZqNNsN2MZxJRqqma2iTbQ/jUNzw+1NqhC8YkgXSD1tOubb7OY6L9XB2lUw8YTV/rjcgX7DWmDsws0kPuNR4rwc9XBDiycZTb2uzWXJcZuYlN3xN1GMUf7b3SpZYdWHBwVK7UQtCUsXsLK+0u/QnTK4= Received: by 10.110.17.6 with SMTP id 6mr6864543tiq.0.1204181838692; Wed, 27 Feb 2008 22:57:18 -0800 (PST) Received: by 10.110.20.10 with HTTP; Wed, 27 Feb 2008 22:57:18 -0800 (PST) Message-ID: Date: Thu, 28 Feb 2008 14:57:18 +0800 From: Bean To: "The development of GRUB 2" In-Reply-To: <00b201c879c8$7a2f00e0$9300a8c0@outsourcing.local> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <00b201c879c8$7a2f00e0$9300a8c0@outsourcing.local> X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) Subject: Re: patch for [xfs, grub-probe -t fs] and a question about lvm 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: Thu, 28 Feb 2008 06:57:24 -0000 On Thu, Feb 28, 2008 at 1:12 PM, Adrian Migraso wrote: > > > hi... can we add this patch... at least the first patch @ lines 249, i was > trying to grub-probe the xfs filesystem under the lvm, and got some error... > > Also,... i have been trying to use the lvm.mod with the grub, the problem > is, my logical volumes are not detected by 'ls' command during grub resucue> > > is lvm.mod ok? > > can i have a peek of how grub2 works? I mean its flow... thanks guys... > > > --- 20080226/grub2/kern/disk.c 2008-02-08 12:22:51.000000000 +0000 > +++ grub2/kern/disk.c 2008-02-26 15:58:58.000000000 +0000 > @@ -246,7 +246,8 @@ > > for (dev = grub_disk_dev_list; dev; dev = dev->next) > { > - if ((dev->open) (raw, disk) == GRUB_ERR_NONE) > + grub_errno = (dev->open) (raw, disk); > + if (grub_errno == GRUB_ERR_NONE) > break; > else if (grub_errno == GRUB_ERR_UNKNOWN_DEVICE) > grub_errno = GRUB_ERR_NONE; > @@ -364,7 +365,8 @@ > grub_dprintf ("disk", "Reading `%s'...\n", disk->name); > > /* First of all, check if the region is within the disk. */ > - if (grub_disk_check_range (disk, §or, &offset, size) != > GRUB_ERR_NONE) > + grub_errno = grub_disk_check_range (disk, §or, &offset, size); > + if (grub_errno != GRUB_ERR_NONE) > { > grub_error_push (); > grub_dprintf ("disk", "Read out of range: sector 0x%llx (%s).\n", > @@ -407,9 +409,9 @@ > else > { > /* Otherwise read data from the disk actually. */ > - if ((disk->dev->read) (disk, start_sector, > - GRUB_DISK_CACHE_SIZE, tmp_buf) > - != GRUB_ERR_NONE) > + grub_errno = (disk->dev->read) (disk, start_sector, > + GRUB_DISK_CACHE_SIZE, tmp_buf); > + if (grub_errno != GRUB_ERR_NONE) > { > /* Uggh... Failed. Instead, just read necessary data. */ > unsigned num; It's generally not a good idea to set grub_errno directly, have you got a reason to do so ? -- Bean