]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2008-04-01 Pavel Roskin <proski@gnu.org>
authorproski <proski@localhost>
Wed, 2 Apr 2008 04:25:41 +0000 (04:25 +0000)
committerproski <proski@localhost>
Wed, 2 Apr 2008 04:25:41 +0000 (04:25 +0000)
* 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.

ChangeLog
disk/ata.c
disk/host.c
disk/loopback.c
disk/memdisk.c

index 04211e958fc545489c56b618b5aef955d376dc50..99ec49b6d5695af83d6b1363522e4c33c2a68c44 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 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.
index 90ed0e10108134a83267c317c2eb1e3b814fdec1..e75af9031d4595512b4ca2aa9572d657dfb78bed 100644 (file)
@@ -615,7 +615,7 @@ grub_ata_open (const char *name, grub_disk_t disk)
   else
     disk->total_sectors = dev->size;
 
-  disk->id = (int) dev;
+  disk->id = (unsigned long) dev;
   
   disk->has_partitions = !dev->atapi;
   disk->data = dev;
index ccd41016930fa54d0128848d2cbf0b83157b5b23..bb8828a6c1551ebb5352a9e238d1d2c543c5c09a 100644 (file)
@@ -41,7 +41,7 @@ grub_host_open (const char *name, grub_disk_t disk)
       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;
index 521c710f881360455a1f847b909ca5c6bf9548a2..709c422dfe074fcad0828129d5c3d8095b5d1883 100644 (file)
@@ -177,7 +177,7 @@ grub_loopback_open (const char *name, grub_disk_t disk)
   /* 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;
index c77eef174e824c4476ceba610c5302706f02a0db..840ef369c25786ce34348c359ac17cf5eced3dcf 100644 (file)
@@ -41,7 +41,7 @@ grub_memdisk_open (const char *name, grub_disk_t disk)
       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;