bsdtar(1) line_reader.c interesting code part - partial patch
Adam PAPAI
wooh at wooh.hu
Fri Mar 19 19:12:43 UTC 2010
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
More information about the freebsd-current
mailing list