[if gte mso 9]>
Subject: Re: [edk2] NetLibGetMacString
From: "Ye, Ting" <firstname.lastname@example.org>
To: "email@example.com" <firstname.lastname@example.org>
Date: 2012-06-11 09:47:31
Thanks for capturing this. I guess there is a historical reason like some code using ImageHandle is removed though the parameter is kept for backwards compatibility. Nevertheless, if no one has concern about this, we can fix it by removing this parameter now.
Any reason why this function takes in ImageHandle? The function doesn’t use that parameter at all.
Convert MAC address of the NIC associated with specified Service Binding Handle
to a unicode string. Callers are responsible for freeing the string storage.
Locate simple network protocol associated with the Service Binding Handle and
get the mac address from SNP. Then convert the mac address into a unicode
string. It takes 2 unicode characters to represent a 1 byte binary buffer.
Plus one unicode character for the null-terminator.
@param[in] ServiceHandle The handle where network service binding protocol is
@param[in] ImageHandle The image handle used to act as the agent handle to
get the simple network protocol.
@param[out] MacString The pointer to store the address of the string
representation of the mac address.
@retval EFI_SUCCESS Convert the mac address a unicode string successfully.
@retval EFI_OUT_OF_RESOURCES There are not enough memory resource.
@retval Others Failed to open the simple network protocol.
IN EFI_HANDLE ServiceHandle,
IN EFI_HANDLE ImageHandle,
OUT CHAR16 **MacString