Home
last modified time | relevance | path

Searched refs:cmd (Results 1 – 25 of 61) sorted by relevance

123

/system/netd/
DNatController.cpp43 int NatController::runIptablesCmd(const char *cmd) { in runIptablesCmd() argument
45 size_t len = strnlen(cmd, 255); in runIptablesCmd()
54 asprintf(&buffer, "%s %s", IPTABLES_PATH, cmd); in runIptablesCmd()
83 char cmd[255]; in doNatCommands() local
107 snprintf(cmd, sizeof(cmd), in doNatCommands()
111 if (runIptablesCmd(cmd) && add) { in doNatCommands()
116 snprintf(cmd, sizeof(cmd), in doNatCommands()
120 if (runIptablesCmd(cmd) && add) { in doNatCommands()
122 snprintf(cmd, sizeof(cmd), in doNatCommands()
126 runIptablesCmd(cmd); in doNatCommands()
[all …]
DThrottleController.cpp44 int ThrottleController::runTcCmd(const char *cmd) { in runTcCmd() argument
46 size_t len = strnlen(cmd, 255); in runTcCmd()
55 asprintf(&buffer, "%s %s", TC_PATH, cmd); in runTcCmd()
62 char cmd[512]; in setInterfaceThrottle() local
83 sprintf(cmd, "qdisc add dev %s root handle 1: htb default 1 r2q 1000", ifn); in setInterfaceThrottle()
84 if (runTcCmd(cmd)) { in setInterfaceThrottle()
92 sprintf(cmd, "class add dev %s parent 1: classid 1:1 htb rate %dkbit", ifn, txKbps); in setInterfaceThrottle()
93 if (runTcCmd(cmd)) { in setInterfaceThrottle()
110 sprintf(cmd, "qdisc add dev ifb0 root handle 1: htb default 1 r2q 1000"); in setInterfaceThrottle()
111 if (runTcCmd(cmd)) { in setInterfaceThrottle()
[all …]
DBandwidthController.cpp145 int BandwidthController::runIpxtablesCmd(const char *cmd, IptRejectOp rejectHandling) { in runIpxtablesCmd() argument
148 LOGV("runIpxtablesCmd(cmd=%s)", cmd); in runIpxtablesCmd()
149 res |= runIptablesCmd(cmd, rejectHandling, IptIpV4); in runIpxtablesCmd()
150 res |= runIptablesCmd(cmd, rejectHandling, IptIpV6); in runIpxtablesCmd()
161 int BandwidthController::runIptablesCmd(const char *cmd, IptRejectOp rejectHandling, in runIptablesCmd() argument
170 std::string fullCmd = cmd; in runIptablesCmd()
288 char cmd[MAX_CMD_LEN]; in maninpulateNaughtyApps() local
360 char cmd[MAX_CMD_LEN]; in prepCostlyIface() local
372 snprintf(cmd, sizeof(cmd), "-N %s", costCString); in prepCostlyIface()
373 res |= runIpxtablesCmd(cmd, IptRejectNoAdd); in prepCostlyIface()
[all …]
DNetdCommand.cpp19 NetdCommand::NetdCommand(const char *cmd) : in NetdCommand() argument
20 FrameworkCommand(cmd) { in NetdCommand()
DSoftapController.cpp67 int cmd = 0, sub_cmd = 0; in setCommand()
81 cmd = priv_ptr[i].cmd; in setCommand()
91 if (cmd < SIOCDEVPRIVATE) { in setCommand()
102 sub_cmd = cmd; in setCommand()
103 cmd = priv_ptr[j].cmd; in setCommand()
113 ret = ioctl(mSock, cmd, &wrq); in setCommand()
245 int SoftapController::addParam(int pos, const char *cmd, const char *arg) in addParam() argument
249 if ((unsigned)(pos + strlen(cmd) + strlen(arg) + 1) >= sizeof(mBuf)) { in addParam()
253 pos += sprintf(&mBuf[pos], "%s=%s,", cmd, arg); in addParam()
DNetdCommand.h24 NetdCommand(const char *cmd);
/system/core/toolbox/
Dsyren.c64 int cmd = -1; in syren_main() local
76 cmd = SYREN_RD; in syren_main()
79 cmd = SYREN_WR; in syren_main()
82 cmd = SYREN_OLD_RD; in syren_main()
85 cmd = SYREN_OLD_WR; in syren_main()
91 if (cmd == SYREN_WR || cmd == SYREN_OLD_WR) { in syren_main()
105 if (cmd != SYREN_RD && cmd != SYREN_OLD_RD) { in syren_main()
113 if (ioctl(fd, cmd, &sio) < 0) { in syren_main()
139 if (ioctl(fd, cmd, &sio) < 0) { in syren_main()
140 fprintf(stderr, "ioctl(%d) failed\n", cmd); in syren_main()
[all …]
Drenice.c81 char *cmd = argv[0]; in renice_main() local
88 usage(cmd); in renice_main()
99 usage(cmd); in renice_main()
105 usage(cmd); in renice_main()
112 usage(cmd); in renice_main()
Dtoolbox.c44 char *cmd = strrchr(argv[0], '/'); in main() local
45 if (cmd) in main()
46 name = cmd + 1; in main()
/system/core/fastboot/
Dprotocol.c103 static int _command_send(usb_handle *usb, const char *cmd, in _command_send() argument
107 int cmdsize = strlen(cmd); in _command_send()
119 if(usb_write(usb, cmd, cmdsize) != cmdsize) { in _command_send()
157 int fb_command(usb_handle *usb, const char *cmd) in fb_command() argument
159 return _command_send(usb, cmd, 0, 0, 0); in fb_command()
162 int fb_command_response(usb_handle *usb, const char *cmd, char *response) in fb_command_response() argument
164 return _command_send(usb, cmd, 0, 0, response); in fb_command_response()
169 char cmd[64]; in fb_download_data() local
172 sprintf(cmd, "download:%08x", size); in fb_download_data()
173 r = _command_send(usb, cmd, data, size, 0); in fb_download_data()
Dusbtest.c128 const char *cmd; member
145 for(i = 0; tests[i].cmd; i++) { in usage()
146 fprintf(stderr," %-8s %s\n", tests[i].cmd, tests[i].help); in usage()
191 for(i = 0; tests[i].cmd; i++) { in main()
192 if(!strcmp(argv[1], tests[i].cmd)) { in main()
197 tests[i].cmd); in main()
201 fprintf(stderr,"usbtest: %s: FAIL\n", tests[i].cmd); in main()
204 fprintf(stderr,"usbtest: %s: OKAY\n", tests[i].cmd); in main()
Dfastboot.h35 int fb_command(usb_handle *usb, const char *cmd);
36 int fb_command_response(usb_handle *usb, const char *cmd, char *response);
51 void fb_queue_command(const char *cmd, const char *msg);
Dengine.c71 char cmd[64]; member
107 cmdsize = vsnprintf(a->cmd, sizeof(a->cmd), fmt, ap); in queue_action()
110 if (cmdsize >= sizeof(a->cmd)) { in queue_action()
112 die("Command length (%d) exceeds maximum size (%d)", cmdsize, sizeof(a->cmd)); in queue_action()
208 fprintf(stderr,"Device %s is '%s'.\n", a->cmd + 7, resp); in cb_check()
244 fprintf(stderr, "%s FAILED (%s)\n", a->cmd, resp); in cb_display()
263 fprintf(stderr, "%s FAILED (%s)\n", a->cmd, resp); in cb_save()
292 void fb_queue_command(const char *cmd, const char *msg) in fb_queue_command() argument
294 Action *a = queue_action(OP_COMMAND, cmd); in fb_queue_command()
334 status = fb_command(usb, a->cmd); in fb_execute_queue()
[all …]
/system/extras/tests/wifi/stress/
DwifiLoadScanAssoc.c132 char cmd[MAXCMD]; in main() local
304 rv = snprintf(cmd, sizeof(cmd), "%s", CMD_STATUS); in main()
305 if (rv >= (signed) sizeof(cmd) - 1) { in main()
309 testExecCmd(cmd); in main()
350 rv = snprintf(cmd, sizeof(cmd), "%s", CMD_STATUS); in main()
351 if (rv >= (signed) sizeof(cmd) - 1) { in main()
355 testExecCmd(cmd); in main()
359 rv = snprintf(cmd, sizeof(cmd), "%s", CMD_START_FRAMEWORK); in main()
360 if (rv >= (signed) sizeof(cmd) - 1) { in main()
364 testExecCmd(cmd); in main()
[all …]
/system/core/nexus/
DNexusCommand.cpp19 NexusCommand::NexusCommand(const char *cmd) : in NexusCommand() argument
20 FrameworkCommand(cmd) { in NexusCommand()
/system/vold/
DVoldCommand.cpp19 VoldCommand::VoldCommand(const char *cmd) : in VoldCommand() argument
20 FrameworkCommand(cmd) { in VoldCommand()
DVoldCommand.h24 VoldCommand(const char *cmd);
/system/core/libsysutils/src/
DFrameworkCommand.cpp24 FrameworkCommand::FrameworkCommand(const char *cmd) { in FrameworkCommand() argument
25 mCommand = cmd; in FrameworkCommand()
/system/core/init/
Dsignal_handler.c52 struct command *cmd; in wait_for_one_process() local
112 cmd = node_to_item(node, struct command, clist); in wait_for_one_process()
113 cmd->func(cmd->nargs, cmd->args); in wait_for_one_process()
Dinit_parser.c402 struct command *cmd; in queue_builtin_action() local
408 cmd = calloc(1, sizeof(*cmd)); in queue_builtin_action()
409 cmd->func = func; in queue_builtin_action()
410 cmd->args[0] = name; in queue_builtin_action()
411 list_add_tail(&act->commands, &cmd->clist); in queue_builtin_action()
477 struct command *cmd; in parse_line_service() local
574 cmd = malloc(sizeof(*cmd) + sizeof(char*) * nargs); in parse_line_service()
575 cmd->func = kw_func(kw); in parse_line_service()
576 cmd->nargs = nargs; in parse_line_service()
577 memcpy(cmd->args, args, sizeof(char*) * nargs); in parse_line_service()
[all …]
Dparser.c15 struct command *cmd; in DUMP()
39 cmd = node_to_item(node2, struct command, clist); in DUMP()
40 RAW(" %p", cmd->func); in DUMP()
41 for (n = 0; n < cmd->nargs; n++) { in DUMP()
42 RAW(" %s", cmd->args[n]); in DUMP()
/system/core/libcutils/
Dqtaguid.c60 static int write_ctrl(const char *cmd) { in write_ctrl() argument
63 LOGV("write_ctrl(%s)", cmd); in write_ctrl()
70 res = TEMP_FAILURE_RETRY(write(fd, cmd, strlen(cmd))); in write_ctrl()
77 LOGI("Failed write_ctrl(%s) res=%d errno=%d", cmd, res, savedErrno); in write_ctrl()
Dandroid_reboot.c104 int android_reboot(int cmd, int flags, char *arg) in android_reboot() argument
114 switch (cmd) { in android_reboot()
/system/media/mca/
Dstructgen.py200 cmd = linecomps[0]
201 if cmd == "@name":
208 elif cmd == "@package":
211 elif cmd == "@libname":
214 elif cmd == "@structname":
217 elif cmd == "@javaclassname":
220 elif cmd == "@field":
231 raise ParseError(lineno, "Unknown command: '%s'!" % cmd)
/system/core/libnl_2/genl/
Dgenl.c47 int hdrlen, int flags, uint8_t cmd, uint8_t version) in genlmsg_put() argument
74 gmh->cmd = (__u8) cmd; in genlmsg_put()
116 gmhhdr.cmd = CTRL_CMD_GETFAMILY; in genl_ctrl_alloc_cache()

123