summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2020-05-31 06:53:09 +0200
committerStanislaw Halik <sthalik@misaki.pl>2020-05-31 06:53:09 +0200
commitbc368174cb015f2291cb8dc2f3e2a5782b22cdc8 (patch)
tree6e2ca18a028a7aa236d04f18195a5f9377485c22
parent05e2bb37e39fb6c61d5d73c609de19058df05c5a (diff)
video/ps3eye: disable when system driver exists
The driver is enabled on Linux merely for testing purposes.
-rw-r--r--video-ps3eye/module.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/video-ps3eye/module.cpp b/video-ps3eye/module.cpp
index 97dd370e..812e523c 100644
--- a/video-ps3eye/module.cpp
+++ b/video-ps3eye/module.cpp
@@ -57,8 +57,18 @@ end:
return cnt;
}
+#ifdef __linux__
+# include <unistd.h>
+#endif
+
bool check_device_exists()
{
+#ifdef __linux__
+ // don't show when system driver exists
+ if (!access("/sys/module/gspca_ov534", R_OK|X_OK))
+ return false;
+#endif
+
static bool ret = device_count() > 0;
return ret;
}