]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2008-02-08 Robert Millan <rmh@aybabtu.com>
authorrobertmh <robertmh@localhost>
Fri, 8 Feb 2008 12:22:51 +0000 (12:22 +0000)
committerrobertmh <robertmh@localhost>
Fri, 8 Feb 2008 12:22:51 +0000 (12:22 +0000)
        * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
        grub_dprintf() calls.
        * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
        error message.

ChangeLog
disk/raid.c
kern/disk.c

index 3ce2e2aa62fd51bf95fe11aee26d73855cd0df5d..6f29be1b7d28c8f83d33f2f1fcae02f845c6bc97 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-02-08  Robert Millan  <rmh@aybabtu.com>
+
+       * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
+       grub_dprintf() calls.
+       * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
+       error message.
+
 2008-02-07  Christian Franke  <franke@computer.org>
 
        * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
index db7bb98d27fba8e26a7bbdc729f04ef5778d8f60..217742990af3e2ca939d395aae2b9b97459d09dd 100644 (file)
@@ -86,6 +86,8 @@ grub_raid_open (const char *name, grub_disk_t disk)
   disk->id = array->number;
   disk->data = array;
 
+  grub_dprintf ("raid", "%s: total_devs=%d, disk_size=%d\n", name, array->total_devs, array->disk_size);
+
   switch (array->level)
     {
     case 0:
@@ -101,6 +103,8 @@ grub_raid_open (const char *name, grub_disk_t disk)
       disk->total_sectors = (array->total_devs - 1) * array->disk_size;
       break;
     }
+
+  grub_dprintf ("raid", "%s: level=%d, total_sectors=%d\n", name, array->level, disk->total_sectors);
   
   return 0;
 }
@@ -332,6 +336,8 @@ grub_raid_scan_device (const char *name)
   struct grub_raid_super_09 sb;
   struct grub_raid_array *p, *array = NULL;
 
+  grub_dprintf ("raid", "Scanning for RAID devices\n");
+
   disk = grub_disk_open (name);
   if (!disk)
     return 0;
@@ -488,6 +494,8 @@ grub_raid_scan_device (const char *name)
 
       grub_sprintf (array->name, "md%d", array->number);
 
+      grub_dprintf ("raid", "Found array: %s\n", array->name);
+
       /* Add our new array to the list.  */
       array->next = array_list;
       array_list = array;
index afbdbb05d0a7002d8d40d75b3e4fd1c74127183e..2529e8075110614b4df5d4ec45399b522da3b13f 100644 (file)
@@ -367,8 +367,8 @@ grub_disk_read (grub_disk_t disk, grub_disk_addr_t sector,
   if (grub_disk_check_range (disk, &sector, &offset, size) != GRUB_ERR_NONE)
     {
       grub_error_push ();
-      grub_dprintf ("disk", "Read out of range: sector 0x%llx.\n",
-                   (unsigned long long) sector);
+      grub_dprintf ("disk", "Read out of range: sector 0x%llx (%s).\n",
+                   (unsigned long long) sector, grub_errmsg);
       grub_error_pop ();
       return grub_errno;
     }