* grub-core/disk/scsi.c (grub_scsi_read): Fix binary and check and make
logical expression more readable.
This commit is contained in:
parent
e489601ad0
commit
5d4f4dd51b
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2011-01-22 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/disk/scsi.c (grub_scsi_read): Fix binary and check and make
|
||||
logical expression more readable.
|
||||
|
||||
2011-01-22 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/disk/raid.c (insert_array): Ensure uniqueness of p->number
|
||||
|
|
|
@ -506,7 +506,7 @@ grub_scsi_read (grub_disk_t disk, grub_disk_addr_t sector,
|
|||
if (scsi->blocksize != GRUB_DISK_SECTOR_SIZE)
|
||||
{
|
||||
unsigned spb = scsi->blocksize >> GRUB_DISK_SECTOR_BITS;
|
||||
if (! (spb != 0 && (scsi->blocksize & GRUB_DISK_SECTOR_SIZE) == 0))
|
||||
if (spb == 0 || (scsi->blocksize & (GRUB_DISK_SECTOR_SIZE - 1)) != 0)
|
||||
return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
|
||||
"unsupported SCSI block size");
|
||||
|
||||
|
|
Loading…
Reference in a new issue