PMF(9lua)

πŸ“¦ version 11.0, in nixpkgs unstable

okay bestie, welcome to PMF(9lua) β€” literally the Lua binding to the power management framework, and it’s giving tiny-but-mighty energy πŸ’…βœ¨

🌸 NAME 🌸

pmf β€” Lua binding to the power management framework. no cap, that’s the whole assignment 🫢

✨ SYNOPSIS ✨

local pmf = require 'pmf'

pmf.system_shutdown(howto)
pmf.set_platform(key, value)
value = pmf.get_platform(key)

πŸ’– DESCRIPTION πŸ’–

The pmf Lua binding provides access to the power management framework. iconic behavior, honestly πŸ‘‘

pmf.system_shutdown(howto)

Shutdown all attached devices. howto should contain the reboot(2) howto argument. these are the values defined as constants in the pmf table, and yes, you need all of them bestie:

  • pmf.RB_AUTOBOOT
  • pmf.RB_ASKNAME
  • pmf.RB_DUMP
  • pmf.RB_HALT
  • pmf.RB_POWERDOWN
  • pmf.RB_KDB
  • pmf.RB_NOSYNC
  • pmf.RB_RDONLY
  • pmf.RB_SINGLE
  • pmf.RB_USERCONF

pmf.set_platform(key, value)

Insert a name-value pair into the platform information database. cute little database moment πŸŽ€

value = pmf.get_platform(key)

Retrieve the value for key from the platform information database. Returns nil if the key is not present. that’s it, that’s the function πŸ’œ

πŸ” SEE ALSO πŸ”

go peek at these, iykyk:

πŸ¦‹ HISTORY πŸ¦‹

A pmf Lua manual appeared in NetBSD 7.0. vintage but still slaying ✨

πŸ‘‘ AUTHORS πŸ‘‘

The pmf Lua binding was written by Marc Balmer <mbalmer@NetBSD.org>. absolute main character energy 🌈


mwah πŸ’‹ β€” source/version: Debian, dated October 29, 2013. that’s the cute lil’ sign-off, bestie πŸŽ€

πŸ“¦ where this page comes from
  • nixpkgs unstable: netbsd-source 11.0
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms