Re: [PATCH v3] IntelSiliconPkg/BaseConfigBlockLib: Add function to iterate over Config Blocks


Ni, Ray
 

+EFI_STATUS

+EFIAPI

+GetNextConfigBlock (

+  IN     VOID      *ConfigBlockTableAddress,

+  IN     VOID      *ConfigBlockAddress,

+  OUT    VOID      **NextConfigBlockAddress

+  )

 

How about using following prototype?

 

CONFIG_BLOCK *

GetNextConfigBlock (

  IN CONFIG_BLOCK_TABLE_HEADER *ConfigBlockTable

  IN CONFIG_BLOCK                                *ConfigBlock,

  IN GUID                                                   *Guid

  );

 

The API searches within ConfigBlockTable from ConfigBlock to find the next one whose GUID matches to Guid.

The new API is more flexible than yours because it allows caller to supply a different GUID.

 

 

By the way, do you have a plan to change existing library APIs to replace “VOID *” with “CONFIG_BLOCK_TABLE_HEADER *” or “CONFIG_BLOCK *”?

 

Thanks,

Ray

Join devel@edk2.groups.io to automatically receive all group messages.