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:
Glenn Washburn authored and Daniel Kiper committed 2022-07-04 14:43:26 +02:00
1 parent a79c567f6b
commit 351c9c2fd0
17 files changed
+17 -58

No files matched your search

+1 -5
View File
@@ -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;