Date: Wed, 17 Mar 2010 14:13:32 -0700 From: Juli Mallett <jmallett@FreeBSD.org> To: igeek <gds089@gmail.com> Cc: freebsd-net@freebsd.org, serena zanetta <sz3003@gmail.com> Subject: Re: sscanf in kernel Message-ID: <eaa228be1003171413x7b8c55b7obe8efcaac02e1b78@mail.gmail.com> In-Reply-To: <D9ECA4E6-9FC7-4DA4-9D09-D486E3D45F46@msn.com> References: <b2ecfd381003170412k75970a49v2a266abe1daf86e4@mail.gmail.com> <D9ECA4E6-9FC7-4DA4-9D09-D486E3D45F46@msn.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Mar 17, 2010 at 13:39, igeek <gds089@gmail.com> wrote: > On Mar 17, 2010, at 2:12 PM, serena zanetta wrote: >> Hi, >> I need to convert an ascii string in its corresponding hex version (the >> same >> as sscanf(str,"%02x%02x...",...) does) in the kernel. FreeBSD has sscanf in the kernel. See <sys/systm.h>. That said, sscanf is pretty evil =97 are you sure it's what you want? Are you sure you need to parse it in the kernel instead of in userland? > sscanf() has a kernel version declared in kernel.h. > http://www.gelato.unsw.edu.au/lxr/source/include/linux/kernel.h#L196 I believe you are confused. FreeBSD is not Linux.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?eaa228be1003171413x7b8c55b7obe8efcaac02e1b78>