menu_next(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, we're in the kernel API manual and this page is menu_next(9) β€” yes it's a manpage, no it's not boring, stay with me πŸ’…

🌸 NAME 🌸

menu_next β€” returns the next menu entry, and it does it with depth-first traversal (iconic algorithm behaviour, honestly) πŸ¦‹

πŸŽ€ SYNOPSIS πŸŽ€

struct menu * menu_next (struct menu *menu , struct menu *root );

πŸ’– ARGUMENTS πŸ’–

  • menu β€” pointer to the current menu, like the one you're standing on right now πŸ‘‘
  • root β€” the root of the sub-tree you want to traverse. and here's the lil plot twist: if you pass NULL for this one, the traversal just keeps going until it reaches the end of the entire menu tree 🌈

⭐ RETURN ⭐

the menu to visit next, or NULL when it reaches the end 🫢

fr fr, NULL here means "that's it, we're done, no more menus" β€” not an error, just the end of the line πŸ’€

🧚 SEE ALSO 🧚

kernel file ./scripts/kconfig/menu.c, plus these besties:


and that's the whole page, no cap πŸ’œ this lil gem lives in ./scripts/kconfig and it's dated October 2026 β€” periodt, go traverse some menus πŸ“βœ¨

πŸ“¦ where this page comes from