mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-21 06:49:35 +00:00
* grub-core/commands/gptsync.c (lba_to_chs): Use proper types rather
than int.
This commit is contained in:
1 parent
af81ed880d
commit
a105d3755b
2 files changed
+8
-3
No files matched your search
@@ -37,11 +37,11 @@ GRUB_MOD_LICENSE ("GPLv3+");
|
||||
Is it a problem?
|
||||
*/
|
||||
static void
|
||||
lba_to_chs (int lba, grub_uint8_t *cl, grub_uint8_t *ch,
|
||||
lba_to_chs (grub_uint32_t lba, grub_uint8_t *cl, grub_uint8_t *ch,
|
||||
grub_uint8_t *dh)
|
||||
{
|
||||
int cylinder, head, sector;
|
||||
int sectors = 63, heads = 255, cylinders = 1024;
|
||||
grub_uint32_t cylinder, head, sector;
|
||||
grub_uint32_t sectors = 63, heads = 255, cylinders = 1024;
|
||||
|
||||
sector = lba % sectors + 1;
|
||||
head = (lba / sectors) % heads;
|
||||
|
||||
Reference in new issue
Block a user