* Apparently the "free_identify_partition_cookie()" function pointer should

not be NULL. If the intention is to allow this, then there is a bug somewhere
  else. Fixes booting on Macs, thanks to Zenja for testing this!
* Fixed what I believe to be an off-by-one error in BlockCount(). This also
  makes it symetrical with SetBlockCount().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31069 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus
2009-06-16 10:38:25 +00:00
parent 008dd42650
commit 5505e1909c
2 changed files with 9 additions and 2 deletions
@@ -505,6 +505,13 @@ efi_gpt_scan_partition(int fd, partition_data *partition, void *_cookie)
} }
static void
efi_gpt_free_identify_partition_cookie(partition_data *partition, void *_cookie)
{
// Cookie is freed in efi_gpt_free_partition_content_cookie().
}
static void static void
efi_gpt_free_partition_content_cookie(partition_data *partition) efi_gpt_free_partition_content_cookie(partition_data *partition)
{ {
@@ -1222,7 +1229,7 @@ partition_module_info gEFIPartitionModule = {
// scanning // scanning
efi_gpt_identify_partition, efi_gpt_identify_partition,
efi_gpt_scan_partition, efi_gpt_scan_partition,
NULL, // free_identify_partition_cookie efi_gpt_free_identify_partition_cookie,
NULL, // free_partition_cookie NULL, // free_partition_cookie
efi_gpt_free_partition_content_cookie, efi_gpt_free_partition_content_cookie,
@@ -113,7 +113,7 @@ struct efi_partition_entry {
void SetBlockCount(uint64 blockCount) void SetBlockCount(uint64 blockCount)
{ SetEndBlock(StartBlock() + blockCount - 1); } { SetEndBlock(StartBlock() + blockCount - 1); }
uint64 BlockCount() const uint64 BlockCount() const
{ return EndBlock() - StartBlock(); } { return EndBlock() - StartBlock() + 1; }
} _PACKED; } _PACKED;
#endif /* EFI_GPT_H */ #endif /* EFI_GPT_H */