1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-25 01:34:28 +03:00
Commit Graph

36686 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
4874191d9d
Merge pull request #10787 from yuwata/libudev-cleanups
libudev: drop unused private functions
2018-11-20 10:42:19 +01:00
Yu Watanabe
f921b457a7 libudev: coding style fixes 2018-11-20 14:38:35 +09:00
Yu Watanabe
5ea78a39e5 libudev-list: move libudev-list related definitions to libudev-list-internal.h
This also rename libudev-private.h to libudev-util.h, and cleanups
several unnecessary headers from udev.h and libudev-util.h
2018-11-20 14:38:35 +09:00
Yu Watanabe
170e4380b6 libudev: drop prototypes for nonexistent functions 2018-11-20 14:38:35 +09:00
Yu Watanabe
c84954e8ed libudev-monitor: drop unused private functions 2018-11-20 14:38:35 +09:00
Yu Watanabe
53369277ec libudev-device: drop unused private functions 2018-11-20 14:38:35 +09:00
Yu Watanabe
02edd80d87 udev: move definition of READ_END and WRITE_END from libudev-private.h to udev.h 2018-11-20 14:38:35 +09:00
Yu Watanabe
278939be7a
Merge pull request #10847 from evverx/journald-stream-fuzzer
tests: add a fuzzer for journald streams
2018-11-20 13:37:27 +09:00
Xuanwo
c4a2deba7e zsh-completion: Add support for set-property (#10322) 2018-11-20 13:17:11 +09:00
Yu Watanabe
27b99f2912
Merge pull request #10801 from ssc-services/zsh-completion_machinectl_clone
zsh-completion: complete available, not running machines for `clone`
2018-11-20 13:13:41 +09:00
Yu Watanabe
f23ff5ba51
Merge pull request #10835 from poettering/transient-env-fix
fix flushing out of transient env vars from PID1's Manager object
2018-11-20 12:53:51 +09:00
Lennart Poettering
cc7a0bfa15 bootspec: introduce SYSTEMD_ESP_PATH for overriding where to look for the ESP (#10834) 2018-11-20 12:37:01 +09:00
David Leeds
53640e6fb9 process-util: check for correct kill return value (#10841)
Code was not doing a wait() after kill() due to checking for a return value > 0, and was leaving zombie processes. This affected things like  sd-bus unixexec connections.
2018-11-20 12:35:36 +09:00
Lennart Poettering
012c2f761b tree-wide: use __ prefixed gcc attributes (#10843)
As suggest here:

https://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html#Attribute-Syntax

    "You may optionally specify attribute names with ‘__’ preceding and
    following the name. This allows you to use them in header files without
    being concerned about a possible macro of the same name. For example,
    you may use the attribute name __noreturn__ instead of noreturn. "
2018-11-20 12:34:08 +09:00
Yu Watanabe
52048013b7
Merge pull request #10845 from poettering/static-destruct
RFC: introduce automatic destructors for static variables
2018-11-20 12:31:52 +09:00
Lennart Poettering
bd7989a3d9 tests: always use the right vtable wrapper calls
Prompted by https://github.com/systemd/systemd/pull/10836#discussion_r234598868
2018-11-20 05:34:29 +03:00
Evgeny Vereshchagin
9541f5ff5c tests: add a fuzzer for journald streams 2018-11-20 03:03:32 +01:00
Lennart Poettering
1acacd737b test-execute: fix killing of unit processes
Let's use the correct wrapper for calling unit vtable functions. Let's
make sure we always use the right wrappers, and never bypass them
needlessly.

Moreover use SIGKILL rather than "9" as signal name. Let's not be
needlessly cryptic.

Follow-up for: f7f8e8cbb9
2018-11-19 21:53:23 +01:00
Lennart Poettering
f7f00fb15b doc: document the boot menu entry identifier vocabulary
The existing text already said "See below regarding a recommended
vocabulary for boot loader entry identifiers.", but the section for it
was still missing. Let's fill in the missing bits, and describe basic
suggested rules for the boot menu entry identifier vocabulary, in
particular how to identify Windows and MacOS X installations, and how to
name automatic entries vs. explicitly configured ones.

This basically follows the logic implemented in sd-boot these days.
2018-11-19 21:52:28 +01:00
Lennart Poettering
a64841779a meson: order source files alphabetically 2018-11-19 21:50:54 +01:00
Lennart Poettering
4197fde5c7 debug-generator: port over to using static destructors 2018-11-19 21:14:34 +01:00
Lennart Poettering
f60947d970 debug-generator: port over to DEFINE_MAIN_FUNCTION() 2018-11-19 21:14:34 +01:00
Lennart Poettering
8a4fdaf292 main-func: automatically call static destructors from main-func.h macros 2018-11-19 21:14:34 +01:00
Lennart Poettering
67e16c31e9 util: add set of macros for declaring _cleanup_-style destructors for static variables 2018-11-19 21:14:34 +01:00
Lennart Poettering
5e332028f2 util-lib: move main() definition macros to its own header file
This way, we can extend the macro a bit with stuff pulled in from other
headers without this affecting everything which pulls in macro.h, which
is one of our most basic headers.

This is just refactoring, no change in behaviour, in prepartion for
later changes.
2018-11-19 21:14:34 +01:00
Lennart Poettering
2a44bf5099
Merge pull request #10811 from keszybz/define-main-through-macro
Define main through macro
2018-11-19 15:28:17 +01:00
Lennart Poettering
2675747f3c pam_systemd: suppress LOG_DEBUG log messages if debugging is off
In the PAM module we need to suppress LOG_DEBUG messages manually, if
debug logging is not on, as PAM won't do this for us. We did this
correctly for most log messages already, but two were missing. Let's fix
those too.

Fixes: #10822
2018-11-19 14:03:34 +01:00
Lennart Poettering
79a224c460 main: when reloading PID 1 let's reset the default environment
Otherwise we keep collecting stuff from env generators, and we really
shouldn't.

This was working properly on reexec but not on reload, as for reexec we
would always start fresh, but for reload would reuse the Manager object
and hence its default environment set.

Fixes: #10671
2018-11-19 13:01:19 +01:00
Lennart Poettering
2fbbbf9a5f manager: log on two OOM occasions 2018-11-19 12:22:56 +01:00
Lennart Poettering
e16f425654
Merge pull request #10698 from yuwata/udevd-replace-udev-device
udevd: replace udev_device by sd_device
2018-11-19 11:28:45 +01:00
Lennart Poettering
b08020893a
Merge pull request #10809 from keszybz/unit-log-result
Add helper function for logging unit results
2018-11-19 11:07:07 +01:00
Lennart Poettering
431957c959
Merge pull request #10814 from poettering/logind-suspend-fallback
if we need to hibernate/suspend-then-hibernate/hybrid-sleep due to keypress/lid switch but can't, fallback to regular suspend
2018-11-19 11:05:48 +01:00
Lennart Poettering
a44088f10f
Merge pull request #10825 from keszybz/advertize-followup
udev link advertizing followup
2018-11-19 11:05:18 +01:00
Lennart Poettering
2b38a8ea80
Merge pull request #10507 from cdown/cpu_acct
cgroup v2: Don't require CPU controller for CPU accounting in 4.15+
2018-11-19 10:57:48 +01:00
Evgeny Vereshchagin
f7f8e8cbb9 test: kill all processes launched by test-execute before exiting
As was shown in https://github.com/systemd/systemd/issues/10696#issuecomment-439613204,
currently `meson` waits for 1080 seconds (which is three times the global timeout) for the
test to fail completely even though it takes just two minutes for it to really fail. This
happens because the test itself leaves the services it has launched behind, which, in turn, makes
meson think that the test is still in progress. KILL_ALL with SIGKILL should make the issue
go away.
2018-11-19 09:24:22 +01:00
Piotr Drąg
85b18dbec5 catalog: update Polish translation 2018-11-19 09:23:04 +01:00
Xi Ruoyao
b0fbf9bd40 test: let the shell find "touch" instead of hard-coded "/bin/touch" 2018-11-19 08:37:36 +01:00
Zbigniew Jędrzejewski-Szmek
64d9f7568b basic/missing: drop _ETHTOOL_LINK_MODE_MAX
It was only used in one place, where we don't actually need it, and
it is too easy to forget to update it when adding new items to the table.
Let's just drop it.
2018-11-18 16:14:21 +01:00
Zbigniew Jędrzejewski-Szmek
5dd101186b udev: use an "inline" array instead of allocating for advertise mode
The code is a bit shorter and we don't allocate the uint32_t[127] array.
2018-11-18 16:14:19 +01:00
Zbigniew Jędrzejewski-Szmek
7f6bfc561f basic/util: import memeqzero from casync 2018-11-18 16:12:53 +01:00
Chris Down
a88c5b8ac4 cgroup v2: DefaultCPUAccounting=yes if CPU controller isn't required
We now don't enable the CPU controller just for CPU accounting if we are
on 4.15+ and using pure unified hierarchy, as this is provided
externally to the CPU controller. This makes CPUAccounting=yes
essentially free, so enabling it by default when it's cheap seems like a
good idea.
2018-11-18 12:21:41 +00:00
Chris Down
94ddb08d74 cgtop: Still try to get CPU statistics if controller-free
If CPU accounting is cheap, no controller necessarily needs to be
enabled here for us to be able to read statistics.
2018-11-18 12:21:41 +00:00
Chris Down
f98c25850f cgroup v2: Don't require CPU controller for CPU accounting in 4.15+
systemd only uses functions that are as of Linux 4.15+ provided
externally to the CPU controller (currently usage_usec), so if we have a
new enough kernel, we don't need to set CGROUP_MASK_CPU for
CPUAccounting=true as the CPU controller does not need to necessarily be
enabled in this case.

Part of this patch is modelled on an earlier patch by Ryutaroh Matsumoto
(see PR #9665).
2018-11-18 12:21:41 +00:00
Zbigniew Jędrzejewski-Szmek
09c984c6f7 test-util: modernize 2018-11-18 10:47:16 +01:00
Zbigniew Jędrzejewski-Szmek
b8cb5effeb
Merge pull request #10819 from yuwata/fix-10807
ethtool: drop NetDevAdvertise
2018-11-18 10:27:29 +01:00
Yu Watanabe
2d18ac4491 ethtool: drop NetDevAdvertise
Fixes #10807.
2018-11-18 14:33:50 +09:00
Yu Watanabe
8a716f26ef missing: add ETHTOOL_LINK_MODE_* and struct ethtool_link_settings 2018-11-18 14:33:50 +09:00
Zbigniew Jędrzejewski-Szmek
f921797d61
Merge pull request #10817 from evverx/audit-fuzzer
Add a fuzzer for process_audit_string
2018-11-17 18:26:54 +01:00
Yu Watanabe
af18705f8e test: also tests enumerating subsystems 2018-11-17 18:18:22 +01:00
Yu Watanabe
eb546b3532 udevd: replace udev_device in struct event by sd_device 2018-11-17 21:45:03 +09:00