diff options
| author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2017-01-05 21:10:06 -0500 |
|---|---|---|
| committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2017-01-17 20:26:10 -0500 |
| commit | 4da0161bbf38890c3e6074a8773ba25c9598f08c (patch) | |
| tree | 49416040df0fe12eb2ef66f422f7f15e8a0cea58 /argument.cpp | |
| parent | 613a5b37b11a272da503fcf6ac0c734a6e342442 (diff) | |
| download | phosphor-hwmon-4da0161bbf38890c3e6074a8773ba25c9598f08c.tar.gz phosphor-hwmon-4da0161bbf38890c3e6074a8773ba25c9598f08c.zip | |
Add cmdline --of-name option
Add an option for passing hwmon instances via the open firmware
device path. This allows udev triggers based on the path.
Change-Id: Icffc9734208204a052dc2910500df88136590e7d
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'argument.cpp')
| -rw-r--r-- | argument.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/argument.cpp b/argument.cpp index 4cab8a8..170bb8f 100644 --- a/argument.cpp +++ b/argument.cpp @@ -62,17 +62,19 @@ void ArgumentParser::usage(char** argv) std::cerr << "Options:\n"; std::cerr << " --help print this menu\n"; std::cerr << " --path=<path> sysfs location to monitor\n"; + std::cerr << " --of-name=<path> open firmware device name to monitor\n"; std::cerr << std::flush; } const option ArgumentParser::options[] = { { "path", required_argument, NULL, 'p' }, + { "of-name", required_argument, NULL, 'o' }, { "help", no_argument, NULL, 'h' }, { 0, 0, 0, 0}, }; -const char* ArgumentParser::optionstr = "p:?h"; +const char* ArgumentParser::optionstr = "o:p:?h"; const std::string ArgumentParser::true_string = "true"; const std::string ArgumentParser::empty_string = ""; |

