acpiconf -k option
J B
jb.1234abcd at gmail.com
Sat Oct 27 05:16:35 UTC 2012
Hi,
$ cat /etc/rc.suspend
...
# Notify the kernel to continue the suspend process
/usr/sbin/acpiconf -k 0
...
$ acpiconf -h
usage: acpiconf [-h] [-i batt] [-k ack] [-s 1-4]
ACPICONF(8) does not have -k option included.
What is the meaning of "-k ack" option (in words that could be
included in update to ACPICONF(8) and understood by a user
reading or writing a script) ?
Proposal:
-k ack ack - suspend notification to kernel
0 - no error (continue suspend)
non-0 - error no (abort suspend)
Ref:
$ cat /usr/src/usr.sbin/acpi/acpiconf/acpiconf.c
...
#include <dev/acpica/acpiio.h>
...
/* Ack or abort a pending suspend request. */
static void
acpi_sleep_ack(int err_val)
{
int ret;
ret = ioctl(acpifd, ACPIIO_ACKSLPSTATE, &err_val);
if (ret != 0)
err(EX_IOERR, "ack sleep type failed");
}
...
int
main(int argc, char *argv[])
{
...
case 'k':
acpi_sleep_ack(atoi(optarg));
break;
....
$ cat /usr/src/sys/dev/acpica/acpiio.h
...
/* Allow suspend to continue (0) or abort it (errno). */
#define ACPIIO_ACKSLPSTATE _IOW('P', 5, int)
...
NOTE:
please copy me in your response as I am not subscribed to this list.
jb
More information about the freebsd-acpi
mailing list