From 68e7fc7aa887075fd4160f2db9532d4b30de3408 Mon Sep 17 00:00:00 2001 From: robertmh Date: Thu, 20 Mar 2008 21:00:15 +0000 Subject: [PATCH] 2008-03-20 Robert Millan Remove 2 TiB limit in ata.mod. * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t. (grub_ata_dumpinfo): Print sector count with 0x%llx. (grub_ata_identify): Interpret `&info16[100]' as a pointer to grub_uint64_t instead of grub_uint32_t. --- ChangeLog | 8 ++++++++ disk/ata.c | 7 +++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index c50e59224..5f411de40 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-03-20 Robert Millan + + Remove 2 TiB limit in ata.mod. + * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t. + (grub_ata_dumpinfo): Print sector count with 0x%llx. + (grub_ata_identify): Interpret `&info16[100]' as a pointer to + grub_uint64_t instead of grub_uint32_t. + 2008-03-05 Bean * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function. diff --git a/disk/ata.c b/disk/ata.c index 30dea7918..90ed0e101 100644 --- a/disk/ata.c +++ b/disk/ata.c @@ -86,7 +86,7 @@ struct grub_ata_device grub_ata_addressing_t addr; /* Sector count. */ - grub_size_t size; + grub_uint64_t size; /* CHS maximums. */ grub_uint16_t cylinders; @@ -214,8 +214,7 @@ grub_ata_dumpinfo (struct grub_ata_device *dev, char *info) grub_printf ("Model: %s\n", text); grub_printf ("Addressing: %d\n", dev->addr); - grub_printf ("#sectors: %d\n", dev->size); - + grub_printf ("#sectors: 0x%llx\n", dev->size); } static grub_err_t @@ -315,7 +314,7 @@ grub_ata_identify (struct grub_ata_device *dev) if (dev->addr != GRUB_ATA_LBA48) dev->size = grub_le_to_cpu32(*((grub_uint32_t *) &info16[60])); else - dev->size = grub_le_to_cpu64(*((grub_uint32_t *) &info16[100])); + dev->size = grub_le_to_cpu64(*((grub_uint64_t *) &info16[100])); /* Read CHS information. */ dev->cylinders = info16[1];