Lines Matching refs:argidx

112 static int parse_ifi_target(const struct shell *sh, size_t argc, char *argv[], int *argidx,  in parse_ifi_target()  argument
120 if (*argidx >= argc) { in parse_ifi_target()
125 arg = argv[*argidx]; in parse_ifi_target()
141 *argidx += 1; in parse_ifi_target()
150 static int parse_if_target(const struct shell *sh, size_t argc, char *argv[], int *argidx, in parse_if_target() argument
156 if (*argidx >= argc) { in parse_if_target()
161 arg = argv[*argidx]; in parse_if_target()
170 *argidx += 1; in parse_if_target()
184 static int parse_target(const struct shell *sh, size_t argc, char *argv[], int *argidx, in parse_target() argument
190 if (*argidx >= argc) { in parse_target()
195 arg = argv[*argidx]; in parse_target()
199 *argidx += 1; in parse_target()
205 *argidx += 1; in parse_target()
212 return parse_ifi_target(sh, argc, argv, argidx, target); in parse_target()
217 *argidx += 1; in parse_target()
218 return parse_if_target(sh, argc, argv, argidx, target); in parse_target()
222 *argidx += 1; in parse_target()
223 return parse_ifi_target(sh, argc, argv, argidx, target); in parse_target()
233 static int parse_getset(const struct shell *sh, size_t argc, char *argv[], int *argidx, in parse_getset() argument
239 if (*argidx >= argc) { in parse_getset()
243 arg = argv[*argidx]; in parse_getset()
246 *argidx += 1; in parse_getset()
252 *argidx += 1; in parse_getset()
262 static int parse_flag(const struct shell *sh, size_t argc, char *argv[], int *argidx, in parse_flag() argument
268 if (*argidx >= argc) { in parse_flag()
275 arg = argv[*argidx]; in parse_flag()
279 *argidx += 1; in parse_flag()
289 static int parse_bool(const struct shell *sh, size_t argc, char *argv[], int *argidx, bool *result) in parse_bool() argument
294 if (*argidx >= argc) { in parse_bool()
298 arg = argv[*argidx]; in parse_bool()
304 *argidx += 1; in parse_bool()
313 *argidx += 1; in parse_bool()
323 static int parse_timeout(const struct shell *sh, size_t argc, char *argv[], int *argidx, in parse_timeout() argument
331 if (*argidx >= argc) { in parse_timeout()
336 arg = argv[*argidx]; in parse_timeout()
340 *argidx += 1; in parse_timeout()
357 *argidx += 1; in parse_timeout()
464 int argidx = 1; in cmd_net_cm_status() local
469 if (parse_target(sh, argc, argv, &argidx, &target)) { in cmd_net_cm_status()
474 if (argidx != argc) { in cmd_net_cm_status()
499 int argidx = 1; in cmd_net_cm_ignore() local
504 if (parse_target(sh, argc, argv, &argidx, &target)) { in cmd_net_cm_ignore()
509 if (argidx != argc) { in cmd_net_cm_ignore()
541 int argidx = 1; in cmd_net_cm_watch() local
546 if (parse_target(sh, argc, argv, &argidx, &target)) { in cmd_net_cm_watch()
551 if (argidx != argc) { in cmd_net_cm_watch()
583 int argidx = 1; in cmd_net_cm_connect() local
589 if (parse_target(sh, argc, argv, &argidx, &target)) { in cmd_net_cm_connect()
594 if (argidx != argc) { in cmd_net_cm_connect()
635 int argidx = 1; in cmd_net_cm_disconnect() local
641 if (parse_target(sh, argc, argv, &argidx, &target)) { in cmd_net_cm_disconnect()
646 if (argidx != argc) { in cmd_net_cm_disconnect()
687 int argidx = 1; in cmd_net_cm_up() local
693 if (parse_target(sh, argc, argv, &argidx, &target)) { in cmd_net_cm_up()
698 if (argidx != argc) { in cmd_net_cm_up()
733 int argidx = 1; in cmd_net_cm_down() local
739 if (parse_target(sh, argc, argv, &argidx, &target)) { in cmd_net_cm_down()
744 if (argidx != argc) { in cmd_net_cm_down()
780 int argidx = 1; in cmd_net_cm_flag() local
789 if (parse_target(sh, argc, argv, &argidx, &target)) { in cmd_net_cm_flag()
809 if (parse_getset(sh, argc, argv, &argidx, &getset)) { in cmd_net_cm_flag()
813 if (parse_flag(sh, argc, argv, &argidx, &flag)) { in cmd_net_cm_flag()
818 if (getset == CM_GS_SET && parse_bool(sh, argc, argv, &argidx, &value)) { in cmd_net_cm_flag()
822 if (argidx != argc) { in cmd_net_cm_flag()
853 int argidx = 1; in cmd_net_cm_timeout() local
861 if (parse_target(sh, argc, argv, &argidx, &target)) { in cmd_net_cm_timeout()
881 if (parse_getset(sh, argc, argv, &argidx, &getset)) { in cmd_net_cm_timeout()
886 if (getset == CM_GS_SET && parse_timeout(sh, argc, argv, &argidx, &value)) { in cmd_net_cm_timeout()
890 if (argidx != argc) { in cmd_net_cm_timeout()