xbc_node_fin...xt_key_value(9)
π xbc_node_fin...xt_key_value(9) π
okay so bestie, we're deep in the Kernel API Manual today β Kernel API Manual, yeah, that one β and this little function is the whole vibe. It's xbc_node_find_next_key_value, and no cap, it's giving "walk the tree, find the next key" energy. Let's get into it π¦
β¨ NAME β¨
xbc_node_find_next_key_value β literally just find the next key-value pair nodes. That's the whole job. Periodt. π
πΈ SYNOPSIS πΈ
const char * xbc_node_find_next_key_value (struct xbc_node *root ,
struct xbc_node **leaf );
look at her go π two params, one pointer-to-pointer, we love a signature that eats.
π«Ά ARGUMENTS π«Ά
rootβ an XBC root node. like, the main character node you're starting from, iykyk πleafβ a container pointer of XBC node which starts from. yes bestie, a pointer to a pointer, she's fancy like that π
π DESCRIPTION π
So what she does: she searches for the next leaf node under the root node β and "leaf node" here means the terminal key node, the end-of-the-line one, not just any random node in the middle. π
If she finds that next leaf node, she returns the value and updates *leaf for you. Slay. If there's no next leaf node to be found? She returns NULL. That's it, that's the deal π
β οΈ okay important note bestie, don't skip this β she returns a 0-length string if the key has no value. And if the value is an array, she gives you the value of the first entry. Not all of them. The first one. Write that down π
π₯ SEE ALSO π₯
Kernel file ./lib/bootconfig.c β go read her, she's iconic π
and the whole friend group:
xbc_prepend_embedded_cmdline(9)xbc_embedded_cmdline_applied(9)bootconfig_cmdline_requested(9)xbc_get_info(9)xbc_root_node(9)xbc_node_index(9)xbc_node_get_parent(9)xbc_node_get_child(9)xbc_node_get_next(9)xbc_node_get_data(9)xbc_node_find_subkey(9)xbc_node_find_value(9)xbc_node_compose_key_after(9)xbc_node_find_next_leaf(9)xbc_snprint_cmdline(9)_xbc_exit(9)xbc_init(9)
go off, every single one of you β
and that's the page!! brought to you by ./lib and stamped October 2026 β mwah, see you in the next node traversal bestie ππ§
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms