fsm_getstate_str(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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

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