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

Kuo-Jung Su
2014-04-07T04:07:24Z

2014-04-03 16:16 GMT+08:00 Marek Vasut <marex@denx.de>:
> 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@denx.de>:
>> > On Tuesday, April 01, 2014 at 10:46:52 AM, Kuo-Jung Su wrote:
>> >> From: Kuo-Jung Su <dantesu@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@faraday-tech.com>
>> >> CC: Albert Aribaud <albert.u.boot@aribaud.net>
>> >> CC: Wolfgang Denk <wd@denx.de>
>> >> Cc: Marek Vasut <marex@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

Sure, but I'm still waiting for more inputs, so it would be delivered
few days later.

--
Best wishes,
Kuo-Jung Su