freebsd: Assume all devices on FreeBSD are USB 2.0 per default because
FreeBSD does not have sysfs to read the device speed and type properly. The good thing is that there are no PCI devices that support V4L right now so all supported devices are from webcamd which only supports USB devices so that default is always correct.
This commit is contained in:
parent
7bf3a13d67
commit
ffff0b34c4
1 changed files with 5 additions and 0 deletions
|
@ -946,8 +946,13 @@ get_device_connection(const char *dev)
|
|||
snprintf(path, sizeof(path), "/sys/class/%s/device/speed", dev);
|
||||
|
||||
if(readlinefromfile(path, l, sizeof(l))) {
|
||||
#if defined(PLATFORM_FREEBSD)
|
||||
// Assume USB 2.0 on FreeBSD because there are no supported PCI devices
|
||||
return HOSTCONNECTION_USB480;
|
||||
#else
|
||||
// Unable to read speed, assume it's PCI
|
||||
return HOSTCONNECTION_PCI;
|
||||
#endif
|
||||
} else {
|
||||
speed = atoi(l);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue