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_block.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/interface/efi/efi_block.c') diff --git a/src/interface/efi/efi_block.c b/src/interface/efi/efi_block.c index 74cf7c0c0..cb73260d5 100644 --- a/src/interface/efi/efi_block.c +++ b/src/interface/efi/efi_block.c @@ -582,9 +582,7 @@ static int efi_block_boot_image ( struct san_device *sandev, EFI_HANDLE handle, sizeof ( efi_block_boot_filename ) ); } end = ( ( ( void * ) filepath ) + filepath_len ); - end->Type = END_DEVICE_PATH_TYPE; - end->SubType = END_ENTIRE_DEVICE_PATH_SUBTYPE; - end->Length[0] = sizeof ( *end ); + efi_path_terminate ( end ); DBGC ( sandev, "EFIBLK %#02x trying to load %s\n", sandev->drive, efi_devpath_text ( boot_path ) ); -- cgit v1.2.3-55-g7522