/* Don't call this function directly. It is a utility helper for the of_property_read_string*() family of functions.  */
int dtb_node_property_read_string_helper(const struct dtb_node *dn, const char *propname, const char **out_strs, size_t sz, int skip)
/* Don't call this function directly. It is a utility helper for the of_property_read_string*() family of functions.  */
int dtb_node_property_read_string_helper(const struct dtb_node *dn, const char *propname, const char **out_strs, size_t sz, int skip)
{
    const struct dtb_property *prop = dtb_node_get_dtb_node_property(dn, propname, NULL);
    int l = 0, i = 0;
    const char *p, *end;
    if (!prop)
        return -EINVAL;
    if (!prop->value)
        return -ENODATA;
    p = prop->value;
    end = p + prop->size;
    for (i = 0; p < end && (!out_strs || i < skip + sz); i++, p += l)
    {
        l = strnlen(p, end - p) + 1;
        if (p + l > end)
            return -EILSEQ;
        if (out_strs && i >= skip)
            *out_strs++ = p;
    }
    i -= skip;
    return i <= 0 ? -ENODATA : i;
}