]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Remove practice of assigning random const pointers to device id.
authorVladimir Serbinenko <phcoder@gmail.com>
Mon, 16 Dec 2013 13:49:11 +0000 (14:49 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Mon, 16 Dec 2013 13:49:11 +0000 (14:49 +0100)
This is not required as cache code already checks driver id as well.

ChangeLog
grub-core/disk/host.c
grub-core/disk/memdisk.c
grub-core/fs/cbfs.c
grub-core/fs/proc.c

index a973b586edda6cbed05c63ef486de0b12585222f..fc976100fb93bec529f250b89d526ceea98cd523 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-12-16  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       Remove practice of assigning random const pointers to device id.
+
+       This is not required as cache code already checks driver id as well.
+
 2013-12-16  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * include/grub/x86_64/types.h: Define sizeof (long) as 4 when compiling
index 69b6f0ea174bff75a6ba4178a1122905d2664bb1..76ef1afb8569dd4e7b79a99dff59bb9e5f3ac524 100644 (file)
@@ -49,7 +49,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 = (unsigned long) "host";
+  disk->id = 0;
 
   disk->data = 0;
 
index 20c3f02ba34d573b9baec912511369d635826d89..e5ffc01bf0435373379198e89031f7565e96a5c2 100644 (file)
@@ -47,7 +47,7 @@ grub_memdisk_open (const char *name, grub_disk_t disk)
 
   disk->total_sectors = memdisk_size / GRUB_DISK_SECTOR_SIZE;
   disk->max_agglomerate = GRUB_DISK_MAX_MAX_AGGLOMERATE;
-  disk->id = (unsigned long) "mdsk";
+  disk->id = 0;
 
   return GRUB_ERR_NONE;
 }
index 93a38003e0ff8dd40403645ba8820ea94c9ea169..7ad1483610aab2234599d4a8f7fd66cade23ab06 100644 (file)
@@ -291,7 +291,7 @@ grub_cbfsdisk_open (const char *name, grub_disk_t disk)
 
   disk->total_sectors = cbfsdisk_size / GRUB_DISK_SECTOR_SIZE;
   disk->max_agglomerate = GRUB_DISK_MAX_MAX_AGGLOMERATE;
-  disk->id = (unsigned long) "cbfs";
+  disk->id = 0;
 
   return GRUB_ERR_NONE;
 }
index 770721ab9ff283ec8e60e5af80142a2a4d646a2d..a03469ec65b25ca7cb4710c881cc15c390bf2543 100644 (file)
@@ -44,7 +44,7 @@ grub_procdev_open (const char *name, grub_disk_t disk)
       return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "not a procfs disk");
 
   disk->total_sectors = 0;
-  disk->id = (unsigned long) "proc";
+  disk->id = 0;
 
   disk->data = 0;