fsm_getstate_str(9)
π fsm_getstate_str(9) β like, the Kernel API Manual, bestie π
Okay so real talk, this is a page from the Kernel API Manual and it's about one tiny little function that's honestly kind of a vibe: fsm_getstate_str. It's the "what's my state called again?" girlie of the FSM world. Let's get into it β¨
πΈ NAME πΈ
fsm_getstate_str β retrieves the name of the current FSM state. That's it, that's the whole job, and she does it flawlessly. π
β¨ SYNOPSIS β¨
const char * fsm_getstate_str (fsm_instance *fi );
Yep. One argument. One const char * coming back at you. Lowkey elegant, ngl. π¦
π«Ά ARGUMENTS π«Ά
fiβ pointer to the FSM. That's your FSM instance bestie, literally just hand her over. π
β RETURN β
You get back the state name string π« β the name of the current state, as a string, ready to be printed or logged or whatever main character thing you're doing with it.
BUT β if the state is out of range, you don't get a name, you get the string "Invalid". No cap. That's the fallback and she said what she said. π
π SEE ALSO π
Kernel file ./drivers/s390/net/fsm.h β go read it, it's giving source of truth π
And then the whole FSM friend group, fr fr:
init_fsm(9)kfree_fsm(9)fsm_event(9)fsm_newstate(9)fsm_getstate(9)fsm_settimer(9)fsm_deltimer(9)fsm_addtimer(9)fsm_modtimer(9)
Like, the whole squad. Go say hi. π«Ά
Okay that's the whole page bestie, mwah π β this lil number lives over in ./drivers/s390/net and it's dated October 2026, so mark your calendar, and the manual name for the record is fsm_getstate_str(9). Slay, bye! πβ¨
π¦ 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