* grub-core/disk/scsi.c (grub_scsi_read_capacity): Renamed to ...

(grub_scsi_read_capacity10): ... this.
	(grub_scsi_read_capacity16): New function.
	(grub_scsi_open): Use read_capacity16 if read_capacity10 returned
	0xffffffff.
	Fix off-by-one error.
	* include/grub/scsi.h (grub_scsi): Rename size to last_block and make it
	64-bit unsigned.
	* include/grub/scsicmd.h (grub_scsi_read_capacity): Rename to ...
	(grub_scsi_read_capacity10): ... this.
	(grub_scsi_read_capacity_data): Rename to ...
	(grub_scsi_read_capacity10_data): ... this. Rename size to last_block.
	(grub_scsi_read_capacity16): New struct.
	(grub_scsi_read_capacity16_data): Likewise.
	(grub_scsi_cmd_t): Rename grub_scsi_cmd_read_capacity to
	grub_scsi_cmd_read_capacity10.
	New command grub_scsi_cmd_read_capacity16.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-01-30 18:33:11 +01:00
parent bc8d0f45a5
commit 9c08ad8707
4 changed files with 102 additions and 18 deletions

View file

@ -94,11 +94,11 @@ struct grub_scsi
/* Set to 0 when not removable, 1 when removable. */
int removable;
/* Size of the device in blocks. */
int size;
/* Size of the device in blocks - 1. */
grub_uint64_t last_block;
/* Size of one block. */
int blocksize;
grub_uint32_t blocksize;
/* Device-specific data. */
void *data;