linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <mcgrof@kernel.org>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: "Luis R. Rodriguez" <mcgrof@kernel.org>,
	Dave Chinner <david@fromorbit.com>,
	Eric Sandeen <sandeen@sandeen.net>,
	sandeen@redhat.com, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 0/5] xfsprogs-4.17: mkfs config file enhancements
Date: Sat, 16 Jun 2018 02:04:59 +0200	[thread overview]
Message-ID: <20180616000459.GS5527@wotan.suse.de> (raw)
In-Reply-To: <20180614183528.GC8128@magnolia>

On Thu, Jun 14, 2018 at 11:35:28AM -0700, Darrick J. Wong wrote:
> Section headers:
> n = sscanf(line, " [ %m[^] \f\n\r\t\v] %ms %m[^\n]", &tag, &cp, &junk);
> 
> We pick up the section name (in *tag) if cp == "]" and n == 2 (i.e.
> there's no junk at the end of the line.
> 
> "# some comment"
> "[data]"
> "[data] # some comment"
> " [data]"
> "[ data]"
> "[data ]"
> "[data] "
> <repeat but with tabs instead of spaces>
> 
> "[data] noalign = 1"
> "[data cow]"
> "[data"
> "data]"
> " [data cow]"
> "[ data cow]"
> "[data cow]"
> "[data cow ]"
> "[data cow] "
> "[data.cow]"
> "[data noalign = 1]"
> "[nonexistentsection]"
> 
> Key/value:
> 
> n = sscanf(line, " %m[^][ \f\n\r\t\v=] %m[=] %m[^\n]", &key, &eq, &val);
> 
> We pick up the key/value pair if n == 3, eq == "]" and *key is found in
> the current section header, and if *val can be stroull'd.
> 
> Assuming a [data] section,
> 
> "# some comment"
> "noalign=1"
> "noalign=1 # some comment"
> " noalign=1"
> "noalign =1"
> "noalign= 1"
> "noalign=1 "
> " noalign =1"
> " noalign= 1"
> " noalign=1 "
> "noalign = 1"
> "noalign =1 "
> "noalign= 1 "
> " noalign = 1"
> " noalign= 1 "
> "noalign = 1 "
> <repeat with tabs>
> 
> "noalign moo = 1"
> "noalign is 1"
> "noalign = 10"
> "noalign = 109825091285091825091285018250"
> "noalign = [metadata]"
> "moocow"
> "moocow = 5"

I tried some stuff but I could not get it to barf. Can you send me some
config file attachments which do make it puke? Or patches? :)

  Luis

  reply	other threads:[~2018-06-16  0:05 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-13 19:31 [PATCH 0/5] xfsprogs-4.17: mkfs config file enhancements Darrick J. Wong
2018-06-13 19:31 ` [PATCH 1/5] mkfs: move build-time defaults to a separate file Darrick J. Wong
2018-06-14  2:34   ` Eric Sandeen
2018-06-13 19:31 ` [PATCH 2/5] mkfs: move config file enums to config.h Darrick J. Wong
2018-06-14  2:51   ` Eric Sandeen
2018-06-14 16:24     ` Luis R. Rodriguez
2018-06-13 19:32 ` [PATCH 3/5] mkfs: hoist mkfs configfile dir string generation to build system Darrick J. Wong
2018-06-14  2:54   ` Eric Sandeen
2018-06-13 19:32 ` [PATCH 4/5] mkfs: emit config file from builtin defaults Darrick J. Wong
2018-06-14  3:05   ` Eric Sandeen
2018-06-13 19:32 ` [PATCH 5/5] mkfs: generate mkfs config file in man page Darrick J. Wong
2018-06-14  3:17   ` Eric Sandeen
2018-06-14  4:06 ` [PATCH 0/5] xfsprogs-4.17: mkfs config file enhancements Dave Chinner
2018-06-14  4:23   ` Eric Sandeen
2018-06-14  5:08     ` Dave Chinner
2018-06-14  6:29       ` Darrick J. Wong
2018-06-14 17:46         ` Luis R. Rodriguez
2018-06-14 17:59           ` Darrick J. Wong
2018-06-14 18:16             ` Luis R. Rodriguez
2018-06-14 18:35               ` Darrick J. Wong
2018-06-16  0:04                 ` Luis R. Rodriguez [this message]
2018-06-14 19:05             ` Eric Sandeen
2018-06-14 22:22               ` Dave Chinner
2018-06-14 23:33         ` Dave Chinner
2018-06-14 23:38           ` Eric Sandeen
2018-06-14 14:31       ` Eric Sandeen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180616000459.GS5527@wotan.suse.de \
    --to=mcgrof@kernel.org \
    --cc=darrick.wong@oracle.com \
    --cc=david@fromorbit.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@redhat.com \
    --cc=sandeen@sandeen.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).