Closed patmans closed 9 years ago
udev was designed to address the issue of device names changing across boots. I recommend you create a custom udev rule that always maps your device to /dev/video1
Sure I can do that, but it's much easier to use the existing persistent name that's already created by udev, and going forward that's a much better solution for all users.
I agree with the extra length actually. I put this on my todo list, it should be trivial.
Okay, I've committed to master the trivial change. This actually brings us in line with the MonitorPresets table.
This will be in 1.28.1 when it is released (soon), or you can run the master branch.
If you would like to just upgrade your db in place, use the following sql to alter the column type: ALTER TABLE Monitors MODIFY Device tinytext;
The maximum length of the Device Path seems to be limited to 64 bytes, so longer by-id names (that should be peristent across reboots) cannot be used.
For example, on my system, I have:
$ ls -l /dev/v4l/by-id/usb-OmniVision_Technologies__Inc._USB_Camera-B4.09.24.1-video-index1 lrwxrwxrwx 1 root root 12 Jan 11 12:20 /dev/v4l/by-id/usb-OmniVision_Technologies__Inc._USB_Camera-B4.09.24.1-video-index1 -> ../../video1
The above by-id name is 84 bytes long, so I'm forced to use the name /dev/video1, but that name can change across boots, where the by-id name should not change across boots.
A maximum of 256 bytes is quite likely good enough in all cases, 128 is probably ok for 99% of the hardware out there.