From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754146AbcBVJ0i (ORCPT ); Mon, 22 Feb 2016 04:26:38 -0500 Received: from mga02.intel.com ([134.134.136.20]:1770 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754106AbcBVJ0d (ORCPT ); Mon, 22 Feb 2016 04:26:33 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,483,1449561600"; d="scan'208";a="918301504" Message-ID: <1456133234.13244.16.camel@linux.intel.com> Subject: Re: [PATCH 0/1] Implement character sets for sscanf() From: Andy Shevchenko To: Jessica Yu , Andrew Morton Cc: Rasmus Villemoes , Kees Cook , linux-kernel@vger.kernel.org Date: Mon, 22 Feb 2016 11:27:14 +0200 In-Reply-To: <1455931259-27117-1-git-send-email-jeyu@redhat.com> References: <1455931259-27117-1-git-send-email-jeyu@redhat.com> Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.3-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2016-02-19 at 20:20 -0500, Jessica Yu wrote: > Hi, > > This patch adds support for the '%[' conversion specifier for > sscanf(). > Since functions that calculate substring lengths based on accepted or > rejected characters already exist in the kernel (namely strspn() and > strcspn()), it's not much of a stretch to add some basic support for > the > bracket '%[' conversion specifier for sscanf(). This is useful in > cases > where we'd like to match substrings delimited by something other than > spaces. The original motivation for this patch actually came from > livepatch > (https://lkml.org/lkml/2016/2/8/790), where we were trying to come up > with > a clean way to parse symbol names with substrings delimited by > periods and > commas. > > Patch based on linux-next-20160219. > > Here are some test cases: Test cases should land into lib/test_scanf.c and be submitted as a separate patch. Also, you have something misconfigured when you sent patches. git-send- email usually does a perfect job. > --- > sscanf_tests.c > --- -- Andy Shevchenko Intel Finland Oy