Lines Matching full:c_str
85 std::string prop_name = StringPrintf("init.svc.%s", name_.c_str());
89 name_.c_str(), new_state.c_str());
93 property_set(prop_name.c_str(), new_state.c_str());
99 name_.c_str(), pid_);
105 std::string tmp = StringPrintf(ANDROID_SOCKET_DIR "/%s", si.name.c_str());
106 unlink(tmp.c_str());
134 "rebooting into recovery mode\n", name_.c_str(),
156 INFO("service %s\n", name_.c_str());
157 INFO(" class '%s'\n", classname_.c_str());
160 INFO(" '%s'", s.c_str());
164 INFO(" socket %s %s 0%o\n", si.name.c_str(), si.type.c_str(), si.perm);
190 gid_ = decode_uid(args[1].c_str());
192 supp_gids_.emplace_back(decode_uid(args[n].c_str()));
255 uid_t uid = args.size() > 4 ? decode_uid(args[4].c_str()) : 0;
256 gid_t gid = args.size() > 5 ? decode_uid(args[5].c_str()) : 0;
264 uid_ = decode_uid(args[1].c_str());
333 ERROR("service '%s' requires console\n", name_.c_str());
339 if (stat(args_[0].c_str(), &sb) == -1) {
341 args_[0].c_str(), strerror(errno), name_.c_str());
353 INFO("computing context for service '%s'\n", args_[0].c_str());
356 ERROR("could not get context while starting '%s'\n", name_.c_str());
360 rc = getfilecon(args_[0].c_str(), &fcon);
362 ERROR("could not get context while starting '%s'\n", name_.c_str());
375 ERROR("Service %s does not have a SELinux domain defined.\n", name_.c_str());
383 ERROR("could not get context while starting '%s'\n", name_.c_str());
388 NOTICE("Starting service '%s'...\n", name_.c_str());
395 add_environment(ei.name.c_str(), ei.value.c_str());
403 !si.socketcon.empty() ? si.socketcon.c_str() : scon.c_str();
405 int s = create_socket(si.name.c_str(), socket_type, si.perm,
416 pid_str.c_str(), file.c_str(), strerror(errno));
456 if (setexeccon(seclabel_.c_str()) < 0) {
458 seclabel_.c_str(), strerror(errno));
466 strs.push_back(const_cast<char*>(args_[0].c_str()));
469 ERROR("%s: cannot expand '%s'\n", args_[0].c_str(), args_[i].c_str());
472 strs.push_back(const_cast<char*>(expanded_args[i].c_str()));
484 ERROR("failed to start '%s'\n", name_.c_str());
496 c_str() : "default");
532 NOTICE("Sending SIGTERM to service '%s' (pid %d)...\n", name_.c_str(),
584 NOTICE("Service '%s' is being killed...\n", name_.c_str());
603 if ((fd = open(console_name.c_str(), O_RDWR)) < 0) {
614 std::string key = StringPrintf(ANDROID_SOCKET_ENV_PREFIX "%s", name.c_str());
616 add_environment(key.c_str(), val.c_str());
636 service->name().c_str());
664 std::string name = StringPrintf("exec %d (%s)", exec_count_, str_args[0].c_str());
673 uid = decode_uid(args[2].c_str());
678 gid = decode_uid(args[3].c_str());
681 supp_gids.push_back(decode_uid(args[4 + i].c_str()));
689 str_args[0].c_str());
790 svc->name().c_str(), pid);
796 NOTICE("%s exited with status %d\n", name.c_str(), WEXITSTATUS(status));
798 NOTICE("%s killed by signal %d\n", name.c_str(), WTERMSIG(status));
800 NOTICE("%s stopped by signal %d\n", name.c_str(), WSTOPSIG(status));
802 NOTICE("%s state changed", name.c_str());
831 *err = StringPrintf("invalid service name '%s'", name.c_str());