chiark / gitweb /
elogind.git
6 years agoswap: always track the current real device node of all swap devices, even when not...
Lennart Poettering [Mon, 25 Nov 2013 20:08:39 +0000 (21:08 +0100)]
swap: always track the current real device node of all swap devices, even when not active

This way, we can avoid executing two /bin/swapon jobs to be dispatched
for the same swap device if it is configured for two different paths.

Previously we were just tracking the device nodes of active swap
devices, which would not allow us to recognize the identity of two swap
devices before they are active.

https://bugs.freedesktop.org/show_bug.cgi?id=69835

6 years agoshutdown: during final killing spree also send SIGHUP in addition to SIGTERM to deal...
Lennart Poettering [Mon, 25 Nov 2013 17:08:02 +0000 (18:08 +0100)]
shutdown: during final killing spree also send SIGHUP in addition to SIGTERM to deal with shells

This makes shutdown a bit faster if debug-shell.service is enabled.

6 years agodelete unused variables
Thomas Hindoe Paaboel Andersen [Mon, 25 Nov 2013 20:16:26 +0000 (21:16 +0100)]
delete unused variables

6 years agonetworkd: add support for [Address] sections
Tom Gundersen [Tue, 19 Nov 2013 15:54:42 +0000 (16:54 +0100)]
networkd: add support for [Address] sections

This will allow specifying more options per address than the
simple Address= entry in the [Network] section.

Preliminary support for the same functionality for [Route] sections
are added, but not yet hooked up, as more testing is needed.

6 years agoconf-parser: distinguish between multiple sections with the same name
Tom Gundersen [Tue, 19 Nov 2013 15:17:55 +0000 (16:17 +0100)]
conf-parser: distinguish between multiple sections with the same name

Pass on the line on which a section was decleared to the parsers, so they
can distinguish between multiple sections (if they chose to). Currently
no parsers take advantage of this, but a follow-up patch will do that
to distinguish

[Address]
Address=192.168.0.1/24
Label=one

[Address]
Address=192.168.0.2/24
Label=two

from

[Address]
Address=192.168.0.1/24
Label=one
Address=192.168.0.2/24
Label=two

6 years agodevice: fix typo
Lennart Poettering [Mon, 25 Nov 2013 16:46:21 +0000 (17:46 +0100)]
device: fix typo

6 years agoudev-builtin-keyboard: More useful error message
Martin Pitt [Mon, 25 Nov 2013 16:44:57 +0000 (17:44 +0100)]
udev-builtin-keyboard: More useful error message

Make the "Error calling EVIOCSKEYCODE" error message more useful by mentioning
which scan/key code it tried to set.

6 years agosystemctl: remove debug log message
Lennart Poettering [Mon, 25 Nov 2013 16:34:57 +0000 (17:34 +0100)]
systemctl: remove debug log message

6 years agosystemctl: when status is called without arguments show pager
Lennart Poettering [Mon, 25 Nov 2013 16:28:42 +0000 (17:28 +0100)]
systemctl: when status is called without arguments show pager

6 years agocore: fix bus serialization of conditions
Lennart Poettering [Mon, 25 Nov 2013 16:18:38 +0000 (17:18 +0100)]
core: fix bus serialization of conditions

6 years agocore: fix serialization of exec command structs
Lennart Poettering [Mon, 25 Nov 2013 15:59:51 +0000 (16:59 +0100)]
core: fix serialization of exec command structs

6 years agocore: set some event source priorities to enforce dispatching order
Lennart Poettering [Mon, 25 Nov 2013 14:35:10 +0000 (15:35 +0100)]
core: set some event source priorities to enforce dispatching order

6 years agoswap: split state machine state ACTIVATING into two
Lennart Poettering [Mon, 25 Nov 2013 14:26:30 +0000 (15:26 +0100)]
swap: split state machine state ACTIVATING into two

We expect the event on /proc/swaps before we expect the SIGCHILD,
reflect this in the state machine.

6 years agodevice: modernizations
Lennart Poettering [Mon, 25 Nov 2013 14:25:01 +0000 (15:25 +0100)]
device: modernizations

6 years agocore: dispatch run queue only if there's nothing else to do
Lennart Poettering [Mon, 25 Nov 2013 14:22:41 +0000 (15:22 +0100)]
core: dispatch run queue only if there's nothing else to do

Always read all external events before we decide what we do next.

6 years agocgroups-agent: down-grade log level
Lennart Poettering [Mon, 25 Nov 2013 14:20:59 +0000 (15:20 +0100)]
cgroups-agent: down-grade log level

6 years agoudev: net_setup_link - don't use Description as Alias
Tom Gundersen [Mon, 25 Nov 2013 00:33:04 +0000 (01:33 +0100)]
udev: net_setup_link - don't use Description as Alias

Use Description only internally, and allow Alias to be set
as a separate option. For instance SNMP uses ifalias for
a specific purpose, so let's not write to it by default.

6 years agoRevert "man: suggest using hash= atribut for swap in example"
Lukas Nykryn [Mon, 25 Nov 2013 08:31:09 +0000 (09:31 +0100)]
Revert "man: suggest using hash= atribut for swap in example"

This reverts commit fa7abba2328eb2d23a7e27708f86f5013059ddcf.

6 years agosocket-proxyd: Fix man page because --listener takes an argument.
David Strauss [Mon, 25 Nov 2013 00:58:13 +0000 (10:58 +1000)]
socket-proxyd: Fix man page because --listener takes an argument.

6 years agosocket-proxyd: Add --listener option for listener/destination pairs.
David Strauss [Mon, 25 Nov 2013 00:44:48 +0000 (10:44 +1000)]
socket-proxyd: Add --listener option for listener/destination pairs.

6 years agocore: set finish_timestamp only after all jobs have finished
Kay Sievers [Sun, 24 Nov 2013 18:18:36 +0000 (19:18 +0100)]
core: set finish_timestamp only after all jobs have finished

6 years agonetworkd: fix build
Tom Gundersen [Sat, 23 Nov 2013 01:47:12 +0000 (02:47 +0100)]
networkd: fix build

Forgot to 'git add'...

6 years agonetworkd: use Type=notify
Tom Gundersen [Sat, 23 Nov 2013 01:07:08 +0000 (02:07 +0100)]
networkd: use Type=notify

Also start earlier during boot.

6 years agoUpdate TODO
David Strauss [Fri, 22 Nov 2013 21:55:37 +0000 (07:55 +1000)]
Update TODO

6 years agobus: protected dual timestamp property macro for misusage
Lennart Poettering [Fri, 22 Nov 2013 19:19:54 +0000 (20:19 +0100)]
bus: protected dual timestamp property macro for misusage

6 years agocore: don't warn loudly if we cannot send a bus signal to a disconnected client
Lennart Poettering [Fri, 22 Nov 2013 19:19:27 +0000 (20:19 +0100)]
core: don't warn loudly if we cannot send a bus signal to a disconnected client

6 years agosystemctl: indicate in list-dependencies whether a unit is already running
Lennart Poettering [Fri, 22 Nov 2013 18:18:52 +0000 (19:18 +0100)]
systemctl: indicate in list-dependencies whether a unit is already running

6 years agoservice: honour that for services RestartSec=0 means immediate restarts but TimeoutSe...
Lennart Poettering [Fri, 22 Nov 2013 18:17:52 +0000 (19:17 +0100)]
service: honour that for services RestartSec=0 means immediate restarts but TimeoutSec= means no timing out at all

6 years agojob: fix serialization
Lennart Poettering [Fri, 22 Nov 2013 18:14:11 +0000 (19:14 +0100)]
job: fix serialization

6 years agocgroups: Fix test service inclusion in Makefile
David Strauss [Fri, 22 Nov 2013 16:36:14 +0000 (02:36 +1000)]
cgroups: Fix test service inclusion in Makefile

6 years agobus: when closing a bus, drop all refs to queued messages, so that the bus can be...
Lennart Poettering [Fri, 22 Nov 2013 14:35:23 +0000 (15:35 +0100)]
bus: when closing a bus, drop all refs to queued messages, so that the bus can be freed

6 years agoman: simplify socket-proxyd examples
Lennart Poettering [Fri, 22 Nov 2013 13:31:31 +0000 (14:31 +0100)]
man: simplify socket-proxyd examples

6 years agobuild-sys: move more files from core/ to share/ that are generic enough
Lennart Poettering [Fri, 22 Nov 2013 13:30:52 +0000 (14:30 +0100)]
build-sys: move more files from core/ to share/ that are generic enough

6 years agotest: test-sched-prio - skip if XDG_RUNTIME_DIR is not set
Kay Sievers [Fri, 22 Nov 2013 14:58:39 +0000 (15:58 +0100)]
test: test-sched-prio - skip if XDG_RUNTIME_DIR is not set

=================================
No control group support available, not creating root group.

Failed to determine XDG_RUNTIME_DIR

Assertion 'r >= 0' failed at src/test/test-sched-prio.c:42, function main(). Aborting.
=================================

6 years agomacro: fix problem with __LINE__ macro expansion
Lukasz Skalski [Fri, 22 Nov 2013 13:44:45 +0000 (14:44 +0100)]
macro: fix problem with __LINE__ macro expansion

David:
I already applied a fix for that, but this patch definitely looks nicer. I
changed CONCATENATE_HELPER() -> XCONCATENATE() similar to XSTRINGIFY and
added the UNIQUE() helper.

6 years agocore: fix timestamp assignment
Kay Sievers [Fri, 22 Nov 2013 12:54:50 +0000 (13:54 +0100)]
core: fix timestamp assignment

6 years agomacro: fix assert_cc() fallback
David Herrmann [Fri, 22 Nov 2013 08:19:00 +0000 (09:19 +0100)]
macro: fix assert_cc() fallback

We need two-level macro-expansion, otherwise __LINE__ will not get
evaluated.

6 years agohwdb: Update database of Bluetooth company identifiers
Marcel Holtmann [Sat, 21 Sep 2013 18:45:05 +0000 (11:45 -0700)]
hwdb: Update database of Bluetooth company identifiers

6 years agobus: rework sd_bus_error APIs
Lennart Poettering [Fri, 22 Nov 2013 03:01:46 +0000 (04:01 +0100)]
bus: rework sd_bus_error APIs

All calls that set a sd_bus_error structure will now return the same
error converted to a negative errno. This may be used as syntactic sugar
to return from a function and setting a bus_error structure in one go.

Also, translate all Linux Exyz (EIO, EINVAL, EUCLEAN, EPIPE, ...)
automatically into counterparts in the (new) "Posix.Error." namespace.

If we fail to allocate memory for the components of a sd_bus_error
automatically reset it to an OOM error which we always can write.

6 years agocgroups: Cache controller masks and optimize queues.
David Strauss [Mon, 11 Nov 2013 09:03:31 +0000 (19:03 +1000)]
cgroups: Cache controller masks and optimize queues.

6 years agobus: deal with duplicate values from enumerators
Lennart Poettering [Fri, 22 Nov 2013 00:51:19 +0000 (01:51 +0100)]
bus: deal with duplicate values from enumerators

6 years agoevent: rename sd_event_get() to sd_event_source_get_event()
Lennart Poettering [Fri, 22 Nov 2013 00:28:45 +0000 (01:28 +0100)]
event: rename sd_event_get() to sd_event_source_get_event()

6 years agobus: add calls to query attached objects
Lennart Poettering [Fri, 22 Nov 2013 00:21:59 +0000 (01:21 +0100)]
bus: add calls to query attached objects

6 years agobus: also add error parameter to object find and enumerator callbacks
Lennart Poettering [Fri, 22 Nov 2013 00:14:57 +0000 (01:14 +0100)]
bus: also add error parameter to object find and enumerator callbacks

Just in order to bring things inline with the method and property
callbacks.

6 years agobus: restore selinux access control to PID 1 for properties
Lennart Poettering [Thu, 21 Nov 2013 22:36:51 +0000 (23:36 +0100)]
bus: restore selinux access control to PID 1 for properties

6 years agotimer: make timer accuracy configurable
Lennart Poettering [Thu, 21 Nov 2013 21:07:51 +0000 (22:07 +0100)]
timer: make timer accuracy configurable

And make it default to 1min

6 years agobuild-sys: enable gcc Link Time Optimization when optimization is enabled
Kay Sievers [Thu, 21 Nov 2013 20:56:18 +0000 (21:56 +0100)]
build-sys: enable gcc Link Time Optimization when optimization is enabled

6 years agocore: actually make SwitchRoot() bus call do the deed
Lennart Poettering [Thu, 21 Nov 2013 20:36:04 +0000 (21:36 +0100)]
core: actually make SwitchRoot() bus call do the deed

6 years agocore: fix serilization of ListJobs() response
Lennart Poettering [Thu, 21 Nov 2013 20:32:23 +0000 (21:32 +0100)]
core: fix serilization of ListJobs() response

6 years agocore: fix serialization of client tracker
Lennart Poettering [Thu, 21 Nov 2013 20:17:34 +0000 (21:17 +0100)]
core: fix serialization of client tracker

6 years agocore: fix deserialization of StartTransientUnit() parameters
Lennart Poettering [Thu, 21 Nov 2013 19:49:04 +0000 (20:49 +0100)]
core: fix deserialization of StartTransientUnit() parameters

6 years agobus: properly serialize unit file change list
Lennart Poettering [Thu, 21 Nov 2013 19:18:59 +0000 (20:18 +0100)]
bus: properly serialize unit file change list

6 years agologind,machined,run: properly invoke StartTransientUnit() bus call
Lennart Poettering [Thu, 21 Nov 2013 19:05:49 +0000 (20:05 +0100)]
logind,machined,run: properly invoke StartTransientUnit() bus call

6 years agobus: rework message handlers to always take an error argument
Lennart Poettering [Thu, 21 Nov 2013 18:34:37 +0000 (19:34 +0100)]
bus: rework message handlers to always take an error argument

Message handler callbacks can be simplified drastically if the
dispatcher automatically replies to method calls if errors are returned.

Thus: add an sd_bus_error argument to all message handlers. When we
dispatch a message handler and it returns negative or a set sd_bus_error
we send this as message error back to the client. This means errors
returned by handlers by default are given back to clients instead of
rippling all the way up to the event loop, which is desirable to make
things robust.

As a side-effect we can now easily turn the SELinux checks into normal
function calls, since the method call dispatcher will generate the right
error replies automatically now.

Also, make sure we always pass the error structure to all property and
method handlers as last argument to follow the usual style of passing
variables for return values as last argument.

6 years agohostnamed: modernizations
Lennart Poettering [Thu, 21 Nov 2013 18:32:33 +0000 (19:32 +0100)]
hostnamed: modernizations

6 years agomanager: always sort environment block, it's prettier
Lennart Poettering [Thu, 21 Nov 2013 18:31:46 +0000 (19:31 +0100)]
manager: always sort environment block, it's prettier

6 years agobus: the :no-sender hack is now unnecessary, since the new library doesn't require...
Lennart Poettering [Thu, 21 Nov 2013 01:17:24 +0000 (02:17 +0100)]
bus: the :no-sender hack is now unnecessary, since the new library doesn't require this anymore

6 years agonetworkd: make sure Network and Link can always be freed
Tom Gundersen [Thu, 21 Nov 2013 20:04:04 +0000 (21:04 +0100)]
networkd: make sure Network and Link can always be freed

Also, don't fail a link just because we can't find its MAC address.

6 years agonetworkd: avoid segfault
Tom Gundersen [Thu, 21 Nov 2013 19:47:34 +0000 (20:47 +0100)]
networkd: avoid segfault

6 years agosrc/core/selinux-access: #include <sys/socket.h>
Daniel Mack [Thu, 21 Nov 2013 19:26:10 +0000 (20:26 +0100)]
src/core/selinux-access: #include <sys/socket.h>

Fixes the following build errors on Fedora 20:

  CC       src/core/libsystemd_core_la-selinux-access.lo
src/core/selinux-access.c: In function 'get_audit_data':
src/core/selinux-access.c:245:22: error: storage size of 'ucred' isn't known
         struct ucred ucred;
                      ^
src/core/selinux-access.c:259:9: warning: implicit declaration of function 'getsockopt' [-Wimplicit-function-declaration]
         r = getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &ucred, &len);
         ^
src/core/selinux-access.c:259:28: error: 'SOL_SOCKET' undeclared (first use in this function)
         r = getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &ucred, &len);
                            ^
src/core/selinux-access.c:259:28: note: each undeclared identifier is reported only once for each function it appears in
src/core/selinux-access.c:259:40: error: 'SO_PEERCRED' undeclared (first use in this function)
         r = getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &ucred, &len);
                                        ^
src/core/selinux-access.c:245:22: warning: unused variable 'ucred' [-Wunused-variable]
         struct ucred ucred;
                      ^
make[2]: *** [src/core/libsystemd_core_la-selinux-access.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

6 years agobus: update kdbus.h
Kay Sievers [Thu, 21 Nov 2013 19:16:56 +0000 (20:16 +0100)]
bus: update kdbus.h

6 years agoman: suggest using hash= atribut for swap in example
Václav Pavlín [Thu, 21 Nov 2013 14:28:02 +0000 (15:28 +0100)]
man: suggest using hash= atribut for swap in example

(#883941)

6 years agonetworkd: don't filter on udev tags
Tom Gundersen [Thu, 21 Nov 2013 14:30:08 +0000 (15:30 +0100)]
networkd: don't filter on udev tags

This removed the requirement for devices to be tagged with
'systemd-networkd' before they will be visible to networkd.

Still, as by default we don't ship any .network files, network
devices will simply be tracked, but not touched, unless the
admin configures things explicitly.

6 years agoefi-boot-generator: don't mount /boot eagerly
Tom Gundersen [Thu, 21 Nov 2013 11:35:46 +0000 (12:35 +0100)]
efi-boot-generator: don't mount /boot eagerly

6 years agobus: fix seriliazation of activation errors
Lennart Poettering [Thu, 21 Nov 2013 01:14:05 +0000 (02:14 +0100)]
bus: fix seriliazation of activation errors

6 years agobus: rename SD_BUS_ERROR_MAKE to SD_BUS_ERROR_MAKE_CONST to indicate it only works...
Lennart Poettering [Thu, 21 Nov 2013 01:11:06 +0000 (02:11 +0100)]
bus: rename SD_BUS_ERROR_MAKE to SD_BUS_ERROR_MAKE_CONST to indicate it only works for const strings

6 years agobus: let's simplify things by getting rid of unnecessary bus parameters
Lennart Poettering [Thu, 21 Nov 2013 00:51:16 +0000 (01:51 +0100)]
bus: let's simplify things by getting rid of unnecessary bus parameters

6 years agobus: add API calls to escape string components of objects paths
Lennart Poettering [Thu, 21 Nov 2013 00:03:26 +0000 (01:03 +0100)]
bus: add API calls to escape string components of objects paths

6 years agosd-event: try to move timer wakeups to the same spot within each minute
Lennart Poettering [Wed, 20 Nov 2013 23:46:13 +0000 (00:46 +0100)]
sd-event: try to move timer wakeups to the same spot within each minute

6 years agosocket: fix segfault
Lennart Poettering [Wed, 20 Nov 2013 23:06:11 +0000 (00:06 +0100)]
socket: fix segfault

6 years agovalgrind: make running PID 1 in valgrind useful
Lennart Poettering [Wed, 20 Nov 2013 21:11:10 +0000 (22:11 +0100)]
valgrind: make running PID 1 in valgrind useful

Since valgrind only generates useful output on exit() (rather than
exec()) we need to explicitly exit when valgrind is detected.

6 years agonspawn: add new --drop-capability= switch
Lennart Poettering [Wed, 20 Nov 2013 21:10:42 +0000 (22:10 +0100)]
nspawn: add new --drop-capability= switch

6 years agoevent: make sure to possibly disarm the timerfds before we reenter epoll_wait
Lennart Poettering [Wed, 20 Nov 2013 17:20:23 +0000 (18:20 +0100)]
event: make sure to possibly disarm the timerfds before we reenter epoll_wait

6 years agoevent: don't disarm invalid timerfd
Lennart Poettering [Wed, 20 Nov 2013 17:19:05 +0000 (18:19 +0100)]
event: don't disarm invalid timerfd

6 years agobus: make sure an additional ref to a busevent source doesn't cause the event source...
Lennart Poettering [Wed, 20 Nov 2013 17:18:09 +0000 (18:18 +0100)]
bus: make sure an additional ref to a busevent source doesn't cause the event source to be triggered again

6 years agoevent: whenever a time source changes pending state reshuffle elapsation prioqs
Lennart Poettering [Wed, 20 Nov 2013 17:07:07 +0000 (18:07 +0100)]
event: whenever a time source changes pending state reshuffle elapsation prioqs

6 years agoevent: when we change the io events to watch we need to figure out if a an event...
Lennart Poettering [Wed, 20 Nov 2013 15:39:22 +0000 (16:39 +0100)]
event: when we change the io events to watch we need to figure out if a an event is pending again

6 years agosd-event: fix comparison functions
Lennart Poettering [Wed, 20 Nov 2013 02:58:05 +0000 (03:58 +0100)]
sd-event: fix comparison functions

6 years agomanager: don't do plymouth in a container
Lennart Poettering [Wed, 20 Nov 2013 02:44:11 +0000 (03:44 +0100)]
manager: don't do plymouth in a container

Given that plymouth listens on an abstract namespace socket and if
CLONE_NEWNET is not used the abstract namespace is shared with the host
we might actually end up send plymouth data to the host.

6 years agobusctl: when no match is specified, add default match
Lennart Poettering [Tue, 19 Nov 2013 20:37:32 +0000 (21:37 +0100)]
busctl: when no match is specified, add default match

6 years agobus: add color and indentation to bus_message_dump()
Lennart Poettering [Tue, 19 Nov 2013 20:35:31 +0000 (21:35 +0100)]
bus: add color and indentation to bus_message_dump()

6 years agocore: convert PID 1 to libsystemd-bus
Lennart Poettering [Tue, 19 Nov 2013 20:12:59 +0000 (21:12 +0100)]
core: convert PID 1 to libsystemd-bus

This patch converts PID 1 to libsystemd-bus and thus drops the
dependency on libdbus. The only remaining code using libdbus is a test
case that validates our bus marshalling against libdbus' marshalling,
and this dependency can be turned off.

This patch also adds a couple of things to libsystem-bus, that are
necessary to make the port work:

- Synthesizing of "Disconnected" messages when bus connections are
  severed.

- Support for attaching multiple vtables for the same interface on the
  same path.

This patch also fixes the SetDefaultTarget() and GetDefaultTarget() bus
calls which used an inappropriate signature.

As a side effect we will now generate PropertiesChanged messages which
carry property contents, rather than just invalidation information.

6 years agohashmap: be a bit more conservative with pre-allocating hash tables and items
Lennart Poettering [Tue, 19 Nov 2013 20:02:59 +0000 (21:02 +0100)]
hashmap: be a bit more conservative with pre-allocating hash tables and items

6 years agoinstall: when determining where default.target points to, accept a file instead of...
Lennart Poettering [Tue, 19 Nov 2013 20:02:16 +0000 (21:02 +0100)]
install: when determining where default.target points to, accept a file instead of a symlink, too

6 years agotest: exit early if we would conflict with running user systemd
Lennart Poettering [Tue, 19 Nov 2013 20:01:24 +0000 (21:01 +0100)]
test: exit early if we would conflict with running user systemd

6 years agobus: add sd_bus_send_to() API call
Lennart Poettering [Tue, 19 Nov 2013 00:23:08 +0000 (01:23 +0100)]
bus: add sd_bus_send_to() API call

6 years agobus: bump serial number counter when sending already sealed messages
Lennart Poettering [Tue, 19 Nov 2013 00:21:27 +0000 (01:21 +0100)]
bus: bump serial number counter when sending already sealed messages

6 years agobus: sd_bus_error_setxyz calls should always return the error as errno style negative int
Lennart Poettering [Tue, 19 Nov 2013 00:19:02 +0000 (01:19 +0100)]
bus: sd_bus_error_setxyz calls should always return the error as errno style negative int

6 years agolibudev: always return NULL in _unref() APIs
Lennart Poettering [Tue, 19 Nov 2013 00:15:31 +0000 (01:15 +0100)]
libudev: always return NULL in _unref() APIs

Returning anything else but NULL would suggest the caller's reference
might still be valid, but it isn't, because the caller just invoked
_unref() after all.

This turns the return value into a typesafe shortcut that allows
unreffing and resetting a reference in one line. In contrast to
solutions for this which take a pointer to a pointer to accomplish the
same this solution is just syntactic sugar the developer can make use of
but doesn't have to, and this is particularly useful when immediately
unreffing objects returned by function calls.

6 years agolibudev: always return valid negative error codes on API functions
Lennart Poettering [Tue, 19 Nov 2013 00:14:21 +0000 (01:14 +0100)]
libudev: always return valid negative error codes on API functions

6 years agocalendar: support 'yearly' and 'annually' names the same way as cron
Lennart Poettering [Tue, 19 Nov 2013 00:13:42 +0000 (01:13 +0100)]
calendar: support 'yearly' and 'annually' names the same way as cron

6 years agohwclock: modernizations
Lennart Poettering [Tue, 19 Nov 2013 00:12:03 +0000 (01:12 +0100)]
hwclock: modernizations

6 years agomacro: add _unlikely_() to assert_return()
Lennart Poettering [Tue, 19 Nov 2013 00:10:40 +0000 (01:10 +0100)]
macro: add _unlikely_() to assert_return()

As the name indicates assert_return() is really just for assertions,
i.e. where it's a programming error if the assertion does not hold.
Hence it is safe to add _unlikely_() decorators for the expression to
check.

6 years agomacro: change assert_cc() so that it can appear outside of functions
Lennart Poettering [Tue, 19 Nov 2013 00:10:22 +0000 (01:10 +0100)]
macro: change assert_cc() so that it can appear outside of functions

6 years agoinclude: make direct includion of _sd-common.h harder
Lennart Poettering [Tue, 19 Nov 2013 00:09:48 +0000 (01:09 +0100)]
include: make direct includion of _sd-common.h harder

6 years agoinstall: use const where we can
Lennart Poettering [Tue, 19 Nov 2013 00:09:12 +0000 (01:09 +0100)]
install: use const where we can

6 years agoconf-parser: don't leak section names
Tom Gundersen [Wed, 20 Nov 2013 16:51:42 +0000 (17:51 +0100)]
conf-parser: don't leak section names

If we encounter an unknown section, we must free the previous section before
clearing the pointer.

6 years agoevent: clear pending-state when re-arming timers
David Herrmann [Wed, 20 Nov 2013 06:54:24 +0000 (07:54 +0100)]
event: clear pending-state when re-arming timers

If a timer fires and is marked pending, but an application re-arms it
before it is dispatched, we now clear the pending state.

This fixes a bug where an application arms a timer, which fires and is
marked pending. But before it is dispatched, the application loses
interest in it and disables it. Now if the timer is re-armed and
re-enabled later, it will be immediately dispatched as it is still marked
pending.

This behavior is unexpected, so avoid it by clearing pending state when
re-arming timers. Note that applications have no way to clear pending
state themselves, so there's no current workaround.

6 years agobus: fix error-path in bus_map_all_properties()
David Herrmann [Wed, 20 Nov 2013 15:18:37 +0000 (16:18 +0100)]
bus: fix error-path in bus_map_all_properties()

We shouldn't return positive integers on errors. Fix the typo by removing
the negation.

6 years agobus/rtnl: silence clang warnings
Thomas Hindoe Paaboel Andersen [Tue, 19 Nov 2013 20:12:38 +0000 (21:12 +0100)]
bus/rtnl: silence clang warnings