2008-08-30 Robert Millan * disk/host.c (grub_host_open): Initialize `disk->id' using a constant rather than a pointer to string. * disk/memdisk.c (grub_memdisk_open): Likewise. * fs/i386/pc/pxe.c (grub_pxe_open): Likewise. * disk/scsi.c (grub_scsi_open): Initialize `disk->id' using the `lun' variable rather than a pointer to string. Index: disk/scsi.c =================================================================== --- disk/scsi.c (revision 1831) +++ disk/scsi.c (working copy) @@ -248,7 +248,7 @@ grub_scsi_open (const char *name, grub_d { if (! p->open (name, scsi)) { - disk->id = (unsigned long) "scsi"; /* XXX */ + disk->id = lun; /* FIXME: are LUNs unique identifiers? */ disk->data = scsi; scsi->dev = p; scsi->lun = lun; Index: disk/host.c =================================================================== --- disk/host.c (revision 1831) +++ disk/host.c (working copy) @@ -41,7 +41,7 @@ grub_host_open (const char *name, grub_d return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "not a host disk"); disk->total_sectors = 0; - disk->id = (unsigned long) "host"; + disk->id = 'host'; disk->has_partitions = 0; disk->data = 0; Index: disk/memdisk.c =================================================================== --- disk/memdisk.c (revision 1831) +++ disk/memdisk.c (working copy) @@ -41,7 +41,7 @@ grub_memdisk_open (const char *name, gru return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "not a memdisk"); disk->total_sectors = memdisk_size / GRUB_DISK_SECTOR_SIZE; - disk->id = (unsigned long) "mdsk"; + disk->id = 'mdsk'; disk->has_partitions = 0; return GRUB_ERR_NONE; Index: fs/i386/pc/pxe.c =================================================================== --- fs/i386/pc/pxe.c (revision 1831) +++ fs/i386/pc/pxe.c (working copy) @@ -63,7 +63,7 @@ grub_pxe_open (const char *name, grub_di return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "not a pxe disk"); disk->total_sectors = 0; - disk->id = (unsigned long) "pxe"; + disk->id = 'pxe'; disk->has_partitions = 0; disk->data = 0;