[efi] Add efi_path_terminate() utility function

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2023-01-23 19:07:35 +00:00
parent fcfb70bfb2
commit 204d39222a
5 changed files with 24 additions and 33 deletions

View File

@@ -21,6 +21,19 @@ struct fcp_description;
struct ib_srp_device;
struct usb_function;
/**
* Terminate device path
*
* @v end End of device path to fill in
*/
static inline void efi_path_terminate ( EFI_DEVICE_PATH_PROTOCOL *end ) {
end->Type = END_DEVICE_PATH_TYPE;
end->SubType = END_ENTIRE_DEVICE_PATH_SUBTYPE;
end->Length[0] = sizeof ( *end );
end->Length[1] = 0;
}
extern EFI_DEVICE_PATH_PROTOCOL *
efi_path_next ( EFI_DEVICE_PATH_PROTOCOL *path );
extern EFI_DEVICE_PATH_PROTOCOL *