get_bool(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– get_bool β€” the Kernel API page, bestie edition πŸ’–

okay so you're looking at get_bool(9) from the Kernel API Manual and honestly? it's a little cutie. tiny function, one job, does it well. let's get into it 🫢


✨ NAME ✨

get_bool β€” grab a parameter from the OF device. that's it. that's the whole vibe πŸŽ€


✨ SYNOPSIS ✨

bool get_bool (struct platform_device *ofdev , const char *s );

like, look at her. two args, returns a bool. main character energy fr πŸ”₯


✨ ARGUMENTS ✨

  • ofdev β€” pointer to the OF device structure πŸ’… this is the device you're snooping around in
  • s β€” the property you want retrieved. the thing you're looking up, iykyk 🌸

✨ DESCRIPTION ✨

so what does she actually do? get_bool goes looking for a property inside the device node, and if it finds that property, it hands you back the value. if it doesn't find it? you get 0. no drama, no error explosion, just a calm little 0 πŸ™ˆ

literally: property found β†’ value. property not found β†’ 0. periodt ⭐


✨ RETURN ✨

the value of the parameter if the parameter is found, or 0 otherwise. that's the whole contract, bestie, no cap πŸ¦‹


✨ SEE ALSO ✨

okay this part is a lot, so buckle up 🧚 the kernel file ./drivers/net/ethernet/xilinx/xilinx_emaclite.c is the whole friend group here:

like yes, that's 24 entries, and yes, i listed every single one because we don't do half-finished over here πŸ‘‘πŸ’œ


ok real talk β€” this page comes from ./drivers/net/ethernet/xilinx and the version/date stamped on it is October 2026. noted. remembered. immortalized in the group chat πŸ’€βœ¨

that's the page!! go read a device property, slay, and remember: not found just means 0, and 0 is still valid πŸ“πŸ’–

πŸ“¦ where this page comes from