On Friday 17 June 2011 10:58, Timo Teräs wrote:
> >> bb_get_chunk_with_continuation() is used only by config parser,
> >> and config parser definitely has no need to deal with \0.
> >> Meaning: it needs to not segfault or hand on files with \0,
> >> but other than this, it is free to either ignore \0, or replace
> >> then with space or newline. IOW: whoever has \0 in their *config*
> >> files is shooting himself in the foot.
> >>
> >> The first step would be to unmarry these two functions.
> > 
> > Done in this commit:
> > 
> > http://git.busybox.net/busybox/commit/?id=a1a448347e71c9899ad1500cbd8739fd82e1bb91
> 
> Did you run the checks if anything broke?

Yes

> > bb_get_chunk_with_continuation -> get_line_with_continuation,
> > become static in parse_config.c,
> > lost one parameter and one realloc per line.
> > 
> > Since now it is nicely localized to parse_config.c, we can optimize it for 
> > speed
> > further. For example, we can avoid realloc per each line by reusing the same
> > buffer.
> 
> Goody. config_* is fairly isolated now, and can be updated separately.
> I'll try to take the time to optimise this during this weekend.


-- 
vda
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to