Lennart Poettering
77d28bd10f
Merge pull request #10483 from yuwata/udev-cleanup-10
...
tree-wide: use log_device_*()
2018-10-24 10:51:53 +02:00
Lennart Poettering
086712f99f
Merge pull request #10461 from yuwata/small-cleanups
...
Fixes recent defects reported by coverity
2018-10-24 10:36:20 +02:00
Jiuyang liu
a2f577fca0
add ephemeral to nspawn-settings.
2018-10-24 10:22:20 +02:00
Yu Watanabe
1cb7d29d68
udevadm-info: fix memleak
...
Fixes CID#1396276.
2018-10-24 05:04:01 +09:00
Yu Watanabe
a0570c1a82
udevadm-monitor: initialize variable
...
Fixes CID#1396278.
2018-10-24 05:04:01 +09:00
Yu Watanabe
db8794c3a0
modules-load: return first error in the loop
...
Follow-up for a889e206a7 .
Fixes CID#1396280.
2018-10-24 05:04:01 +09:00
Yu Watanabe
fd5ad16cfb
reply-password: initialize 'length' variable
...
Follow-up for 1fd2786161 .
This fixes the following warning when built by clang:
```
../src/reply-password/reply-password.c:76:21 warning: variable 'length' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
```
Fixes CID#1396281 and CID#1396277.
2018-10-24 05:03:00 +09:00
Yu Watanabe
ec9d636b37
core: use ascii_toupper() instead of everytime judging whether it is the first message
2018-10-24 04:58:08 +09:00
Evgeny Vereshchagin
c8758e726c
journald: use the "driver" transport for logging a refused connection
...
Otherwise, these messages can end up in `/dev/null` when journald is run
in containers as was shown in https://github.com/systemd/systemd/pull/10444#issuecomment-430927793 .
2018-10-23 19:36:52 +02:00
Evgeny Vereshchagin
9e8b1ec08e
sd-journal: escape binary data in match_make_string()
...
Fixes : #10383
2018-10-23 19:33:01 +02:00
Yu Watanabe
61b8aa3d27
udevadm: normalize exit status
...
After d354690e7d , each udevadm command
returns negative errno on error. So, let's normalize the exit status
of udevadm.
2018-10-23 19:31:37 +02:00
Lennart Poettering
5d83b9f47b
Merge pull request #10493 from yuwata/parse-time-overflow
...
util: check overflow in parse_time() and parse_nsec()
2018-10-23 19:30:49 +02:00
Yu Watanabe
b220632c61
link-config: use log_device_*()
2018-10-23 22:44:07 +09:00
Yu Watanabe
4d04259d41
udev-watch: use log_device_*()
2018-10-23 22:44:07 +09:00
Yu Watanabe
e0ca42e383
udev-node: use log_device_*()
2018-10-23 22:44:07 +09:00
Yu Watanabe
94ad322538
rfkill: use log_device_*()
2018-10-23 22:44:07 +09:00
Yu Watanabe
3d0ac9d0ec
mount-tool: use log_device_*()
2018-10-23 22:44:07 +09:00
Yu Watanabe
76386309b8
login: use log_device_*()
2018-10-23 22:44:07 +09:00
Yu Watanabe
b6124e64a5
sd-device-monitor: use log_device_*()
2018-10-23 22:44:07 +09:00
Yu Watanabe
133432cc15
gpt-auto-generator: use log_device_*()
2018-10-23 22:44:07 +09:00
Yu Watanabe
7bd33dbd6e
fsck: use log_device_*()
2018-10-23 22:44:07 +09:00
Yu Watanabe
71f79b56cf
core/device: use log_device_*()
2018-10-23 22:44:07 +09:00
Yu Watanabe
87a9a197ed
backlight: use log_device_*()
2018-10-23 22:44:07 +09:00
Yu Watanabe
cb39201e72
bash-completion: analyze: add timespan
...
Follow-up for 3f1c1287a9 .
2018-10-23 22:28:42 +09:00
Yu Watanabe
db4e61071d
test: add tests for detecting overflow in parse_time() and parse_nsec()
2018-10-23 22:25:01 +09:00
Yu Watanabe
f6a178e91d
util: check overflow in parse_nsec()
2018-10-23 22:24:16 +09:00
Yu Watanabe
8079c90333
util: check overflow in parse_time()
2018-10-23 22:23:34 +09:00
Chris Down
3f1c1287a9
analyze: Add "timespan" command to dump time span in usec
...
This is useful for a couple of cases, I'm mostly interested in case #1 :
1. Verifying "reasonable" values in a trivially scriptable way
2. Debugging unexpected time span parsing directly
Test Plan:
```
% build/systemd-analyze timespan 20
Original: 20
μs: 20
Human: 20us
% build/systemd-analyze timespan 20ms
Original: 20ms
μs: 20000
Human: 20ms
% build/systemd-analyze timespan 20z
Failed to parse time span '20z': Invalid argument
```
2018-10-23 14:26:51 +02:00
Zbigniew Jędrzejewski-Szmek
f402ce827d
Merge pull request #10395 from yuwata/udev-cleanup-9
...
udev-builtin: replace udev_device by sd_device
2018-10-23 13:43:33 +02:00
Yu Watanabe
d354690e7d
udev-builtin: propagate negative errno
2018-10-23 18:29:25 +09:00
Yu Watanabe
45a73f4be3
udevadm-test-builtin: use find_device()
...
This also fixes minor memleak.
2018-10-23 18:28:38 +09:00
Yu Watanabe
b753e14ac8
udevadm: use path friendly functions
2018-10-23 18:28:38 +09:00
Yu Watanabe
269c3b67c6
udev: propagate original error from udev_builtin_add_property()
2018-10-23 18:28:38 +09:00
Yu Watanabe
63918f926a
udev: logs error in udev_builtin_add_property()
2018-10-23 18:28:38 +09:00
Yu Watanabe
b0cba0ca52
sd-device: introduce log_device_*() macros
2018-10-23 18:28:38 +09:00
Yu Watanabe
c45b369dd1
udev-builtin: modernize code a bit
...
- introduce _UDEV_BUILTIN_INVALID,
- use _UDEV_BUILTIN_MAX where applicable,
- add several assertions.
2018-10-23 18:28:38 +09:00
Yu Watanabe
d277e33916
udevadm-test-builtin: replace udev_device by sd_device
2018-10-23 18:28:38 +09:00
Yu Watanabe
981b8159e9
udev: drop libudev-private.h from udev-builtin-{hwdb,net_id}.c
2018-10-23 18:28:38 +09:00
Yu Watanabe
3d6194e83e
udev: make udev_builtin_run take sd_device
2018-10-23 18:28:38 +09:00
Yu Watanabe
9b917abe02
udev-builtin: simplify code a bit
2018-10-23 18:28:38 +09:00
Yu Watanabe
3fc2e9a247
udev: replace udev_device by sd_device from prototype of udev builtin commands
2018-10-23 18:28:38 +09:00
Yu Watanabe
71bd61c576
udev: replace udev_device by sd_device in udev-builtin-usb_id.c
2018-10-23 18:28:38 +09:00
Yu Watanabe
4b60fe6e83
udev: replace udev_device by sd_device in udev-builtin-uaccess.c
2018-10-23 18:28:38 +09:00
Yu Watanabe
de675b17c8
udev: replace udev_device by sd_device in udev-builtin-path_id.c
2018-10-23 18:28:38 +09:00
Yu Watanabe
d9b3e99656
udev: replace udev_device by sd_device in udev-builtin-net_setup_link.c
2018-10-23 18:28:38 +09:00
Yu Watanabe
09d04a74c1
udev: replace udev_device by sd_device in udev-builtin-net_id.c
2018-10-23 18:28:00 +09:00
Yu Watanabe
786cc8523a
udev: replace udev_device by sd_device in udev-builtin-keyboard.c
2018-10-23 17:51:34 +09:00
Yu Watanabe
ff79992751
udev: replace udev_device by sd_device in udev-builtin-input_id.c
2018-10-23 17:51:34 +09:00
Yu Watanabe
29fefe2dcb
udev: replace udev_device by sd_device in udev-builtin-blkid.c
2018-10-23 17:51:34 +09:00
Yu Watanabe
bfc38d8fff
udev: replace udev_device by sd_device in udev-builtin-hwdb.c
2018-10-23 17:51:34 +09:00