From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KMktn-0002Dr-F9 for mharc-grub-devel@gnu.org; Sat, 26 Jul 2008 10:37:31 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KMktk-00028N-1S for grub-devel@gnu.org; Sat, 26 Jul 2008 10:37:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KMkti-00026a-SL for grub-devel@gnu.org; Sat, 26 Jul 2008 10:37:27 -0400 Received: from [199.232.76.173] (port=39989 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KMkti-00026N-LU for grub-devel@gnu.org; Sat, 26 Jul 2008 10:37:26 -0400 Received: from gateway07.websitewelcome.com ([69.56.236.22]:60099) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1KMkti-00004v-6L for grub-devel@gnu.org; Sat, 26 Jul 2008 10:37:26 -0400 Received: (qmail 6453 invoked from network); 26 Jul 2008 14:46:32 -0000 Received: from gator297.hostgator.com (74.53.228.114) by gateway07.websitewelcome.com with SMTP; 26 Jul 2008 14:46:32 -0000 Received: from c-67-185-142-228.hsd1.wa.comcast.net ([67.185.142.228]:60401 helo=localhost) by gator297.hostgator.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.68) (envelope-from ) id 1KMkte-0005FK-6u for grub-devel@gnu.org; Sat, 26 Jul 2008 09:37:22 -0500 Date: Sat, 26 Jul 2008 07:36:35 -0700 From: Colin D Bennett To: grub-devel@gnu.org Message-ID: <20080726073635.1cb8bbbe@gibibit.com> In-Reply-To: <998366.10826.qm@web31604.mail.mud.yahoo.com> References: <998366.10826.qm@web31604.mail.mud.yahoo.com> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/NvnMUTbNio49NCIm6GCWqO6"; protocol="application/pgp-signature"; micalg=PGP-SHA1 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator297.hostgator.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - gibibit.com X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Subject: Re: atoi X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Jul 2008 14:37:28 -0000 --Sig_/NvnMUTbNio49NCIm6GCWqO6 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Sat, 26 Jul 2008 06:52:31 -0700 (PDT) Viswesh S wrote: > Hi, > Just a confirmation,=20 > Is there an implementation for atoi or similar conversion implemented > in grub2 already. I suppose, I need to implement it myself. > I am planning to implement a setpci command in grub2.Hence the > question Viswesh Try grub_strtoul(n, 0, 0) from 'kern/misc.c'. It is better than atoi since it provides error checking (if you choose to specify a char **end as the 2nd arg instead of 0) and supports multiple bases (the 3rd arg; 0 means auto detect). Regards, Colin --Sig_/NvnMUTbNio49NCIm6GCWqO6 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAkiLNnUACgkQokx8fzcGbYf+FgCfcjN4E5cseqdAkfRkyEmVU/1S x8wAniZYguyuiFXqG9c4vxL93/CLRdjm =ZjNt -----END PGP SIGNATURE----- --Sig_/NvnMUTbNio49NCIm6GCWqO6--