Colin Günther | 1 Jan 22:09 2010
Picon
Picon

Adding strndup to kernel

Hi,

would it be ok to add strndup.cpp to kernel_lib_posix.o?
I'd like to make use of it in the freebsd compat layer, where a string 
(originating in FreeBSD driver code) has to be duplicated and I have a 
bad feeling about using strdup for it.
I know of alternative approaches to implement a safe copy, but I wanted 
to ask first.

Kind Regards
Colin

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
Ingo Weinhold | 1 Jan 22:18 2010
Picon
Picon

Re: Adding strndup to kernel

On 2010-01-01 at 22:09:36 [+0100], Colin Günther <coling@...> wrote:
> would it be ok to add strndup.cpp to kernel_lib_posix.o?
> I'd like to make use of it in the freebsd compat layer, where a string
> (originating in FreeBSD driver code) has to be duplicated and I have a
> bad feeling about using strdup for it.

Sure, the function is definitely useful and could be used in some other 
places as well (e.g. in create_sem_etc()).

CU, Ingo

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 

Gmane