aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2021-07-01 07:55:25 +0200
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2021-07-01 08:01:51 +0200
commit42a4dff95f2291c07a59a589646796e70ee5e7f9 (patch)
treee15c182865e46e7932d0234a81cae479f13eaf7c
parentc4e0bd71a7f6a737a98f8eef86c417e61051240f (diff)
cec-ctl: log signal free time when (show && !verbose)
The logging of the signal free time was no longer done when show == true and verbose == false, fix the logic. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Fixes: 8639ff89 ("cec-ctl: report low drive without --verbose")
-rw-r--r--utils/cec-ctl/cec-pin.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/utils/cec-ctl/cec-pin.cpp b/utils/cec-ctl/cec-pin.cpp
index f890d2a0..cf4b6d34 100644
--- a/utils/cec-ctl/cec-pin.cpp
+++ b/utils/cec-ctl/cec-pin.cpp
@@ -386,9 +386,10 @@ void log_event_pin(bool is_high, __u64 ev_ts, bool show)
} else {
verb_printf("0 -> 1\n");
}
- } else if (!is_high && bit_periods > 1 && bit_periods < 10 && show) {
- printf("%s: signal free time = %.1f bit periods\n",
- ts2s(ts).c_str(), bit_periods);
+
+ if (!verbose && !is_high && bit_periods > 1 && bit_periods < 10)
+ printf("%s: signal free time = %.1f bit periods\n",
+ ts2s(ts).c_str(), bit_periods);
}
cec_pin_debug(ev_ts, (ev_ts - last_ts) / 1000, was_high, is_high, show);
last_change_ts = ev_ts;

Privacy Policy