Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Mar 2010 19:43:42 +0100
From:      Adam PAPAI <wooh@wooh.hu>
To:        freebsd-current@freebsd.org
Subject:   bsdtar(1) line_reader.c interesting code part - partial patch
Message-ID:  <4BA3C5DE.50001@wooh.hu>

next in thread | raw e-mail | index | archive | help
Hi,

Bug report sais:

http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/144786

bsdtar(1) doesn't support multi line matching or it is broken.

This patch [1] should solve it but not sure about this line in the 
original code:

if (lr->nullSeparator) {
...
}

This is  constant '\n' so this code part was never reached. This is why 
the '\n' separated lines were handled as one long line.

The line_reader.c header comment sais:

  * Read lines from file and do something with each one.  If option_null
  * is set, lines are terminated with zero bytes; otherwise, they're
  * terminated with newlines.

But where is the switch to change between \n and zero bytes? :)

[1]: http://www.wooh.hu/freebsd/line_reader.c.patch.txt


-- 
Adam PAPAI



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4BA3C5DE.50001>