summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2015-09-29systemctl: split out code that schedules shutdowsn into its own functionLennart Poettering
2015-09-29systemctl: rename all logind-specific functions to logind_xyz()Lennart Poettering
2015-09-29systemctl: move shutdown cancelling code into its own functionLennart Poettering
Let's make sure the main switch statement only invokes functions, but doesn't do anything real on its own.
2015-09-29systemctl: don't special case ACTION_RUNLEVEL anymoreLennart Poettering
Let's move its dispatching to the main switch statement.
2015-09-29systemctl: introduce a single function to set the wall messageLennart Poettering
Let's not have the same code three times, but reduce it to one function.
2015-09-29core: rework crash handlingLennart Poettering
This introduces a new systemd.crash_reboot=1 kernel command line option that triggers a reboot after crashing. This also cleans up crash VT handling. Specifically, it cleans up the configuration setting, to be between 1..63 or a boolean. This is to replace the previous logic where "-1" meant disabled. We continue to accept that setting, but only document the boolean syntax instead. This also brings the documentation of the default settings in sync with what actually happens. The CrashChVT= configuration file setting is renamed to CrashChangeVT=, following our usual logic of not abbreviating unnecessarily. The old setting stays support for compat reasons. Fixes #1300
2015-09-29socket: rename ffs_xyz to usbffs_xyzLennart Poettering
The relation to USB should really be clearer.
2015-09-29core: turn a large if statement into a switchLennart Poettering
2015-09-29selinux: add _cleanup_ concepts to SELinux label allocationLennart Poettering
2015-09-29core: simplify how we create socket fdsLennart Poettering
Let's always return the allocated fds as return values where possible, and make more use of _cleanup_close_
2015-09-29core: small error message wording improvementsLennart Poettering
2015-09-29core: properly use the ExitCode bus property when exiting is --user instanceLennart Poettering
2015-09-29core: allow setting WorkingDirectory= to the special value ~Lennart Poettering
If set to ~ the working directory is set to the home directory of the user configured in User=. This change also exposes the existing switch for the working directory that allowed making missing working directories non-fatal. This also changes "machinectl shell" to make use of this to ensure that the invoked shell is by default in the user's home directory. Fixes #1268.
2015-09-29detect-virt: various modernizationsLennart Poettering
2015-09-29journal-cat: various modernizationsLennart Poettering
2015-09-29journal-cat: return a correct error, not -1Lennart Poettering
2015-09-29machine-id-commit: merge machine-id-commit functionality into machine-id-setupLennart Poettering
And remove machine-id-commit as separate binary. There's really no point in keeping this separate, as the sources are pretty much identical, and have pretty identical interfaces. Let's unify this in one binary. Given that machine-id-commit was a private binary of systemd (shipped in /usr/lib/) removing the tool is not an API break. While we are at it, improve the documentation of the command substantially.
2015-09-29sd-daemon: Simplify sd_booted() checkLennart Poettering
We can just use access() to check whether /run/system/system/ is a directory, no need to involve stat(). The trick is to suffix the path name with a dash.
2015-09-29systemctl: make "systemctl is-system-running" return "offline" if we are not ↵Lennart Poettering
booted with systemd This sounds like the better place to expose this than in "systemd-notify --booted". Also document the so far undocumented "unknown" state the command might return. And rearrange the table of states documented to be more like the one for "is-running". Also, don't document the precise exit code of this function, just say errors are reported != 0 or > 0...
2015-09-29Merge pull request #1407 from dvdhrm/prioqLennart Poettering
prioq: drop stability guarantee
2015-09-29tty-ask-password: minor modernizationsLennart Poettering
2015-09-29util: introduce common version() implementation and use it everywhereLennart Poettering
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.
2015-09-29util: unify implementation of NOP signal handlerLennart Poettering
This is highly complex code after all, we really should make sure to only keep one implementation of this extremely difficult function around.
2015-09-29core: remove set_default_unit()Lennart Poettering
The new free_and_strdup() call does pretty much the same thing these days, no need to keep a private limited purpose version around.
2015-09-29core: modernize prepare_reexecute()Lennart Poettering
2015-09-29core: exit early if we hit OOMLennart Poettering
2015-09-29core: use %m rather than strerror() where we canLennart Poettering
2015-09-29main: minor clean-upsLennart Poettering
Add (void) casting for a couple of functions where we knowingly ignore the returning error code. Use EXIT_FAILURE where appropriate. Try to initialize structures at declaration time, or at once.
2015-09-29tree-wide: take benefit of the fact that fdset_free() returns NULLLennart Poettering
2015-09-29core: order #includes in main.cLennart Poettering
2015-09-29strv: add strv_free_free() to strv.c and make use of itLennart Poettering
Let's teach it a new trick, and make it return NULL.
2015-09-29tree-wide: port more code to use send_one_fd() and receive_one_fd()Lennart Poettering
Also, make it slightly more powerful, by accepting a flags argument, and make it safe for handling if more than one cmsg attribute happens to be attached.
2015-09-29core: sort includes of manager.[ch] according to CODING_STYLELennart Poettering
2015-09-29sd-event: don't provide priority stabilityDavid Herrmann
Currently, we guarantee that if two event-sources with the same priority fire at the same time, they're always dispatched in the same order. While this might sound nice in theory, there's is little benefit in providing stability on that level. We have no control over the order the events are reported, hence, we cannot guarantee that we get notified about both at the same time. By dropping the stability guarantee, we loose roughly 10% Heap swaps in the prioq on a desktop cold-boot. Krzysztof Kotlenga even reported up to 20% on his tests. This sounds worth optimizing, so drop the stability guarantee.
2015-09-29prioq: never shuffle identical entriesDavid Herrmann
Skip shuffling identical entries in shuffle_up(), just like we already do in shuffle_down().
2015-09-29journal-remote: typo in log_error when no sources are specifiedBranislav Blaskovic
2015-09-29prioq: add introduction commentDavid Herrmann
Add comment to prioq.c explaining what it does. And more importantly, mention that we implement a Heap. It's more than annoying having to figure out what the code actually does, without ever mentioning the word 'heap'.
2015-09-28Move all unit states to basic/ and extend systemctl --state=helpZbigniew Jędrzejewski-Szmek
2015-09-28systemctl: add --state=helpZbigniew Jędrzejewski-Szmek
This mirrors --type=help and simplifies completion scripts. The array of states is dense, so the is no need to check if the string is null.
2015-09-28Move UnitActiveState to basic/Zbigniew Jędrzejewski-Szmek
Preparation to allow systemctl to query the list of unit states.
2015-09-27sd-bus: va_start should use the last named parameterThomas Hindoe Paaboel Andersen
2015-09-27fsck: start reboot.target irreversiblyŁukasz Stelmach
In some situations rebooting after fixing rootfs fails because the job for reboot.target gets canceled. To avoid this the "mode" parameter of the StartUnitReplace() call needs to be set to "replace-irreversibly".
2015-09-27Merge pull request #1392 from dvdhrm/bus-format2Lennart Poettering
sd-bus: add sd_bus_path_{encode,decode}_many() (v2)
2015-09-27Merge pull request #1373 from pfl/dhcp6_opportunistic_configurationMartin Pitt
networkd: Be opportunistic when declaring link configured
2015-09-26sd-bus: add sd_bus_path_{encode,decode}_many()David Herrmann
This introduces two new helpers alongside sd_bus_path_{encode,decode}(), which work similarly to their counterparts, but accept a format-string as input. This allows encoding and decoding multiple labels of a format string at the same time.
2015-09-24load-fragment: Use parse_cpu_set in CPUAffinity supportFilipe Brandenburger
Tested with a dummy service running 'sleep', modifying its CPUAffinity, restarting the service and checking the ^Cpus_allowed entries in the /proc/PID/status file.
2015-09-24util: Add test for parse_cpu_setFilipe Brandenburger
2015-09-24util: refactor cpu_set parsing into its own functionFilipe Brandenburger
Use the new code in config_parse_cpu_affinity2. Tested by modifying CPUAffinity=... setting in /etc/systemd/system.conf and reloading the daemon, then checking ^Cpus_allowed in /proc/1/status to confirm the correct CPU mask is in place.
2015-09-24Merge pull request #1376 from dvdhrm/hostnamed-argcLennart Poettering
hostnamed: drop redundant code
2015-09-24hostnamed: drop redundant codeDavid Herrmann
Doing argc checks once is enough enough enough enough.