lwmi_remove_battery(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… lwmi_remove_battery(9) β€” from the Kernel API Manual, bestie πŸŽ€

okay so picture this: we're deep in the kernel docs, specifically the lwmi_remove_battery(9) page, and I'm gonna walk you through it like we're on FaceTime at 2am. it's short, it's sweet, it ate, periodt. ✨


✨ NAME ✨

lwmi_remove_battery β€” the one that disconnects the power_supply_ext 🫢

like, it's literally the "we're done here, unplug the vibe" function. no cap.


🌸 SYNOPSIS 🌸

int lwmi_remove_battery (struct power_supply *battery , struct
       acpi_battery_hook *hook );

so it takes two things and gives you back an int. classic. πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • battery β€” the battery that was extended. yes, that one, the main character battery πŸ‘‘
  • hook β€” the driver hook used to extend the battery. it's the little helper that did the extending, and now it's time to say bye πŸ₯Ί

⭐ RETURN ⭐

0 on success, or an error. that's it, that's the whole deal. if you get 0, slay πŸ’–. if you get an error, well... 😭 at least you know.


πŸ”₯ SEE ALSO πŸ”₯

so many friends in the group chat, I'm obsessed:


🫢 reminder bestie: this page is a (9) section manpage, so it's kernel API territory β€” not your normal everyday man page. treat it with the respect it deserves (which is a lot, honestly πŸ’œ).

and that's the page!! πŸŽ€ this little cutie came out of the tree at ./drivers/platform/x86/lenovo, dated October 2026, and it lives in the Kernel API Manual. bye bestie, go disconnect some power_supply_ext responsibly πŸŒˆπŸ’…βœ¨

πŸ“¦ where this page comes from