[if gte mso 9]>

Re: [edk2] NetLibGetMacString

Subject: Re: [edk2] NetLibGetMacString

From: "Ye, Ting" <ting.ye@intel.com>

To: "edk2-devel@lists.sourceforge.net" <edk2-devel@lists.sourceforge.net>

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.

 

Best regards,

Ting Ye

 

From: El-Haj-Mahmoud, Samer [mailto:samer.el-haj-mahmoud@hp.com]
Sent: Saturday, June 09, 2012 12:37 AM
To: edk2-devel@lists.sourceforge.net
Subject: [edk2] NetLibGetMacString

 

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

                                     installed on.

  @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.

 

**/

EFI_STATUS

EFIAPI

NetLibGetMacString (

  IN  EFI_HANDLE            ServiceHandle,

  IN  EFI_HANDLE            ImageHandle,

  OUT CHAR16                **MacString

  )