aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2019-01-30 14:16:17 (GMT)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2019-01-30 14:16:17 (GMT)
commit9e375c965f200538817ab712330a86a123124394 (patch)
treedbb67c6d80751c0805c95b148e2ecec42f94334f
parent708f9052e1d2a905b10a03ed4d18e2d2c54b1350 (diff)
v4l2-ctl: call s_trace after opening the device, not before
Calling it before will generate spurious trace messages of the ioctls that are performed during open() that are confusing. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--utils/v4l2-ctl/v4l2-ctl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/v4l2-ctl/v4l2-ctl.cpp b/utils/v4l2-ctl/v4l2-ctl.cpp
index 10f7436..fc19798 100644
--- a/utils/v4l2-ctl/v4l2-ctl.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl.cpp
@@ -1184,8 +1184,6 @@ int main(int argc, char **argv)
}
verbose = options[OptVerbose];
c_fd.s_trace(options[OptSilent] ? 0 : (verbose ? 2 : 1));
- c_out_fd.s_trace(options[OptSilent] ? 0 : (verbose ? 2 : 1));
- c_exp_fd.s_trace(options[OptSilent] ? 0 : (verbose ? 2 : 1));
if (!is_subdev && doioctl(fd, VIDIOC_QUERYCAP, &vcap)) {
fprintf(stderr, "%s: not a v4l2 node\n", device);
@@ -1215,6 +1213,7 @@ int main(int argc, char **argv)
strerror(errno));
exit(1);
}
+ c_out_fd.s_trace(options[OptSilent] ? 0 : (verbose ? 2 : 1));
if (doioctl(out_fd, VIDIOC_QUERYCAP, &vcap)) {
fprintf(stderr, "%s: not a v4l2 node\n", out_device);
exit(1);
@@ -1233,6 +1232,7 @@ int main(int argc, char **argv)
strerror(errno));
exit(1);
}
+ c_exp_fd.s_trace(options[OptSilent] ? 0 : (verbose ? 2 : 1));
if (doioctl(exp_fd, VIDIOC_QUERYCAP, &vcap)) {
fprintf(stderr, "%s: not a v4l2 node\n", export_device);
exit(1);

Privacy Policy