1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 00:51:24 +03:00
Commit Graph

37952 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
690f02f4b8 timesyncd,resolved,machinectl: drop calls to sd_event_get_exit_code()
In all three cases, sd_event_loop() will return the exit code anyway.
If sd_event_loop() returns negative, failure is logged and results in an
immediate return. Otherwise, we don't care if sd_event_loop() returns 0
or positive, because the return value feeds into DEFINE_MAIN_FUNCTION(), which
doesn't make the distinction.
2019-01-08 23:26:07 +01:00
Zbigniew Jędrzejewski-Szmek
1b2a7d92af Fix a few comments 2019-01-08 23:11:26 +01:00
Zbigniew Jędrzejewski-Szmek
2cfb197890 sd-device: modernize code a bit
Empty line between setting the output parameter and return is removed. I like
to think about both steps as part of returning from the function, and there's
no need to separate them.

Similarly, if we need to unset a pointer after successfully passing ownership,
use TAKE_PTR and do it immediately after the ownership change, without an empty
line inbetween.
2019-01-08 22:14:06 +01:00
Yu Watanabe
82d9ac23fd udev-node: make link_find_prioritized() return negative value when nothing found
Fixes a bug introduced by a2554acec6.

Fixes RHBZ#1662303.
2019-01-08 19:21:44 +01:00
Yu Watanabe
d501e52bf1 core/socket: drop unnecessary assignment to 'r'
Follow-up for e541734528.

As suggested in #11352.
2019-01-09 02:11:19 +09:00
Yu Watanabe
6548603235 core/socket: use macro to define log_address_error_errno()
Then, it is not necessary to suppress warnings.

Follow-up for ae05e1b658.
2019-01-09 02:09:36 +09:00
Yu Watanabe
06c2f0a816 login: simplify the condtion in assertion and slightly decrease binary size 2019-01-08 23:44:50 +09:00
Yu Watanabe
6b9f8b7135 login: use free_and_strdup() at one more place 2019-01-08 23:44:50 +09:00
Yu Watanabe
543680f415 login: adjust range of InhibitWhat in assertions 2019-01-08 23:44:45 +09:00
dana
c501ecd70c zsh completion: Prevent functions from clobbering each other, &c.
- Don't redefine helpers on every call
- Prefix helper names with main function name
- Adjust some helper names for consistency and convention adherance
2019-01-08 15:23:37 +01:00
marvelousblack
f047466041 Add Teclast X80 PLUS (H5C5) accel mount matrix 2019-01-08 15:09:08 +01:00
Zbigniew Jędrzejewski-Szmek
f0560c7453
Merge pull request #11355 from yuwata/rfe-11343
conf-parse: accept whitespaces before comments
2019-01-08 15:07:33 +01:00
Lennart Poettering
3f1af087a9
Merge pull request #11352 from yuwata/rfe-11348
core/socket: logs address or path which fails to be initialized
2019-01-08 11:43:35 +01:00
Claudius Ellsel
0919362b31 Unchain not related mice in 70-mouse.hwdb 2019-01-08 10:40:09 +01:00
Michael Sloan
a08c3e8f25 cat: add --stderr-priority option 2019-01-08 10:37:20 +01:00
Zbigniew Jędrzejewski-Szmek
c64715b5cb
Merge pull request #11344 from poettering/various-fixes
multiple trivial fixlets, across the tree
2019-01-08 10:33:09 +01:00
Yu Watanabe
c494b739a4 udevadm: refuse to run trigger, control, settle and monitor commands in chroot
Closes #11333.
2019-01-08 10:31:19 +01:00
Yu Watanabe
787a133f2d NEWS: also mention that clock file for timesyncd may need to move
Follow-up for aa2437e2ae.

Closes #11329.
2019-01-08 10:20:33 +01:00
Yu Watanabe
ff650ffe34 test: add testcases for the lines prefixed with whitespaces 2019-01-08 14:12:22 +09:00
Yu Watanabe
b41dd0d2db conf-parser: accept whitespaces before comments
Closes #11343.
2019-01-08 14:05:15 +09:00
Yu Watanabe
71b21730d4 conf-parser: mention that unknown lvalue is ignored 2019-01-08 12:50:58 +09:00
Yu Watanabe
bca3222cd6
Merge pull request #11351 from yuwata/ethtool-port-table
ethtool: cleanups for port_table
2019-01-08 12:23:11 +09:00
Yu Watanabe
c226800996
Merge pull request #11232 from yuwata/fix-9130-alternative
network: always check link is ready when address is updated
2019-01-08 12:22:21 +09:00
Yu Watanabe
ae05e1b658 core/socket: logs address or path which fails to be initialized
Closes #11348.
2019-01-08 04:40:46 +09:00
Yu Watanabe
e541734528 core/socket: use _cleanup_ attribute for closing fds on error 2019-01-08 04:11:59 +09:00
Yu Watanabe
fc2d74ab05 core/socket: use log_unit_*() 2019-01-08 04:11:45 +09:00
Yu Watanabe
44909f1c9f ethtool: minimize the size of port_table
Note that `_NET_DEV_PORT_MAX` is 0x100.
2019-01-08 03:30:15 +09:00
Yu Watanabe
1637c3575b ethtool: use kernel defined values for NET_DEV_PORT_* 2019-01-08 03:28:47 +09:00
Yu Watanabe
f8bfa31856 login: do not use cast to bool for enum 2019-01-08 02:39:31 +09:00
Zbigniew Jędrzejewski-Szmek
a75211421f udev: rework how we handle the return value from spawned programs
When running PROGRAM="...", we would log
systemd-udevd[447]: Failed to wait spawned command '...': Input/output error
no matter why the program actually failed, at error level.

The code wouldn't distinguish between an internal failure and a failure in the
program being called and run sd_event_exit(..., -EIO) on any kind of error. EIO
is rather misleading here, becuase it suggests a serious error.

on_spawn_sigchld is updated to set the return code to distinguish failure to
spawn, including the program being killed by a signal (a negative return value),
and the program failing (positive return value).

The logging levels are adjusted, so that for PROGRAM= calls, which are
essentially "if" statements, we only log at debug level (unless we get a
timeout or segfault or another unexpected error).
2019-01-07 18:36:04 +01:00
Lennart Poettering
be0b7a1a66 tree-wide: always declare bitflag enums the same way
let's always use the 1 << x syntax. No change of behaviour or even of
the compiled binary.
2019-01-07 17:50:39 +01:00
Lennart Poettering
f8c186c9ec json: handle NULL explicitly in json_variant_has_type() 2019-01-07 17:50:39 +01:00
Lennart Poettering
6af022fedd json: fix typo 2019-01-07 17:50:39 +01:00
Lennart Poettering
fc0f6fbffc json: teach json_log() the new SYNTHETIC_ERRNO() logic 2019-01-07 17:50:39 +01:00
Lennart Poettering
16420be1fd loop-util: tweak codepath when a loopback file is "created" from an existing block device
Be more careful with initialized of the 'relinquished' boolean field,
and let's return the fd, like we do for the regular codepath, too.
2019-01-07 17:50:39 +01:00
Lennart Poettering
26c1be0fdc loop-util: minor simplification 2019-01-07 17:50:39 +01:00
Lennart Poettering
cbf13087cc fsck: use symbolic names where we have them 2019-01-07 17:50:39 +01:00
Lennart Poettering
aebfc8f090 stat-util: remove spurious newline 2019-01-07 17:50:39 +01:00
Lennart Poettering
6eab5f0656 env-util: normalize one more flags enum 2019-01-07 17:50:39 +01:00
Lennart Poettering
f2e28b5a0d
Merge pull request #11327 from keszybz/revert-dbus-address
Revert "pam_systemd: drop setting DBUS_SESSION_BUS_ADDRESS"
2019-01-07 16:14:07 +01:00
Frantisek Sumsal
4a2c3dc318
Merge pull request #11252 from evverx/use-asan-wrapper-on-travis-ci
travis: run PID1, journald and everything else under ASan+UBsan
2019-01-06 18:48:38 +01:00
Lennart Poettering
5f99550afe
Merge pull request #11241 from bengal/lldp-802-3-subtypes
lldp: add 802.3 OUI subtype definitions
2019-01-06 18:15:51 +01:00
Zbigniew Jędrzejewski-Szmek
69bd76f2b9 pam_systemd: set $DBUS_SESSION_BUS_ADDRESS unconditionally
There's very little lost if the variable is set for a socket that isn't
connectible, but a lot lost (races, ...) if it's not set but the socket exists.

Also, drop the FIXME note, since we don't plan to revert this revert any time
soon.
2019-01-06 17:37:00 +01:00
Lennart Poettering
7b77689c30
Merge pull request #11328 from keszybz/static-array-size-declarations
Use a c99 feature for additional code analysis
2019-01-06 14:06:59 +01:00
Lucas Werkmeister
4fa226ff3b man: systemctl: document effect of --all on journal output
Based on the journalctl documentation of this option added in 23ad99b519
(#10527), but with the first reference to “fields” replaced by “journal
messages”, since I think it’s less common to show other fields with
`systemctl status` (though it’s possible with the `-o` option).
2019-01-06 14:03:16 +01:00
Zbigniew Jędrzejewski-Szmek
f1028f5766 Print the systemd version in a format that dracut likes
- systemd 240-63-g4199f68+
+ systemd 240 (240-63-g4199f68+)

Sad, but easy.

Fixes #11330.
2019-01-06 13:57:31 +01:00
Lennart Poettering
2004fce186
Merge pull request #11337 from keszybz/build-version-h
meson: declare version.h as dep for libbasic
2019-01-06 13:55:10 +01:00
James Hilliard
50f2fc77d7 Disable tools/choose-default-locale.sh when cross compiling 2019-01-06 13:51:18 +01:00
Zbigniew Jędrzejewski-Szmek
63058f432b Revert "meson: declare version.h as dep for fuzzers"
This reverts commit 0c2e93b863.

This should not be necessary anymore after previous commit.
I don't quite remember what sequence of steps was failing, but right now
"meson build -Dslow-tests=true && ninja -C build fuzzers" work fine.
2019-01-05 13:30:24 +01:00
Zbigniew Jędrzejewski-Szmek
df93e8ef05 meson: declare version.h as dep for libbasic
"meson build && ninja -C build systemd-cat" would fail on missing version.h.

Fixes #11335.
2019-01-05 13:30:23 +01:00