[U-Boot] [PATCH v12 1/8] libc: move strlcpy() from ether.c to string.c

Marek Vasut marex at denx.de
Thu Apr 3 10:16:14 CEST 2014


On Thursday, April 03, 2014 at 02:58:27 AM, Kuo-Jung Su wrote:
> 2014-04-01 17:16 GMT+08:00 Marek Vasut <marex at denx.de>:
> > On Tuesday, April 01, 2014 at 10:46:52 AM, Kuo-Jung Su wrote:
> >> From: Kuo-Jung Su <dantesu at faraday-tech.com>
> >> 
> >> It would be better to have strlcpy() moved to lib/string.c,
> >> so that it could be reused by others without enabling
> >> USB Gadget Ethernet.
> >> 
> >> Signed-off-by: Kuo-Jung Su <dantesu at faraday-tech.com>
> >> CC: Albert Aribaud <albert.u.boot at aribaud.net>
> >> CC: Wolfgang Denk <wd at denx.de>
> >> Cc: Marek Vasut <marex at denx.de>
> > 
> > Good article on strlcpy() is here [1]. I suggest we remove strlcpy()
> > altogether and use standard posix functions like strncpy() instead. I am
> > on Ulrich Drepper side on this, strlcpy() is just hiding bugs.
> > 
> > [1] https://lwn.net/Articles/507319/
> 
> Agree, I'll use strncpy instead of strlcpy in drivers/clk/clkdev.c &
> drivers/usb/gadget/ether.c
> 
> And the patch for drivers/usb/gadget/ether.c would not be bonded to
> this patch series.

Can you please remove that strlcpy() implementation while at it ?

Best regards,
Marek Vasut


More information about the U-Boot mailing list