Commit graph

8 commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek fd4a5ec6fa systemd-analyze: do not format timestamp when not printing it
../src/analyze/systemd-analyze.c:530:88: warning: data argument not used by format string [-Wformat-extra-args]
  ...svg_text(false, u->ixt, y, u->time? "%s (%s)" : "%s", u->name, format_timespan(ts, sizeof(ts), u->time));
                                                     ~~~~           ^
2013-03-20 19:16:01 -04:00
Lennart Poettering 2f6eb835ca analyze: use defines where we don't need static variables 2013-03-08 19:10:24 +01:00
Lennart Poettering ffaa0e2503 analyze: by now, systemd-analyze is hardly all my work 2013-03-08 19:03:50 +01:00
Lennart Poettering c170f3a41b analyze: various cleanups
Update systemd-analyze to follow the coding style of the other tools
more closely. Also, update the CODING_STYLE to document this for future
additions.

Changes:

- Always use usec_t for time units, so that we always use the same types
  everywhere, and format times the same way as everywhere else.

- Add "static" to global variables

- Make sure we can always distuingish OOM and other errors: ensure we
  always return useful error codes from all functions.

- Always free unit_times array
2013-03-08 18:58:08 +01:00
Lukas Nykryn 4534824035 systemd-analyze: free unit_times only if it is not NULL 2013-03-01 16:43:57 -05:00
Harald Hoyer a5c32cff1f honor SELinux labels, when creating and writing config files
Also split out some fileio functions to fileio.c and provide a SELinux
aware pendant in fileio-label.c

see https://bugzilla.redhat.com/show_bug.cgi?id=881577
2013-02-14 16:19:38 +01:00
Simon Peeters 1700761b06 Move systemctl dot to systemd-analyze dot 2013-02-13 14:47:05 -08:00
Simon Peeters 2265fbf7e5 systemd-analyze: rewrite in C.
Written by Peeters Simon <peeters.simon@gmail.com>.
Makefile stuff and cleaned up a bit by Auke Kok <auke-jan.h.kok@intel.com>.
Some code inspired by Marc-Antoine Perennou <Marc-Antoine@Perennou.com>.
2013-02-13 14:46:50 -08:00