In article <4eb7f47c.4040...@netbsd.org>, Julio Merino <j...@netbsd.org> wrote: >On 11/6/11 1:18 PM, Christos Zoulas wrote: >> Module Name: src >> Committed By: christos >> Date: Sun Nov 6 18:18:16 UTC 2011 >> >> Modified Files: >> src/external/bsd/atf/dist/atf-c: tc.c >> >> Log Message: >> don't truncate error messages to 1K. > >The use of dprintf cannot be merged back upstream because this function >does not appear to be widely available. A bunch of write()s should have >the same effect and remove the 1K limit; will do this. > >Anyway, where have you spot error messages longer than 1K? That >seems... ugly.
Well, I tried to print the failing pattern in t_expand, and it silently got truncated. dprintf(3) has been part of TOG since 2006: (http://pubs.opengroup.org/onlinepubs/9699919799/functions/dprintf.html) So it would be preferable to implement it in terms of asprintf/write + or snprintf/malloc/write or even fdopen/fprintf instead of open coding it. christos