aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2016-12-01 15:16:11 +0100
committerHans Verkuil <hans.verkuil@cisco.com>2016-12-01 15:16:11 +0100
commit063d1f5d5e60783002d781e8a23911acbda65e99 (patch)
treef3b70f4f6528928be8f3fde68fd7214fff9a98ef
parent003f31e59f353b4aecc82e8fb1c7555964da7efa (diff)
cec-compliance: --test-adapter needs a valid PA
If the --test-adapter test is run, and there is no valid physical address, then bail out with a clear message instead of producing a bunch of weird failures. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
-rw-r--r--utils/cec-compliance/cec-compliance.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/cec-compliance/cec-compliance.cpp b/utils/cec-compliance/cec-compliance.cpp
index bd96d968..547247a0 100644
--- a/utils/cec-compliance/cec-compliance.cpp
+++ b/utils/cec-compliance/cec-compliance.cpp
@@ -1307,6 +1307,11 @@ int main(int argc, char **argv)
printf("\tCEC_ADAP_G/S_PHYS_ADDR: %s\n", ok(testAdapPhysAddr(&node)));
if (node.caps & CEC_CAP_PHYS_ADDR)
doioctl(&node, CEC_ADAP_S_PHYS_ADDR, &node.phys_addr);
+ if (node.phys_addr == CEC_PHYS_ADDR_INVALID) {
+ fprintf(stderr, "FAIL: without a valid physical address this test cannot proceed.\n");
+ fprintf(stderr, "Make sure that this CEC adapter is connected to another HDMI sink or source.\n");
+ exit(1);
+ }
printf("\tCEC_ADAP_G/S_LOG_ADDRS: %s\n", ok(testAdapLogAddrs(&node)));
fcntl(node.fd, F_SETFL, fcntl(node.fd, F_GETFL) & ~O_NONBLOCK);
if (node.caps & CEC_CAP_LOG_ADDRS) {

Privacy Policy