Lines Matching refs:name
41 int ServiceManager::start(const char *name) { in start() argument
42 if (strlen(name) > SERVICE_NAME_MAX) { in start()
43 SLOGE("Service name '%s' is too long", name); in start()
46 if (isRunning(name)) { in start()
47 SLOGW("Service '%s' is already running", name); in start()
51 SLOGD("Starting service '%s'", name); in start()
52 property_set("ctl.start", name); in start()
58 if (isRunning(name)) in start()
62 SLOGW("Timed out waiting for service '%s' to start", name); in start()
66 SLOGD("Sucessfully started '%s'", name); in start()
70 int ServiceManager::stop(const char *name) { in stop() argument
71 if (strlen(name) > SERVICE_NAME_MAX) { in stop()
72 SLOGE("Service name '%s' is too long", name); in stop()
75 if (!isRunning(name)) { in stop()
76 SLOGW("Service '%s' is already stopped", name); in stop()
80 SLOGD("Stopping service '%s'", name); in stop()
81 property_set("ctl.stop", name); in stop()
87 if (!isRunning(name)) in stop()
92 SLOGW("Timed out waiting for service '%s' to stop", name); in stop()
96 SLOGD("Successfully stopped '%s'", name); in stop()
100 bool ServiceManager::isRunning(const char *name) { in isRunning() argument
105 ret = snprintf(propName, sizeof(propName), "init.svc.%s", name); in isRunning()
107 SLOGD("Service name '%s' is too long", name); in isRunning()