__of_prop_dup(9)
π __of_prop_dup β the Kernel API Manual, bestie edition π
okay so welcome to the <lavender>Kernel API Manual</lavender> entry for __of_prop_dup(9) β yes the double underscore is load-bearing, we do not abbreviate her name π
β¨ NAME β¨
__of_prop_dup β copy a property, but likeβ¦ dynamically π¦
πΈ SYNOPSIS πΈ
struct property * __of_prop_dup (const struct property *prop , gfp_t
allocflags );
π ARGUMENTS π
propβ the property you wanna copy. your blorbo. the one getting duplicated π«Άallocflagsβ the allocation flags (typically passGFP_KERNEL, that's the standard vibe β¨)
π₯ DESCRIPTION π₯
so the way this works is: it copies a property by dynamically allocating the memory for both the property structure and the property name & contents π like, it's not doing a shallow little copy, it's allocating memory for real, no cap.
and here's the iconic part β the property's flags get the OF_DYNAMIC bit set β so we can tell the difference between dynamically allocated properties and the ones that are not. that's literally the whole point, iykyk.
π RETURN π
it hands you back the newly allocated property β or NULL on out of memory error π (fr fr, check for the NULL, bestie, please).
π SEE ALSO π
kernel file ./drivers/of/dynamic.c β yes, that's the one, go look π
and the whole friend group:
of_node_get(9)of_node_put(9)of_attach_node(9)of_detach_node(9)of_node_release(9)__of_node_dup(9)of_changeset_create_node(9)of_changeset_init(9)of_changeset_destroy(9)of_changeset_apply(9)of_changeset_revert(9)of_changeset_action(9)of_changeset_add_prop_string(9)of_changeset_add_prop_string_array(9)of_changeset_add_prop_u32_array(9)of_changeset_add_prop_bool(9)of_changeset_update_prop_string(9)
that's the whole page, you ate it, you're a kernel dev now π§π
so like, credit where credit's due: this one's from ./drivers/of, it's the October 2026 edition, and it says __of_prop_dup(9) at the bottom because that's just how manpages do π mwah, bye 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