* grub-core/commands/gptsync.c (lba_to_chs): Use proper types rather
than int.
This commit is contained in:
parent
af81ed880d
commit
a105d3755b
2 changed files with 8 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2013-10-25 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/commands/gptsync.c (lba_to_chs): Use proper types rather
|
||||||
|
than int.
|
||||||
|
|
||||||
2013-10-25 Vladimir Serbinenko <phcoder@gmail.com>
|
2013-10-25 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* conf/Makefile.common (CPPFLAGS_KERNEL): Add -DGRUB_KERNEL=1.
|
* conf/Makefile.common (CPPFLAGS_KERNEL): Add -DGRUB_KERNEL=1.
|
||||||
|
|
|
@ -37,11 +37,11 @@ GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
Is it a problem?
|
Is it a problem?
|
||||||
*/
|
*/
|
||||||
static void
|
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)
|
grub_uint8_t *dh)
|
||||||
{
|
{
|
||||||
int cylinder, head, sector;
|
grub_uint32_t cylinder, head, sector;
|
||||||
int sectors = 63, heads = 255, cylinders = 1024;
|
grub_uint32_t sectors = 63, heads = 255, cylinders = 1024;
|
||||||
|
|
||||||
sector = lba % sectors + 1;
|
sector = lba % sectors + 1;
|
||||||
head = (lba / sectors) % heads;
|
head = (lba / sectors) % heads;
|
||||||
|
|
Loading…
Reference in a new issue