summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2014-08-26util: make sure reset_all_signal_handlers() continues with all other signal ↵Lennart Poettering
handlers when one sigaction() fails After all, we usually don't check for failures here, and it is better to do as much as we can...
2014-08-26sd-bus: don't include internal header memfd.h in public header sd-bus.hHristo Venev
https://bugs.freedesktop.org/show_bug.cgi?id=83097
2014-08-26systemctl: Correct error message printed when bus_process_wait failsSjoerd Simons
Actually use the variable containing the return code of bus_process_wait when printing the error message as a result of it failing.
2014-08-26sd-bus: remove unused call bus_kernel_create_monitor()Lennart Poettering
Noticed by Djalal Harouni
2014-08-26test-util: use assert_se() for call to safe_mkdir with side effectFilipe Brandenburger
Otherwise it gets optimized out when CPPFLAGS='-DNDEBUG' is used. Tested: - make check TESTS='test-util' CPPFLAGS='-DNDEBUG'
2014-08-26test-path-util: use assert_se in all assertionsFilipe Brandenburger
Otherwise they get optimized out when CPPFLAGS='-DNDEBUG' is used, and that causes the tests to fail. Tested: - make check TESTS='test-path-util' CPPFLAGS='-DNDEBUG'
2014-08-26test-compress: make sure asserts with side effects use assert_se()Filipe Brandenburger
Otherwise the test fails when built with CPPFLAGS='-DNDEBUG' which disables assertions. Tested: - make check TESTS='test-compress' CPPFLAGS='-DNDEBUG'
2014-08-26networkd-wait-online: add missing short option 'i' to optstringŁukasz Stelmach
2014-08-26missing: add BPF_XORMichael Olbrich
BPF_XOR was introduced in kernel 3.7
2014-08-26udev: hwdb - do not look at "usb_device" parentsKay Sievers
Based on a patch from Simon McVittie <simon.mcvittie@collabora.co.uk>. Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=758050
2014-08-26Revert "systemctl: fix broken list-unit-files with --root"Lennart Poettering
This reverts commit 41a451cc2901a5deb985aea4cc8de204a22e5612. This breaks checks for masking of units file, since we invoke null_or_empty_path() on the resulting path.
2014-08-26sd-event: sd_event_prepare - stay in PREPARED if sd_event_wait() indicates ↵Tom Gundersen
that no sources are pending
2014-08-25sd-event: split run into prepare/wait/dispatchTom Gundersen
This will allow sd-event to be integrated into an external event loop, which in turn will allow (say) glib-based applications to use our various libraries, without manually integrating each of them (bus, rtnl, dhcp, ...). The external event-loop should integrate sd-event int he following way: Every iteration must start with a call to sd_event_prepare(), which will return 0 if no event sources are ready to be processed, a positive value if they are and a negative value on error. sd_event_prepare() may only be called following sd_event_dispatch(); a call to sd_event_wait() indicating that no sources are ready to be dispatched; or a failed call to sd_event_dispatch() or sd_event_wait(). A successful call to sd_event_prepare() indicating that no event sources are ready to be dispatched must be followed by a call to sd_event_wait(), which will return 0 if it timed out without event sources being ready to be processed, a negative value on error and a positive value otherwise. sd_event_wait() may only be called following a successful call to sd_event_prepare() indicating that no event sources are ready to be dispatched. If sd_event_wait() indicates that some events sources are ready to be dispatched, it must be followed by a call to sd_event_dispatch(). This is the only time sd_event_dispatch() may be called.
2014-08-25systemctl: fix broken list-unit-files with --rootLukas Nykryn
This patch modifies unit_file_get_list which will now return hashmap of structures where f->path is *without* root_dir prefix. This change should be ok, because current code either does not use root_dir at all or calls basename() on the f->path.
2014-08-22core: split up "starting" manager state into "initializing" and "starting"Lennart Poettering
We'll stay in "initializing" until basic.target has reached, at which point we will enter "starting". This is preparation so that we can change the startip timeout to only apply to the first phase of startup, not the full procedure.
2014-08-22core: introduce "poweroff" as new failure action typesLennart Poettering
Also, change the default action on a system start-up timeout to powering off.
2014-08-22resolved: fix typo in log messageLennart Poettering
2014-08-22core: print 'startup finished' messages even if we log to consoleLennart Poettering
2014-08-22core: add support for a configurable system-wide start-up timeoutLennart Poettering
When this system-wide start-up timeout is hit we execute one of the failure actions already implemented for services that fail. This should not only be useful on embedded devices, but also on laptops which have the power-button reachable when the lid is closed. This devices, when in a backpack might get powered on by accident due to the easily reachable power button. We want to make sure that the system turns itself off if it starts up due this after a while. When the system manages to fully start-up logind will suspend the machine by default if the lid is closed. However, in some cases we don't even get as far as logind, and the boot hangs much earlier, for example because we ask for a LUKS password that nobody ever enters. Yeah, this is a real-life problem on my Yoga 13, which has one of those easily accessible power buttons, even if the device is closed.
2014-08-22missing.h: add a cpp warning for __NR_memfd_create on MIPSDaniel Mack
2014-08-22missing.h: add fake __NR_memfd_create for MIPSDaniel Mack
We don't have the correct __NR_memfd_create syscall number yet, so set it to 0xffffffff for now to prevent compile time errors.
2014-08-22shared: add MAXSIZE() and use it in resolvedDavid Herrmann
The MAXSIZE() macro takes two types and returns the size of the larger one. It is much simpler to use than MAX(sizeof(A), sizeof(B)) and also avoids any compiler-extensions, unlike CONST_MAX() and MAX() (which are needed to avoid evaluating arguments more than once). This was suggested by Daniele Nicolodi <daniele@grinta.net>. Also make resolved use this macro instead of CONST_MAX(). This enhances readability quite a bit.
2014-08-22dbus1-generator: properly free the FILE*Lennart Poettering
Also, rework the code to make use of fflush_and_check(). Issue discovered by Simon Danner.
2014-08-21systemctl: in list-unit-files, always show legend, even if we know about no ↵Lennart Poettering
unit files
2014-08-21install: simplify usage of _cleanup_ macrosLennart Poettering
2014-08-21service: allow services of Type=oneshot that specify no ExecStart= commandsLennart Poettering
This is useful for services that simply want to run something on shutdown, but not at bootup. They should only set ExecStop= but leave ExecStart= unset.
2014-08-21service: use the right timeout for stop processes we forkLennart Poettering
2014-08-21execute: explain in a comment, why close_all_fds() is invoked the second ↵Lennart Poettering
time differently
2014-08-21bus: when terminating our bus-actviated services that exit-on-idle send ↵Lennart Poettering
STOPPING=1 via sd_notify() This should fix a race where a service thatis idle drops its name, and is immediately requested by another client, which causes dbus-daemon to ask systemd to activate it again, but since systemd still assumes it is running it won't do anything.
2014-08-21notify: send STOPPING=1 from our daemonsLennart Poettering
2014-08-21core: allow informing systemd about service status changes with RELOADING=1 ↵Lennart Poettering
and STOPPING=1 sd_notify() messages
2014-08-21manager: don#t dispatch sd_notify() messages and SIGCHLD multiple times to ↵Lennart Poettering
the same units
2014-08-21manager: reuse sockaddr_union instead of redefining our own version of itLennart Poettering
2014-08-21service,strv: introduce strv_find_startswith() and make use of itLennart Poettering
Unlike strv_find_prefix() the new call will return a pointer to the suffix of the item we found, instead of the whole item. This is more closer inline with what startswith() does, and allows us to simplify a couple of invocations.
2014-08-21service: don't invoke functions at the same time as declaring variablesLennart Poettering
2014-08-21service: remove some pointless linebreaks, to make things more readableLennart Poettering
2014-08-21service: asynchronous_close() already checks for negative parameters, no ↵Lennart Poettering
need to duplicate that
2014-08-21core: unify how we generate the prefix string when dumping unit stateLennart Poettering
2014-08-21util: make asynchronous_close() really work like an asynchronous version of ↵Lennart Poettering
safe_close() Save/restore errno, like we do in safe_close(). And don't fork a thread if the parameter is already negative.
2014-08-21util: simplify close_nointr() a bitLennart Poettering
2014-08-21util: change return value of startswith() to non-constLennart Poettering
This way we can use it on non-const strings, and don't end up with a const'ified result. This is similar to libc's strstr() which also takes a const string but returns a non-const one.
2014-08-21journalctl: add "-t --identifier=STRING" optionHarald Hoyer
This turns journalctl to the counterpart of systemd-cat. Messages sent with systemd-cat --identifier foo --prioritiy debug can now be shown with journalctl --identifier foo --prioritiy debug "--identifier" is not merged with "--unit" to make a clear distinction between syslog and systemd units. syslog identifiers can be chosen freely by anyone.
2014-08-20sd-event: add API to access epoll_fdTom Gundersen
This is a prerequisite for integrating sd-event into an external event loop.
2014-08-20resolved: write resolv.conf search - switch argumentsTom Gundersen
Found by Lukáš Nykrýn.
2014-08-20journal-upload: make sure that 'r' is initializedLukas Nykryn
2014-08-20util: return after freeing all members of arrayLukas Nykryn
2014-08-20journal-remote: remove unreachable codeLukas Nykryn
2014-08-20resolved: fix which return codes we checkLennart Poettering
Discovered by Lukas Nykryn
2014-08-20resolved-dns-rr: fix typoLukas Nykryn
a->rrsig.type_covered != a->rrsig.type_covered" is always false regardless of the values of its operands because those operands are identical.
2014-08-20machine-id-setup: don't try to read UUID from VM/container manager if we ↵Lennart Poettering
operate on a root directory that's not / This should make sure no UUID from the host systemd-machine-id-setup is running on leaks onto a disk image that is provisioned with the tool.