pub unsafe extern "C" fn fdt_stringlist_search(
fdt: *const c_void,
nodeoffset: c_int,
property: *const c_char,
string: *const c_char,
) -> c_intExpand description
fdt_stringlist_search - find a string in a string list and return its index @fdt: pointer to the device tree blob @nodeoffset: offset of a tree node @property: name of the property containing the string list @string: string to look up in the string list
Note that it is possible for this function to succeed on property values that are not NUL-terminated. That’s because the function will stop after finding the first occurrence of @string. This can for example happen with small-valued cell properties, such as #address-cells, when searching for the empty string.
return: the index of the string in the list of strings -FDT_ERR_BADVALUE if the property value is not NUL-terminated -FDT_ERR_NOTFOUND if the property does not exist or does not contain the given string