Age | Commit message (Collapse) | Author |
|
After passing the fds over to the sd_bus object, we should forget them,
so that we don't close them a second time when the object goes away.
|
|
Sometimes, when we try to reply to messages we don't check return
values. This means we might miss a ECONNRESET, and will get a ENOTCONN
on next command. Treat both the same hence.
|
|
sd_event_wait() returning 0 usually means that it timed out, which means it must
have been idle. However, sd_event_wait() may return 0 in case an event was triggered
but it turned out there was nothing to do. Make the check for idle explicit to avoid
this edge-case.
|
|
but don't exit
Errors like EPERM from the kernel should certainly not be reason to
exit. Let's try to be defensive here, and try to continue on most send
errors, but possibly tell the sender about it.
|
|
synthetic_reply_method_return_strv()
That way it matches more closely the nomenclature of our other
success reply calls.
|
|
|
|
|
|
|
|
|
|
It's fine to abbreviate local variables, but it's not OK to abbreviate
function names needlessly. This is not an excercise in writing
unreadable code.
|
|
Another slice logic rework in kdbus made KDBUS_ITEM_PAYLOAD_OFF items
relative to the message header again. Catch up with that in sd-bus.
|
|
include-what-you-use automatically does this and it makes finding
unnecessary harder to spot. The only content of poll.h is a include
of sys/poll.h so should be harmless.
|
|
This fixes various issues found by globally reordering the include
sections of all .c files.
|
|
|
|
|
|
|
|
The kernel does not like getting an empty container, so just always pass the parameter, even if
it is the default.
|
|
Fix capitalization, indentation, make sure we support --version, and
similar.
|
|
Better safe than sorry, if drivers are stupid, and reset immediately on
device closing if the timeout could not be initialized.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=777735
|
|
Otherwise we cannot even invoke systemd-exit.service anymore, thus not
even exit.
https://bugs.freedesktop.org/show_bug.cgi?id=83100
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759320
|
|
This reverts commit d6d810fbf8071f8510450dbacd1d083f37603656.
It's apparently not OK to pass MSG_CMSG_CLOEXEC to recvmsg() of raw
sockets.
|
|
|
|
If a service has an ExecStop= program that uses the socket the service was
activated by to tell it to terminate, then that should not be used as
trigger to start the service again.
http://lists.freedesktop.org/archives/systemd-devel/2015-February/028058.html
|
|
Otherwise systemd-reboot.service will remove the parameter that was set
before. This was broken in commit "b986229efe2cc96157aa14c37bab7843311bbef1
systemctl: bugfix for systemctl reboot command with argument"
|
|
The log message talks specifically about services, though it actually
applies to any kind of unit.
|
|
Also, document in adjacent comments and in CODING_STYLE why we do that.
|
|
execute.c only uses basename (the GNU version in <string.h>)
|
|
Signed-off-by: Robert Milasan <rmilasan@suse.com>
|
|
This fixes the test-suite again.
|
|
|
|
connection
Just fall back to plain old event loop in this (highly unlikely) case.
In the glorious future when kdbus is upstream we can of course drop all this.
|
|
This avoids taking the SysV init script enablement state into account if we
have native units. Otherwise systemctl disable on native unit would not
be respected in the presence of an enabled SysV script.
Also, there's no need to do all the parsing and creation of service files if we
already have a native systemd unit for the processed SysV init script.
|
|
On Tue, Feb 10, 2015 at 08:10:43PM +0100, Lennart Poettering wrote:
> Hmm, I think it would be nicer to use be32toh() here instead, since it
> ensures the macro is (to a limited degree) typesafe.
>
> Any chance you could rework that?
From: Paul Martin <paul.martin@codethink.co.uk>
Date: Wed, 11 Feb 2015 11:47:16 +0000
Subject: [PATCH] networkd dhcpv4 logging endian fix
On a big-endian host, systemd-networkd prints out IPv4 network
addresses byte reversed:
Feb 10 16:43:32 hostname systemd-networkd[151]: eth0 : DHCPv4 address 158.1.24.10/16 via 1.1.24.10
The address obtained is 10.24.1.158/16 and the route is
10.24.0.0/16 dev eth0 src 10.24.1.187
The macro ADDRESS_FMT_VAL() unpacks a "struct in_addr" in a
little-endian specific manner.
This patch forces the passed address into host order, then unpacks it.
On an x86 later than i486, compiled with -O2, the only extra overhead
is a single bswap instruction.
|
|
Match{Name,OrginalName,Type,Driver,Path} can now take a space-separated glob of matches.
|
|
Pass around Link objcets rather than FdbEntry objects. The link objects have an up-to-date
ifname we can use for logging. match_name sholud _never_ be used for anything except
matching. Firstly, it may be unset (usually is), and secondly it may not be up-to-date.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
As a malloc0 could fail, doing a strncpy without checking could
cause issues. Adding an assert should be good enough and in line
with other similar routines in the code.
Found with Coverity Fixes: CID#1261402
|
|
|
|
Leave it to the compiler to figure out whether it shall inline stuff or
not.
Only place where using static inline is OK to use is in in header
files, really.
|
|
|
|
|
|
Reported by Zbigniew.
|
|
For now we only support the hardcoded values RT_SCOPE_{UNIVERSE,LOCAL,HOST},
and not numerical values or values from /etc/iproute2/rt_scopes.
This addresses https://bugs.freedesktop.org/show_bug.cgi?id=88508.
|
|
|
|
|