summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* coccinelle: avoid matching 'errno' as a file descriptorFrantisek Sumsal2019-04-271-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `coccinelle/take-fd.cocci` transformation file attempts to rewrite r = fd; fd = -1; to r = TAKE_FD(fd); Unfortunately, using `identifier` or `idexpression` as a metavariable type in this case wouldn't match more complex location descriptions, like: x->fd = fd fd = -1; Using 'expression' metavariable type generates false positives, as you can't specify scope of such expression. The only real example from the current codebase is the global 'errno' variable, which results in following patch generated by `spatch`: --- src/basic/errno-util.h +++ /tmp/cocci-output-28263-971baa-errno-util.h @@ -15,8 +15,7 @@ static inline void _reset_errno_(int *sa #define UNPROTECT_ERRNO \ do { \ - errno = _saved_errno_; \ - _saved_errno_ = -1; \ + errno = TAKE_FD(_saved_errno_); \ } while (false) static inline int negative_errno(void) { Let's explicitly state that the matched expression should not equal 'errno' to avoid this. It's not particularly nice, but it should be enough, at least for now.
* coccinelle: add explicit statement isomorphismsFrantisek Sumsal2019-04-272-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | Coccinelle needs a custom isomorphism file with rules (isomorphisms) how to correctly rewrite conditions with explicit NULL checks (i.e. if (ptr == NULL)) to their shorter form (i.e. if (!ptr)). Coccinelle already contains such isomorphisms in its default .iso file, however, they're in the opposite direction, which results in useless output from coccinelle/equals-null.cocci. With this fix, `spatch` should no longer report patches like: @@ -628,8 +628,9 @@ static int path_deserialize_item(Unit *u f = path_result_from_string(value); if (f < 0) log_unit_debug(u, "Failed to parse result value: %s", value); - else if (f != PATH_SUCCESS) - p->result = f; + else {if (f != PATH_SUCCESS) + p->result = f; + } } else log_unit_debug(u, "Unknown serialization key: %s", key);
* resolve: use bridge or bonding interfaces in degraded-carrier stateYu Watanabe2019-04-261-1/+1
| | | | Fixes #12285.
* sd-bus: bump message queue size againFranck Bui2019-04-261-2/+2
| | | | | Simliarly to issue #4068, the current limit turns out to be too small for a big storage setup that uses many small disks. Let's bump it further.
* udevd: notify when max number value of children is reached only once per ↵Franck Bui2019-04-261-1/+10
| | | | | | | | | | | | | | | | | | batch of events When booting with "udev.log-priority=debug" for example, the output might be spammed with messages like this: systemd-udevd[23545]: maximum number (248) of children reached systemd-udevd[23545]: maximum number (248) of children reached systemd-udevd[23545]: maximum number (248) of children reached systemd-udevd[23545]: maximum number (248) of children reached systemd-udevd[23545]: maximum number (248) of children reached systemd-udevd[23545]: maximum number (248) of children reached systemd-udevd[23545]: maximum number (248) of children reached While the message itself is useful, printing it per batch of events should be enough.
* Merge pull request #12394 from poettering/oncalendar-tweakZbigniew Jędrzejewski-Szmek2019-04-262-18/+24
|\ | | | | systemd-run --on-calendar= follow-up
| * run: when we determine a timer cannot elapse anymore, really just warn, ↵Lennart Poettering2019-04-251-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | nothing else When we determine that a calendar expression cannot elapse anymore, print a warning but proceed regardless like we normally would. Quite possibly a remote system has a different understanding of time (timezone, system clock) than we have, hence we really shouldn't change behaviour here client side, but log at best, and then leave the decision what to do to the server side. Follow-up for #12299
| * calendarspec: make return time value of calendar_spec_next_usec() optionalLennart Poettering2019-04-251-7/+12
| | | | | | | | | | | | If noone is interested, there's no reason to return it. (Also document the ENOENT error code in a comment)
* | chown-recursive: also check mode before we bypassLennart Poettering2019-04-261-5/+5
| |
* | json: let's not accept embedded NUL bytes when allocating JSON stringsLennart Poettering2019-04-262-3/+7
| | | | | | | | | | Let's add an additional paranoia check, and not accept embedded NUL bytes in strings, just in case.
* | json: make log message more focussedLennart Poettering2019-04-261-1/+1
| |
* | bash-completion: accept files for --bind/--bind-ro optionsFrantisek Sumsal2019-04-261-2/+2
| |
* | bash-completion: process only non-template units for systemctl isolateFrantisek Sumsal2019-04-261-1/+1
| |
* | bash-completion: don't sort syslog prioritiesFrantisek Sumsal2019-04-261-0/+1
| | | | | | | | | | | | By default, the available completions are sorted alphabetically, which is counterproductive in case of syslog priorities. Override the default behavior using the `nosort` option
* | Document /etc/initrd-releaseJérémy Rosen2019-04-261-1/+3
| | | | | | | | | | | | When systemd is started, it detects initrd by checking for that file The usage of that file is not documented anywhere, so mention it early in the most relevant man-page I could find.
* | Revert "Revert "README: remove Coverity Scan badge""Evgeny Vereshchagin2019-04-251-1/+0
|/ | | | This reverts commit 93e4163e912b6895e61c43452a629f30a28eb70c.
* Merge pull request #12074 from poettering/io-acctZbigniew Jędrzejewski-Szmek2019-04-259-33/+365
|\ | | | | expose IO stats on the bus and in "systemctl status" and "systemd-run --wait"
| * systemctl: show IO stats in 'status' outputLennart Poettering2019-04-121-1/+14
| |
| * run: show IO stats in --wait resource outputLennart Poettering2019-04-121-0/+14
| |
| * core: include IO data in per-unit resource log msgLennart Poettering2019-04-121-4/+70
| |
| * croup: expose IO accounting data per unitLennart Poettering2019-04-125-3/+240
| | | | | | | | | | | | | | | | | | | | | | This was the last kind of accounting still not exposed on for each unit. Let's fix that. Note that this is a relatively simplistic approach: we don't expose per-device stats, but sum them all up, much like cgtop does. This kind of metric is probably the most interesting for most usecases, and covers the "systemctl status" output best. If we want per-device stats one day we can of course always add that eventually.
| * core: use string_table_lookup() at more placesLennart Poettering2019-04-122-18/+14
| |
| * core: add new call unit_reset_accounting()Lennart Poettering2019-04-125-6/+15
| | | | | | | | | | | | | | | | It's a simple wrapper for resetting both IP and CPU accounting in one go. This will become particularly useful when we also needs this to reset IO accounting (to be added in a later commit).
| * core: no need to initialize ip_accounting twiceLennart Poettering2019-04-121-1/+0
| |
| * cgroup: get rid of a local variableLennart Poettering2019-04-121-3/+1
| |
* | run: check if the specified calendar event is not in the pastFrantisek Sumsal2019-04-251-1/+19
| | | | | | | | | | Check if calendar event specification passed by --on-calendar runs in some time in the future. If not, execute the given command immediately
* | Merge pull request #12332 from cdown/default_minZbigniew Jędrzejewski-Szmek2019-04-255-27/+54
|\ \ | | | | | | cgroup: Add support for propagation of memory.min
| * | unit: Add DefaultMemoryMinChris Down2019-04-165-2/+24
| | |
| * | cgroup: Create UNIT_DEFINE_ANCESTOR_MEMORY_LOOKUPChris Down2019-04-161-25/+30
| | | | | | | | | | | | This is in preparation for creating unit_get_ancestor_memory_min.
* | | hwdb: add axis range corrections for the Dell Latitude e7250Dave Ross2019-04-251-0/+7
| | | | | | | | | Based on touchpad-edge-detector and dimensions confirmed with the owner's manual (https://content.etilize.com/User-Manual/1037738079.pdf)
* | | Merge pull request #12382 from yuwata/wireguard-12377Zbigniew Jędrzejewski-Szmek2019-04-252-32/+33
|\ \ \ | | | | | | | | network: fix ListenPort= in [WireGuard] section
| * | | network: fix ListenPort= in [WireGuard] sectionYu Watanabe2019-04-251-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | This fixes a bug introduced by f1368a333e5e08575f0b45dfe41e936b106a8627. Fixes #12377.
| * | | test-network: fix invalid assertionsYu Watanabe2019-04-251-23/+23
| | | |
* | | | Merge pull request #12316 from ↵Zbigniew Jędrzejewski-Szmek2019-04-253-68/+82
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | yuwata/network-prevent-multiple-initialization-12315 network: prevent interfaces to be initialized multiple times
| * | | | network: fix ref/unref logic for Link objectYu Watanabe2019-04-253-57/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - bridge or bonding master takes a reference of slave links. - drop link from bridge or bonding master's slave list when slave link is removed. - change type of Link::slaves to Set*, Fixes #12315.
| * | | | network: prevent interfaces to be initialized multiple timesYu Watanabe2019-04-252-11/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a uevent is received during the relevant interface is in LINK_STATE_PENDING, then the interface may be initialized twice. To prevent that, this introduces LINK_STATE_INITIALIZED.
| * | | | network: logs link state changeYu Watanabe2019-04-171-0/+4
| | | | |
* | | | | udev,network: warn when .link or .network file has no [Match] sectionYu Watanabe2019-04-256-5/+34
| |/ / / |/| | | | | | | | | | | Closes #12098.
* | | | Merge pull request #12376 from mrc0mmand/deal-with-backslashes-in-completionZbigniew Jędrzejewski-Szmek2019-04-242-3/+12
|\ \ \ \ | | | | | | | | | | bash-completion: properly autocomplete escaped unit names
| * | | | bash-completion: unify indentationFrantisek Sumsal2019-04-241-1/+1
| | | | |
| * | | | bash-completion: properly autocomplete escaped unit namesFrantisek Sumsal2019-04-242-2/+11
| | | | |
* | | | | NEWS: List getty@tty1.service as not being enabled anymorePaul Menzel2019-04-241-2/+3
| | | | | | | | | | | | | | | | | | | | Fixes: https://github.com/systemd/systemd/issues/12345
* | | | | Merge pull request #12351 from keszybz/sd-bus-add-symbolLennart Poettering2019-04-2418-222/+934
|\ \ \ \ \ | | | | | | | | | | | | Add symbol to tell the linker that new libsystemd version is needed
| * | | | | meson: do not use f-stringsZbigniew Jędrzejewski-Szmek2019-04-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our travis CI still uses python3.5. I'm making this into a separate commit to make it easy to revert later.
| * | | | | man: document sd_bus_add_{object,fallback}_vtableZbigniew Jędrzejewski-Szmek2019-04-235-0/+613
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The interface provided by those two functions is huge, so this text could probably be made two or three times as long if all details were described. But I think it's a good start.
| * | | | | sd-bus: when running user find function don't trust the value to be initializedZbigniew Jędrzejewski-Szmek2019-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The find function is externally provided, and we shouldn't trust that the authors remember to set the output parameter in all cases.
| * | | | | busctl: add introspect --xml-interfaceZbigniew Jędrzejewski-Szmek2019-04-232-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This wraps the call to org.freedesktop.DBus.Introspectable.Introspect. Using "busctl call" directly is inconvenient because busctl escapes the string before printing. Example: $ busctl introspect --xml org.freedesktop.systemd1 /org/freedesktop/systemd1 | pygmentize -lxml | less -RF
| * | | | | test-bus-{vtable,introspect}: share data and test introspect_path()Zbigniew Jędrzejewski-Szmek2019-04-236-142/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | test-bus-introspect is also applied to the tables from test-bus-vtable.c. test-bus-vtable.c is also used as C++ sources to produce test-bus-vtable-cc, and our hashmap headers are not C++ compatible. So let's do the introspection part only in the C version.
| * | | | | sd-bus: split introspection into the content creation and reply creation partsZbigniew Jędrzejewski-Szmek2019-04-235-41/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just moving code around, in preparation to allow the content creation part to be used in other places. On the surface of things, introspect_path() should be in bus-introspect.c, but introspect_path() uses many static helper functions in bus-objects.c, so moving it would require all of them to be exposed, which is too much trouble. test-bus-introspect is updated to actually write the closing bracket.
| * | | | | sd-bus: use _cleanup_ for struct introspectZbigniew Jędrzejewski-Szmek2019-04-232-30/+15
| | | | | |