diff options
author | Dmitry V. Levin <ldv@strace.io> | 2023-03-02 08:00:00 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@strace.io> | 2023-03-08 18:55:40 +0000 |
commit | acdba85e0e2bf229f356ad09a2b880e89224715d (patch) | |
tree | c070f6407dd1bd639708e1c7dfb5243478f4dd05 /src/udev/udevadm.h | |
parent | 4f5de157316f00e046bc43687144fb8a6a81808f (diff) | |
download | systemd-acdba85e0e2bf229f356ad09a2b880e89224715d.tar.gz |
udevadm: introduce new 'verify' command
We seem to have no tool to verify udev rule files. There is a simple
udev rules syntax checker in the tree, test/rule-syntax-check.py, but
it is too simple to detect less trivial issues not detected by udev,
e.g. redundant comparisons (#26593) or labels without references.
Such a tool would be beneficial not only for maintaining udev rules
distributed along with udev, but also and even more so for maintaining
third party udev rules that are more likely to have issues with syntax
and semantic correctness.
Implement a udev rules syntax and semantics checker in the form of
'udevadm verify [OPTIONS] FILE...' command that is based on
udev_rules_parse_file() interface and would apply further checks
on top of it in subsequent commits.
Resolves: #26606
Diffstat (limited to 'src/udev/udevadm.h')
-rw-r--r-- | src/udev/udevadm.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/udev/udevadm.h b/src/udev/udevadm.h index 417611affe..7920a70d5b 100644 --- a/src/udev/udevadm.h +++ b/src/udev/udevadm.h @@ -13,6 +13,7 @@ int monitor_main(int argc, char *argv[], void *userdata); int hwdb_main(int argc, char *argv[], void *userdata); int test_main(int argc, char *argv[], void *userdata); int builtin_main(int argc, char *argv[], void *userdata); +int verify_main(int argc, char *argv[], void *userdata); int wait_main(int argc, char *argv[], void *userdata); int lock_main(int argc, char *argv[], void *userdata); |