mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-19 14:31:48 +01:00
Implement efidp_size
efidp_size will return the size, in bytes, of a EFI device path structure. This is a convenience wrapper in the same style as the other linux routines. It's implemented by GetDevicePathSize from EDK2 we already needed for other things. Sponsored by: Netflix
This commit is contained in:
parent
1d21184075
commit
1028a2d4b3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=323259
@ -2430,3 +2430,9 @@ efidp_format_device_path(char *buf, size_t len, const_efidp dp, ssize_t max)
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
size_t
|
||||
efidp_size(const_efidp dp)
|
||||
{
|
||||
return GetDevicePathSize(__DECONST(EFI_DEVICE_PATH_PROTOCOL *, dp));
|
||||
}
|
||||
|
@ -62,4 +62,6 @@ ssize_t efidp_format_device_path(char *buf, size_t len, const_efidp dp,
|
||||
ssize_t max);
|
||||
ssize_t efidp_parse_device_path(char *path, efidp out, size_t max);
|
||||
|
||||
size_t efidp_size(const_efidp);
|
||||
|
||||
#endif /* _EFIVAR_DP_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user