From 19e2ef324dced523cf86e41db7a7379356737b97 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 1 May 2007 09:29:50 -0300 Subject: 2_driver.c:v4l2_enum_stds: erroneously always returns failure From: David Warman v4l2_driver.c:v4l2_enum_stds: erroneously always returns failure because errno is +ve, needs inverting for use as a v4l error code. The diff command actually produced patched for two fixes; I separated them manually into these two reports. Signed-off-by: David Warman Signed-off-by: Mauro Carvalho Chehab --- v4l2-apps/lib/v4l2_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'v4l2-apps/lib/v4l2_driver.c') diff --git a/v4l2-apps/lib/v4l2_driver.c b/v4l2-apps/lib/v4l2_driver.c index 24ed2846b..3f7a1188f 100644 --- a/v4l2-apps/lib/v4l2_driver.c +++ b/v4l2-apps/lib/v4l2_driver.c @@ -211,7 +211,7 @@ int v4l2_enum_stds (struct v4l2_driver *drv) p->index=i; ok=xioctl(drv->fd,VIDIOC_ENUMSTD,p); if (ok<0) { - ok=errno; + ok=-errno; free(p); break; } -- cgit v1.2.3