On Thu, 28.08.14 00:44, WaLyong Cho (walyong....@samsung.com) wrote: > On 08/27/2014 03:49 AM, Lennart Poettering wrote: > > On Tue, 26.08.14 18:11, Mantas Mikulėnas (graw...@gmail.com) wrote: > > > >> On Tue, Aug 26, 2014 at 5:07 PM, WaLyong Cho <walyong....@samsung.com> > >> wrote: > >>> > >>> This case really shouldn't be happen. (But actually sometime that was > >>> happen.) Eeven if happened we maybe want to see the bootchart exclude > >>> not printable processes. > >>> --- > >>> src/bootchart/svg.c | 3 +++ > >>> 1 file changed, 3 insertions(+) > >>> > >>> diff --git a/src/bootchart/svg.c b/src/bootchart/svg.c > >>> index 135883f..9b7de33 100644 > >>> --- a/src/bootchart/svg.c > >>> +++ b/src/bootchart/svg.c > >>> @@ -1014,6 +1014,9 @@ static void svg_ps_bars(void) { > >>> if (!enc_name) > >>> continue; > >>> > >>> + if (!utf8_is_printable(enc_name, strlen(enc_name))) > >>> + continue; > >>> + > >>> /* leave some trace of what we actually filtered etc. */ > >>> svg("<!-- %s [%i] ppid=%i runtime=%.03fs -->\n", > >>> enc_name, ps->pid, > >>> ps->ppid, ps->total); > >> > >> If the name is not printable, wouldn't it be better to show it in > >> escaped form rather than pretend it doesn't exist at all? > > > > Yeah I agree. I'd love to merge a patch that intrdouces > > utf8_escape_non_printable() or so, that works similar to > > utf8_escape_invalid(), but also escapes non-printable chars, and then > > make use of this here... > > OK, but I'm confusing. We already have *cescape*. Is it not enough with > *cescape*?
cescape() escapes all chars < 32 and >= 127, that means it only leaves ASCII printable characters, but not UTF8 printable characters, since most of them are encoded in > 127... Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel