* disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
* disk/host.c (grub_host_open): Likewise.
* disk/loopback.c (grub_loopback_open): Likewise.
* disk/memdisk.c (grub_memdisk_open): Use a string pointer for
disk->id as in disk/host.c, not a multi-character constant.
2008-04-01 Pavel Roskin <proski@gnu.org>
+ * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
+ * disk/host.c (grub_host_open): Likewise.
+ * disk/loopback.c (grub_loopback_open): Likewise.
+ * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
+ disk->id as in disk/host.c, not a multi-character constant.
+
* util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
later is obsolete, potentially dangerous and sets a bad example.
* util/i386/efi/grub-mkimage.c (make_header): Likewise.
else
disk->total_sectors = dev->size;
- disk->id = (int) dev;
+ disk->id = (unsigned long) dev;
disk->has_partitions = !dev->atapi;
disk->data = dev;
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "not a host disk");
disk->total_sectors = 0;
- disk->id = (int) "host";
+ disk->id = (unsigned long) "host";
disk->has_partitions = 0;
disk->data = 0;
/* Use the filesize for the disk size, round up to a complete sector. */
disk->total_sectors = ((file->size + GRUB_DISK_SECTOR_SIZE - 1)
/ GRUB_DISK_SECTOR_SIZE);
- disk->id = (int) dev;
+ disk->id = (unsigned long) dev;
disk->has_partitions = dev->has_partitions;
disk->data = file;
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "not a memdisk");
disk->total_sectors = memdisk_size / GRUB_DISK_SECTOR_SIZE;
- disk->id = (int) 'mdsk';
+ disk->id = (unsigned long) "mdsk";
disk->has_partitions = 0;
return GRUB_ERR_NONE;