]> git.ipfire.org Git - thirdparty/systemd.git/commit
udev: introduce CONST key name
authorJan Synacek <jsynacek@redhat.com>
Mon, 7 Oct 2019 08:03:07 +0000 (10:03 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 14 Oct 2019 13:01:11 +0000 (22:01 +0900)
commit4801d8afe2ff1c1c075c9f0bc5631612172e0bb7
tree320a1e198b9bfc33aa7024ee0dfc231fa7f1ef0a
parent55d3fdcf5e9f6ceb9fc1a5f93120305f20abf690
udev: introduce CONST key name

Currently, there is no way to match against system-wide constants, such
as architecture or virtualization type, without forking helper binaries.
That potentially results in a huge number of spawned processes which
output always the same answer.

This patch introduces a special CONST keyword which takes a hard-coded
string as its key and returns a value assigned to that key. Currently
implemented are CONST{arch} and CONST{virt}, which can be used to match
against the system's architecture and virtualization type.
man/udev.xml
src/udev/udev-rules.c