~darkmuggle-deactivatedaccount/ubuntu/quantal/grub2/fix-872244

« back to all changes in this revision

Viewing changes to grub-core/disk/scsi.c

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2011-05-17 23:59:10 UTC
  • mto: (17.3.55 sid)
  • mto: This revision was merged to the branch mainline in revision 122.
  • Revision ID: james.westby@ubuntu.com-20110517235910-ma8u889vyjdfro27
Tags: upstream-1.99
ImportĀ upstreamĀ versionĀ 1.99

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
#include <grub/scsicmd.h>
28
28
#include <grub/time.h>
29
29
 
 
30
GRUB_MOD_LICENSE ("GPLv3+");
 
31
 
30
32
 
31
33
static grub_scsi_dev_t grub_scsi_dev_list;
32
34
 
506
508
  if (scsi->blocksize != GRUB_DISK_SECTOR_SIZE)
507
509
    {
508
510
      unsigned spb = scsi->blocksize >> GRUB_DISK_SECTOR_BITS;
509
 
      if (! (spb != 0 && (scsi->blocksize & GRUB_DISK_SECTOR_SIZE) == 0))
 
511
      if (spb == 0 || (scsi->blocksize & (GRUB_DISK_SECTOR_SIZE - 1)) != 0)
510
512
        return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
511
513
                           "unsupported SCSI block size");
512
514