mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
Export fdt_stringlist_contains()
This function is useful outside libfdt, so export it. Ref: DTC commit b7aa300e Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
2988eac70e
commit
e853b32424
2 changed files with 16 additions and 3 deletions
|
@ -816,6 +816,20 @@ int fdt_node_check_compatible(const void *fdt, int nodeoffset,
|
|||
int fdt_node_offset_by_compatible(const void *fdt, int startoffset,
|
||||
const char *compatible);
|
||||
|
||||
/**
|
||||
* fdt_stringlist_contains - check a string list property for a string
|
||||
* @strlist: Property containing a list of strings to check
|
||||
* @listlen: Length of property
|
||||
* @str: String to search for
|
||||
*
|
||||
* This is a utility function provided for convenience. The list contains
|
||||
* one or more strings, each terminated by \0, as is found in a device tree
|
||||
* "compatible" property.
|
||||
*
|
||||
* @return: 1 if the string is found in the list, 0 not found, or invalid list
|
||||
*/
|
||||
int fdt_stringlist_contains(const char *strlist, int listlen, const char *str);
|
||||
|
||||
/**********************************************************************/
|
||||
/* Write-in-place functions */
|
||||
/**********************************************************************/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue