From owner-freebsd-current@FreeBSD.ORG Thu May 19 05:06:05 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2367616A4CE; Thu, 19 May 2005 05:06:05 +0000 (GMT) Received: from ylpvm43.prodigy.net (ylpvm43-ext.prodigy.net [207.115.57.74]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9DE8D43D53; Thu, 19 May 2005 05:06:02 +0000 (GMT) (envelope-from nate@root.org) Received: from pimout6-ext.prodigy.net (pimout6-int.prodigy.net [207.115.4.22])j4J5629Q005773; Thu, 19 May 2005 01:06:02 -0400 X-ORBL: [64.171.184.124] Received: from [10.0.0.115] (adsl-64-171-184-124.dsl.snfc21.pacbell.net [64.171.184.124])j4J55hK8012040; Thu, 19 May 2005 01:05:54 -0400 Message-ID: <428C1EA6.7020907@root.org> Date: Wed, 18 May 2005 22:05:42 -0700 From: Nate Lawson User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050416) X-Accept-Language: en-us, en MIME-Version: 1.0 To: fli+freebsd-current@shapeshifter.se, Warner Losh Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: current@FreeBSD.org Subject: Re: Patch to make powerd(8) devd(8)-aware X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 May 2005 05:06:05 -0000 I appreciate you working on a patch for this. However, I'd prefer the work on the devd side go into making devctl a clonable device or follow the bpf route and hook up /dev/devctl0,1,2,... If you start using the /var/run/devd.pipe, it's not available for other consumers. I agree that the sysctl errors should be soft at runtime although you should make sure that powerd(8) does not spin in a fast loop if sysctl returns an error (i.e. the sleep at the bottom should be called even when there's an error). Other comments: style(9) long sscanf line extra newlines inserted into existing code change read() in devd_read() to return on error instead of running sscanf -- this will allow the indent to be reduced. -- Nate