From mboxrd@z Thu Jan 1 00:00:00 1970 From: Henrique de Moraes Holschuh Subject: Re: [PATCH 0/8] [-mm] ACPI: add ACPI device sysfs interface Date: Tue, 20 Mar 2007 12:31:06 -0300 Message-ID: <20070320153105.GD13042@khazad-dum.debian.net> References: <1174382471.8833.79.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from out5.smtp.messagingengine.com ([66.111.4.29]:40560 "EHLO out5.smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933918AbXCTPbN (ORCPT ); Tue, 20 Mar 2007 11:31:13 -0400 Content-Disposition: inline In-Reply-To: <1174382471.8833.79.camel@localhost.localdomain> Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: Zhang Rui Cc: linux-acpi@vger.kernel.org, lenb@kernel.org On Tue, 20 Mar 2007, Zhang Rui wrote: > Add sysfs interface for ACPI devices. While doing the ibm-acpi sysfs work (not submitted yet), I have found I need something like this to properly parse simple ulongs from sysfs: static int parse_strtoul(const char *buf, unsigned long max, unsigned long *value) { char *endp; *value = simple_strtoul(buf, &endp, 0); while (*endp && isspace(*endp)) endp++; if (*endp || *value > max) return -EINVAL; return 0; } -- "One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh