mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-20 22:48:22 +00:00
* grub-core/normal/misc.c (grub_normal_print_device_info): Show
partition size and offset.
This commit is contained in:
1 parent
d8a84076ea
commit
2fc8ccb97f
2 files changed
+16
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user