]> git.ipfire.org Git - thirdparty/systemd.git/commit
udev-rule: rework logging about udev rules
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 13 Mar 2023 11:57:50 +0000 (20:57 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 13 Mar 2023 12:25:45 +0000 (21:25 +0900)
commitc06ab041c769a12fa6cc40b60c8289bff5e2d8bd
treeba8ecb8d02b0b936f02f5ccb356e4c9342ebcf85
parent560900be67694798b2230e9b5d4b9449733a2c01
udev-rule: rework logging about udev rules

This makes the loggers take the most relevant object, i.e. when
applying udev rules to a device, the loggers take sd_device and
UdevRuleToken object, and when parsing udev rules, they take
UdevRuleLine or UdevRuleFile object.

To achieve that, this drops 'iterators' in UdevRules or friends named
`current_file` or so. Instead of that, each object now has its
parent object, e.g. UdevRuleToken.rule_line that references the
UdevRuleLine object the token belonging to. And each function previously
took UdevRules object now takes the most relevant object, e.g. UdevRuleToken.

Solves the discussion in https://github.com/systemd/systemd/pull/26698#discussion_r1129261193.
src/udev/fuzz-udev-rules.c
src/udev/udev-rules.c
src/udev/udev-rules.h
src/udev/udevadm-verify.c