b26fa1a2fbcfee7d03b0c8fd15ec3aa64ae70b9f |
|
10-Feb-2016 |
Daniel Mack <daniel@zonque.org> |
tree-wide: remove Emacs lines from all files
This should be handled fine now by .dir-locals.el, so need to carry that
stuff in every file. |
4afd3348c7506dd1d36305b7bcb9feb8952b9d6b |
|
27-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: expose "p"-suffix unref calls in public APIs to make gcc cleanup easy
GLIB has recently started to officially support the gcc cleanup
attribute in its public API, hence let's do the same for our APIs.
With this patch we'll define an xyz_unrefp() call for each public
xyz_unref() call, to make it easy to use inside a
__attribute__((cleanup())) expression. Then, all code is ported over to
make use of this.
The new calls are also documented in the man pages, with examples how to
use them (well, I only added docs where the _unref() call itself already
had docs, and the examples, only cover sd_bus_unrefp() and
sd_event_unrefp()).
This also renames sd_lldp_free() to sd_lldp_unref(), since that's how we
tend to call our destructors these days.
Note that this defines no public macro that wraps gcc's attribute and
makes it easier to use. While I think it's our duty in the library to
make our stuff easy to use, I figure it's not our duty to make gcc's own
features easy to use on its own. Most likely, client code which wants to
make use of this should define its own:
#define _cleanup_(function) __attribute__((cleanup(function)))
Or similar, to make the gcc feature easier to use.
Making this logic public has the benefit that we can remove three header
files whose only purpose was to define these functions internally.
See #2008. |
fa4b687b63d229c7711c146896b0faa116284ede |
|
13-Nov-2015 |
Michal Schmidt <mschmidt@redhat.com> |
analyze: do not draw ConflictedBy dependencies in dot graph
We already draw Conflicts. I see no reason for having every red line in
the graph duplicated in the opposite direction. |
8901b40502670d1d153f92294ae93245f608adc8 |
|
13-Nov-2015 |
Michal Schmidt <mschmidt@redhat.com> |
analyze: show Requisite dependencies in the dot graph again
We lost them a long time ago with commit 048ecf5b843. |
f32b43bda454a70ae23d6802605d41b26dc24ce2 |
|
12-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
core: remove support for RequiresOverridable= and RequisiteOverridable=
As discussed at systemd.conf 2015 and on also raised on the ML:
http://lists.freedesktop.org/archives/systemd-devel/2015-November/034880.html
This removes the two XyzOverridable= unit dependencies, that were
basically never used, and do not enhance user experience in any way.
Most folks looking for the functionality this provides probably opt for
the "ignore-dependencies" job mode, and that's probably a good idea.
Hence, let's simplify systemd's dependency engine and remove these two
dependency types (and their inverses).
The unit file parser and the dbus property parser will now redirect
the settings/properties to result in an equivalent non-overridable
dependency. In the case of the unit file parser we generate a warning,
to inform the user.
The dbus properties for this unit type stay available on the unit
objects, but they are now hidden from usual introspection and will
always return the empty list when queried.
This should provide enough compatibility for the few unit files that
actually ever made use of this. |
b5efdb8af40ea759a1ea584c1bc44ecc81dd00ce |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out allocation calls into alloc-util.[ch] |
7d50b32a129e781401cf897475f388f682de1368 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out globbing related calls into glob-util.[ch] |
8752c5752f3b9023f9ce96a55d70c6e5fc31118f |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: move more locale-related calls to locale-util.[ch] |
6bedfcbb2970e06a4d3280c8fb62083d252ede73 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split string parsing related calls from util.[ch] into parse-util.[ch] |
b1b533a06085def8c248f9c34b8b3672e9ee455f |
|
07-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
analyze: trivial code cleanups |
febda62a36bea0a817b8bc6e63d71e74f65845ba |
|
07-Oct-2015 |
Łukasz Stelmach <l.stelmach@samsung.com> |
analyze: minor fixes according to review
+ use _cleanup_host_info in acquire_host_info()
+ revert the first strempty() to show "Linux" string in case
os_pretty_name is missing. |
caeacefe9f4db9c7f853a06d9d50070930a4b2d6 |
|
06-Oct-2015 |
Łukasz Stelmach <l.stelmach@samsung.com> |
analyze: replace isempty()+ternary with strempty() |
6cdf0399f3f2b7302a79f979cbe160531bd4049a |
|
06-Oct-2015 |
Łukasz Stelmach <l.stelmach@samsung.com> |
analyze: do not require information from hostnamed |
19f462f2de4d5513111974dad90b0eb83ae02f9d |
|
06-Oct-2015 |
Łukasz Stelmach <l.stelmach@samsung.com> |
analyze: introduce _cleanup_host_info_ |
2ca2a91cf1deba83825692f1ce06116d2aed2379 |
|
30-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
analyze: add new set-log-target subcommand
We already have the property writable, hence let's add a command to set
it. |
266f3e269d173f104aa2a5e3ceac9b6979ea5039 |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
bus-util: rename bus_open_transport() to bus_connect_transport()
In sd-bus, the sd_bus_open_xyz() family of calls allocates a new bus,
while sd_bus_default_xyz() family tries to reuse the thread's default
bus. bus_open_transport() sometimes internally uses the former,
sometimes the latter family, but suggests it only calls the former via
its name. Hence, let's avoid this confusion, and generically rename the
call to bus_connect_transport().
Similar for all related calls.
And while we are at it, also change cgls + cgtop to do direct systemd
connections where possible, since all they do is talk to systemd itself. |
3f6fd1ba65f962702753c4ad284b588e59689a23 |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
util: introduce common version() implementation and use it everywhere
This also allows us to drop build.h from a ton of files, hence do so.
Since we touched the #includes of those files, let's order them properly
according to CODING_STYLE. |
1fc464f6fbecfc5d8ba9f7b98d19e21fb324bfb9 |
|
22-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
cgtop: underline table header
Let's underline the header line of the table shown by cgtop, how it is
customary for tables. In order to do this, let's introduce new ANSI
underline macros, and clean up the existing ones as side effect. |
ece174c5439021e32ebcc858842de9586072c006 |
|
09-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: drop {} from one-line if blocks
Patch via coccinelle. |
a1e58e8ee1c84b633d6d6d651d5328d4dd4eba5b |
|
09-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: use coccinelle to patch a lot of code to use mfree()
This replaces this:
free(p);
p = NULL;
by this:
p = mfree(p);
Change generated using coccinelle. Semantic patch is added to the
sources. |
4387795e0e3adcdfbfac4d83210ff53aa7c038c0 |
|
07-Sep-2015 |
Evgeny Vereshchagin <evvers@ya.ru> |
analyze: add alias handling for --{from,to}-pattern options
`systemd-analyze dot --from-pattern default.target` works fine |
83efb7c22722bd8d07091d2cb6545cdef003cc90 |
|
06-Sep-2015 |
Evgeny Vereshchagin <evvers@ya.ru> |
analyze: add "alias" handling to dot subcommand
`systemd-analyze dot default.target` works fine |
06bef033becc75da95eee9b5fff3b0d5664195e2 |
|
28-Jul-2015 |
Ivan Shapovalov <intelfx100@gmail.com> |
analyze: correctly draw the plot for user instances
Start-up timestamp of a user instance (userspace_time in struct boot_times)
actually may be arbitrarily big. This, because all timestamps are offset by
that value, leads to creation of arbitrarily wide SVGs which almost completely
consist of blank space.
Fix this by inverse-offsetting all timestamps by that value if user instance
operation is requested.
Fixes #740. |
29b8b5ce87017150cb57425eca6e906a8f9fc243 |
|
28-Jul-2015 |
Ivan Shapovalov <intelfx100@gmail.com> |
analyze: move acquire_boot_times() above acquire_time_data()
Next patch will make the latter call into the former. |
03976f7b4a84b8b1492a549a3470b2bba8f37008 |
|
03-Jul-2015 |
Lennart Poettering <lennart@poettering.net> |
sd-bus: introduce new sd_bus_flush_close_unref() call
sd_bus_flush_close_unref() is a call that simply combines sd_bus_flush()
(which writes all unwritten messages out) + sd_bus_close() (which
terminates the connection, releasing all unread messages) +
sd_bus_unref() (which frees the connection).
The combination of this call is used pretty frequently in systemd tools
right before exiting, and should also be relevant for most external
clients, and is hence useful to cover in a call of its own.
Previously the combination of the three calls was already done in the
_cleanup_bus_close_unref_ macro, but this was only available internally.
Also see #327 |
b2c23da8cea1987a1a329f5a964d3299b7ca7890 |
|
11-May-2015 |
Lennart Poettering <lennart@poettering.net> |
core: rename SystemdRunningAs to ManagerRunningAs
It's primarily just a property of the Manager object after all, and we
try to refer to PID 1 as "manager" instead of "systemd", hence let's to
stick to this here too. |
288a74cce597f81d3ba01d8a5ca7d2ba5b654b7e |
|
11-Apr-2015 |
Ronny Chevalier <chevalier.ronny@gmail.com> |
shared: add terminal-util.[ch] |
2eec67acbb00593e414549a7e5b35eb7dd776b1b |
|
23-Feb-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
remove unused includes
This patch removes includes that are not used. The removals were found with
include-what-you-use which checks if any of the symbols from a header is
in use. |
2404701e679904979751816930101511d8ec5d49 |
|
16-Feb-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Transpose args in strv_fnmatch() to be more oo |
6ecb6cec66739d733e95302031998f517261380c |
|
16-Feb-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
analyze: change behaviour of combined --to/from--pattern
We would require a match against all three: patterns specified
with --to, with --from, and as positional arguments to show an
edge. This does not seem useful. Let instead the positional args
behave like they were specified in both --to and --from, which is
fairly intuitive and should be more useful. |
bceccd5ecc393c344ab008737ba6aab211a5ea9f |
|
16-Feb-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Add helper for fnmatch over strv |
b57b06258e0b1894edb6d1fc52a80b3c33164892 |
|
28-Jan-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
notify,firstboot,analyze,run: trim --help output to 80 lines |
de33fc625725d199629ed074d6278504deb23deb |
|
24-Dec-2014 |
Lennart Poettering <lennart@poettering.net> |
sd-bus: rename sd_bus_open_system_container() to sd_bus_open_system_machine()
Pretty much everywhere else we use the generic term "machine" when
referring to containers in API, so let's do though in sd-bus too. In
particular, since the concept of a "container" exists in sd-bus too, but
as part of the marshalling system. |
da927ba997d68401563b927f92e6e40e021a8e5c |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: no need to negate errno for log_*_errno()
It corrrectly handles both positive and negative errno values. |
0a1beeb64207eaa88ab9236787b1cbc2f704ae14 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: auto-convert the simple cases to log_*_errno()
As a followup to 086891e5c1 "log: add an "error" parameter to all
low-level logging calls and intrdouce log_error_errno() as log calls
that take error numbers", use sed to convert the simple cases to use
the new macros:
find . -name '*.[ch]' | xargs sed -r -i -e \
's/log_(debug|info|notice|warning|error|emergency)\("(.*)%s"(.*), strerror\(-([a-zA-Z_]+)\)\);/log_\1_errno(-\4, "\2%m"\3);/'
Multi-line log_*() invocations are not covered.
And we also should add log_unit_*_errno(). |
d5099efc47d4e6ac60816b5381a5f607ab03f06e |
|
15-Sep-2014 |
Michal Schmidt <mschmidt@redhat.com> |
hashmap: introduce hash_ops to make struct Hashmap smaller
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. |
0ee9613d98cbe1f36ffc98c6bfa51dd2b798fc6d |
|
13-Sep-2014 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
analyze: fix mem leak
Found with Coverity. Fixes: CID#1237756 |
d725a138c5c311ba06567d6841933aa5b7b6a435 |
|
11-Sep-2014 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
analyze: avoid a null dereference
If we have an error in the early sd_bus_* calls then unit_times
will still be null.
Found with coverity. Fixes: CID#996464 |
dad29dff1925a114e20d4eb7b47fca23c4f25fd7 |
|
20-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
cmdline: for new tools avoid introduce new negative switches, and properly 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. |
6a41c9e288fc9483aa98151338501f7654c229b6 |
|
14-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
analyze: some fixes to the --help text |
249968612f16a71df909d6e73785c18a9ff36a65 |
|
04-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
bus: always explicitly close bus from main programs
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. |
601185b43da638b1c74153deae01dbd518680889 |
|
04-Aug-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Unify parse_argv style
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. |
5d459d6b07206963a022e9a95ea9d8c18dc0eab8 |
|
31-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Constify option table and add missing option |
5b6f6ebd63a0d212738ee50e9bc357120af6d3ce |
|
26-Jul-2014 |
Daniel Buch <boogiewasthere@gmail.com> |
analyze: fix seg-fault with no cl-argument
We need to check if argv[1] is set before compare |
1d3bc0177a1952473bbe45b5bbb4e4e4f69a84f4 |
|
22-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Merge systemd-verify with systemd-analyze |
1f89214e6e990a0b552f6854f87f8514ca384956 |
|
26-May-2014 |
Thomas Bächler <thomas@archlinux.org> |
analyze/run: use bus_open_transport_systemd instead of bus_open_transport
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... |
7e690cefd4f09bb6370f91611f623adea841bdf4 |
|
18-May-2014 |
Djalal Harouni <tixxdz@opendz.org> |
analyze: read host and system information from remote
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> |
a213b7e977221ca96bbc1b19a5a879c912ba2488 |
|
23-Apr-2014 |
Jeffrey Clark <h0tw1r3@gmail.com> |
analyze: fix plot with bad y size
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 |
6b01f1d3911bd7c7eadbb8a3b4375bd3ac05c98f |
|
23-Apr-2014 |
Lennart Poettering <lennart@poettering.net> |
delta: draw arrows with draw_special_char()
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. |
b5cfa7408c4cb68e9bb232fc34b07fd03c915617 |
|
31-Jan-2014 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
analyze: fix plot issues when using gummiboot
It would crash and the legend in the bottom followed the time 0.0. |
f168c27313e4d7b0aabee037dc9c78a5799f0597 |
|
03-Dec-2013 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
trivial coding style clean ups
- 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()
{
} |
c2e0d600ed76f6767d59715d93cf862808552ea2 |
|
10-Nov-2013 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
analyze: plot the time spent setting up security modules |
8fe12d88a8b4d5beb64e5d4efd205043a01b0c13 |
|
08-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
clients: add missing command line arguments |
f459b6025f9368116d8c410376546c157314c205 |
|
08-Nov-2013 |
Marc-Antoine Perennou <Marc-Antoine@Perennou.com> |
systemctl: port to libsystemd-bus |
988b9df29fa01a305eeb073153e7d5113a5ae537 |
|
07-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
analyze: make use of new sd_bus_get_property_strv() call |
a86a47ce1f63476631635fbcbc10af8877172114 |
|
07-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
clients: try to follow roughly the same order in --help texts for common options |
5b30bef856e89a571df57b7b953e9a1409d9aced |
|
07-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
bus: log message parsing errors everywhere with a generalized bus_log_parse_error() |
c8a8806e7705cb2e465b6727415c955fd5ef194b |
|
07-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
build-sys: merge sd-event into sd-bus
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. |
eb9da376d76b48585b3b63b4f91903b54f7abd36 |
|
06-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
clients: unify how we invoke getopt_long()
Among other things this makes sure we always expose a --version command
and show it in the help texts. |
3cd26e7cb24bf1408902c352ab9d2b9a27d4c74f |
|
06-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
analyze: port over to use bus_open_transport() |
d3eba116d14b8775eed02e433f7ec5f62cde4957 |
|
06-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
analyze: simplify things |
07d0eaa0171d6e30b85a4b84b3287509406f9451 |
|
06-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
analyze: fix indentation |
cc27380c1e09bd51380fbeb168d8315cc806e0ab |
|
01-Nov-2013 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
analyze: rename variables |
95168f7d55181475946ad93db30255c4d709df03 |
|
01-Nov-2013 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
analyze: plot: place the text on the side with most space
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. |
6e6ca4a5cca704da63ccf7ffa7d7e8a9e6e934f0 |
|
31-Oct-2013 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
analyze: share code to read a string array from sd-bus |
a936124f7ac441b7b32ea9f04fae02a573dbd954 |
|
31-Oct-2013 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
analyze: use sd_bus_get_propery_trivial and indentation |
5220a6f3a1f5a7324898ecfe7649af254cf561a6 |
|
30-Oct-2013 |
Lennart Poettering <lennart@poettering.net> |
general: various cleanups |
048ecf5b843eea928cb3a2edc15ee528153403ce |
|
25-Oct-2013 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
analyze: port to sd-bus |
b0770377ab844f92f336837d63f158b954300d2e |
|
22-Oct-2013 |
Kay Sievers <kay@vrfy.org> |
analyze: systemd-analyze.c -> analyze.c |