From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.warmcat.com (mail.warmcat.com [163.172.24.82]) by dpdk.org (Postfix) with ESMTP id 151241BC42 for ; Mon, 14 May 2018 01:07:57 +0200 (CEST) To: Thomas Monjalon Cc: dev@dpdk.org, Stephen Hemminger References: <152609021699.121661.5295227351721865436.stgit@localhost.localdomain> <152609032721.121661.6937845392817292798.stgit@localhost.localdomain> <1908372.FHAYcbrlyj@xps> From: Andy Green Message-ID: <6df3804a-f5ab-0915-737c-08e5a990fd79@warmcat.com> Date: Mon, 14 May 2018 07:07:29 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 In-Reply-To: <1908372.FHAYcbrlyj@xps> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v3 01/24] lib/librte_eal: import libbsd strlcpy X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2018 23:07:58 -0000 On 05/13/2018 10:56 PM, Thomas Monjalon wrote: > Hi, > > 12/05/2018 03:58, Andy Green: >> Signed-off-by: Andy Green > > Why do we need to replace rte_strlcpy fallback? > GCC 8 complains about the fallback using snprintf? No; the first version of this patch just fixed the compiler warnings. But Stephen Hemminger requested the ersatz rte_strlcpy be replaced ---> > >> +/* >> + * Copyright (c) 1998 Todd C. Miller >> + * >> + * Permission to use, copy, modify, and distribute this software for any >> + * purpose with or without fee is hereby granted, provided that the above >> + * copyright notice and this permission notice appear in all copies. >> + */ >> + >> +size_t >> +rte_strlcpy(char *dst, const char *src, size_t siz) >> +{ > [...] >> +} > > I would like to be sure there is no legal issue with this imported code. "with the one from BSD". If it's OK to use BSD anything then the way this is imported should be respecting the original license. -Andy > > [...] >> -static inline size_t >> -rte_strlcpy(char *dst, const char *src, size_t size) >> -{ >> - return snprintf(dst, size, "%s", src); >> -} >> +size_t >> +rte_strlcpy(char *dst, const char *src, size_t size); > > >