util/udev: fix path for udev device inhibitor

The udev inhibitor rules are checking for `device-$major:$minor`
but we created them with `f"device-{major}-{minor}"`. So they
did indeed not actually work. Fix that.
This commit is contained in:
Christian Kellner 2022-02-27 16:20:43 +01:00
parent 8102f20d23
commit 6300a80c84

View file

@ -53,7 +53,7 @@ class UdevInhibitor:
@classmethod
def for_device(cls, major: int, minor: int, lockdir=LOCKDIR):
"""Inhibit a device given its major and minor number"""
path = pathlib.Path(lockdir, f"device-{major}-{minor}")
path = pathlib.Path(lockdir, f"device-{major}:{minor}")
ib = cls(path)
ib.inhibit()
return ib