summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-05-01 09:29:50 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-05-01 09:29:50 -0300
commit19e2ef324dced523cf86e41db7a7379356737b97 (patch)
treefd2ac1df972199af1f561ed768e91234fe6f2810
parent9262c54c1ac7fccca1b6aaa51ed2081ee2c1c0da (diff)
downloadmediapointer-dvb-s2-19e2ef324dced523cf86e41db7a7379356737b97.tar.gz
mediapointer-dvb-s2-19e2ef324dced523cf86e41db7a7379356737b97.tar.bz2
2_driver.c:v4l2_enum_stds: erroneously always returns failure
From: David Warman <dwarman@davidwarman.net> 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 <dwarman@davidwarman.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r--v4l2-apps/lib/v4l2_driver.c2
1 files changed, 1 insertions, 1 deletions
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;
}