]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/normal/misc.c (grub_normal_print_device_info): Show
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sun, 12 Sep 2010 18:18:50 +0000 (20:18 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sun, 12 Sep 2010 18:18:50 +0000 (20:18 +0200)
partition size and offset.

ChangeLog
grub-core/normal/misc.c

index 2eaee5571f376b2f9055058f39bb027874e80868..7d957c5cf0927d1810f0e64a113c1e3e076d94fb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-09-12  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/normal/misc.c (grub_normal_print_device_info): Show
+       partition size and offset.
+
 2010-09-12  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * grub-core/commands/wildcard.c (make_regex): Escape brackets.
index 2b84b1c82ad9482bf16f2bb4de223907e8629bfa..ad408074b02da6d07ee8f33eb18fc184c9b91fad 100644 (file)
@@ -26,6 +26,7 @@
 #include <grub/datetime.h>
 #include <grub/term.h>
 #include <grub/i18n.h>
+#include <grub/partition.h>
 
 /* Print the information on the device NAME.  */
 grub_err_t
@@ -112,6 +113,16 @@ grub_normal_print_device_info (const char *name)
       else
        grub_printf ("%s", _("Partition table"));
 
+      if (dev->disk->partition)
+       grub_printf (_(" - Partition start at %u"),
+                    grub_partition_get_start (dev->disk->partition));
+      if (grub_disk_get_size (dev->disk) == GRUB_DISK_SIZE_UNKNOWN)
+       grub_printf (_(" - Total size unknown"),
+                    grub_disk_get_size (dev->disk));
+      else
+       grub_printf (_(" - Total size %u sectors"),
+                    grub_disk_get_size (dev->disk));
+
       grub_device_close (dev);
     }