chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
logind: allow suspending if there are no displays
[elogind.git]
/
src
/
analyze
/
analyze.c
diff --git
a/src/analyze/analyze.c
b/src/analyze/analyze.c
index eb85276b4021190de5afbe754590260503c8a41e..ebaa9d025c22cbd77164ba143c55ce706573b740 100644
(file)
--- 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 */
#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))
#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("<g transform=\"translate(%.3f,100)\">\n", 20.0 + (SCALE_X * boot->firmware_time));
name.nodename, name.release, name.version, name.machine);
svg("<g transform=\"translate(%.3f,100)\">\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);
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++;
}
y++;
}
+ svg("</g>\n");
+
/* Legend */
/* Legend */
+ svg("<g transform=\"translate(20,100)\">\n");
y++;
svg_bar("activating", 0, 300000, y);
svg_text(true, 400000, y, "Activating");
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--)
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_VERT
ICAL
: DRAW_TREE_SPACE));
printf("%s", draw_special_char(last ? DRAW_TREE_RIGHT : DRAW_TREE_BRANCH));
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) {
return r;
STRV_FOREACH(c, deps) {