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
@@ -185,9 +185,7 @@ grub_util_get_fd_size (grub_util_fd_t hd, const char *name_in,
size = g.Cylinders.QuadPart;
size *= g.TracksPerCylinder * g.SectorsPerTrack * g.BytesPerSector;
for (log_sector_size = 0;
(1 << log_sector_size) < g.BytesPerSector;
log_sector_size++);
log_sector_size = grub_log2ull (g.BytesPerSector);
}
else
{