From c66d641020fd1fa502151fe911957ac5f29251ac Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Wed, 29 Feb 2012 15:17:59 +0100 Subject: [PATCH] * grub-core/kern/emu/hostdisk.c (grub_util_get_fd_sectors) [__APPLE__]: Add blocksize retrieval. --- ChangeLog | 5 +++++ grub-core/kern/emu/hostdisk.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 13e48acf9..12a76b551 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-02-29 Vladimir Serbinenko + + * grub-core/kern/emu/hostdisk.c (grub_util_get_fd_sectors) [__APPLE__]: + Add blocksize retrieval. + 2012-02-29 Vladimir Serbinenko * configure.ac: Restore CFLAGS after efiemu check. diff --git a/grub-core/kern/emu/hostdisk.c b/grub-core/kern/emu/hostdisk.c index 6c903d495..5b588a652 100644 --- a/grub-core/kern/emu/hostdisk.c +++ b/grub-core/kern/emu/hostdisk.c @@ -283,6 +283,9 @@ grub_util_get_fd_sectors (int fd, const char *name, unsigned *log_secsize) # if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) if (ioctl (fd, DIOCGSECTORSIZE, §or_size)) goto fail; +# elif defined(__APPLE__) + if (ioctl (fd, DKIOCGETBLOCKSIZE, §or_size)) + goto fail; # elif defined(__sun__) sector_size = minfo.dki_lbsize; # elif defined(__NetBSD__)