1.\" $NetBSD: pmf.9lua,v 1.3 2016/02/15 20:33:18 snj Exp $ 2.\" 3.\" Copyright (c) 2013 Marc Balmer <mbalmer@NetBSD.org>. All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright 9.\" notice, this list of conditions and the following disclaimer. 10.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" notice, this list of conditions and the following disclaimer in the 12.\" documentation and/or other materials provided with the distribution. 13.\" 3. Neither the name of the University nor the names of its contributors 14.\" may be used to endorse or promote products derived from this software 15.\" without specific prior written permission. 16.\" 17.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 18.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 21.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27.\" SUCH DAMAGE. 28.\" 29.\" 30.Dd October 29, 2013 31.Dt PMF 9lua 32.Os 33.Sh NAME 34.Nm pmf 35.Nd Lua binding to the power management framework 36.Sh SYNOPSIS 37.Cd "local pmf = require 'pmf'" 38.Pp 39.Bl -tag -width XXXX -compact 40.It Dv pmf.system_shutdown(howto) 41.It Dv pmf.set_platform(key, value) 42.It Dv value = pmf.get_platform(key) 43.El 44.Sh DESCRIPTION 45The 46.Nm 47Lua binding provides access to the power management framework. 48.Pp 49.Bl -tag -width XXXX -compact 50.It Dv pmf.system_shutdown(howto) 51Shutdown all attached devices. 52.Ar howto 53should contain the 54.Xr reboot 2 55.Ar howto 56argument. 57The following values are defined as constants in the 58.Nm 59table: 60.Pp 61.Bl -tag -width XXXX -compact 62.It Dv pmf.RB_AUTOBOOT 63.It Dv pmf.RB_ASKNAME 64.It Dv pmf.RB_DUMP 65.It Dv pmf.RB_HALT 66.It Dv pmf.RB_POWERDOWN 67.It Dv pmf.RB_KDB 68.It Dv pmf.RB_NOSYNC 69.It Dv pmf.RB_RDONLY 70.It Dv pmf.RB_SINGLE 71.It Dv pmf.RB_USERCONF 72.El 73.Pp 74.It Dv pmf.set_platform(key, value) 75Insert a name-value pair into the platform information database. 76.Pp 77.It Dv value = pmf.get_platform(key) 78Retrieve the value for 79.Ar key 80from the platform information database. 81Returns nil if the key is not present. 82.El 83.Sh SEE ALSO 84.Xr lua 1 , 85.Xr luac 1 , 86.Xr lua 4 , 87.Xr pmf 9 , 88.Xr intro 9lua 89.Sh HISTORY 90A 91.Nm 92Lua manual appeared in 93.Nx 7.0 . 94.Sh AUTHORS 95.An -nosplit 96The 97.Nm 98Lua binding was written by 99.An Marc Balmer Aq Mt mbalmer@NetBSD.org . 100