Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1339865
| From | Jessica Yu <jeyu@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: Implement character sets for sscanf() |
| Date | 2016-02-22 20:40 +0100 |
| Message-ID | <r54uS-2cu-23@gated-at.bofh.it> (permalink) |
| References | <r44wX-5K3-21@gated-at.bofh.it> <r4UYz-3uz-35@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
+++ Andy Shevchenko [22/02/16 11:27 +0200]: >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. Thanks for the tip. Yeah, I had a small hiccup with git-send-email, which is why the patchset came out like that :-\ In any case, the attached test cases are more for the benefit of the patch reviewer, not something I intended to be merged. For v2, I will just send the single patch out. Jessica
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 0/1] Implement character sets for sscanf() Jessica Yu <jeyu@redhat.com> - 2016-02-20 02:30 +0100
Re: [PATCH 0/1] Implement character sets for sscanf() Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-02-22 10:30 +0100
Re: Implement character sets for sscanf() Jessica Yu <jeyu@redhat.com> - 2016-02-22 20:40 +0100
csiph-web