sscanf in kernel

Saleh Batati gds089 at gmail.com
Wed Mar 17 21:25:29 UTC 2010


My bad, I thought that I am working on a different mailing list (linux-net).

-- Saleh


On Thu, Mar 18, 2010 at 12:13 AM, Juli Mallett <jmallett at freebsd.org> wrote:

> On Wed, Mar 17, 2010 at 13:39, igeek <gds089 at 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 — 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.
>


More information about the freebsd-net mailing list