From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sheng Yong Subject: Re: [PATCH V3 2/2] mkfs.f2fs: skip extension name that is too long Date: Mon, 30 Nov 2015 10:58:08 +0800 Message-ID: <565BBB40.3010206@huawei.com> References: <1448880067-9629-1-git-send-email-shengyong1@huawei.com> <1448880067-9629-2-git-send-email-shengyong1@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1a3Efg-0007AP-8K for linux-f2fs-devel@lists.sourceforge.net; Mon, 30 Nov 2015 02:58:32 +0000 Received: from szxga03-in.huawei.com ([119.145.14.66]) by sog-mx-3.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1a3Efc-00071q-9y for linux-f2fs-devel@lists.sourceforge.net; Mon, 30 Nov 2015 02:58:32 +0000 In-Reply-To: <1448880067-9629-2-git-send-email-shengyong1@huawei.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net To: chao2.yu@samsung.com, jaegeuk@kernel.org Cc: linux-f2fs-devel@lists.sourceforge.net Hi, Chao Yu, Jaegeuk I'm not sure if it is ok to send this patch out by me. If I did it the wrong way, please ignore this patch. thanks, Sheng On 11/30/2015 6:41 PM, Sheng Yong wrote: > From: Chao Yu > > The length of extension name has a limit of 8 bytes. If an extension > exceeds the limitation, it will not be added to the extension_list. > > Signed-off-by: Chao Yu > Signed-off-by: Sheng Yong > --- > mkfs/f2fs_format.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/mkfs/f2fs_format.c b/mkfs/f2fs_format.c > index a29d7ef..212df60 100644 > --- a/mkfs/f2fs_format.c > +++ b/mkfs/f2fs_format.c > @@ -157,8 +157,13 @@ static void configure_extension_list(void) > ue = strtok(ext_str, ", "); > while (ue != NULL) { > name_len = strlen(ue); > + if (name_len >= 8) { > + MSG(0, "\tWarn: Extension name (%s) is too long\n", ue); > + goto next; > + } > if (!is_extension_exist(ue)) > memcpy(sb.extension_list[i++], ue, name_len); > +next: > ue = strtok(NULL, ", "); > if (i >= F2FS_MAX_EXTENSION) > break; > ------------------------------------------------------------------------------ Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140