I'm trying to fix the v4l2loopback
driver to work with udev (to have udev automatically assign stable device names).
The problem seems to be, that the device driver doesn't expose a few fields that are seemingly required by udev to properly work with the standard 60-persistent-v4l.rules
, namely:
ID_BUS
ID_SERIAL
ID_PATH
Also, running udevadm test-builtin path_id
on the device doesn't return anything (and the exit-code is 1
).
Now any example I've found in the net assumes that I want to write a USB device driver. Unfortunately this is not true for the v4l2loopback
device, which is a virtual
device.
So the question is:
How do I add PATH
, SERIAL
and BUS
properties to a virtual device driver, in order to make udev
see them?
Note: The question is really targeted at fixing the device driver so that it plays nicely with existing udev rules (rather than tweaking udev so that it recognizes the device properly).