mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-20 22:48:22 +00:00
disk: Replace code that calculates the log of sector size with grub_log2ull()
Signed-off-by: Glenn Washburn <development@efficientek.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
1 parent
a79c567f6b
commit
351c9c2fd0
17 files changed
+17
-58
No files matched your search
@@ -1023,11 +1023,7 @@ grub_obdisk_open (const char *name, grub_disk_t disk)
|
||||
dev->num_blocks = GRUB_DISK_SIZE_UNKNOWN;
|
||||
|
||||
if (dev->block_size != 0)
|
||||
{
|
||||
for (dev->log_sector_size = 0;
|
||||
(1U << dev->log_sector_size) < dev->block_size;
|
||||
dev->log_sector_size++);
|
||||
}
|
||||
dev->log_sector_size = grub_log2ull (dev->block_size);
|
||||
else
|
||||
dev->log_sector_size = 9;
|
||||
|
||||
|
||||
Reference in new issue
Block a user