diff --git a/src/add-ons/kernel/partitioning_systems/efi/efi_gpt.cpp b/src/add-ons/kernel/partitioning_systems/efi/efi_gpt.cpp index 28f1d303f3..5df649a328 100644 --- a/src/add-ons/kernel/partitioning_systems/efi/efi_gpt.cpp +++ b/src/add-ons/kernel/partitioning_systems/efi/efi_gpt.cpp @@ -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 efi_gpt_free_partition_content_cookie(partition_data *partition) { @@ -1222,7 +1229,7 @@ partition_module_info gEFIPartitionModule = { // 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, diff --git a/src/add-ons/kernel/partitioning_systems/efi/efi_gpt.h b/src/add-ons/kernel/partitioning_systems/efi/efi_gpt.h index 4436362b47..2de5e9a4d2 100644 --- a/src/add-ons/kernel/partitioning_systems/efi/efi_gpt.h +++ b/src/add-ons/kernel/partitioning_systems/efi/efi_gpt.h @@ -113,7 +113,7 @@ struct efi_partition_entry { void SetBlockCount(uint64 blockCount) { SetEndBlock(StartBlock() + blockCount - 1); } uint64 BlockCount() const - { return EndBlock() - StartBlock(); } + { return EndBlock() - StartBlock() + 1; } } _PACKED; #endif /* EFI_GPT_H */