Lines Matching refs:args

63                  const std::vector<std::string>& args)  in Service()  argument
66 ioprio_class_(IoSchedClass_NONE), ioprio_pri_(0), args_(args) { in Service()
72 const std::string& seclabel, const std::vector<std::string>& args) in Service() argument
75 seclabel_(seclabel), ioprio_class_(IoSchedClass_NONE), ioprio_pri_(0), args_(args) { in Service()
168 bool Service::HandleClass(const std::vector<std::string>& args, std::string* err) { in HandleClass() argument
169 classname_ = args[1]; in HandleClass()
173 bool Service::HandleConsole(const std::vector<std::string>& args, std::string* err) { in HandleConsole() argument
178 bool Service::HandleCritical(const std::vector<std::string>& args, std::string* err) { in HandleCritical() argument
183 bool Service::HandleDisabled(const std::vector<std::string>& args, std::string* err) { in HandleDisabled() argument
189 bool Service::HandleGroup(const std::vector<std::string>& args, std::string* err) { in HandleGroup() argument
190 gid_ = decode_uid(args[1].c_str()); in HandleGroup()
191 for (std::size_t n = 2; n < args.size(); n++) { in HandleGroup()
192 supp_gids_.emplace_back(decode_uid(args[n].c_str())); in HandleGroup()
197 bool Service::HandleIoprio(const std::vector<std::string>& args, std::string* err) { in HandleIoprio() argument
198 ioprio_pri_ = std::stoul(args[2], 0, 8); in HandleIoprio()
205 if (args[1] == "rt") { in HandleIoprio()
207 } else if (args[1] == "be") { in HandleIoprio()
209 } else if (args[1] == "idle") { in HandleIoprio()
219 bool Service::HandleKeycodes(const std::vector<std::string>& args, std::string* err) { in HandleKeycodes() argument
220 for (std::size_t i = 1; i < args.size(); i++) { in HandleKeycodes()
221 keycodes_.emplace_back(std::stoi(args[i])); in HandleKeycodes()
226 bool Service::HandleOneshot(const std::vector<std::string>& args, std::string* err) { in HandleOneshot() argument
231 bool Service::HandleOnrestart(const std::vector<std::string>& args, std::string* err) { in HandleOnrestart() argument
232 std::vector<std::string> str_args(args.begin() + 1, args.end()); in HandleOnrestart()
237 bool Service::HandleSeclabel(const std::vector<std::string>& args, std::string* err) { in HandleSeclabel() argument
238 seclabel_ = args[1]; in HandleSeclabel()
242 bool Service::HandleSetenv(const std::vector<std::string>& args, std::string* err) { in HandleSetenv() argument
243 envvars_.emplace_back(args[1], args[2]); in HandleSetenv()
248 bool Service::HandleSocket(const std::vector<std::string>& args, std::string* err) { in HandleSocket() argument
249 if (args[2] != "dgram" && args[2] != "stream" && args[2] != "seqpacket") { in HandleSocket()
254 int perm = std::stoul(args[3], 0, 8); in HandleSocket()
255 uid_t uid = args.size() > 4 ? decode_uid(args[4].c_str()) : 0; in HandleSocket()
256 gid_t gid = args.size() > 5 ? decode_uid(args[5].c_str()) : 0; in HandleSocket()
257 std::string socketcon = args.size() > 6 ? args[6] : ""; in HandleSocket()
259 sockets_.emplace_back(args[1], args[2], uid, gid, perm, socketcon); in HandleSocket()
263 bool Service::HandleUser(const std::vector<std::string>& args, std::string* err) { in HandleUser() argument
264 uid_ = decode_uid(args[1].c_str()); in HandleUser()
268 bool Service::HandleWritepid(const std::vector<std::string>& args, std::string* err) { in HandleWritepid() argument
269 writepid_files_.assign(args.begin() + 1, args.end()); in HandleWritepid()
302 bool Service::HandleLine(const std::vector<std::string>& args, std::string* err) { in HandleLine() argument
303 if (args.empty()) { in HandleLine()
309 auto handler = handler_map.FindFunction(args[0], args.size() - 1, err); in HandleLine()
315 return (this->*handler)(args, err); in HandleLine()
634 Service* ServiceManager::MakeExecOneshotService(const std::vector<std::string>& args) { in MakeExecOneshotService() argument
638 for (std::size_t i = 1; i < args.size(); ++i) { in MakeExecOneshotService()
639 if (args[i] == "--") { in MakeExecOneshotService()
649 if (command_arg >= args.size()) { in MakeExecOneshotService()
653 std::vector<std::string> str_args(args.begin() + command_arg, args.end()); in MakeExecOneshotService()
660 if (command_arg > 2 && args[1] != "-") { in MakeExecOneshotService()
661 seclabel = args[1]; in MakeExecOneshotService()
665 uid = decode_uid(args[2].c_str()); in MakeExecOneshotService()
670 gid = decode_uid(args[3].c_str()); in MakeExecOneshotService()
673 supp_gids.push_back(decode_uid(args[4 + i].c_str())); in MakeExecOneshotService()
814 bool ServiceParser::ParseSection(const std::vector<std::string>& args, in ParseSection() argument
816 if (args.size() < 3) { in ParseSection()
821 const std::string& name = args[1]; in ParseSection()
827 std::vector<std::string> str_args(args.begin() + 2, args.end()); in ParseSection()
832 bool ServiceParser::ParseLineSection(const std::vector<std::string>& args, in ParseLineSection() argument
835 return service_ ? service_->HandleLine(args, err) : false; in ParseLineSection()