* grub-core/normal/misc.c (grub_normal_print_device_info): Use KiB to display
sizes and display sector size.
This commit is contained in:
parent
d55ffb0249
commit
28d468d6f2
2 changed files with 13 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
|||
2013-02-25 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/normal/misc.c (grub_normal_print_device_info): Use KiB to display
|
||||
sizes and display sector size.
|
||||
|
||||
2013-02-24 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
Implement new command cmosdump.
|
||||
|
|
|
@ -117,13 +117,17 @@ grub_normal_print_device_info (const char *name)
|
|||
grub_printf ("%s", _("No known filesystem detected"));
|
||||
|
||||
if (dev->disk->partition)
|
||||
grub_printf (_(" - Partition start at %llu"),
|
||||
(unsigned long long) grub_partition_get_start (dev->disk->partition));
|
||||
grub_printf (_(" - Partition start at %llu%sKiB"),
|
||||
(unsigned long long) (grub_partition_get_start (dev->disk->partition) >> 1),
|
||||
(grub_partition_get_start (dev->disk->partition) & 1) ? ".5" : "" );
|
||||
else
|
||||
grub_printf_ (N_(" - Sector size %uB"), 1 << dev->disk->log_sector_size);
|
||||
if (grub_disk_get_size (dev->disk) == GRUB_DISK_SIZE_UNKNOWN)
|
||||
grub_puts_ (N_(" - Total size unknown"));
|
||||
else
|
||||
grub_printf (_(" - Total size %llu sectors"),
|
||||
(unsigned long long) grub_disk_get_size (dev->disk));
|
||||
grub_printf (_(" - Total size %llu%sKiB"),
|
||||
(unsigned long long) (grub_disk_get_size (dev->disk) >> 1),
|
||||
(grub_disk_get_size (dev->disk) & 1) ? ".5" : "");
|
||||
|
||||
grub_device_close (dev);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue