grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

patch for [xfs, grub-probe -t fs] and a question about lvm


From: Adrian Migraso
Subject: patch for [xfs, grub-probe -t fs] and a question about lvm
Date: Thu, 28 Feb 2008 13:12:08 +0800

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, &sector, &offset, size) != GRUB_ERR_NONE)
+  grub_errno = grub_disk_check_range (disk, &sector, &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;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]