of_property_count_strings(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– of_property_count_strings(9) πŸ’–

okay so bestie, this is a page from the Kernel API Manual β€” it's about of_property_count_strings, and it lives right in ./include/linux. Let's get into it ✨


🌸 NAME 🌸

of_property_count_strings β€” find and return the number of strings from a multiple strings property. that's it, that's the whole job, and it does it flawlessly πŸ’…


✨ SYNOPSIS ✨

int of_property_count_strings (const struct device_node *np , const char *propname );

πŸŽ€ ARGUMENTS πŸŽ€

  • np β€” the device node from which the property value is to be read. like, this is the node we're snooping in πŸ•΅οΈβ€β™€οΈ
  • propname β€” name of the property to be searched. the thing you're looking for, bestie πŸ”

πŸ¦‹ DESCRIPTION πŸ¦‹

So what it does: it searches for a property in a device tree node and retrieves the number of null terminated strings contained in it. that's literally the whole vibe β€” you point it at a node and a property name, and it counts the strings for you 🫢


🎯 RETURN 🎯

  • the number of strings on success β€” slay πŸ‘‘
  • -EINVAL if the property does not exist
  • -ENODATA if property does not have a value
  • -EILSEQ if the string is not null-terminated within the length of the property data
ngl those error codes are your vibe check πŸ’€ if you get one, the property isn't giving what you thought it was giving.

🌈 SEE ALSO 🌈

Kernel file ./include/linux/of.h, plus all of these icons:


and that's the whole page πŸ§šπŸ’œ this icon came from ./include/linux, dated October 2026, and it's officially titled of_property_count_strings(9) β€” mwah, bye bestie! πŸ“πŸ’…βœ¨

πŸ“¦ where this page comes from