From owner-freebsd-acpi@FreeBSD.ORG Sat Oct 27 05:16:35 2012 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 656AF9FA for ; Sat, 27 Oct 2012 05:16:35 +0000 (UTC) (envelope-from jb.1234abcd@gmail.com) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 1B95C8FC08 for ; Sat, 27 Oct 2012 05:16:34 +0000 (UTC) Received: by mail-vb0-f54.google.com with SMTP id v11so4700495vbm.13 for ; Fri, 26 Oct 2012 22:16:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=HiajruNEh2uGqXQF+t3qbth/yuHX6r1ipUnNXc5lcNo=; b=ZY22nU/zQr8O2vxmEVbIPWGEKNGNwHoambWTL1ZJjCBygGJxrGPhtoom46SXJyDmmh XpEjvsUcBBz1mANLnUthLDU/OyjtiMMvdrvKY9YdAB33HwWcJyC4jRLdVdY2xPnWSw7F iaXhq6/6yq2AN6m53hiMmvMNBSrgfLDeAeCzGLYkez8NErFjKgIqQ5pdFt5jZsIBLSA5 Ib0VhwUcd/iezozPy0gNlTAPSl1fOpy1SxE8aiFKHu2FOP5Xt4zhVmbGJTIAsiTLLU54 5tZyCMFcQzneXCjXtt+ijLVYj8bqa+nrljlJOY5lEpsEYpEDLA4hUW/15ho89E2JBxF4 S/Pg== MIME-Version: 1.0 Received: by 10.220.220.5 with SMTP id hw5mr368467vcb.53.1351314993312; Fri, 26 Oct 2012 22:16:33 -0700 (PDT) Received: by 10.220.186.197 with HTTP; Fri, 26 Oct 2012 22:16:33 -0700 (PDT) Date: Sat, 27 Oct 2012 07:16:33 +0200 Message-ID: Subject: acpiconf -k option From: J B To: freebsd-acpi@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Oct 2012 05:16:35 -0000 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 ... /* 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