Lines Matching refs:opts
615 miniopt_t opts; in dhd_pktgen() local
619 miniopt_init(&opts, "pktgen", "", FALSE); in dhd_pktgen()
621 while ((opt_err = miniopt(&opts, argv)) != -1) { in dhd_pktgen()
627 argv += opts.consumed; in dhd_pktgen()
629 if (!opts.good_int && opts.opt != 'd') { in dhd_pktgen()
630 fprintf(stderr, "invalid integer %s\n", opts.valstr); in dhd_pktgen()
635 switch (opts.opt) { in dhd_pktgen()
637 pktgen.freq = opts.uval; in dhd_pktgen()
640 pktgen.count = opts.uval; in dhd_pktgen()
643 pktgen.print = opts.uval; in dhd_pktgen()
646 pktgen.total = opts.uval; in dhd_pktgen()
649 pktgen.stop = opts.uval; in dhd_pktgen()
652 pktgen.minlen = opts.uval; in dhd_pktgen()
655 pktgen.maxlen = opts.uval; in dhd_pktgen()
658 pktgen.minlen = pktgen.maxlen = opts.uval; in dhd_pktgen()
661 if (!strcmp(opts.valstr, "send")) in dhd_pktgen()
663 else if (!strcmp(opts.valstr, "echo")) in dhd_pktgen()
665 else if (!strcmp(opts.valstr, "burst")) in dhd_pktgen()
667 else if (!strcmp(opts.valstr, "recv")) in dhd_pktgen()
671 opts.valstr); in dhd_pktgen()
678 opts.key, opts.valstr); in dhd_pktgen()
956 miniopt_t opts; in dhd_membytes() local
960 miniopt_init(&opts, "membytes", "rh", FALSE); in dhd_membytes()
965 while ((opt_err = miniopt(&opts, argv)) != -1) { in dhd_membytes()
972 if (opts.positional) in dhd_membytes()
975 argv += opts.consumed; in dhd_membytes()
977 if (opts.opt == 'h') { in dhd_membytes()
979 } else if (opts.opt == 'r') { in dhd_membytes()
1720 miniopt_t opts; in dhd_download()
1735 miniopt_init(&opts, "download", "", TRUE); in dhd_download()
1738 while ((opt_err = miniopt(&opts, argv)) != -1) { in dhd_download()
1744 argv += opts.consumed; in dhd_download()
1746 if (opts.opt == 'a') { in dhd_download()
1747 if (!opts.good_int) { in dhd_download()
1748 fprintf(stderr, "invalid address %s\n", opts.valstr); in dhd_download()
1752 start = (uint32)opts.uval; in dhd_download()
1753 } else if (opts.positional) { in dhd_download()
1756 opts.valstr); in dhd_download()
1761 vname = opts.valstr; in dhd_download()
1763 fname = opts.valstr; in dhd_download()
1764 } else if (!opts.opt) { in dhd_download()
1765 if (!strcmp(opts.key, "noreset")) { in dhd_download()
1767 } else if (!strcmp(opts.key, "norun")) { in dhd_download()
1769 } else if (!strcmp(opts.key, "verify")) { in dhd_download()
1772 fprintf(stderr, "unrecognized option %s\n", opts.valstr); in dhd_download()
1777 fprintf(stderr, "unrecognized option %c\n", opts.opt); in dhd_download()
1970 miniopt_t opts; in dhd_dldn()
1976 miniopt_init(&opts, "download", "", TRUE); in dhd_dldn()
1979 while ((opt_err = miniopt(&opts, argv)) != -1) { in dhd_dldn()
1985 argv += opts.consumed; in dhd_dldn()
1987 if (opts.positional) { in dhd_dldn()
1990 opts.valstr); in dhd_dldn()
1995 fname = opts.valstr; in dhd_dldn()
1997 fprintf(stderr, "unrecognized option %c\n", opts.opt); in dhd_dldn()
2095 miniopt_t opts; in dhd_upload()
2105 miniopt_init(&opts, "upload", "", TRUE); in dhd_upload()
2108 while ((opt_err = miniopt(&opts, argv)) != -1) { in dhd_upload()
2114 argv += opts.consumed; in dhd_upload()
2116 if (opts.opt == 'a') { in dhd_upload()
2117 if (!opts.good_int) { in dhd_upload()
2118 fprintf(stderr, "invalid address %s\n", opts.valstr); in dhd_upload()
2122 start = (uint32)opts.uval; in dhd_upload()
2123 } else if (opts.positional) { in dhd_upload()
2125 fname = opts.valstr; in dhd_upload()
2126 } else if (opts.good_int) { in dhd_upload()
2127 size = (uint32)opts.uval; in dhd_upload()
2133 } else if (!opts.opt) { in dhd_upload()
2134 fprintf(stderr, "unrecognized option %s\n", opts.valstr); in dhd_upload()
2138 fprintf(stderr, "unrecognized option %c\n", opts.opt); in dhd_upload()
2280 miniopt_t opts; in dhd_coredump()
2295 miniopt_init(&opts, "dump", "", TRUE); in dhd_coredump()
2298 while ((opt_err = miniopt(&opts, argv)) != -1) { in dhd_coredump()
2304 argv += opts.consumed; in dhd_coredump()
2306 if (opts.positional) { in dhd_coredump()
2308 fname = opts.valstr; in dhd_coredump()
2314 } else if (!opts.opt) { in dhd_coredump()
2315 fprintf(stderr, "unrecognized option %s\n", opts.valstr); in dhd_coredump()
2319 fprintf(stderr, "unrecognized option %c\n", opts.opt); in dhd_coredump()
2435 miniopt_t opts; in dhd_consoledump()
2449 miniopt_init(&opts, "consoledump", "", TRUE); in dhd_consoledump()
2452 while ((opt_err = miniopt(&opts, argv)) != -1) { in dhd_consoledump()
2458 argv += opts.consumed; in dhd_consoledump()
2460 if (!opts.opt) { in dhd_consoledump()
2461 fprintf(stderr, "unrecognized option %s\n", opts.valstr); in dhd_consoledump()
2465 fprintf(stderr, "unrecognized option %c\n", opts.opt); in dhd_consoledump()