diff --git a/ChangeLog b/ChangeLog index dd5d28063..299d51b4d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-10-25 Vladimir Serbinenko + + * grub-core/commands/gptsync.c (lba_to_chs): Use proper types rather + than int. + 2013-10-25 Vladimir Serbinenko * conf/Makefile.common (CPPFLAGS_KERNEL): Add -DGRUB_KERNEL=1. diff --git a/grub-core/commands/gptsync.c b/grub-core/commands/gptsync.c index 1a203dc59..3db62887b 100644 --- a/grub-core/commands/gptsync.c +++ b/grub-core/commands/gptsync.c @@ -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;