avicap32: Use define instead of hardcoded value
André Hentschel
nerv at dawncrow.de
Wed Feb 23 11:55:49 CST 2011
At least ENOIOCTLCMD already existed in linux kernel 2.2.*
---
dlls/avicap32/avicap32_main.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/dlls/avicap32/avicap32_main.c b/dlls/avicap32/avicap32_main.c
index 349ee5d..caa8673 100644
--- a/dlls/avicap32/avicap32_main.c
+++ b/dlls/avicap32/avicap32_main.c
@@ -142,15 +142,14 @@ static BOOL query_video_device(int devnum, char *name, int namesize, char *versi
return TRUE;
}
- if (errno != EINVAL && errno != 515)
+ if (errno != EINVAL && errno != ENOIOCTLCMD)
WARN("%s: ioctl failed: %s -- Falling back to V4L\n", device, strerror(errno));
else WARN("%s: Not a V4L2 compatible device, trying V4l 1\n", device);
#endif /* HAVE_V4L2 */
memset(&capa, 0, sizeof(capa));
if (xioctl(fd, VIDIOCGCAP, &capa) == -1) {
-/* errno 515 is used by some webcam drivers for unknown IOICTL command */
- if (errno != EINVAL && errno != 515)
+ if (errno != EINVAL && errno != ENOIOCTLCMD)
ERR("%s: Querying failed: %s\n", device, strerror(errno));
else ERR("%s: Querying failed: Not a V4L compatible device\n", device);
close(fd);
--
Best Regards, André Hentschel
More information about the wine-patches
mailing list