Re: [PATCH 0/5] xfsprogs-4.17: mkfs config file enhancements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux