[Haiku-commits] r31069 - haiku/trunk/src/add-ons/kernel/partitioning_systems/efi
stippi at mail.berlios.de
stippi at mail.berlios.de
Tue Jun 16 12:38:29 CEST 2009
Author: stippi
Date: 2009-06-16 12:38:25 +0200 (Tue, 16 Jun 2009)
New Revision: 31069
ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31069&view=rev
Modified:
haiku/trunk/src/add-ons/kernel/partitioning_systems/efi/efi_gpt.cpp
haiku/trunk/src/add-ons/kernel/partitioning_systems/efi/efi_gpt.h
Log:
* 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().
Modified: haiku/trunk/src/add-ons/kernel/partitioning_systems/efi/efi_gpt.cpp
===================================================================
--- haiku/trunk/src/add-ons/kernel/partitioning_systems/efi/efi_gpt.cpp 2009-06-16 00:25:36 UTC (rev 31068)
+++ haiku/trunk/src/add-ons/kernel/partitioning_systems/efi/efi_gpt.cpp 2009-06-16 10:38:25 UTC (rev 31069)
@@ -506,6 +506,13 @@
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
efi_gpt_free_partition_content_cookie(partition_data *partition)
{
delete (EFI::Header *)partition->content_cookie;
@@ -1222,7 +1229,7 @@
// scanning
efi_gpt_identify_partition,
efi_gpt_scan_partition,
- NULL, // free_identify_partition_cookie
+ efi_gpt_free_identify_partition_cookie,
NULL, // free_partition_cookie
efi_gpt_free_partition_content_cookie,
Modified: haiku/trunk/src/add-ons/kernel/partitioning_systems/efi/efi_gpt.h
===================================================================
--- haiku/trunk/src/add-ons/kernel/partitioning_systems/efi/efi_gpt.h 2009-06-16 00:25:36 UTC (rev 31068)
+++ haiku/trunk/src/add-ons/kernel/partitioning_systems/efi/efi_gpt.h 2009-06-16 10:38:25 UTC (rev 31069)
@@ -113,7 +113,7 @@
void SetBlockCount(uint64 blockCount)
{ SetEndBlock(StartBlock() + blockCount - 1); }
uint64 BlockCount() const
- { return EndBlock() - StartBlock(); }
+ { return EndBlock() - StartBlock() + 1; }
} _PACKED;
#endif /* EFI_GPT_H */
More information about the Haiku-commits
mailing list