Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Aug 2002 14:53:38 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Maxime Henrion <mux@freebsd.org>
Cc:        arch@FreeBSD.org, Brooks Davis <brooks@one-eyed-alien.net>
Subject:   Re: kernel strlcpy
Message-ID:  <3D5C22E2.33A82B55@mindspring.com>
References:  <20020815122641.B21334@Odin.AC.HMC.Edu> <20020815193028.GF14155@elvis.mu.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Maxime Henrion wrote:
> Brooks Davis wrote:
> > I'd like to import strlcpy into libkern.  It's obviously the right
> > function for setting the if_xname member of struct ifnet from the
> > device.
> 
> Yes, please!  We waited far too long for this, there are a lot of places
> in the kernel that really need strlcpy().

No, please.  It encourages idiots to do string processing in
the kernel, when you should be carrying around this crap in
user space, instead.

I think Linux did the right thing when they limited string
copied in the kernel to file path name components.

Other than "mount" (the system call that ate the world),
and "sysctl" (the debug subsystem that ate the world), there's
not a lot of real valid use for string manipulation in the
kernel.

-- Terry

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D5C22E2.33A82B55>