From owner-freebsd-current Mon Dec 18 6:58:35 2000 From owner-freebsd-current@FreeBSD.ORG Mon Dec 18 06:58:33 2000 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from ringworld.nanolink.com (ringworld.nanolink.com [195.24.48.189]) by hub.freebsd.org (Postfix) with SMTP id C2BA237B400 for ; Mon, 18 Dec 2000 06:58:30 -0800 (PST) Received: (qmail 5454 invoked by uid 1000); 18 Dec 2000 14:57:33 -0000 Date: Mon, 18 Dec 2000 16:57:32 +0200 From: Peter Pentchev To: Mike Smith Cc: current@FreeBSD.org Subject: dev/acpica/acpi.c - minor patch for cleaner poweroff Message-ID: <20001218165732.A5418@ringworld.oblivion.bg> Mail-Followup-To: Peter Pentchev , Mike Smith , current@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, I think you're the main maintainer of the ACPICA codebase (and yes, I know that parts of it is imported from Intel). Attached is a trivial patch which makes for cleaner testing for RB_POWEROFF in acpi_shutdown_final() - I've had various kernel/userland routines invoke reboot sequences where the howto had more bits set than RB_POWEROFF, e.g. RB_NOSYNC. With this patch, shutdown -p works for me :) Thanks for all the work on ACPICA :) G'luck, Peter PS. Please CC: me in replies as I'm not on -current. -- If I had finished this sentence, Index: acpi.c =================================================================== RCS file: /home/ncvs/src/sys/dev/acpica/acpi.c,v retrieving revision 1.7 diff -u -r1.7 acpi.c --- acpi.c 2000/12/12 14:20:27 1.7 +++ acpi.c 2000/12/18 14:55:43 @@ -657,7 +657,7 @@ { ACPI_STATUS status; - if (howto == RB_POWEROFF) { + if (howto & RB_POWEROFF) { printf("Power system off using ACPI...\n"); if ((status = AcpiSetSystemSleepState(ACPI_STATE_S5)) != AE_OK) { printf("ACPI power-off failed - %s\n", acpi_strerror(status)); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message