Age | Commit message (Collapse) | Author |
|
It is redundant to store 'hash' and 'compare' function pointers in
struct Hashmap separately. The functions always comprise a pair.
Store a single pointer to struct hash_ops instead.
systemd keeps hundreds of hashmaps, so this saves a little bit of
memory.
|
|
Found with Coverity. Fixes: CID#1237756
|
|
If we have an error in the early sd_bus_* calls then unit_times
will still be null.
Found with coverity. Fixes: CID#996464
|
|
align --help texts
Negative switches are a bad un-normalized thing. We alerady have some,
but we should try harder to avoid intrdoucing new ones.
Hence, instead of adding two switches:
--foobar
--no-foobar
Let's instead use the syntax
--foobar
--foobar=yes
--foobar=no
Where the first two are equivalent. The boolean argument is parsed
following the usual rules.
Change all new negative switches this way.
This patch also properly aligns the --help table, so that single char
switches always get a column separate of the long switches.
|
|
|
|
Since b5eca3a2059f9399d1dc52cbcf9698674c4b1cf0 we don't attempt to GC
busses anymore when unsent messages remain that keep their reference,
when they otherwise are not referenced anymore. This means that if we
explicitly want connections to go away, we need to close them.
With this change we will no do so explicitly wherver we connect to the
bus from a main program (and thus know when the bus connection should go
away), or when we create a private bus connection, that really should go
away after our use.
This fixes connection leaks in the NSS and PAM modules.
|
|
getopt is usually good at printing out a nice error message when
commandline options are invalid. It distinguishes between an unknown
option and a known option with a missing arg. It is better to let it
do its job and not use opterr=0 unless we actually want to suppress
messages. So remove opterr=0 in the few places where it wasn't really
useful.
When an error in options is encountered, we should not print a lengthy
help() and overwhelm the user, when we know precisely what is wrong
with the commandline. In addition, since help() prints to stdout, it
should not be used except when requested with -h or --help.
Also, simplify things here and there.
|
|
|
|
We need to check if argv[1] is set before compare
|
|
|
|
Both systemd-analyze and systemd-run only access org.freedesktop.systemd1
on the bus. This patch allows using systemd-run --user and systemd-analyze
--user even if the user session's bus is not properly integrated with the
systemd user unit.
https://bugs.freedesktop.org/show_bug.cgi?id=79252 and other reports...
|
|
This makes "systemd-analyze plot" read host information from remote.
While we are it show if this is a virtualized system.
https://bugs.freedesktop.org/show_bug.cgi?id=76498
Reported-by: Zach <zachcook1991@gmail.com>
|
|
systemd-analyze plot > test.svg produces output with all y and height
element attributes equal to zero. This of course causes the resulting
svg to appear blank (zero height). Bug does not affect x86. Looks like
a compiler optimization may be the culprit.
https://github.com/archlinuxarm/PKGBUILDs/issues/815
|
|
Let's unify generation of unicode chars at one place.
Also, don't add an extra space into chars we print, except for the tree
chars where this is really necessary.
|
|
It would crash and the legend in the bottom followed the time 0.0.
|
|
- Add space between if/for and the opening parentheses
- Place the opening brace on same line as the function (not for udev)
From the CODING_STYLE
Try to use this:
void foo() {
}
instead of this:
void foo()
{
}
|
|
|
|
|
|
|
|
|
|
|
|
bus_log_parse_error()
|
|
The sd-event APIs should be available only as part of libsystemd-bus so
that the utility calls are not linked into each independently and we can
minimize the number of libraries we have.
|
|
Among other things this makes sure we always expose a --version command
and show it in the help texts.
|
|
|
|
|
|
|
|
|
|
Set the width of the svg to always fit the longest string
while taking its starting position into consideration.
Place the text on the right while the starting point is
in the first half of the screen. After that we put it on
the left to save the svg from being wider that it has to.
|
|
|
|
|
|
|
|
|
|
|