merge mainline into 4096
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 23 Jun 2011 02:08:37 +0000 (04:08 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 23 Jun 2011 02:08:37 +0000 (04:08 +0200)
1  2 
grub-core/disk/i386/pc/biosdisk.c
grub-core/disk/scsi.c
grub-core/kern/emu/hostdisk.c
grub-core/partmap/msdos.c
include/grub/disk.h

@@@ -510,12 -503,10 +512,12 @@@ grub_biosdisk_rw (int cmd, grub_disk_t 
  
  /* Return the number of sectors which can be read safely at a time.  */
  static grub_size_t
 -get_safe_sectors (grub_disk_addr_t sector, grub_uint32_t sectors)
 +get_safe_sectors (grub_disk_t disk, grub_disk_addr_t sector)
  {
    grub_size_t size;
-   grub_uint32_t offset;
+   grub_uint64_t offset;
 +  struct grub_biosdisk_data *data = disk->data;
 +  grub_uint32_t sectors = data->sectors;
  
    /* OFFSET = SECTOR % SECTORS */
    grub_divmod64 (sector, sectors, &offset);
Simple merge
@@@ -884,11 -914,9 +928,10 @@@ grub_util_biosdisk_read (grub_disk_t di
         sectors that are read together with the MBR in one read.  It
         should only remap the MBR, so we split the read in two
         parts. -jochen  */
 -      if (nread (fd, buf, GRUB_DISK_SECTOR_SIZE) != GRUB_DISK_SECTOR_SIZE)
 +      if (nread (fd, buf, (1 << disk->log_sector_size))
 +        != (1 << disk->log_sector_size))
        {
          grub_error (GRUB_ERR_READ_ERROR, "cannot read `%s'", map[disk->id].device);
-         close (fd);
          return grub_errno;
        }
  
Simple merge
Simple merge