From 204d39222a0ff9f91fdffc2809de0b7f5aaabbae Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Mon, 23 Jan 2023 19:07:35 +0000 Subject: [efi] Add efi_path_terminate() utility function Signed-off-by: Michael Brown --- src/interface/efi/efi_snp_hii.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/interface/efi/efi_snp_hii.c') diff --git a/src/interface/efi/efi_snp_hii.c b/src/interface/efi/efi_snp_hii.c index 5d5f80cd7..8b65c8a78 100644 --- a/src/interface/efi/efi_snp_hii.c +++ b/src/interface/efi/efi_snp_hii.c @@ -704,9 +704,7 @@ int efi_snp_hii_install ( struct efi_snp_device *snpdev ) { vendor_path->Header.Length[0] = sizeof ( *vendor_path ); efi_snp_hii_random_guid ( &vendor_path->Guid ); path_end = ( ( void * ) ( vendor_path + 1 ) ); - path_end->Type = END_DEVICE_PATH_TYPE; - path_end->SubType = END_ENTIRE_DEVICE_PATH_SUBTYPE; - path_end->Length[0] = sizeof ( *path_end ); + efi_path_terminate ( path_end ); /* Create device path and child handle for HII association */ if ( ( efirc = bs->InstallMultipleProtocolInterfaces ( -- cgit v1.2.3-55-g7522