get_bool(9)
π 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 insβ 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:
struct net_local(9)xemaclite_enable_interrupts(9)xemaclite_disable_interrupts(9)xemaclite_aligned_write(9)xemaclite_aligned_read(9)xemaclite_send_data(9)xemaclite_recv_data(9)xemaclite_update_address(9)xemaclite_set_mac_address(9)xemaclite_tx_timeout(9)xemaclite_tx_handler(9)xemaclite_rx_handler(9)xemaclite_interrupt(9)xemaclite_mdio_wait(9)xemaclite_mdio_read(9)xemaclite_mdio_write(9)xemaclite_mdio_setup(9)xemaclite_adjust_link(9)xemaclite_open(9)xemaclite_close(9)xemaclite_send(9)xemaclite_ethtools_get_drvinfo(9)xemaclite_of_probe(9)xemaclite_of_remove(9)
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
- 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