Colin Cross | f45fa6b | 2012-03-26 12:38:26 -0700 | [diff] [blame] | 1 | /* |
Felipe Leme | 343175a | 2016-08-02 18:57:37 -0700 | [diff] [blame] | 2 | * Copyright (C) 2009 The Android Open Source Project |
Colin Cross | f45fa6b | 2012-03-26 12:38:26 -0700 | [diff] [blame] | 3 | * |
Felipe Leme | 343175a | 2016-08-02 18:57:37 -0700 | [diff] [blame] | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
Colin Cross | f45fa6b | 2012-03-26 12:38:26 -0700 | [diff] [blame] | 15 | */ |
| 16 | |
Josh Gao | 4b8f6f9 | 2016-02-29 16:20:34 -0800 | [diff] [blame] | 17 | #include <algorithm> |
| 18 | #include <chrono> |
Kevin Rocard | 430e079 | 2017-08-14 20:40:24 -0700 | [diff] [blame] | 19 | #include <iomanip> |
Josh Gao | 4b8f6f9 | 2016-02-29 16:20:34 -0800 | [diff] [blame] | 20 | #include <thread> |
| 21 | |
| 22 | #include <android-base/file.h> |
mukesh agrawal | 2f1eb1c | 2016-06-08 18:16:36 -0700 | [diff] [blame] | 23 | #include <android-base/stringprintf.h> |
Josh Gao | 4b8f6f9 | 2016-02-29 16:20:34 -0800 | [diff] [blame] | 24 | #include <android-base/unique_fd.h> |
Colin Cross | f45fa6b | 2012-03-26 12:38:26 -0700 | [diff] [blame] | 25 | #include <binder/Parcel.h> |
| 26 | #include <binder/ProcessState.h> |
Mathias Agopian | 002e1e5 | 2013-05-06 20:20:50 -0700 | [diff] [blame] | 27 | #include <binder/TextOutput.h> |
Vishnu Nair | 780b128 | 2017-10-10 13:57:24 -0700 | [diff] [blame] | 28 | #include <serviceutils/PriorityDumper.h> |
Josh Gao | 4b8f6f9 | 2016-02-29 16:20:34 -0800 | [diff] [blame] | 29 | #include <utils/Log.h> |
Colin Cross | f45fa6b | 2012-03-26 12:38:26 -0700 | [diff] [blame] | 30 | #include <utils/Vector.h> |
| 31 | |
Josh Gao | 4b8f6f9 | 2016-02-29 16:20:34 -0800 | [diff] [blame] | 32 | #include <fcntl.h> |
Colin Cross | f45fa6b | 2012-03-26 12:38:26 -0700 | [diff] [blame] | 33 | #include <getopt.h> |
Colin Cross | f45fa6b | 2012-03-26 12:38:26 -0700 | [diff] [blame] | 34 | #include <stdio.h> |
Josh Gao | 4b8f6f9 | 2016-02-29 16:20:34 -0800 | [diff] [blame] | 35 | #include <stdlib.h> |
Colin Cross | f45fa6b | 2012-03-26 12:38:26 -0700 | [diff] [blame] | 36 | #include <string.h> |
Josh Gao | 4b8f6f9 | 2016-02-29 16:20:34 -0800 | [diff] [blame] | 37 | #include <sys/poll.h> |
| 38 | #include <sys/socket.h> |
Colin Cross | f45fa6b | 2012-03-26 12:38:26 -0700 | [diff] [blame] | 39 | #include <sys/time.h> |
Josh Gao | 4b8f6f9 | 2016-02-29 16:20:34 -0800 | [diff] [blame] | 40 | #include <sys/types.h> |
| 41 | #include <unistd.h> |
Colin Cross | f45fa6b | 2012-03-26 12:38:26 -0700 | [diff] [blame] | 42 | |
Felipe Leme | 343175a | 2016-08-02 18:57:37 -0700 | [diff] [blame] | 43 | #include "dumpsys.h" |
| 44 | |
Colin Cross | f45fa6b | 2012-03-26 12:38:26 -0700 | [diff] [blame] | 45 | using namespace android; |
mukesh agrawal | 2f1eb1c | 2016-06-08 18:16:36 -0700 | [diff] [blame] | 46 | using android::base::StringPrintf; |
Josh Gao | 4b8f6f9 | 2016-02-29 16:20:34 -0800 | [diff] [blame] | 47 | using android::base::unique_fd; |
| 48 | using android::base::WriteFully; |
Colin Cross | f45fa6b | 2012-03-26 12:38:26 -0700 | [diff] [blame] | 49 | |
Steven Moreland | 2c3cd83 | 2017-02-13 23:44:17 +0000 | [diff] [blame] | 50 | static int sort_func(const String16* lhs, const String16* rhs) |
| 51 | { |
Colin Cross | f45fa6b | 2012-03-26 12:38:26 -0700 | [diff] [blame] | 52 | return lhs->compare(*rhs); |
| 53 | } |
| 54 | |
Felipe Leme | bbfd2b8 | 2016-02-03 11:16:27 -0800 | [diff] [blame] | 55 | static void usage() { |
| 56 | fprintf(stderr, |
Vishnu Nair | f56042d | 2017-09-19 15:25:10 -0700 | [diff] [blame] | 57 | "usage: dumpsys\n" |
Felipe Leme | bbfd2b8 | 2016-02-03 11:16:27 -0800 | [diff] [blame] | 58 | " To dump all services.\n" |
| 59 | "or:\n" |
Vishnu Nair | f56042d | 2017-09-19 15:25:10 -0700 | [diff] [blame] | 60 | " dumpsys [-t TIMEOUT] [--priority LEVEL] [--help | -l | --skip SERVICES | " |
| 61 | "SERVICE [ARGS]]\n" |
Felipe Leme | bbfd2b8 | 2016-02-03 11:16:27 -0800 | [diff] [blame] | 62 | " --help: shows this help\n" |
| 63 | " -l: only list services, do not dump them\n" |
Thierry Strudel | 8b78b75 | 2016-03-22 10:25:44 -0700 | [diff] [blame] | 64 | " -t TIMEOUT: TIMEOUT to use in seconds instead of default 10 seconds\n" |
Vishnu Nair | f56042d | 2017-09-19 15:25:10 -0700 | [diff] [blame] | 65 | " --priority LEVEL: filter services based on specified priority\n" |
| 66 | " LEVEL must be one of CRITICAL | HIGH | NORMAL\n" |
Felipe Leme | 859aef6 | 2016-02-03 12:17:10 -0800 | [diff] [blame] | 67 | " --skip SERVICES: dumps all services but SERVICES (comma-separated list)\n" |
| 68 | " SERVICE [ARGS]: dumps only service SERVICE, optionally passing ARGS to it\n"); |
| 69 | } |
| 70 | |
Felipe Leme | 343175a | 2016-08-02 18:57:37 -0700 | [diff] [blame] | 71 | static bool IsSkipped(const Vector<String16>& skipped, const String16& service) { |
Felipe Leme | 859aef6 | 2016-02-03 12:17:10 -0800 | [diff] [blame] | 72 | for (const auto& candidate : skipped) { |
| 73 | if (candidate == service) { |
| 74 | return true; |
| 75 | } |
| 76 | } |
| 77 | return false; |
Felipe Leme | bbfd2b8 | 2016-02-03 11:16:27 -0800 | [diff] [blame] | 78 | } |
| 79 | |
Vishnu Nair | 780b128 | 2017-10-10 13:57:24 -0700 | [diff] [blame] | 80 | static bool ConvertPriorityTypeToBitmask(String16& type, int& bitmask) { |
| 81 | if (type == PRIORITY_ARG_CRITICAL) { |
| 82 | bitmask = IServiceManager::DUMP_PRIORITY_CRITICAL; |
| 83 | return true; |
| 84 | } |
| 85 | if (type == PRIORITY_ARG_HIGH) { |
| 86 | bitmask = IServiceManager::DUMP_PRIORITY_HIGH; |
| 87 | return true; |
| 88 | } |
| 89 | if (type == PRIORITY_ARG_NORMAL) { |
| 90 | bitmask = IServiceManager::DUMP_PRIORITY_NORMAL; |
| 91 | return true; |
| 92 | } |
| 93 | return false; |
| 94 | } |
| 95 | |
Felipe Leme | 343175a | 2016-08-02 18:57:37 -0700 | [diff] [blame] | 96 | int Dumpsys::main(int argc, char* const argv[]) { |
Colin Cross | f45fa6b | 2012-03-26 12:38:26 -0700 | [diff] [blame] | 97 | Vector<String16> services; |
| 98 | Vector<String16> args; |
Vishnu Nair | 780b128 | 2017-10-10 13:57:24 -0700 | [diff] [blame] | 99 | String16 priorityType; |
Felipe Leme | 859aef6 | 2016-02-03 12:17:10 -0800 | [diff] [blame] | 100 | Vector<String16> skippedServices; |
keunyoung | caad555 | 2013-06-13 15:08:51 -0700 | [diff] [blame] | 101 | bool showListOnly = false; |
Thierry Strudel | 8b78b75 | 2016-03-22 10:25:44 -0700 | [diff] [blame] | 102 | bool skipServices = false; |
| 103 | int timeoutArg = 10; |
Vishnu Nair | f56042d | 2017-09-19 15:25:10 -0700 | [diff] [blame] | 104 | int dumpPriority = IServiceManager::DUMP_PRIORITY_ALL; |
| 105 | static struct option longOptions[] = {{"priority", required_argument, 0, 0}, |
| 106 | {"skip", no_argument, 0, 0}, |
| 107 | {"help", no_argument, 0, 0}, |
| 108 | {0, 0, 0, 0}}; |
Thierry Strudel | 8b78b75 | 2016-03-22 10:25:44 -0700 | [diff] [blame] | 109 | |
Felipe Leme | 343175a | 2016-08-02 18:57:37 -0700 | [diff] [blame] | 110 | // Must reset optind, otherwise subsequent calls will fail (wouldn't happen on main.cpp, but |
| 111 | // happens on test cases). |
| 112 | optind = 1; |
Thierry Strudel | 8b78b75 | 2016-03-22 10:25:44 -0700 | [diff] [blame] | 113 | while (1) { |
| 114 | int c; |
| 115 | int optionIndex = 0; |
| 116 | |
| 117 | c = getopt_long(argc, argv, "+t:l", longOptions, &optionIndex); |
| 118 | |
| 119 | if (c == -1) { |
| 120 | break; |
Felipe Leme | bbfd2b8 | 2016-02-03 11:16:27 -0800 | [diff] [blame] | 121 | } |
Thierry Strudel | 8b78b75 | 2016-03-22 10:25:44 -0700 | [diff] [blame] | 122 | |
| 123 | switch (c) { |
| 124 | case 0: |
| 125 | if (!strcmp(longOptions[optionIndex].name, "skip")) { |
| 126 | skipServices = true; |
| 127 | } else if (!strcmp(longOptions[optionIndex].name, "help")) { |
| 128 | usage(); |
| 129 | return 0; |
Vishnu Nair | f56042d | 2017-09-19 15:25:10 -0700 | [diff] [blame] | 130 | } else if (!strcmp(longOptions[optionIndex].name, "priority")) { |
Vishnu Nair | 780b128 | 2017-10-10 13:57:24 -0700 | [diff] [blame] | 131 | priorityType = String16(String8(optarg)); |
| 132 | if (!ConvertPriorityTypeToBitmask(priorityType, dumpPriority)) { |
Vishnu Nair | f56042d | 2017-09-19 15:25:10 -0700 | [diff] [blame] | 133 | fprintf(stderr, "\n"); |
| 134 | usage(); |
| 135 | return -1; |
| 136 | } |
Thierry Strudel | 8b78b75 | 2016-03-22 10:25:44 -0700 | [diff] [blame] | 137 | } |
| 138 | break; |
| 139 | |
| 140 | case 't': |
| 141 | { |
| 142 | char *endptr; |
| 143 | timeoutArg = strtol(optarg, &endptr, 10); |
| 144 | if (*endptr != '\0' || timeoutArg <= 0) { |
| 145 | fprintf(stderr, "Error: invalid timeout number: '%s'\n", optarg); |
| 146 | return -1; |
| 147 | } |
| 148 | } |
| 149 | break; |
| 150 | |
| 151 | case 'l': |
Felipe Leme | bbfd2b8 | 2016-02-03 11:16:27 -0800 | [diff] [blame] | 152 | showListOnly = true; |
Thierry Strudel | 8b78b75 | 2016-03-22 10:25:44 -0700 | [diff] [blame] | 153 | break; |
| 154 | |
| 155 | default: |
| 156 | fprintf(stderr, "\n"); |
| 157 | usage(); |
| 158 | return -1; |
Felipe Leme | bbfd2b8 | 2016-02-03 11:16:27 -0800 | [diff] [blame] | 159 | } |
keunyoung | caad555 | 2013-06-13 15:08:51 -0700 | [diff] [blame] | 160 | } |
Thierry Strudel | 8b78b75 | 2016-03-22 10:25:44 -0700 | [diff] [blame] | 161 | |
| 162 | for (int i = optind; i < argc; i++) { |
| 163 | if (skipServices) { |
| 164 | skippedServices.add(String16(argv[i])); |
| 165 | } else { |
| 166 | if (i == optind) { |
| 167 | services.add(String16(argv[i])); |
| 168 | } else { |
| 169 | args.add(String16(argv[i])); |
Felipe Leme | 859aef6 | 2016-02-03 12:17:10 -0800 | [diff] [blame] | 170 | } |
| 171 | } |
| 172 | } |
Thierry Strudel | 8b78b75 | 2016-03-22 10:25:44 -0700 | [diff] [blame] | 173 | |
| 174 | if ((skipServices && skippedServices.empty()) || |
Steven Moreland | 2c3cd83 | 2017-02-13 23:44:17 +0000 | [diff] [blame] | 175 | (showListOnly && (!services.empty() || !skippedServices.empty()))) { |
Thierry Strudel | 8b78b75 | 2016-03-22 10:25:44 -0700 | [diff] [blame] | 176 | usage(); |
| 177 | return -1; |
| 178 | } |
| 179 | |
Thierry Strudel | 159a832 | 2016-03-23 11:22:34 -0700 | [diff] [blame] | 180 | if (services.empty() || showListOnly) { |
Felipe Leme | 859aef6 | 2016-02-03 12:17:10 -0800 | [diff] [blame] | 181 | // gets all services |
Vishnu Nair | f56042d | 2017-09-19 15:25:10 -0700 | [diff] [blame] | 182 | services = sm_->listServices(dumpPriority); |
Colin Cross | f45fa6b | 2012-03-26 12:38:26 -0700 | [diff] [blame] | 183 | services.sort(sort_func); |
Vishnu Nair | 780b128 | 2017-10-10 13:57:24 -0700 | [diff] [blame] | 184 | if (dumpPriority != IServiceManager::DUMP_PRIORITY_ALL) { |
| 185 | args.insertAt(String16(PRIORITY_ARG), 0); |
| 186 | args.insertAt(priorityType, 1); |
| 187 | } else { |
| 188 | args.add(String16("-a")); |
| 189 | } |
Colin Cross | f45fa6b | 2012-03-26 12:38:26 -0700 | [diff] [blame] | 190 | } |
| 191 | |
| 192 | const size_t N = services.size(); |
| 193 | |
| 194 | if (N > 1) { |
| 195 | // first print a list of the current services |
| 196 | aout << "Currently running services:" << endl; |
Felipe Leme | bbfd2b8 | 2016-02-03 11:16:27 -0800 | [diff] [blame] | 197 | |
Colin Cross | f45fa6b | 2012-03-26 12:38:26 -0700 | [diff] [blame] | 198 | for (size_t i=0; i<N; i++) { |
Felipe Leme | 343175a | 2016-08-02 18:57:37 -0700 | [diff] [blame] | 199 | sp<IBinder> service = sm_->checkService(services[i]); |
| 200 | |
| 201 | if (service != nullptr) { |
Felipe Leme | 859aef6 | 2016-02-03 12:17:10 -0800 | [diff] [blame] | 202 | bool skipped = IsSkipped(skippedServices, services[i]); |
| 203 | aout << " " << services[i] << (skipped ? " (skipped)" : "") << endl; |
Colin Cross | f45fa6b | 2012-03-26 12:38:26 -0700 | [diff] [blame] | 204 | } |
| 205 | } |
| 206 | } |
| 207 | |
keunyoung | caad555 | 2013-06-13 15:08:51 -0700 | [diff] [blame] | 208 | if (showListOnly) { |
| 209 | return 0; |
| 210 | } |
| 211 | |
Josh Gao | 4b8f6f9 | 2016-02-29 16:20:34 -0800 | [diff] [blame] | 212 | for (size_t i = 0; i < N; i++) { |
Chih-Hung Hsieh | cb057c2 | 2017-08-03 15:48:25 -0700 | [diff] [blame] | 213 | const String16& service_name = std::move(services[i]); |
Josh Gao | 4b8f6f9 | 2016-02-29 16:20:34 -0800 | [diff] [blame] | 214 | if (IsSkipped(skippedServices, service_name)) continue; |
Felipe Leme | 859aef6 | 2016-02-03 12:17:10 -0800 | [diff] [blame] | 215 | |
Felipe Leme | 343175a | 2016-08-02 18:57:37 -0700 | [diff] [blame] | 216 | sp<IBinder> service = sm_->checkService(service_name); |
| 217 | if (service != nullptr) { |
Josh Gao | 4b8f6f9 | 2016-02-29 16:20:34 -0800 | [diff] [blame] | 218 | int sfd[2]; |
| 219 | |
Josh Gao | 49f0a0c | 2016-03-04 13:12:29 -0800 | [diff] [blame] | 220 | if (pipe(sfd) != 0) { |
| 221 | aerr << "Failed to create pipe to dump service info for " << service_name |
Josh Gao | 4b8f6f9 | 2016-02-29 16:20:34 -0800 | [diff] [blame] | 222 | << ": " << strerror(errno) << endl; |
| 223 | continue; |
| 224 | } |
| 225 | |
| 226 | unique_fd local_end(sfd[0]); |
| 227 | unique_fd remote_end(sfd[1]); |
| 228 | sfd[0] = sfd[1] = -1; |
| 229 | |
Colin Cross | f45fa6b | 2012-03-26 12:38:26 -0700 | [diff] [blame] | 230 | if (N > 1) { |
| 231 | aout << "------------------------------------------------------------" |
| 232 | "-------------------" << endl; |
Vishnu Nair | 780b128 | 2017-10-10 13:57:24 -0700 | [diff] [blame] | 233 | if (dumpPriority == IServiceManager::DUMP_PRIORITY_ALL) { |
| 234 | aout << "DUMP OF SERVICE " << service_name << ":" << endl; |
| 235 | } else { |
| 236 | aout << "DUMP OF SERVICE " << priorityType << " " << service_name << ":" << endl; |
| 237 | } |
Colin Cross | f45fa6b | 2012-03-26 12:38:26 -0700 | [diff] [blame] | 238 | } |
Josh Gao | 4b8f6f9 | 2016-02-29 16:20:34 -0800 | [diff] [blame] | 239 | |
| 240 | // dump blocks until completion, so spawn a thread.. |
| 241 | std::thread dump_thread([=, remote_end { std::move(remote_end) }]() mutable { |
| 242 | int err = service->dump(remote_end.get(), args); |
| 243 | |
| 244 | // It'd be nice to be able to close the remote end of the socketpair before the dump |
| 245 | // call returns, to terminate our reads if the other end closes their copy of the |
| 246 | // file descriptor, but then hangs for some reason. There doesn't seem to be a good |
| 247 | // way to do this, though. |
Josh Gao | 9656be1 | 2016-09-19 12:44:50 -0700 | [diff] [blame] | 248 | remote_end.reset(); |
Josh Gao | 4b8f6f9 | 2016-02-29 16:20:34 -0800 | [diff] [blame] | 249 | |
| 250 | if (err != 0) { |
| 251 | aerr << "Error dumping service info: (" << strerror(err) << ") " << service_name |
| 252 | << endl; |
| 253 | } |
| 254 | }); |
| 255 | |
Thierry Strudel | 8b78b75 | 2016-03-22 10:25:44 -0700 | [diff] [blame] | 256 | auto timeout = std::chrono::seconds(timeoutArg); |
mukesh agrawal | 2f1eb1c | 2016-06-08 18:16:36 -0700 | [diff] [blame] | 257 | auto start = std::chrono::steady_clock::now(); |
| 258 | auto end = start + timeout; |
Josh Gao | 4b8f6f9 | 2016-02-29 16:20:34 -0800 | [diff] [blame] | 259 | |
| 260 | struct pollfd pfd = { |
| 261 | .fd = local_end.get(), |
| 262 | .events = POLLIN |
| 263 | }; |
| 264 | |
| 265 | bool timed_out = false; |
| 266 | bool error = false; |
| 267 | while (true) { |
| 268 | // Wrap this in a lambda so that TEMP_FAILURE_RETRY recalculates the timeout. |
| 269 | auto time_left_ms = [end]() { |
| 270 | auto now = std::chrono::steady_clock::now(); |
| 271 | auto diff = std::chrono::duration_cast<std::chrono::milliseconds>(end - now); |
| 272 | return std::max(diff.count(), 0ll); |
| 273 | }; |
| 274 | |
| 275 | int rc = TEMP_FAILURE_RETRY(poll(&pfd, 1, time_left_ms())); |
| 276 | if (rc < 0) { |
| 277 | aerr << "Error in poll while dumping service " << service_name << " : " |
| 278 | << strerror(errno) << endl; |
| 279 | error = true; |
| 280 | break; |
| 281 | } else if (rc == 0) { |
| 282 | timed_out = true; |
| 283 | break; |
| 284 | } |
| 285 | |
| 286 | char buf[4096]; |
| 287 | rc = TEMP_FAILURE_RETRY(read(local_end.get(), buf, sizeof(buf))); |
| 288 | if (rc < 0) { |
| 289 | aerr << "Failed to read while dumping service " << service_name << ": " |
| 290 | << strerror(errno) << endl; |
| 291 | error = true; |
| 292 | break; |
| 293 | } else if (rc == 0) { |
| 294 | // EOF. |
| 295 | break; |
| 296 | } |
| 297 | |
| 298 | if (!WriteFully(STDOUT_FILENO, buf, rc)) { |
| 299 | aerr << "Failed to write while dumping service " << service_name << ": " |
| 300 | << strerror(errno) << endl; |
| 301 | error = true; |
| 302 | break; |
| 303 | } |
| 304 | } |
| 305 | |
| 306 | if (timed_out) { |
Felipe Leme | 343175a | 2016-08-02 18:57:37 -0700 | [diff] [blame] | 307 | aout << endl |
| 308 | << "*** SERVICE '" << service_name << "' DUMP TIMEOUT (" << timeoutArg |
| 309 | << "s) EXPIRED ***" << endl |
| 310 | << endl; |
Josh Gao | 4b8f6f9 | 2016-02-29 16:20:34 -0800 | [diff] [blame] | 311 | } |
| 312 | |
| 313 | if (timed_out || error) { |
| 314 | dump_thread.detach(); |
| 315 | } else { |
| 316 | dump_thread.join(); |
Colin Cross | f45fa6b | 2012-03-26 12:38:26 -0700 | [diff] [blame] | 317 | } |
mukesh agrawal | 2f1eb1c | 2016-06-08 18:16:36 -0700 | [diff] [blame] | 318 | |
| 319 | if (N > 1) { |
| 320 | std::chrono::duration<double> elapsed_seconds = |
| 321 | std::chrono::steady_clock::now() - start; |
mukesh agrawal | bca287d | 2016-07-27 12:01:49 -0700 | [diff] [blame] | 322 | aout << StringPrintf("--------- %.3fs ", elapsed_seconds.count()).c_str() |
Kevin Rocard | 430e079 | 2017-08-14 20:40:24 -0700 | [diff] [blame] | 323 | << "was the duration of dumpsys " << service_name; |
| 324 | |
| 325 | using std::chrono::system_clock; |
| 326 | const auto finish = system_clock::to_time_t(system_clock::now()); |
| 327 | std::tm finish_tm; |
| 328 | localtime_r(&finish, &finish_tm); |
| 329 | aout << ", ending at: " << std::put_time(&finish_tm, "%Y-%m-%d %H:%M:%S") |
| 330 | << endl; |
mukesh agrawal | 2f1eb1c | 2016-06-08 18:16:36 -0700 | [diff] [blame] | 331 | } |
Colin Cross | f45fa6b | 2012-03-26 12:38:26 -0700 | [diff] [blame] | 332 | } else { |
Josh Gao | 4b8f6f9 | 2016-02-29 16:20:34 -0800 | [diff] [blame] | 333 | aerr << "Can't find service: " << service_name << endl; |
Colin Cross | f45fa6b | 2012-03-26 12:38:26 -0700 | [diff] [blame] | 334 | } |
| 335 | } |
| 336 | |
| 337 | return 0; |
| 338 | } |