summaryrefslogtreecommitdiff
path: root/v4l2-apps
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2008-09-05 10:08:45 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-09-05 10:08:45 -0300
commit9aa2d22f827055231502b339af60044582cc67c3 (patch)
treebd801419e69534d0042bf447a6bf0ed8c899f3a0 /v4l2-apps
parent9a68ced75fe38c14a4277067c4fcaeaf205b06ee (diff)
parent89bf8cd11f914eff585c23797fd88a641b9cb3dd (diff)
downloadmediapointer-dvb-s2-9aa2d22f827055231502b339af60044582cc67c3.tar.gz
mediapointer-dvb-s2-9aa2d22f827055231502b339af60044582cc67c3.tar.bz2
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'v4l2-apps')
-rw-r--r--v4l2-apps/util/v4l2-ctl.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/v4l2-apps/util/v4l2-ctl.cpp b/v4l2-apps/util/v4l2-ctl.cpp
index ae9293414..1c765cf96 100644
--- a/v4l2-apps/util/v4l2-ctl.cpp
+++ b/v4l2-apps/util/v4l2-ctl.cpp
@@ -93,6 +93,7 @@ enum Option {
OptListFormats,
OptLogStatus,
OptVerbose,
+ OptSilent,
OptGetVideoOutFormat,
OptSetVideoOutFormat,
OptGetSlicedVbiCap,
@@ -291,15 +292,15 @@ static void usage(void)
" set the video capture format [VIDIOC_S_FMT]\n"
" pixelformat is either the format index as reported by\n"
" --list-formats, or the fourcc value as a string\n"
- " --verbose turn on verbose ioctl error reporting.\n"
+ " --silent only set the result code, do not print any messages\n"
+ " --verbose turn on verbose ioctl status reporting\n"
"\n");
printf("Uncommon options:\n"
" --get-fmt-video-out\n"
" query the video output format [VIDIOC_G_FMT]\n"
" --set-fmt-video-out=width=<w>,height=<h>\n"
" set the video output format [VIDIOC_S_FMT]\n"
- " --get-fmt-overlay\n"
- " query the video overlay format [VIDIOC_G_FMT]\n"
+ " --get-fmt-overlay query the video overlay format [VIDIOC_G_FMT]\n"
" --get-fmt-output-overlay\n"
" query the video output overlay format [VIDIOC_G_FMT]\n"
" --set-fmt-output-overlay=chromakey=<key>,global_alpha=<alpha>\n"
@@ -1017,12 +1018,11 @@ static int doioctl(int fd, int request, void *parm, const char *name)
if (retVal < 0) {
app_result = -1;
}
- if (!options[OptVerbose]) return retVal;
- printf("%s: ", name);
+ if (options[OptSilent]) return retVal;
if (retVal < 0)
- printf("failed: %s\n", strerror(errno));
- else
- printf("ok\n");
+ printf("%s: failed: %s\n", name, strerror(errno));
+ else if (options[OptVerbose])
+ printf("%s: ok\n", name);
return retVal;
}