From ea0e5b37938863b04d7d5f2cfeb12a984cffb650 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Thu, 15 Aug 2013 14:50:38 +0200 Subject: [PATCH] v4l2-ctl: fix '--set-dv-bt-timings query' option. An earlier bug fix in parse_subopt broke the '--set-dv-bt-timings query' parsing. The way it was parsed was also buggy, but the parse_subopt bug hid that. Signed-off-by: Hans Verkuil --- utils/v4l2-ctl/v4l2-ctl-stds.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/utils/v4l2-ctl/v4l2-ctl-stds.cpp b/utils/v4l2-ctl/v4l2-ctl-stds.cpp index f779718..fdb6163 100644 --- a/utils/v4l2-ctl/v4l2-ctl-stds.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-stds.cpp @@ -139,6 +139,11 @@ static void parse_dv_bt_timings(char *optarg, struct v4l2_dv_timings *dv_timings dv_timings->type = V4L2_DV_BT_656_1120; + if (!strcmp(subs, "query")) { + query = true; + return; + } + while (*subs != '\0') { static const char *const subopts[] = { "width", @@ -156,7 +161,6 @@ static void parse_dv_bt_timings(char *optarg, struct v4l2_dv_timings *dv_timings "il_vs", "il_vbp", "index", - "query", NULL }; @@ -206,9 +210,6 @@ static void parse_dv_bt_timings(char *optarg, struct v4l2_dv_timings *dv_timings case 14: enumerate = strtol(value, 0L, 0); break; - case 15: - query = true; - break; default: stds_usage(); exit(1); -- 2.7.4