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. |
b5efdb8af40ea759a1ea584c1bc44ecc81dd00ce |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out allocation calls into alloc-util.[ch] |
b1d4f8e154bf61b5de1b27461ef8e9c8c5e838a1 |
|
26-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out user/group/uid/gid calls into user-util.[ch] |
3ffd4af22052963e7a29431721ee204e634bea75 |
|
25-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out fd-related operations into fd-util.[ch]
There are more than enough to deserve their own .c file, hence move them
over. |
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. |
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 |
ce30c8dcb41dfe9264f79f30c7f51c0e74576638 |
|
10-Jun-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: whenever we fork off a foreign child process reset signal mask/handlers
Also, when the child is potentially long-running make sure to set a
death signal.
Also, ignore the result of the reset operations explicitly by casting
them to (void). |
0b452006de98294d1690f045f6ea2f7f6630ec3b |
|
10-Apr-2015 |
Ronny Chevalier <chevalier.ronny@gmail.com> |
shared: add process-util.[ch] |
6482f6269c87d2249e52e889a63adbdd50f2d691 |
|
10-Apr-2015 |
Ronny Chevalier <chevalier.ronny@gmail.com> |
shared: add formats-util.h |
dcee01125dde502bd8108c36ddf2026c1348865f |
|
07-Mar-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
login: fix copy-pasto in error path
CID #1256583. |
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. |
820d3acfe924e58965d14b4711d5df31c5db199a |
|
29-Nov-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
delta: diff returns 1 when files differ, ignore this
https://bugs.debian/org/771397 |
56f64d95763a799ba4475daf44d8e9f72a1bd474 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: use log_*_errno whenever %m is in the format string
If the format string contains %m, clearly errno must have a meaningful
value, so we might as well use log_*_errno to have ERRNO= logged.
Using:
find . -name '*.[ch]' | xargs sed -r -i -e \
's/log_(debug|info|notice|warning|error|emergency)\((".*%m.*")/log_\1_errno(errno, \2/'
Plus some whitespace, linewrap, and indent adjustments. |
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(). |
d9130355ee0530117518ff24354bdd552d030238 |
|
10-Nov-2014 |
Lennart Poettering <lennart@poettering.net> |
busctl: add "tree" command to explore object trees |
ca5447c082347d611c52b22a0115d4efe2d2e0e8 |
|
10-Nov-2014 |
Mantas Mikulėnas <grawity@gmail.com> |
inhibit: allow filtering --list by mode
Usually there are a few delay inhibitors all the time (NetworkManager,
Telepathy, etc.), but I'm only interested in the block ones. |
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. |
de0671ee7fe465e108f62dcbbbe9366f81dd9e9a |
|
15-May-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Remove unnecessary casts in printfs
No functional change expected :) |
ead349509e325aad720bb0349521a9e56e2ac7c0 |
|
13-May-2014 |
Lennart Poettering <lennart@poettering.net> |
replace more dup() by F_DUPFD_CLOEXEC |
76b543756ef69ce69784d571aefe8de65eaeb331 |
|
12-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
bus: introduce concept of a default bus for each thread and make use of it everywhere
We want to emphasize bus connections as per-thread communication
primitives, hence introduce a concept of a per-thread default bus, and
make use of it everywhere. |
40be0704eb4784ee01f60442396a70f797281744 |
|
07-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
inhibit: more conversions to use bus_log_parse_error() |
5b30bef856e89a571df57b7b953e9a1409d9aced |
|
07-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
bus: log message parsing errors everywhere with a generalized bus_log_parse_error() |
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. |
45a7c6b5d373170eda2fa7bdb8fa81b49865f316 |
|
06-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
inhibit: don't return error code on --help |
5220a6f3a1f5a7324898ecfe7649af254cf561a6 |
|
30-Oct-2013 |
Lennart Poettering <lennart@poettering.net> |
general: various cleanups |
0fb0c56f5283a8a94560f595768a801c8240a9bd |
|
22-Oct-2013 |
Tom Gundersen <teg@jklm.no> |
inhibit: port to sd-bus |
391a4f72422ab18c0a6b5f291fa47f8d606b9e14 |
|
25-Apr-2013 |
Lennart Poettering <lennart@poettering.net> |
inhbit: show comm field of inhibiting processes |
7fd1b19bc9e9f5574f2877936b8ac267c7706947 |
|
18-Apr-2013 |
Harald Hoyer <harald@redhat.com> |
move _cleanup_ attribute in front of the type
http://lists.freedesktop.org/archives/systemd-devel/2013-April/010510.html |
449101fce2757575c4813a9512890536365445f6 |
|
18-Apr-2013 |
Simon Peeters <peeters.simon@gmail.com> |
Move bus_error to dbus-common and remove bus_error_message_or_strerror
bus_error and bus_error_message_or_strerror dit almost exactly the same,
so use only one of them and place it in dbus-common. |
4654e558a3c297a71f05c3b2db6a2744fcf3cdea |
|
19-Mar-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
logind: exploit previous cleanups and simplify returns |
ce0fc5f5f6debc6e37ac3ab0a3ea1c9c35b3ed99 |
|
19-Mar-2013 |
Colin Walters <walters@verbum.org> |
logind: Make more use of cleanup macros |
2f2343c6b15ec5495eb5032ae36b937fe36177cc |
|
05-Mar-2013 |
Kay Sievers <kay@vrfy.org> |
inhibit: print --list if no argument is given |
41330ddb033f2cbeeb565e43708be91d5df28fb2 |
|
01-Mar-2013 |
Mantas Mikulėnas <grawity@gmail.com> |
inhibit: make the output more readable
The columnar output can become pretty horrible. When GNOME inhibits
power/suspend/hibernate keys, the "WHAT" column's text extends to "WHO"
and even "WHY". At the same time, all texts in "WHY" are of the form
GNOME handlin...sses
Receiving sle...ions
GNOME needs t...reen
This patch splits each inhibit entry into four lines, allowing the full
text to fit in a normal-width terminal. |
bc2708414babc5c99bb8000e63c84e87606cc15d |
|
04-Jan-2013 |
Lennart Poettering <lennart@poettering.net> |
build-sys: drop all distribution specfic checks
Yay, we now have a completely generic systemd. No distribution specific checks anymore! |
2f1bb51336e02005ecdac402591154301d3d680b |
|
04-Oct-2012 |
Сковорода Никита Андреевич <chalkerx@gmail.com> 13 <chalkerx@gmail.com> |
man: handle-sleep-key is invalid, replace it with handle-suspend-key and handle-hibernate-key in systemd-inhibit help and man. |
12a1309e117972791a84f20483e981a42be0d9ac |
|
19-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
man: document new inhibitor types |
77030bd65f755c10294aec7d3b87febea977b8e9 |
|
10-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
inhibit: close all fds when invoking inhibited tool |
3137e0bd5290fea67e52cfe7ff657c3af400b548 |
|
10-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
dbus: minor coding style fixes |
680258b112e8a78769a42abb71ada4981ce701e1 |
|
10-Sep-2012 |
Matthias Clasen <mclasen@redhat.com> |
Make systemd-inhibit --list work
The code in the print_inhibitors function had an unintended
unconditional early exit, causing it to never print any
inhibitors. |
b9c26b413497a0014ac2058a0ec04849a83df1ea |
|
08-Aug-2012 |
Simon Peeters <peeters.simon@gmail.com> |
logind: use bus_method_call_with_reply() where posible |
4943c1c94ba751c98763f4232b4350481b22c90a |
|
08-May-2012 |
Lennart Poettering <lennart@poettering.net> |
logind: use "sleep" as generic term for "suspend", "hibernate", and later on "hybrid suspend" |
eecd1362f7f4de432483b5d77c56726c3621a83a |
|
05-May-2012 |
Lennart Poettering <lennart@poettering.net> |
logind: implement delay inhibitor locks in addition to block inhibitor locks
This is useful to allow applications to synchronously save data before
the system is suspended or shut down. |