xenbus_switch_state(9)
πΈ NAME πΈ
Okay so bestie, welcome to the xenbus_switch_state(9) page from the Kernel API Manual β¨ β and the whole mood is: save the new state of a driver π
. That's literally the function's job, no cap.
π¦ SYNOPSIS π¦
int xenbus_switch_state (struct xenbus_device *dev , enum xenbus_state
state );
π ARGUMENTS π
devβ the xenbus device πstateβ the new state we're switching to, periodt π«
π DESCRIPTION π
So what this does is advertise in the store that the given driver is changing to the given new_state π«Ά. That's the main character move.
And if something goes wrong? On error, the device will switch to XenbusStateClosing, and the error will be saved in the store π. Like, the store keeps the receipts, fr fr.
β RETURN β
You get 0 on success, or -errno on error. Slay when it's 0, sigh when it's -errno π.
π SEE ALSO π
Kernel file ./drivers/xen/xenbus/xenbus_client.c is the spot π β then go peek at these besties:
xenbus_watch_path(9)xenbus_watch_pathfmt(9)xenbus_dev_error(9)xenbus_dev_fatal(9)xenbus_map_ring_valloc(9)xenbus_unmap_ring(9)xenbus_unmap_ring_vfree(9)xenbus_read_driver_state(9)
Mwah π this little icon lives under ./drivers/xen/xenbus, got stamped October 2026, and it's forever the xenbus_switch_state(9) page β bye bestie, go switch some states responsibly π§π
π¦ 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