lwmi_dev_evaluate_int(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… lwmi_dev_evaluate_int(9) β€” the Kernel API Manual glow-up πŸŽ€

okay so you're in the lwmi_dev_evaluate_int girlies now?? welcome to the Kernel API Manual, bestie, this is literally the page for the helper function that calls WMI methods which return an integer. iykyk ✨


✨ NAME ✨

lwmi_dev_evaluate_int β€” the helper function you use when you need to call WMI methods that hand you back an integer. no cap, that's the whole job description 🫢


🌸 SYNOPSIS 🌸

int lwmi_dev_evaluate_int (struct wmi_device *wdev , u8 instance , u32
method_id , unsigned char *buf , size_t size , u32 *retval );

like, look at her. six arguments, all present and accounted for πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • wdev β€” pointer to the WMI device you're calling. the main character, fr πŸ”₯
  • instance β€” the instance of the called method. yes it's a u8, don't come for her.
  • method_id β€” the WMI Method ID for the method you want to call. this is how the kernel knows which one you mean πŸ‘‘
  • buf β€” the buffer holding all the arguments for the given method_id. everything you're passing in lives here.
  • size β€” length of the buffer. respect her boundaries πŸŽ€
  • retval β€” pointer where the return value gets assigned. she's an output param and she's thriving ✨

πŸ’– DESCRIPTION πŸ’–

so what does she actually do? she calls wmidev_evaluate_method for Lenovo WMI devices that return an ACPI integer β€” that's the vibe check she runs. then she validates the return value type and assigns the value to the retval pointer. clean, efficient, iconic. no notes πŸ’…

lowkey the important part: retval is a pointer, so the value gets written through it. you're not getting a return value back from the function itself β€” that's the int in the synopsis and it's a whole different thing, bestie, don't mix them up πŸ™ˆ

⭐ RETURN ⭐

0 on success, or an error code. that's it, that's the tea β˜•


🌈 SEE ALSO 🌈


and that's the whole page, bestie πŸ“ she lives in ./drivers/platform/x86/lenovo, version October 2026, and she's filed under lwmi_dev_evaluate_int(9) β€” go forth and call your WMI methods responsibly πŸ’œπŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from