of_changeset_revert(9)
π of_changeset_revert β the Kernel API Manual glow-up β¨
okay bestie, welcome to the of_changeset_revert(9) page, straight out of the Kernel API Manual and honestly? it's giving "undo button for the device tree" and we're obsessed π
β¨ NAME β¨
of_changeset_revert β literally reverts an applied changeset. that's it. that's the vibe. no cap π«Ά
πΈ SYNOPSIS πΈ
int of_changeset_revert (struct of_changeset *ocs );
π¦ ARGUMENTS π¦
ocsβ the changeset pointer, aka the little handle to the changeset you're about to un-do π«
π DESCRIPTION π
so here's the tea β β this function reverts a changeset, which means it returns the state of the tree back to what it was before the application. time travel but make it kernel β¨
and bestie, it does not just quietly flip a flag. any side-effects get applied for real, including:
- the creation and destruction of devices π₯
- the removal of sysfs properties and directories ποΈ
like, the whole clean-up era. main character energy for real π
β RETURN β
0on success β slay, we ate π- a negative error value in case of an error β not slay, but at least you'll know π
π SEE ALSO π
the whole friend group, fr fr β kernel file ./drivers/of/dynamic.c plus:
of_node_get(9)of_node_put(9)of_attach_node(9)of_detach_node(9)of_node_release(9)__of_prop_dup(9)__of_node_dup(9)of_changeset_create_node(9)of_changeset_init(9)of_changeset_destroy(9)of_changeset_apply(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)
iykyk π
and that's the page, bestie π§ this iconic little entry lives under ./drivers/of and it's dated October 2026 β go forth and revert responsibly, mwah π
π¦ 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