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
c6beecfb44
commit
18f0e7a9b6
@ -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…
x
Reference in New Issue
Block a user