armoury_get_devstate(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… armoury_get_devstate(9) β€” the Kernel API Manual, bestie edition ✨

okay so real talk, this page lives in the Kernel API Manual, and it's all about armoury_get_devstate β€” literally the function that goes and asks WMI "hey girl, what's your state?" πŸŽ€


🌸 NAME 🌸

armoury_get_devstate β€” get the WMI function state. that's it, that's the whole vibe check πŸ’«


πŸ¦‹ SYNOPSIS πŸ¦‹

int armoury_get_devstate (struct kobj_attribute *attr , u32 *retval ,
u32 dev_id );

copy it exactly like that, spacing and all, no cap 🫢


✨ ARGUMENTS ✨

  • attr β€” either NULL, or the kobj_attribute that's associated with the WMI function you're calling. your call bestie πŸ’…
  • retval β€” this one's a two-for-one deal:
    • it's a non-NULL pointer to where the value returned from WMI gets stored πŸ‘‘
    • and the function presence bit is cleared in it, periodt
  • dev_id β€” the WMI method ID to call. the main character of the argument list fr fr ⭐

πŸ’– DESCRIPTION πŸ’–

the intended usage is from a sysfs attribute, checking the associated WMI function. that's the whole plan, that's the assignment 🧚


πŸ”₯ RETURN πŸ”₯

  • -ENODEV β€” the method ID is unsupported, so like… not a thing, move on πŸ™ˆ
  • 0 β€” slay, it worked, and retval is filled πŸ’€βœ¨
  • other β€” an error from the WMI call, which is giving "not our fault, blame WMI" energy 😭

🌈 SEE ALSO 🌈

go read those too, iykyk πŸ¦‹


lowkey important: retval needs to be non-NULL if you actually want the value back β€” don't come for me when there's nowhere to put it πŸ’…

and that's the page!! πŸŽ€ sign-off time: this one comes from ./drivers/platform/x86 and it's dated October 2026 β€” mwah, go forth and check those devstates bestie πŸ’œπŸ«Ά

πŸ“¦ where this page comes from