summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLei YU <mine260309@gmail.com>2018-04-19 10:59:40 +0800
committerLei YU <mine260309@gmail.com>2018-04-19 14:09:46 +0800
commit065b767b6e658702dfac696cd752cca6190a4610 (patch)
tree75d3de466c5c80c32cc98cc2b333aa6596844992
parentbc4a4ff6e4d0688727d54e73356be617acf18035 (diff)
downloadphosphor-gpio-monitor-065b767b6e658702dfac696cd752cca6190a4610.tar.gz
phosphor-gpio-monitor-065b767b6e658702dfac696cd752cca6190a4610.zip
Make --continue as no_argument
This is an improvement for the previous commit, that make --continue option as no_argument. Tested: phosphor-gpio-monitor is able to run with or without --continue argument, and it it continues to run after key press with this argument. Change-Id: I6f9dc5423e19eace366e382a2408dd143a124915 Signed-off-by: Lei YU <mine260309@gmail.com>
-rw-r--r--argument.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/argument.cpp b/argument.cpp
index d388001..c47dcd9 100644
--- a/argument.cpp
+++ b/argument.cpp
@@ -37,7 +37,7 @@ const option ArgumentParser::options[] =
{ "key", required_argument, nullptr, 'k' },
{ "polarity", required_argument, nullptr, 'r' },
{ "target", required_argument, nullptr, 't' },
- { "continue", optional_argument, nullptr, 'c' },
+ { "continue", no_argument, nullptr, 'c' },
{ "help", no_argument, nullptr, 'h' },
{ 0, 0, 0, 0},
};
@@ -94,7 +94,7 @@ void ArgumentParser::usage(char** argv)
" This is 0 / 1 \n";
std::cerr << " --target=<systemd unit> Systemd unit to be called on GPIO"
" state change\n";
- std::cerr << " --continue=[true] Whether or not to continue"
+ std::cerr << " [--continue] Whether or not to continue"
" after key pressed\n";
}
} // namespace gpio
OpenPOWER on IntegriCloud