Commit graph

3716 commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 79dc477f2f shared/logs-show: urlify CONFIG_FILE in verbose mode
Now all short-*, verbose, with-unit modes are handled. cat, export, json-* are
not, but those are usually used for post-processing, so I don't think it'd be
useful there.
2019-07-10 14:20:09 +02:00
Zbigniew Jędrzejewski-Szmek 76f7cc3fe4 shared/logs-show: urlify CONFIG_FILE in short mode
v2:
- check that the filename is terminated by ':', ' ', or EOS
- fix grep highlight overlap check
2019-07-10 14:19:26 +02:00
Zbigniew Jędrzejewski-Szmek d7921114d7 udev: warn when we fail to parse udev.conf
This should be like any other parse error and a warning should be emitted.
Let's use log_syntax() so we get the CONFIG_FILE= set.
2019-07-04 10:36:19 +02:00
Zbigniew Jędrzejewski-Szmek 62c6bbbc09 tree-wide: use PROJECT_FILE instead of __FILE__
This replaces the internal uses of __FILE__ with the new macro.
2019-07-04 10:36:00 +02:00
Zbigniew Jędrzejewski-Szmek 71b7a6c47e shared/logs-show: indentation 2019-07-02 09:34:12 +02:00
Yu Watanabe 539bcc831b
Merge pull request #12903 from keszybz/condition-quoting
Condition quoting
2019-06-30 04:10:40 +09:00
Zbigniew Jędrzejewski-Szmek 910c6d0931 Treat kernel version condition as a list of quoted checks
Before only one comparison was allowed. Let's make this more flexible:
ConditionKernelVersion = ">=4.0" "<=4.5"

Fixes #12881.

This also fixes expressions like "ConditionKernelVersion=>" which would
evaluate as true.
2019-06-29 17:11:03 +02:00
Zbigniew Jędrzejewski-Szmek f8bab19674
Merge pull request #12887 from fbuihuu/coredump-cleanup-part-1
Coredump cleanup part 1
2019-06-28 16:25:46 +02:00
Zbigniew Jędrzejewski-Szmek 4ec8514142 Rename EXTRACT_QUOTES to EXTRACT_UNQUOTE
Whenever I see EXTRACT_QUOTES, I'm always confused whether it means to
leave the quotes in or to take them out. Let's say "unquote", like we
say "cunescape".
2019-06-28 11:35:05 +02:00
Zbigniew Jędrzejewski-Szmek cae90de3d3 Reindent some things for readability 2019-06-28 11:19:24 +02:00
Yu Watanabe 22800b473e
Merge pull request #12889 from keszybz/analyze-condition
Add systemd-analyze condition
2019-06-28 02:37:20 +09:00
Franck Bui 11e6d9714e journal-import: extract helpers for handling arrays of iovec and make them available for others 2019-06-27 19:14:23 +02:00
Zbigniew Jędrzejewski-Szmek dc2c231684
Merge pull request #12760 from zachsmith/systemd-sleep_resume_offset
systemd-sleep: use resume_offset value if set
2019-06-27 13:37:27 +02:00
Zbigniew Jędrzejewski-Szmek e3b52014e2 shared/condition: fix printing of ConditionNull=
ConditionNull= is the only condition where parameter==NULL is allowed,
and we'd print ConditionNull=(null) or ConditionNull=!(null).
2019-06-27 10:54:37 +02:00
Zach Smith 2002d8cdae systemd-sleep: (bug) use resume_offset value if set
Use hibernation configuration as defined in
/sys/power/resume and /sys/power/resume_offset
if present before inspecting /proc/swaps and
attempting to calculate swapfile offset
2019-06-26 22:04:59 -07:00
Yu Watanabe 0ef69585d8 conf-parser: fix continuation handling
Before this commit, empty lines cannot break continuation.
The bug was introduced by 9adbfeb38a.

Closes #12883.
2019-06-27 03:00:26 +09:00
Kai Lüke fab347489f bpf-firewall: custom BPF programs through IP(Ingress|Egress)FilterPath=
Takes a single /sys/fs/bpf/pinned_prog string as argument, but may be
specified multiple times. An empty assignment resets all previous filters.

Closes https://github.com/systemd/systemd/issues/10227
2019-06-25 09:56:16 +02:00
Lennart Poettering 2d901d33a9
Merge pull request #12874 from yuwata/ethtool-make-ubsan-quiet
ethtool: make UBSan quiet and add missing link modes
2019-06-25 09:28:21 +02:00
Lennart Poettering 05b2ace147
Merge pull request #12870 from yuwata/tree-wide-further-path-join-cleanups
tree-wide: further path_join() and path_joina() cleanups
2019-06-25 09:27:01 +02:00
Yu Watanabe 6d02888935 ethtool: reindent link mode table 2019-06-25 11:55:59 +09:00
Yu Watanabe 72dda93acb ethtool: add missing link mode 2019-06-25 11:55:04 +09:00
Yu Watanabe d16c272844 ethtool-util: fix returned value when ethtool_cmd_speed() is SPEED_UNKNOWN 2019-06-25 11:44:19 +09:00
Yu Watanabe ffba064ae4 linux: make UBSAN quiet 2019-06-25 11:44:08 +09:00
Yu Watanabe 2824ed64a1 linux: update kernel headers 2019-06-25 11:29:13 +09:00
Yu Watanabe 270384b2d4 tree-wide: replace strjoina() with prefix_roota() 2019-06-25 01:31:26 +09:00
Michal Sekletar b070c7c0e1 core: introduce NUMAPolicy and NUMAMask options
Make possible to set NUMA allocation policy for manager. Manager's
policy is by default inherited to all forked off processes. However, it
is possible to override the policy on per-service basis. Currently we
support, these policies: default, prefer, bind, interleave, local.
See man 2 set_mempolicy for details on each policy.

Overall NUMA policy actually consists of two parts. Policy itself and
bitmask representing NUMA nodes where is policy effective. Node mask can
be specified using related option, NUMAMask. Default mask can be
overwritten on per-service level.
2019-06-24 16:58:54 +02:00
Lennart Poettering cee97d5768
Merge pull request #12836 from yuwata/tree-wide-replace-strjoin
tree-wide: replace strjoin() with path_join()
2019-06-22 20:02:46 +02:00
Lennart Poettering c6134d3e2f path-util: get rid of prefix_root()
prefix_root() is equivalent to path_join() in almost all ways, hence
let's remove it.

There are subtle differences though: prefix_root() will try shorten
multiple "/" before and after the prefix. path_join() doesn't do that.
This means prefix_root() might return a string shorter than both its
inputs combined, while path_join() never does that. I like the
path_join() semantics better, hence I think dropping prefix_root() is
totally OK. In the end the strings generated by both functon should
always be identical in terms of path_equal() if not streq().

This leaves prefix_roota() in place. Ideally we'd have path_joina(), but
I don't think we can reasonably implement that as a macro. or maybe we
can? (if so, sounds like something for a later PR)

Also add in a few missing OOM checks
2019-06-21 08:42:55 +09:00
Yu Watanabe 657ee2d82b tree-wide: replace strjoin() with path_join() 2019-06-21 03:26:16 +09:00
Lennart Poettering 64ef83139c
Merge pull request #12837 from yuwata/tree-wide-lgtm-fixes
tree-wide: fix issues found by lgtm
2019-06-20 12:35:34 +02:00
Yu Watanabe b19eab1f74
Merge pull request #12806 from yuwata/networkctl-ethtool-12657
networkctl: show speed, duplex, auto negotiation, and port
2019-06-20 06:56:37 +09:00
Yu Watanabe fe2e4b6961 tree-wide: use htobe{32,16}() instead of hton{l,s}() 2019-06-20 06:34:05 +09:00
Yu Watanabe 9ff27e6413 table: introduce FORMAT_BPS type 2019-06-19 23:15:19 +09:00
Yu Watanabe 33a8695fdc ethtool-util: introduce ethtool_get_link_info()
Will be used in later commits.
2019-06-19 23:15:19 +09:00
Yu Watanabe 7864b16b27 ethtool-util: make ethtool_connect() warn on failure 2019-06-19 23:15:19 +09:00
Yu Watanabe b9bc7d42e3 ethtool-util: use structured initializers 2019-06-19 23:15:13 +09:00
Iwan Timmer 4310bfc20b resolved: add strict mode for DNS-over-TLS
Add strict mode for DNS-over-TLS, which will require TLS support from the server. Closes #10755
2019-06-19 13:10:44 +02:00
Yu Watanabe 5c2316c605 ethtool-util: move from src/udev/net/ to src/shared/ 2019-06-19 09:03:50 +09:00
Zbigniew Jędrzejewski-Szmek 58cf79c224
Merge pull request #12424 from poettering/logind-brightness
logind: add SetBrightness() bus call as minimal API for setting "leds" and "backlight" kernel class device brightness
2019-06-12 14:28:09 +02:00
Yu Watanabe 042526868a
Merge pull request #12508 from keszybz/no-root-checks
Drop many root checks
2019-06-06 21:31:19 +09:00
Chris Down eab5049520
Merge pull request #11778 from anitazha/rfe_11654_dbus
core: add ExecStartXYZEx= with dbus support for executable prefixes
2019-06-05 10:02:00 +01:00
Zbigniew Jędrzejewski-Szmek 37dc34f702 shared/generator: voidify mkdir_parents() call
To appease coverity: CID#1401752.
2019-06-04 08:57:54 +02:00
Michal Sekletar 71923237b1 cpu-set-util: use %d-%d format in cpu_set_to_range_string() only for actual ranges 2019-06-03 22:36:58 +02:00
Yu Watanabe 1b47436e0e util: make device_wait_for_initialization() optionally takes timeout value 2019-06-04 01:19:43 +09:00
Yu Watanabe f822c5d59e util: make argument "subsystem" in device_wait_for_initialization() optional 2019-06-04 01:19:43 +09:00
Zbigniew Jędrzejewski-Szmek 8f5d6a044b
Merge pull request #12619 from zachsmith/refactor-parse-sleep-config
systemd-sleep: refactor sleep conf parsing
2019-06-03 17:30:05 +02:00
Zbigniew Jędrzejewski-Szmek 2bb24885de
Merge pull request #12700 from yuwata/udev-propagate-critical-errors
udev: modernize code and propagate critical errors
2019-06-03 15:29:40 +02:00
Yu Watanabe 25de7aa7b9 udev: modernize udev-rules.c
This does the following:
- rename enum udev_builtin_cmd -> UdevBuiltinCmd
- rename struct udev_builtin -> UdevBuiltin
- move type definitions to udev-rules.h
- move prototypes of functions defined in udev-rules.c to udev-rules.h
- drop to use strbuf
- propagate critical errors in applying rules,
- drop limitation for number of tokens per line.
2019-06-02 14:15:26 +09:00
Anita Zhang b3d593673c core: add ExecStartXYZEx= with dbus support for executable prefixes
Closes #11654
2019-05-30 20:41:42 -07:00
Zbigniew Jędrzejewski-Szmek e7b93f97ed shared/varlink: add missing va_end()
Coverity CID#1401347.
2019-05-30 20:36:54 +02:00