udev: allow removing tags via TAG-="foobar"

System Internals / systemd - David Herrmann [gmail.com] - 11 September 2014 08:22 UTC

This extends the udev parser to support OP_REMOVE (-=) and adds support for TAG-= to remove previously set tags. We don't fail if the tag didn't exist.

This is pretty handy if we ship default rules for seat-assignments and users want to exclude specific devices from that. They can easily add rules that drop any automatically added "seat" tags again.

8e3ba37 udev: allow removing tags via TAG-="foobar"
man/udev.xml | 7 ++++
src/libudev/libudev-device.c | 21 ++++++++++-
src/libudev/libudev-private.h | 1 +
src/udev/udev-rules.c | 78 +++++++++++++++++++++++++++++++++++++++--
4 files changed, 103 insertions(+), 4 deletions(-)

Upstream: github.com


  • Share