All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Display the sector size
@ 2013-01-22 18:11 Paulo Flabiano Smorigo/Brazil/IBM
  2013-01-25  9:01 ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 1 reply; 2+ messages in thread
From: Paulo Flabiano Smorigo/Brazil/IBM @ 2013-01-22 18:11 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 169 bytes --]

Hi all,

What about show the disk sector size with the disk info?

-- 
Paulo Flabiano Smorigo
Software Engineer
Linux Technology Center - IBM Systems & Technology Group

[-- Attachment #2: grub_display_sector_size.patch --]
[-- Type: text/x-patch, Size: 1058 bytes --]

=== modified file 'ChangeLog'
--- ChangeLog	2013-01-22 17:54:34 +0000
+++ ChangeLog	2013-01-22 17:59:00 +0000
@@ -1,5 +1,10 @@
 2013-01-22  Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
 
+	* grub-core/normal/misc.c (grub_normal_print_device_info): Display
+	the sector size.
+
+2013-01-22  Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
+
 	Support Openfirmware disks with non-512B sectors.
 
 	* grub-core/disk/ieee1275/ofdisk.c (grub_ofdisk_open): Get the block

=== modified file 'grub-core/normal/misc.c'
--- grub-core/normal/misc.c	2012-05-23 07:10:56 +0000
+++ grub-core/normal/misc.c	2013-01-22 17:55:49 +0000
@@ -119,6 +119,10 @@
       if (dev->disk->partition)
 	grub_printf (_(" - Partition start at %llu"),
 		     (unsigned long long) grub_partition_get_start (dev->disk->partition));
+      
+      if (dev->disk->log_sector_size != 0)
+        grub_printf (_(" - Sector size %u"), 1 << dev->disk->log_sector_size);
+
       if (grub_disk_get_size (dev->disk) == GRUB_DISK_SIZE_UNKNOWN)
 	grub_puts_ (N_(" - Total size unknown"));
       else


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-25  9:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-22 18:11 [PATCH] Display the sector size Paulo Flabiano Smorigo/Brazil/IBM
2013-01-25  9:01 ` Vladimir 'φ-coder/phcoder' Serbinenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.