]> git.ipfire.org Git - thirdparty/systemd.git/commit
udev: make newer event also blocked by DEVPATH_OLD
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 15 Apr 2022 03:23:48 +0000 (12:23 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 4 May 2022 08:16:14 +0000 (17:16 +0900)
commita1af9668ec78fc11a2e7ac942397eac0c8fceced
treeda4b83bc763b96a95b524e28f83d8eab41641e4f
parent29d02458327234333cba109d9355181c78030eb4
udev: make newer event also blocked by DEVPATH_OLD

Previously, a device has DEVPATH_OLD is blocked by a previous event
whose devpath is equivalent to the DEVPATH_OLD.

This extends the condtion.

1. an event has DEVPATH_OLD is blocked by a previous event whose
   devpath is a parent of, child of, or equivalent to the DEVPATH_OLD.

2. an event is blocked by a previous event whose DEVPATH_OLD is a
   parent of, child of, or equivalent to the devpath of the new event.

I am not sure such check is really necessary. But, the cost of the check
is expected to be extremely small, as device renaming does not occur so
frequently. Hence, it should not introduce any significant performance
regression.
src/shared/udev-util.c
src/shared/udev-util.h
src/test/test-udev-util.c
src/udev/udevd.c