diff options
author | Michael Brown <mcb30@ipxe.org> | 2023-01-23 19:07:35 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2023-01-23 19:27:11 +0000 |
commit | 204d39222a0ff9f91fdffc2809de0b7f5aaabbae (patch) | |
tree | 64e2faac8d8d6141a54c867482cd3b36755ea06d /src/include | |
parent | fcfb70bfb2a9aae78e86a2505669068e7e511f79 (diff) | |
download | ipxe-204d39222a0ff9f91fdffc2809de0b7f5aaabbae.tar.gz |
[efi] Add efi_path_terminate() utility function
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/ipxe/efi/efi_path.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/include/ipxe/efi/efi_path.h b/src/include/ipxe/efi/efi_path.h index 9dea74b5a..98b922ac1 100644 --- a/src/include/ipxe/efi/efi_path.h +++ b/src/include/ipxe/efi/efi_path.h @@ -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 * |