patch-grub-core_kern_emu_hostdisk_c 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. --- grub-2.00.orig/grub-core/kern/emu/hostdisk.c 2012-06-25 10:32:04.000000000 +0200
  2. +++ grub-2.00/grub-core/kern/emu/hostdisk.c 2014-04-06 13:14:06.000000000 +0200
  3. @@ -761,25 +761,6 @@ linux_find_partition (char *dev, grub_di
  4. }
  5. #endif /* __linux__ */
  6. -#if defined(__linux__) && (!defined(__GLIBC__) || \
  7. - ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1))))
  8. - /* Maybe libc doesn't have large file support. */
  9. -grub_err_t
  10. -grub_util_fd_seek (int fd, const char *name, grub_uint64_t off)
  11. -{
  12. - loff_t offset, result;
  13. - static int _llseek (uint filedes, ulong hi, ulong lo,
  14. - loff_t *res, uint wh);
  15. - _syscall5 (int, _llseek, uint, filedes, ulong, hi, ulong, lo,
  16. - loff_t *, res, uint, wh);
  17. -
  18. - offset = (loff_t) off;
  19. - if (_llseek (fd, offset >> 32, offset & 0xffffffff, &result, SEEK_SET))
  20. - return grub_error (GRUB_ERR_BAD_DEVICE, N_("cannot seek `%s': %s"),
  21. - name, strerror (errno));
  22. - return GRUB_ERR_NONE;
  23. -}
  24. -#else
  25. grub_err_t
  26. grub_util_fd_seek (int fd, const char *name, grub_uint64_t off)
  27. {
  28. @@ -790,7 +771,6 @@ grub_util_fd_seek (int fd, const char *n
  29. name, strerror (errno));
  30. return 0;
  31. }
  32. -#endif
  33. static void
  34. flush_initial_buffer (const char *os_dev __attribute__ ((unused)))