From: Thomas Hindoe Paaboel Andersen Date: Fri, 31 Jan 2014 06:07:20 +0000 (+0100) Subject: analyze: fix plot issues when using gummiboot X-Git-Tag: v209~276 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=b5cfa7408c4cb68e9bb232fc34b07fd03c915617 analyze: fix plot issues when using gummiboot It would crash and the legend in the bottom followed the time 0.0. --- diff --git a/src/analyze/analyze.c b/src/analyze/analyze.c index 459f87957..3d2d08f66 100644 --- a/src/analyze/analyze.c +++ b/src/analyze/analyze.c @@ -556,7 +556,7 @@ static int analyze_plot(sd_bus *bus) { name.nodename, name.release, name.version, name.machine); svg("\n", 20.0 + (SCALE_X * boot->firmware_time)); - svg_graph_box(m, -boot->firmware_time, boot->finish_time); + svg_graph_box(m, -(double) boot->firmware_time, boot->finish_time); if (boot->firmware_time) { svg_bar("firmware", -(double) boot->firmware_time, -(double) boot->loader_time, y); @@ -606,7 +606,10 @@ static int analyze_plot(sd_bus *bus) { y++; } + svg("\n"); + /* Legend */ + svg("\n"); y++; svg_bar("activating", 0, 300000, y); svg_text(true, 400000, y, "Activating");