Thomas Mühlbacher
fee1863c83
man: Don't leak memory in path-documents example
...
The `sd_path_lookup(3)` man page states that the returned string shall be
`free(3)`'d but then doesn't do so in the example code.
Also add basic error handling as well.
2021-08-31 13:44:49 +09:00
Yu Watanabe
827d1ba730
core: fix typo: they -> the
2021-08-30 22:25:54 +09:00
Lennart Poettering
aecc04f180
hwdb: remove double empty line in --help text
2021-08-30 22:25:04 +09:00
jlempen
93d2e0b6b0
Add matrix for the Chuwi SurBook Mini (CWI540)
2021-08-30 12:16:52 +02:00
José Expósito
c5e9aeca0a
hwdb: add a generic rule for trackpoints ( #20543 )
...
Check for "TrackPoint" in the device name and add the
ID_INPUT_POINTINGSTICK property.
In reference to libinput issue:
https://gitlab.freedesktop.org/libinput/libinput/-/issues/651
2021-08-30 18:30:42 +10:00
Yu Watanabe
4917c15af7
Merge pull request #20057 from yuwata/sd-netlink-genl-cleanups
...
sd-netlink: cleanups for generic netlink
2021-08-29 22:37:31 +09:00
Yu Watanabe
98be429243
sd-netlink: make type_system_get_*() and friends return value directly
2021-08-29 18:10:47 +09:00
Yu Watanabe
e1578f608b
sd-netlink: introduce sd_genl_add_match()
...
By using this, we can listen multicast messages for generic netlink.
2021-08-29 18:10:47 +09:00
Yu Watanabe
3f60e4488c
sd-netlink: split sd_netlink_add_match() into two parts
...
This also makes netlink_slot_disconnect() correctly unref multicast
groups.
2021-08-29 18:10:47 +09:00
Yu Watanabe
ef90beb1c5
sd-netlink: introduce sd_genl_message_get_command()
2021-08-29 18:10:47 +09:00
Yu Watanabe
44f1072a9d
sd-netlink: determine header size of genl message by using CTRL_ATTR_HDRSIZE attribute
...
Fortunately, all genl families we currently use do not require additional
header size.
2021-08-29 18:10:47 +09:00
Yu Watanabe
52313394ba
sd-netlink: read protocol version of each genl family
2021-08-29 18:10:47 +09:00
Yu Watanabe
56fdc16da8
sd-netlink: drop sd_genl_family_t and introduce GenericNetlinkFamily
...
Kernel manages each genl family by its name, e.g. "nlctrl" or WG_GENL_NAME,
and its ID (used for nlmsg_type) is determined dynamically when the
corresponding module is loaded.
This commit makes sd-netlink follow the same way; now, sd_genl_family_t
is dropped, and sd_genl_message_new() takes a genl family name. Each
genl family is resolved when it is used first time, and its information
is stored in GenericNetlinkFamily.
2021-08-29 18:10:43 +09:00
Yu Watanabe
1cedca05e4
sd-netlink: split message_new() into two parts and introduces message_new_full()
2021-08-29 18:01:26 +09:00
Yu Watanabe
699c3708df
sd-netlink: introduce several macros to define type system
2021-08-29 18:01:26 +09:00
Yu Watanabe
e6dd298935
sd-netlink: drop redundant string table lookup functions to handle type system union
2021-08-29 18:01:26 +09:00
Yu Watanabe
fae9ee25a4
sd-netlink: split type system for nfnl
...
This makes the root type system for nfnl indexed by subsystem, and
itroduces a next level type system for each subsystem. The second
level type systems are indexed by message types correspond to each
subsystem.
2021-08-29 18:01:26 +09:00
Yu Watanabe
07acd0d90b
sd-netlink: drop 'flags' argument from sd_nfnl_nft_message_new_table()
2021-08-29 18:01:26 +09:00
Yu Watanabe
c08ab4a013
sd-netlink: wrap long function declarations
2021-08-29 18:01:26 +09:00
Yu Watanabe
9a9c8f3fcc
sd-netlink: add several missing attributes
2021-08-29 18:01:26 +09:00
Yu Watanabe
1370925bc7
basic: copy genetlink.h to repository
2021-08-29 18:01:26 +09:00
Yu Watanabe
aee6309b97
sd-netlink: introduce basic_type_system
...
Preparation for later commits.
2021-08-29 18:01:26 +09:00
Yu Watanabe
d757e6bdf0
sd-netlink: unify two spurious type system root for genl
2021-08-29 18:01:26 +09:00
Yu Watanabe
9270ec60bc
sd-netlink: drop genl type system indexed by command
...
All type systems of currently supported genl families do not depend on
commands. Hence, at least tentatively, let's drop the tables.
Note that type system for genl ethtool depends on commands. Let's
reintroduce a mechanism to support the deps when we support ethtool on
netlink.
2021-08-29 18:01:26 +09:00
Yu Watanabe
e6d58c2f71
sd-netlink: rename several type systems for generic netlink
2021-08-29 18:01:26 +09:00
Yu Watanabe
021273b782
sd-netlink: split netlink-types.[ch] into small files
...
Also renames several files.
2021-08-29 18:01:22 +09:00
Yu Watanabe
b5beb9b0f5
sd-netlink: make several type systems static
2021-08-29 17:18:11 +09:00
Yu Watanabe
0dac2688a4
sd-netlink: move type systems
2021-08-29 17:18:11 +09:00
Yu Watanabe
b019c545e9
sd-netlink: introduce two helper functions for type system union
2021-08-29 17:18:11 +09:00
Yu Watanabe
ea073c8fce
sd-netlink: rename functions
2021-08-29 17:18:04 +09:00
Yu Watanabe
49eb0a6889
sd-netlink: make type_get_type_system{,_union}() return value directly
2021-08-29 17:14:07 +09:00
Yu Watanabe
c737abd31b
sd-netlink: make message_seal() accept already sealed messages
...
The function can be idempotent. It is not necessary to refuse already
sealed messages.
2021-08-29 17:14:07 +09:00
Yu Watanabe
409856d328
sd-netlink: rename variables, arguments, and functions
...
Most changes are 'rtnl' -> 'nl' where the function is not only for rtnl.
2021-08-29 17:14:03 +09:00
Yu Watanabe
0c45a60f8e
test: add usual log messages in test-netlink
2021-08-29 17:11:40 +09:00
Yu Watanabe
9d7fbec1e5
sd-netlink: drop unused type
2021-08-29 17:11:40 +09:00
Lennart Poettering
9c53de8bc5
update TODO
2021-08-28 07:15:12 +02:00
Daan De Meyer
6e5485617e
core: Add information on which condition failed to the job done message
...
When a job is skipped, it's useful to know exactly which condition failed so
let's add this information to the error message.
To avoid having to dynamically generate a format string, we special case the
formatting of condition failed messages.
2021-08-28 06:46:37 +02:00
Lennart Poettering
d52cc0a531
core: Unit's condition_result field is a boolean
...
Let's only assign boolean values to a boolean variable.
Unit's condition_result is not of type ConditionResult, slightly
confusingly. Let's hence not assign one of ConditionResult's values to
it, but simple booleans.
This effectively doesn't make a difference, since CONDITION_ERROR is
true when cast to bool. But it's still ugly to rely on that. And
confusing.
2021-08-27 21:46:10 +01:00
Kevin Orr
a3a5446b76
Fix another crash due to missing NHDR
2021-08-27 10:01:14 +02:00
Lennart Poettering
fb9bd82443
Merge pull request #20547 from poettering/home-4k
...
homed: round fs offset and sizes to multiples of 4K
2021-08-27 09:59:44 +02:00
Yu Watanabe
a9cd516f6c
Merge pull request #20553 from weblate/weblate-systemd-master
...
Translations update from Weblate
2021-08-27 03:09:29 +09:00
Jan Kuparinen
433a610626
po: Translated using Weblate (Finnish)
...
Currently translated at 9.5% (18 of 189 strings)
Co-authored-by: Jan Kuparinen <copper_fin@hotmail.com >
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/fi/
Translation: systemd/main
2021-08-26 20:05:20 +02:00
Adolfo Jayme Barrientos
18a5c90f29
po: Translated using Weblate (Spanish)
...
Currently translated at 89.4% (169 of 189 strings)
Co-authored-by: Adolfo Jayme Barrientos <fitoschido@gmail.com >
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/es/
Translation: systemd/main
2021-08-26 20:05:20 +02:00
Lennart Poettering
b8643ee2ea
Revert "core: Add information on which condition failed to job skipped format string"
...
This reverts commit c97bef458b .
2021-08-27 00:36:07 +09:00
Frantisek Sumsal
061f0084eb
cryptsetup: drop an unused variable
...
This fixes compilation with new-enough libcryptsetup (2.4.0+) & clang:
```
$ CC=clang CXX=clang++ meson build --werror -Dlibcryptsetup-plugins=true
...
$ ninja -C build
...
../src/cryptsetup/cryptsetup-tokens/luks2-fido2.c:23:53: error: unused variable 'v' [-Werror,-Wunused-variable]
_cleanup_(json_variant_unrefp) JsonVariant *v = NULL;
...
```
2021-08-26 13:13:08 +01:00
Wind/owZ and Simeonlps
f7327a485b
hwdb: Add sensor rule for Hometech Wi101
...
This commit was done to add sensor rule for Hometech Wi101. Note that this rule might be too general and need fixes. I couldn't test this on any other device since this one is the only one I have.
Co-authored-by: Simeonlps <Simeonlps@users.noreply.github.com >
Signed-off-by: Wind/owZ <windowz414@gnuweeb.org >
2021-08-26 10:27:10 +01:00
I-dont-need-name
6f2353a2ce
hwdb: Add force-release for HP Omen 15 calculator key. ( #20538 )
...
* Add force-release for HP Omen 15 calculator key.
The key doesn't create release event so I have come up with this fix to make it work properly.
2021-08-26 10:25:32 +01:00
Daan De Meyer
c97bef458b
core: Add information on which condition failed to job skipped format string
...
When a job is skipped, it's useful to know exactly which condition failed so
let's add this information to the error message. Because we now return an
allocated string from job_done_message_format(), make sure we strdup() the
other formats as well so the caller can safely free the string returned by
job_done_message_format().
2021-08-26 10:24:13 +01:00
Tom Yan
c918b70a4d
network: default LinkLocalAddresssing= to no for link stacked with a passthru mode MACVLAN/MACVTAP
...
For similar reason to the case of a bridge slave: we don't want any IP configuration for it.
2021-08-26 06:11:41 +09:00
Yu Watanabe
cacf882ff3
Merge pull request #20541 from yuwata/udev-coalesce-follow-up
...
udev: follow-ups for coalesce feature support
2021-08-26 06:05:29 +09:00