X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=src%2Fboot%2Fefi%2Fmeasure.c;h=f43039b1b3202c3cf29dbbe2cea74d0142eb8981;hb=53e1b683907c2f12330f00feb9630150196f064d;hp=4ac11a9bb05fe7a932b696c7aef40a9d0333825f;hpb=763368943a7154e003f4cf949084564bdc4206ca;p=thirdparty%2Fsystemd.git diff --git a/src/boot/efi/measure.c b/src/boot/efi/measure.c index 4ac11a9bb05..f43039b1b32 100644 --- a/src/boot/efi/measure.c +++ b/src/boot/efi/measure.c @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: LGPL-2.1+ */ /* * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by @@ -11,7 +12,7 @@ * */ -#ifdef SD_BOOT_LOG_TPM +#if ENABLE_TPM #include #include @@ -199,7 +200,7 @@ static EFI_STATUS tpm1_measure_to_pcr_and_event_log(const EFI_TCG *tcg, UINT32 p event_number = 1; status = uefi_call_wrapper(tcg->HashLogExtendEvent, 7, - tcg, buffer, buffer_size, TCG_ALG_SHA, tcg_event, &event_number, &event_log_last); + (EFI_TCG *) tcg, buffer, buffer_size, TCG_ALG_SHA, tcg_event, &event_number, &event_log_last); if (EFI_ERROR(status)) return status; @@ -219,7 +220,7 @@ static EFI_STATUS tpm1_measure_to_pcr_and_event_log(const EFI_TCG *tcg, UINT32 p */ static EFI_STATUS trigger_tcg2_final_events_table(const EFI_TCG2 *tcg) { - return uefi_call_wrapper(tcg->GetEventLog, 5, tcg, + return uefi_call_wrapper(tcg->GetEventLog, 5, (EFI_TCG2 *) tcg, EFI_TCG2_EVENT_LOG_FORMAT_TCG_2, NULL, NULL, NULL); } @@ -254,7 +255,7 @@ static EFI_STATUS tpm2_measure_to_pcr_and_event_log(const EFI_TCG2 *tcg, UINT32 CopyMem((VOID *) tcg_event->Event, (VOID *) description, desc_len); - status = uefi_call_wrapper(tcg->HashLogExtendEvent, 5, tcg, 0, buffer, buffer_size, tcg_event); + status = uefi_call_wrapper(tcg->HashLogExtendEvent, 5, (EFI_TCG2 *) tcg, 0, buffer, buffer_size, tcg_event); uefi_call_wrapper(BS->FreePool, 1, tcg_event);