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 -3
View File
@@ -147,9 +147,7 @@ grub_util_get_fd_size_os (grub_util_fd_t fd, const char *name, unsigned *log_sec
if (sector_size & (sector_size - 1) || !sector_size)
return -1;
for (log_sector_size = 0;
(1 << log_sector_size) < sector_size;
log_sector_size++);
log_sector_size = grub_log2ull (sector_size);
if (log_secsize)
*log_secsize = log_sector_size;