OLD | NEW |
1 // Copyright 2014 The Crashpad Authors. All rights reserved. | 1 // Copyright 2014 The Crashpad Authors. All rights reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 kOptionLastChar = 255, | 76 kOptionLastChar = 255, |
77 kOptionAnnotation, | 77 kOptionAnnotation, |
78 kOptionDatabase, | 78 kOptionDatabase, |
79 kOptionURL, | 79 kOptionURL, |
80 | 80 |
81 // Standard options. | 81 // Standard options. |
82 kOptionHelp = -2, | 82 kOptionHelp = -2, |
83 kOptionVersion = -3, | 83 kOptionVersion = -3, |
84 }; | 84 }; |
85 | 85 |
86 const struct option long_options[] = { | 86 const option long_options[] = { |
87 {"handler", required_argument, nullptr, kOptionHandler}, | 87 {"handler", required_argument, nullptr, kOptionHandler}, |
88 {"annotation", required_argument, nullptr, kOptionAnnotation}, | 88 {"annotation", required_argument, nullptr, kOptionAnnotation}, |
89 {"database", required_argument, nullptr, kOptionDatabase}, | 89 {"database", required_argument, nullptr, kOptionDatabase}, |
90 {"url", required_argument, nullptr, kOptionURL}, | 90 {"url", required_argument, nullptr, kOptionURL}, |
91 {"argument", required_argument, nullptr, kOptionArgument}, | 91 {"argument", required_argument, nullptr, kOptionArgument}, |
92 {"help", no_argument, nullptr, kOptionHelp}, | 92 {"help", no_argument, nullptr, kOptionHelp}, |
93 {"version", no_argument, nullptr, kOptionVersion}, | 93 {"version", no_argument, nullptr, kOptionVersion}, |
94 {nullptr, 0, nullptr, 0}, | 94 {nullptr, 0, nullptr, 0}, |
95 }; | 95 }; |
96 | 96 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 PLOG(ERROR) << "execvp " << argv[0]; | 182 PLOG(ERROR) << "execvp " << argv[0]; |
183 return errno == ENOENT ? kExitExecENOENT : kExitExecFailure; | 183 return errno == ENOENT ? kExitExecENOENT : kExitExecFailure; |
184 } | 184 } |
185 | 185 |
186 } // namespace | 186 } // namespace |
187 } // namespace crashpad | 187 } // namespace crashpad |
188 | 188 |
189 int main(int argc, char* argv[]) { | 189 int main(int argc, char* argv[]) { |
190 return crashpad::RunWithCrashpadMain(argc, argv); | 190 return crashpad::RunWithCrashpadMain(argc, argv); |
191 } | 191 } |
OLD | NEW |