Date: Sat, 27 Oct 2012 07:16:33 +0200 From: J B <jb.1234abcd@gmail.com> To: freebsd-acpi@freebsd.org Subject: acpiconf -k option Message-ID: <CAJXMFhHtBhbNNis1-WbO_OcWqug_ZNYfnk5oUemE2kTQAqRHgQ@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJXMFhHtBhbNNis1-WbO_OcWqug_ZNYfnk5oUemE2kTQAqRHgQ>