Paper over a coverity issue:
*** CID 1372592: API usage errors (BAD_COMPARE)
/lib/libefivar/efivar-dp-parse.c: 2723 in DevPathFromTextiSCSI()
Truncating the result of "strcmp" to "unsigned short" may cause it
to be misinterpreted as 0. Note that "strcmp" may return an integer
besides -1, 0, or 1.
We do this by making StrCmp return either 0 or 1 for equal or
not-equal. There's a bug in the DevPathFromTextiSCSI cast of the
return value and this workaround will fix it without breaking other
users of StrCmp (all of which test for == 0).
https://bugzilla.tianocore.org/show_bug.cgi?id=440 has been filed
upstream to log this issue.
CID: 1372592
Sponsored by: Netflix
This commit implements the (mostly?) Linux compatible
efidp_format_device_path and efidp_parse_device_path APIs. These are
the only APIs exposed through this library. However, they are built on
code from Tianocore's EDK2 MdePkg. They are brought in as new files
here for reasons described in FreeBSD-update.
Symbol versioning will be introduced to control what's exported from
the EDK2 code.
Some structural changes may be necessary when we move to sharing with
sys/boot/efi.
Sponsored by: Netflix