diff options
author | Yi Jin <jinyithu@google.com> | 2018-01-24 17:33:35 -0800 |
---|---|---|
committer | Yi Jin <jinyithu@google.com> | 2018-01-24 18:25:33 -0800 |
commit | b8344dc72fde9386cdecbb1aa8a47f1e8e430111 (patch) | |
tree | 6b28079105fb9b0ff8bd194c66e6a1eb03ac46af /cmds/incident/main.cpp | |
parent | c04c265dd57e0fe2c880e529cc5cfc8164180009 (diff) |
Fix command line tool to set the right privacy enum.
Test: manual
Change-Id: I3f0845ea32b46f1a028f8b6d3d4180a90a47beb5
Diffstat (limited to 'cmds/incident/main.cpp')
-rw-r--r-- | cmds/incident/main.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/cmds/incident/main.cpp b/cmds/incident/main.cpp index 519852dbe88b..cdec6a01d086 100644 --- a/cmds/incident/main.cpp +++ b/cmds/incident/main.cpp @@ -148,9 +148,19 @@ find_section(const char* name) static int get_dest(const char* arg) { - if (strcmp(arg, "LOCAL") == 0) return 0; - if (strcmp(arg, "EXPLICIT") == 0) return 1; - if (strcmp(arg, "AUTOMATIC") == 0) return 2; + if (strcmp(arg, "L") == 0 + || strcmp(arg, "LOCAL") == 0) { + return DEST_LOCAL; + } + if (strcmp(arg, "E") == 0 + || strcmp(arg, "EXPLICIT") == 0) { + return DEST_EXPLICIT; + } + if (strcmp(arg, "A") == 0 + || strcmp(arg, "AUTO") == 0 + || strcmp(arg, "AUTOMATIC") == 0) { + return DEST_AUTOMATIC; + } return -1; // return the default value } |