diff options
author | Hans Verkuil <hansverk@cisco.com> | 2018-10-03 10:57:48 +0200 |
---|---|---|
committer | Hans Verkuil <hansverk@cisco.com> | 2018-10-03 11:01:23 +0200 |
commit | ba5cef6d356c6bbc9f9a3cfb0f778d3c4a518f5d (patch) | |
tree | d96b796e6d269a8fd1daf42d1ea8c7b199d1bd5a /utils/cec-ctl/cec-ctl.cpp | |
parent | 4ed1a5af20fb761002a63611e25afbfc98a23373 (diff) |
cec-ctl: turn -n into a toggle
The -n option turns off waiting for a reply, but there is no way
to turn it on again for later messages. Turn this into a toggle.
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Diffstat (limited to 'utils/cec-ctl/cec-ctl.cpp')
-rw-r--r-- | utils/cec-ctl/cec-ctl.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/utils/cec-ctl/cec-ctl.cpp b/utils/cec-ctl/cec-ctl.cpp index 07ab5a72..f9e8dcb7 100644 --- a/utils/cec-ctl/cec-ctl.cpp +++ b/utils/cec-ctl/cec-ctl.cpp @@ -641,7 +641,7 @@ enum Option { OptLogicalAddresses = 'L', OptMonitor = 'm', OptMonitorAll = 'M', - OptNoReply = 'n', + OptToggleNoReply = 'n', OptOsdName = 'o', OptPhysAddr = 'p', OptPoll = 'P', @@ -745,7 +745,7 @@ static struct option long_options[] = { { "ignore", required_argument, 0, OptIgnore }, { "store-pin", required_argument, 0, OptStorePin }, { "analyze-pin", required_argument, 0, OptAnalyzePin }, - { "no-reply", no_argument, 0, OptNoReply }, + { "no-reply", no_argument, 0, OptToggleNoReply }, { "logical-address", no_argument, 0, OptLogicalAddress }, { "logical-addresses", no_argument, 0, OptLogicalAddresses }, { "to", required_argument, 0, OptTo }, @@ -803,7 +803,7 @@ static void usage(void) " -l, --logical-address Show first configured logical address\n" " -L, --logical-addresses Show all configured logical addresses\n" " -C, --clear Clear all logical addresses\n" - " -n, --no-reply Don't wait for a reply\n" + " -n, --no-reply Toggle 'don't wait for a reply'\n" " -t, --to <la> Send message to the given logical address\n" " -f, --from <la> Send message from the given logical address\n" " By default use the first assigned logical address\n" @@ -1872,8 +1872,8 @@ int main(int argc, char **argv) case OptAnalyzePin: analyze_pin = optarg; break; - case OptNoReply: - reply = false; + case OptToggleNoReply: + reply = !reply; break; case OptPhysAddr: phys_addr = parse_phys_addr(optarg); |