From owner-freebsd-hackers Mon Mar 9 13:44:20 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA06422 for freebsd-hackers-outgoing; Mon, 9 Mar 1998 13:44:20 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from amsoft.ru (amsoft.ru [194.87.86.241]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA06160 for ; Mon, 9 Mar 1998 13:43:19 -0800 (PST) (envelope-from am@amsoft.ru) Received: (from am@localhost) by amsoft.ru (8.8.8/amsoft/1.0) id AAA05671 ; Tue, 10 Mar 1998 00:07:16 +0300 (MSK) From: Andrew Maltsev Message-Id: <199803092107.AAA05671@amsoft.ru> Subject: Re: APM power off (patch) In-Reply-To: from "Bruce M. Walter" at "Mar 9, 98 01:11:15 pm" To: walter@fortean.com (Bruce M. Walter) Date: Tue, 10 Mar 1998 00:07:16 +0300 (MSK) Cc: freebsd-hackers@FreeBSD.ORG Organization: AM'soft X-Location: Oryol (http://www.oryol.ru/), Russia X-Phone: +7 086 229 9988 X-Mailer: ELM [version 2.4ME+ PL32 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > I've uploaded my patch (2.2-stable based) to > > > > ftp://ftp.freebsd.org/pub/FreeBSD/incoming/am-atx-power-off.patch.gz > > > > What was done: > > - kernel apm driver now able to power off system > > - /sbin/shutdown has new flag `-p' to switch power off after shutdown > > The kernel poweroff stuff is important for my UPS work and patches have > been submitted via send-pr for a shutdown queue for a while. I don't > believe they've been committed though. We really need a standard (and > safe) way of requesting the kernel to poweroff the machine. What can be more standart, than ioctl(/dev/apm) for userland and apm_power_off for kernel stuff? Or should we call it machine_power_off() and place a hook in i386/machdep.c? With `restore previous power state' bios option it would be perfect colution for UPS support. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message