of_changeset_apply(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’« of_changeset_apply(9) πŸ’«

okay bestie, welcome to the Kernel API Manual β€” yes we're literally reading kernel docs together, this is our bonding era 🫢


✨ NAME ✨

of_changeset_apply β€” it applies a changeset. that's it, that's the whole vibe πŸ’…


🌸 SYNOPSIS 🌸

int of_changeset_apply (struct of_changeset *ocs );

πŸŽ€ ARGUMENTS πŸŽ€

  • ocs β€” the changeset pointer, aka the little handle to the changeset you're about to unleash πŸ‘‘

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea: this bad boy applies a changeset to the live tree. no cap, the real one. 🌈

and the way that any side-effects of live tree state changes get applied here on success?? iconic. we're talking creation/destruction of devices, plus side-effects like creation of sysfs properties and directories. it's giving main character energy for real 😭πŸ”₯


⭐ RETURN ⭐

  • 0 on success πŸŽ‰
  • a negative error value in case of an error πŸ’€

and ngl, the good part: on error, the partially applied effects are reverted. slay, we love a clean rollback πŸ™ˆβœ¨


πŸ‘‘ SEE ALSO πŸ‘‘

kernel file ./drivers/of/dynamic.c β€” plus the whole friend group:


and that's the whole page, bestie β€” go forth and apply those changesets responsibly πŸ’–

little sign-off from the source: this one lives in ./drivers/of and it's dated October 2026. periodt. πŸ“πŸ§š

πŸ“¦ where this page comes from