Yu Watanabe
e559eca1b6
sd-bus: use SD_BUS_ERROR_NULL macro
...
Follow-up for e8f280bd0a
.
2018-11-12 16:32:10 +09:00
Lennart Poettering
5fb0720ebb
Merge pull request #10728 from keszybz/four-unrelated-cleanups
...
Four unrelated cleanups
2018-11-11 21:16:14 +01:00
Yu Watanabe
deb2b7348e
sd-device: drop priority and description from sd_device_monitor_attach_event() and sd_device_monitor_start()
...
Now we have sd_device_monitor_get_event_soruce(). So, it is not
necessary to include these parameters in the functions for sd_device_monitor.
2018-11-10 22:53:00 +09:00
Yu Watanabe
bf7712b63e
sd-device: add sd_device_monitor_get_event_source()
2018-11-10 22:53:00 +09:00
Yu Watanabe
8d578a2e73
sd-device: fix possible use of uninitialized value
2018-11-10 11:59:32 +01:00
Zbigniew Jędrzejewski-Szmek
e8f280bd0a
sd_bus: use structured intialization in one more place
2018-11-09 21:40:21 +01:00
Lennart Poettering
c4e48030cf
sd-bus: make "close+flush-on-exit" optional when using sd-event with sd-bus
...
This adds a new pair of API calls sd_bus_set_close_on_exit() and
sd_bus_get_close_on_exit(). They control whether an sd_bus object
attached to a an sd-event loop shall automatically be flushed/closed
when the event loop goes down. Usually that's a good thing, except for
very few cases where the bus connection is longer living than the event
loop it is attached on. Specifically, this is the case for nspawn, where
we run the event loop only while the container is up, but afterwards
still want to be able to use the bus connection.
2018-11-09 17:08:59 +01:00
Lennart Poettering
cc83d5197c
random-util: optionally allow randomness to be generated via RDRAND
...
We only use this when we don't require the best randomness. The primary
usecase for this is UUID generation, as this means we don't drain
randomness from the kernel pool for them. Since UUIDs are usually not
secrets RDRAND should be goot enough for them to avoid real-life
collisions.
2018-11-08 09:44:27 +01:00
Lennart Poettering
94d457e8d9
random-util: change high_quality_required bool parameter into a flags parameter
...
No change in behaviour, just some refactoring.
2018-11-08 09:44:27 +01:00
Lennart Poettering
3335dc2d75
random-util: rename acquire_random_bytes() → genuine_random_bytes()
...
It's more descriptive, since we also have a function random_bytes()
which sounds very similar.
Also rename pseudorandom_bytes() to pseudo_random_bytes(). This way the
two functions are nicely systematic, one returning genuine random bytes
and the other pseudo random ones.
2018-11-08 09:44:27 +01:00
Zbigniew Jędrzejewski-Szmek
e44c5a3ba6
Merge pull request #10594 from poettering/env-reload-fix
...
change handling of environment block of PID1's manager object
2018-11-07 12:49:13 +01:00
Lennart Poettering
9edcbc4f44
Merge pull request #10602 from yuwata/sd-device-logs
...
update log messages
2018-11-06 19:33:51 +03:00
Lennart Poettering
b992109b3e
Merge pull request #10633 from yuwata/sd-resolve-destroy
...
Another solution to fix wireguard issues
2018-11-06 19:30:59 +03:00
Yu Watanabe
7cadbe09e9
sd-device: use write_string_file() helper to write sysattr
2018-11-06 21:24:03 +09:00
Yu Watanabe
a5db6debcd
test: check returned value of sd_device_get_usec_since_initialized()
2018-11-06 15:45:22 +09:00
Yu Watanabe
754d6c26b4
test: show is_initialized flag in log message of test-sd-device
...
And drop devpath, as it is redundant for most cases.
2018-11-06 15:45:22 +09:00
Yu Watanabe
ecbe9873a9
test: show name of testing functions in test-sd-device
2018-11-06 15:45:22 +09:00
Yu Watanabe
c7d54daef9
sd-device: normalize debug messages
2018-11-06 15:45:22 +09:00
Yu Watanabe
38d1555d7c
sd-device: drop subsystem from log_device_*()
...
The sd_device object always has syspath and sysname, but subsytem may not.
Also, it may take some costs to get subsystem.
So, let's drop subsystem from logs.
2018-11-06 15:45:22 +09:00
Yu Watanabe
2382c9367b
sd-event: add sd_event_source_{get,set}_floating()
2018-11-05 13:19:02 +09:00
Yu Watanabe
b3ae7237c6
sd-resolve: introduce sd_resolve_query_{get,set}_floating()
2018-11-05 13:19:02 +09:00
Yu Watanabe
a8319dea1d
sd-resolve: introduce sd_resolve_query_{get,set}_destroy_callback()
2018-11-05 13:19:02 +09:00
Tobias Jungel
99f68ef02d
networkd: add missing bonding options ( #10542 )
...
Add support for bonding options system prio, port key and actor system mac.
These options exist in the linux kernel since 4.2
(torvalds/linux@171a42c38c )
Details:
https://www.kernel.org/doc/Documentation/networking/bonding.txt
2018-11-02 10:31:20 +09:00
Lennart Poettering
bea1a01310
strv: wrap strv_new() in a macro so that NULL sentinel is implicit
2018-10-31 18:00:52 +01:00
Yu Watanabe
5a937ea2f6
sd-device: make sd_device_get_is_initialized() returns is_initialized by return value
2018-10-29 17:33:33 +09:00
Yu Watanabe
78ffb476f2
sd-device: make several sd_device_get_*() accepts NULL pointer for buffer of returned value
...
When only the existence of the value are important, then we can set
NULL now.
2018-10-29 17:18:00 +09:00
Yu Watanabe
5d062b4ef0
test: check sd_device_get_ifindex() returns positive ifindex when it succeeds
2018-10-27 07:03:39 +09:00
Yu Watanabe
1dfa960786
sd-device: return positive ifindex when sd_device_get_ifindex() succeeds
...
As valid ifindex is positive value, not non-negative value.
Follow-up for dcfbde3a43
.
2018-10-27 07:03:38 +09:00
Yu Watanabe
dcdc2f61b1
sd-device: fix wrong assertion ( #10530 )
2018-10-26 10:16:00 +09:00
Lennart Poettering
e7b48c45ae
Merge pull request #10498 from yuwata/udev-builtin-log
...
udev-builtin: use log_device_*() macros
2018-10-24 10:53:35 +02:00
Yu Watanabe
f3f80f43aa
sd_hwdb: update log messages
2018-10-24 04:31:48 +09:00
Yu Watanabe
ec2e8c3a62
sd-device: fix argument name in log_device_*() macros
...
Follow-up for b0cba0ca52
.
2018-10-24 04:29:00 +09:00
Yu Watanabe
b6124e64a5
sd-device-monitor: use log_device_*()
2018-10-23 22:44:07 +09:00
Yu Watanabe
b0cba0ca52
sd-device: introduce log_device_*() macros
2018-10-23 18:28:38 +09:00
Yu Watanabe
80df8f2518
missing: support old linux/fou.h
...
linux/fou.h was introduced in 3.18.
FOU_ATTR_REMCSUM_NOPARTIAL was added in 4.0.
FOU_CMD_GET was added in 4.1.
Follow-up for 53cb501a13
.
Fixes #10474 .
2018-10-21 22:34:28 +09:00
Yu Watanabe
14cb109d45
tree-wide: replace 'unsigned int' with 'unsigned'
2018-10-19 22:19:12 +02:00
Lennart Poettering
347a19343c
Merge pull request #10462 from yuwata/test-sd-device-monitor
...
Add tests for sd_device_monitor and small cleanups
2018-10-19 22:05:50 +02:00
Lennart Poettering
490c5a37cb
tree-wide: some automatic coccinelle fixes ( #10463 )
...
Nothing fancy, just coccinelle doing its work.
2018-10-20 00:07:46 +09:00
Yu Watanabe
aaa5b4cec7
test: add tests for sd_device_monitor
2018-10-19 18:07:53 +09:00
Lennart Poettering
6ab1853953
Merge pull request #10460 from yuwata/setsockopt_int-more
...
tree-wide: use setsockopt_int() more
2018-10-19 10:12:00 +02:00
Yu Watanabe
b58d4d2d4f
sd-device-monitor: include error cause in log message
2018-10-19 11:57:54 +09:00
Yu Watanabe
a537eafe1d
sd-device-monitor: drop unnecessary condition
2018-10-19 11:57:29 +09:00
Yu Watanabe
17acb7ef9a
Merge pull request #10450 from poettering/foreach-line-excorcism
...
FOREACH_LINE excorcism
2018-10-19 08:44:51 +09:00
Yu Watanabe
218b4609d0
Merge pull request #10447 from poettering/fgets-excorcism
...
let's get rid of fgets()
2018-10-19 08:36:01 +09:00
Yu Watanabe
9e5b649655
tree-wide: use setsockopt_int() more
2018-10-19 05:52:42 +09:00
Lennart Poettering
2ff48e981e
tree-wide: introduce setsockopt_int() helper and make use of it everywhere
...
As suggested by @heftig:
6d5e65f645 (commitcomment-30938667)
2018-10-18 19:50:29 +02:00
Lennart Poettering
849d653a4e
Merge pull request #10239 from yuwata/sd-device-monitor
...
sd-device: introduce sd_device_monitor
2018-10-18 18:30:38 +02:00
Lennart Poettering
c0815ca93d
Merge pull request #10407 from yuwata/netlink-slot
...
sd-netlink: introduce sd_netlink_slot object and relevant functions
2018-10-18 18:05:58 +02:00
Lennart Poettering
710bf2aeb2
sd-path: FOREACH_LINE exorcism
2018-10-18 16:23:45 +02:00
Lennart Poettering
8ae29228a8
bus-creds: FOREACH_LINE excorcism
2018-10-18 16:23:45 +02:00