Manually reimported XNU branch

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2009-11-09 18:43:53 +01:00
parent 32764030b5
commit 1d3c6f1de7
29 changed files with 1128 additions and 633 deletions

View file

@ -31,7 +31,7 @@ SUFFIX (grub_macho_parse) (grub_macho_t macho)
}
if (head.magic != GRUB_MACHO_MAGIC)
{
grub_error (GRUB_ERR_BAD_OS, "Invalid Mach-O " XX "-bit header.");
grub_error (GRUB_ERR_BAD_OS, "Invalid Mach-O 32-bit header.");
macho->offsetXX = -1;
return;
}
@ -94,7 +94,7 @@ SUFFIX (grub_macho_readfile) (grub_macho_t macho, void *dest)
return grub_error (GRUB_ERR_BAD_OS,
"Couldn't read architecture-specific part");
if (grub_file_seek (macho->file, macho->offsetXX) == (grub_off_t) -1)
if (grub_file_seek (macho->file, macho->offset32) == (grub_off_t) -1)
{
grub_error_push ();
return grub_error (GRUB_ERR_BAD_OS,
@ -102,8 +102,8 @@ SUFFIX (grub_macho_readfile) (grub_macho_t macho, void *dest)
}
read = grub_file_read (macho->file, dest,
macho->endXX - macho->offsetXX);
if (read != (grub_ssize_t) (macho->endXX - macho->offsetXX))
macho->end32 - macho->offset32);
if (read != (grub_ssize_t) (macho->end32 - macho->offset32))
{
grub_error_push ();
return grub_error (GRUB_ERR_BAD_OS,