diff options
Diffstat (limited to 'src/include/ipxe/efi/efi_path.h')
-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 9dea74b5..98b922ac 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 * |