[Toybox] [PATCH] hostname: fix behavior when in jail.
Rob Landley
rob at landley.net
Fri Jan 25 18:55:59 PST 2019
On 1/25/19 4:56 PM, enh wrote:
> On Sun, Jan 20, 2019 at 11:07 PM Rob Landley <rob at landley.net> wrote:
>>
>> On 1/20/19 4:20 PM, enh wrote:
>>> or that just isn't started yet (like hexdump), patch is probably in
>>> the worst state: that will need fuzz support (which POSIX describes in
>>> more detail than i would have expected:
>>> https://pubs.opengroup.org/onlinepubs/9699919799/utilities/patch.html)
>>
>> This page does not contain the word "fuzz"? What were you referring to?
>
> search for "1000 bytes"...
That's not fuzz, that's just applying at an offset. Which my patch engine does,
but it works like a stream editor: the line at which the hunk applies isn't
currently used at all, it's just "wherever the removed context occurs".
Currently I'm not even using the offset for printing output, although I should
do that when adding fuzz. I could also do a cap on the number of lines from the
original location it could apply at, but there's no really logical way to know.
(I could also buffer the whole file and do passes over the file to find the
_closest_ match, but in the absence of fuzz I've never encountered an instance
of there being more than _one_ match. The removed lines are also context. It's
been doing this for over a decade now, and I ported my patch implementation to
BusyBox in 2010 and in the 9 years since nobody's reported this failure there
either...)
Rob
More information about the Toybox
mailing list