of_changeset_revert(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 ⭐

  • 0 on 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:

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