X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fanalyze%2Fanalyze.c;h=ebaa9d025c22cbd77164ba143c55ce706573b740;hb=9bdb98c59451ed090f8d35d470a54710f389ce71;hp=eb85276b4021190de5afbe754590260503c8a41e;hpb=c2e0d600ed76f6767d59715d93cf862808552ea2;p=elogind.git
diff --git a/src/analyze/analyze.c b/src/analyze/analyze.c
index eb85276b4..ebaa9d025 100644
--- a/src/analyze/analyze.c
+++ b/src/analyze/analyze.c
@@ -43,7 +43,7 @@
#include "pager.h"
#define SCALE_X (0.1 / 1000.0) /* pixels per us */
-#define SCALE_Y 20.0
+#define SCALE_Y (20.0)
#define compare(a, b) (((a) > (b))? 1 : (((b) > (a))? -1 : 0))
@@ -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");
@@ -642,7 +645,7 @@ static int list_dependencies_print(const char *name, unsigned int level, unsigne
char ts[FORMAT_TIMESPAN_MAX], ts2[FORMAT_TIMESPAN_MAX];
for (i = level; i != 0; i--)
- printf("%s", draw_special_char(branches & (1 << (i-1)) ? DRAW_TREE_VERT : DRAW_TREE_SPACE));
+ printf("%s", draw_special_char(branches & (1 << (i-1)) ? DRAW_TREE_VERTICAL : DRAW_TREE_SPACE));
printf("%s", draw_special_char(last ? DRAW_TREE_RIGHT : DRAW_TREE_BRANCH));
@@ -740,7 +743,7 @@ static int list_dependencies_one(sd_bus *bus, const char *name, unsigned int lev
}
}
- if(!to_print)
+ if (!to_print)
return r;
STRV_FOREACH(c, deps) {