Age | Commit message (Collapse) | Author |
|
|
|
It corrrectly handles both positive and negative errno values.
|
|
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().
|
|
https://bugs.freedesktop.org/show_bug.cgi?id=82485
|
|
udev_device_get_parent() may return NULL when the device doesn't have a
parent, as is the case with (for example) /sys/devices/virtual/drm/ttm.
Also, log an actual error message instead of "-12 displays connected".
|
|
|
|
Previously we expected the desktop environment to take an inhibitor
lock, but this opened a race on boot-up where logind might already be
running but no DE is active.
Hence, let's move checking for additional displays into logind. This
also opens up this logic for other DEs, given that only GNOME
implemented the inhibitor logic so far.
|
|
processing
This should make operation nicer with docking stations, but will not
cover anything that does not implement SW_DOCK.
|
|
Fix the whole code to use "unsigned int" for vtnr. 0 is an invalid vtnr so
we don't need negative numbers at all.
Note that most code already assumes it's unsigned so in case there's a
negative vtnr, our code may, under special circumstances, silently break.
So this patch makes sure all sources of vtnrs verify the validity. Also
note that the dbus api already uses unsigned ints.
|
|
|
|
This way we can without races always determine the machine for a leader
PID. This allows machine managers to query the machine for a forked off
container/VM without a race where the child might already have died
before we could read the cgroup information from /proc/$PID/cgroup.
|
|
|
|
liblogind-core.la was underlinked, missing a few functions
defined in logind.c. They are moved to a new file, logind-core.c,
and this file is linked into liblogind-core.la.
In addition, logind-acl.c is attached to the liblogind-core.la,
instead of systemd-logind directly.
|