/freebsd/sbin/newfs_msdos/ |
H A D | newfs_msdos.c | 85 o.offset = argtooff(optarg, "offset"); in main() 94 o.bootstrap = optarg; in main() 97 o.create_size = argtooff(optarg, "create size"); in main() 100 if (strcmp(optarg, "12") && in main() 101 strcmp(optarg, "16") && in main() 102 strcmp(optarg, "32")) in main() 103 errx(1, "%s: bad FAT type", optarg); in main() 104 o.fat_type = atoi(optarg); in main() 107 o.volume_id = argto4(optarg, 0, "volume ID"); in main() 111 o.volume_label = optarg; in main() [all …]
|
/freebsd/sbin/newfs/ |
H A D | newfs.c | 142 volumelabel = optarg; in main() 161 if ((Oflag = atoi(optarg)) < 1 || Oflag > 2) in main() 163 optarg); in main() 169 rval = expand_number_int(optarg, §orsize); in main() 171 errx(1, "%s: bad sector size", optarg); in main() 174 disktype = optarg; in main() 187 rval = expand_number_int(optarg, &maxcontig); in main() 190 optarg); in main() 193 rval = expand_number_int(optarg, &bsize); in main() 196 optarg); in main() [all …]
|
/freebsd/contrib/ofed/opensm/opensm/ |
H A D | main.c | 719 config_file = optarg; in main() 748 conf_template = optarg; in main() 772 SET_STR_OPT(opt.port_prof_ignore_file, optarg); in main() 778 SET_STR_OPT(opt.hop_weights_file, optarg); in main() 784 SET_STR_OPT(opt.port_search_ordering_file, optarg); in main() 793 opt.guid = cl_hton64(strtoull(optarg, NULL, 16)); in main() 804 val = strtol(optarg, NULL, 0); in main() 817 val = strtoul(optarg, NULL, 0); in main() 818 opt.transaction_timeout = strtoul(optarg, NULL, 0); in main() 829 opt.max_wire_smps = strtoul(optarg, NULL, 0); in main() [all …]
|
/freebsd/usr.bin/dtc/ |
H A D | dtc.cc | 134 string arg(optarg); in main() 149 fprintf(stderr, "Unknown input format: %s\n", optarg); in main() 156 string arg(optarg); in main() 175 fprintf(stderr, "Unknown output format: %s\n", optarg); in main() 182 outfile_name = optarg; in main() 185 outfile = open(optarg, O_CREAT | O_TRUNC | O_WRONLY, 0666); in main() 198 if (string(optarg) != "17") in main() 200 fprintf(stderr, "Unknown output format version: %s\n", optarg); in main() 210 if (string(optarg) == "-") in main() 216 depfile = fdopen(open(optarg, O_CREAT | O_TRUNC | O_WRONLY, 0666), "w"); in main() [all …]
|
/freebsd/usr.sbin/bhyve/amd64/ |
H A D | bhyverun_machdep.c | 139 if (bhyve_pincpu_parse(optarg) != 0) { in bhyve_optparse() 141 "configuration '%s'", optarg); in bhyve_optparse() 145 if (bhyve_topology_parse(optarg) != 0) { in bhyve_optparse() 147 "'%s'", optarg); in bhyve_optparse() 154 if (qemu_fwcfg_parse_cmdline_arg(optarg) != 0) { in bhyve_optparse() 156 optarg); in bhyve_optparse() 160 bhyve_parse_gdb_options(optarg); in bhyve_optparse() 163 bhyve_parse_simple_config_file(optarg); in bhyve_optparse() 166 set_config_value("keyboard.layout", optarg); in bhyve_optparse() 169 if (strncmp(optarg, "help", strlen(optarg)) == 0) { in bhyve_optparse() [all …]
|
/freebsd/usr.sbin/makefs/ |
H A D | makefs.c | 134 if (strcmp(optarg, "be") == 0 || in main() 135 strcmp(optarg, "4321") == 0 || in main() 136 strcmp(optarg, "big") == 0) { in main() 140 } else if (strcmp(optarg, "le") == 0 || in main() 141 strcmp(optarg, "1234") == 0 || in main() 142 strcmp(optarg, "little") == 0) { in main() 147 warnx("Invalid endian `%s'.", optarg); in main() 153 len = strlen(optarg) - 1; in main() 154 if (optarg[len] == '%') { in main() 155 optarg[len] = '\0'; in main() [all …]
|
/freebsd/contrib/bsddialog/utility/ |
H A D | util_cli.c | 394 opt->backtitle = optarg; in parseargs() 399 conf->x = (int)strtol(optarg, NULL, 10); in parseargs() 405 conf->y = (int)strtol(optarg, NULL, 10); in parseargs() 416 (int)strtol(optarg, NULL, 10)); in parseargs() 419 conf->button.cancel_label = optarg; in parseargs() 430 (u_int)strtoul(optarg, NULL, 10); in parseargs() 436 if (strcasecmp(optarg, "d/m/y") == 0) in parseargs() 438 else if (strcasecmp(optarg, "m/d/y") == 0) in parseargs() 440 else if (strcasecmp(optarg, "y/m/d") == 0) in parseargs() 444 "date format \"%s\" is invalid", optarg); in parseargs() [all...] |
/freebsd/usr.sbin/bluetooth/btpand/ |
H A D | btpand.c | 84 if (!bt_aton(optarg, &remote_bdaddr)) { in main() 87 if ((he = bt_gethostbyname(optarg)) == NULL) in main() 89 optarg, hstrerror(h_errno)); in main() 98 control_path = optarg; in main() 102 if (!bt_devaddr(optarg, &local_bdaddr)) { in main() 105 if ((he = bt_gethostbyname(optarg)) == NULL) in main() 107 optarg, hstrerror(h_errno)); in main() 115 if (strchr(optarg, '/') == NULL) { in main() 116 asprintf(&ep, "/dev/%s", optarg); in main() 119 interface_name = optarg; in main() [all...] |
/freebsd/sbin/mdconfig/ |
H A D | mdconfig.c | 153 tflag = optarg; in main() 154 if (!strcmp(optarg, "malloc")) { in main() 157 } else if (!strcmp(optarg, "vnode")) { in main() 160 } else if (!strcmp(optarg, "swap")) { in main() 163 } else if (!strcmp(optarg, "null")) { in main() 167 errx(1, "unknown type: %s", optarg); in main() 172 fflag = realpath(optarg, NULL); in main() 177 if (!strcmp(optarg, "async")) in main() 179 else if (!strcmp(optarg, "noasync")) in main() 181 else if (!strcmp(optarg, "cache")) in main() [all …]
|
/freebsd/usr.bin/nl/ |
H A D | nl.c | 144 parse_numbering(optarg, BODY); in main() 147 clen = mbrlen(optarg, MB_CUR_MAX, NULL); in main() 151 memcpy(delim1, optarg, delim1len = clen); in main() 152 clen = mbrlen(optarg + delim1len, in main() 158 memcpy(delim2, optarg + delim1len, in main() 160 if (optarg[delim1len + clen] != '\0') in main() 163 optarg); in main() 168 parse_numbering(optarg, FOOTER); in main() 171 parse_numbering(optarg, HEADER); in main() 175 val = strtol(optarg, &ep, 10); in main() [all …]
|
/freebsd/contrib/mtree/ |
H A D | mtree.c | 114 parsetags(&excludetags, optarg); in main() 121 spec1 = fopen(optarg, "r"); in main() 123 mtree_err("%s: %s", optarg, in main() 126 spec2 = fopen(optarg, "r"); in main() 128 mtree_err("%s: %s", optarg, in main() 135 if (strcmp(optarg, flavors[i].name) == 0) { in main() 146 parsetags(&includetags, optarg); in main() 153 while ((p = strsep(&optarg, " \t,")) != NULL) in main() 158 while ((p = strsep(&optarg, " \t,")) != NULL) in main() 179 if (! setup_getid(optarg)) in main() [all …]
|
/freebsd/contrib/telnet/telnet/ |
H A D | main.c | 170 DoBaudRate(optarg); in main() 192 if ((tos = parsetos(optarg, "tcp")) < 0) in main() 195 optarg, in main() 199 ultmp = strtoul(optarg, &ep, 0); in main() 200 if (*ep || ep == optarg || ultmp > MAXTOS) in main() 203 optarg, in main() 211 auth_disable_name(optarg); in main() 228 set_escape_char(optarg); in main() 279 (void)strncpy(dest_realm, optarg, dst_realm_sz); in main() 298 user = optarg; in main() [all …]
|
/freebsd/sys/contrib/openzfs/cmd/zinject/ |
H A D | zinject.c | 948 if (strcasecmp(optarg, "degrade") == 0) { in main() 950 } else if (strcasecmp(optarg, "fault") == 0) { in main() 954 "must be 'degrade' or 'fault'\n", optarg); in main() 961 raw = optarg; in main() 964 cancel = optarg; in main() 967 ret = parse_dvas(optarg, &dvas); in main() 971 "commas.\n", optarg); in main() 978 device = optarg; in main() 982 ret = parse_delay(optarg, &record.zi_timer, in main() 987 "value: '%s'\n", optarg); in main() [all...] |
/freebsd/usr.bin/truncate/ |
H A D | truncate.c | 86 rname = optarg; in main() 89 if (*optarg == '+' || *optarg == '-') { in main() 91 } else if (*optarg == '%' || *optarg == '/') { in main() 95 optarg + 1 : optarg, in main() 98 "invalid size argument `%s'", optarg); in main() 100 sz = (*optarg == '-' || *optarg == '/') ? in main() 105 if (expand_number(optarg, &usz) == -1 || in main() 108 "invalid offset argument `%s'", optarg); in main() 113 if (expand_number(optarg, &usz) == -1 || in main() 116 "invalid length argument `%s'", optarg); in main()
|
/freebsd/contrib/ldns/drill/ |
H A D | drill.c | 227 src = optarg; in main() 246 if (strtok(optarg, "0123456789") != NULL) { in main() 250 verbosity = atoi(optarg); in main() 257 query_file = optarg; in main() 260 answer_file = optarg; in main() 264 answer_file = optarg; in main() 267 query_file = optarg; in main() 275 global_dns_root = read_root_hints(optarg); in main() 277 fprintf(stderr, "Unable to read root hints file %s, aborting\n", optarg); in main() 286 qbuf = (uint16_t)atoi(optarg); in main() [all …]
|
/freebsd/contrib/smbfs/mount_smbfs/ |
H A D | mount_smbfs.c | 141 error = smb_ctx_opt(ctx, opt, optarg); in main() 148 pwd = isdigit(optarg[0]) ? in main() 149 getpwuid(atoi(optarg)) : getpwnam(optarg); in main() 151 errx(EX_NOUSER, "unknown user '%s'", optarg); in main() 158 grp = isdigit(optarg[0]) ? in main() 159 getgrgid(atoi(optarg)) : getgrnam(optarg); in main() 161 errx(EX_NOUSER, "unknown group '%s'", optarg); in main() 167 dir_mode = strtol(optarg, &next, 8); in main() 173 file_mode = strtol(optarg, &next, 8); in main() 183 nsp = inp = optarg; in main() [all …]
|
/freebsd/usr.bin/grep/ |
H A D | grep.c | 399 if (optarg == NULL) { 408 l = strtoll(optarg, &ep, 10); 436 if (strcasecmp(optarg, "skip") == 0) 438 else if (strcasecmp(optarg, "read") == 0) 444 if (strcasecmp("recurse", optarg) == 0) { 447 } else if (strcasecmp("skip", optarg) == 0) 449 else if (strcasecmp("read", optarg) == 0) 460 char *string = optarg; 471 read_patterns(optarg); 503 mlimit = mcount = strtoll(optarg, &ep, 10); [all …]
|
/freebsd/contrib/wpa/wpa_supplicant/ |
H A D | main.c | 209 iface->bridge_ifname = optarg; in main() 215 iface->confname = optarg; in main() 218 iface->ctrl_interface = optarg; in main() 221 iface->driver = optarg; in main() 234 params.entropy_file = optarg; in main() 238 params.wpa_debug_file_path = optarg; in main() 242 params.ctrl_interface = optarg; in main() 245 params.ctrl_interface_group = optarg; in main() 252 iface->ifname = optarg; in main() 255 iface->confanother = optarg; in main() [all …]
|
/freebsd/sbin/mount_msdosfs/ |
H A D | mount_msdosfs.c | 94 uid = a_uid(optarg); in main() 98 gid = a_gid(optarg); in main() 102 mask = a_mask(optarg); in main() 106 dirmask = a_mask(optarg); in main() 111 if (setlocale(LC_CTYPE, optarg) == NULL) in main() 112 err(EX_CONFIG, "%s", optarg); in main() 113 csp = strchr(optarg,'.'); in main() 115 err(EX_CONFIG, "%s", optarg); in main() 122 cs_dos = strdup(optarg); in main() 128 p = strchr(optarg, '='); in main() [all …]
|
/freebsd/sbin/camcontrol/ |
H A D | attrib.c | 164 attr_num = strtol(optarg, &endptr, 0); in scsiattrib() 167 __func__, optarg); in scsiattrib() 177 element_address = strtol(optarg, &endptr, 0); in scsiattrib() 180 __func__, optarg); in scsiattrib() 191 if (isdigit(optarg[0])) { in scsiattrib() 192 output_format = strtoul(optarg, &endptr, 0); in scsiattrib() 196 optarg); in scsiattrib() 204 while ((tmpstr = strsep(&optarg, ",")) != NULL) { in scsiattrib() 226 partition = strtol(optarg, &endptr, 0); in scsiattrib() 229 __func__, optarg); in scsiattrib() [all...] |
/freebsd/tools/tools/netrate/tcpp/ |
H A D | tcpp.c | 117 ll = strtoll(optarg, &dummy, 10); in main() 125 if (inet_aton(optarg, &remoteip.sin_addr) != 1) in main() 126 err(-1, "inet_aton: %s", optarg); in main() 135 if (inet_aton(optarg, &localipbase.sin_addr) != 1) in main() 136 err(-1, "inet_aton: %s", optarg); in main() 140 ll = strtoll(optarg, &dummy, 10); in main() 147 ll = strtoll(optarg, &dummy, 10); in main() 154 ll = strtol(optarg, &dummy, 10); in main() 165 ll = strtoll(optarg, &dummy, 10); in main() 172 ll = strtoll(optarg, &dummy, 10); in main()
|
/freebsd/bin/pax/ |
H A D | options.c | 205 if ((wrblksz = (int)str_offt(optarg)) <= 0) { in pax_options() 206 paxwarn(1, "Invalid block size %s", optarg); in pax_options() 228 arcname = optarg; in pax_options() 264 if (opt_add(optarg) < 0) in pax_options() 271 for (pt = optarg; *pt != '\0'; ++pt) { in pax_options() 325 if (rep_add(optarg) < 0) { in pax_options() 362 tmp.name = optarg; in pax_options() 368 paxwarn(1, "Unknown -x format: %s", optarg); in pax_options() 386 if ((wrlimit = str_offt(optarg)) <= 0) { in pax_options() 387 paxwarn(1, "Invalid write limit %s", optarg); in pax_options() [all …]
|
/freebsd/usr.sbin/memcontrol/ |
H A D | memcontrol.c | 165 owner = strdup(optarg); in listfunc() 207 mrd.mr_base = strtouq(optarg, &ep, 0); in setfunc() 208 if ((ep == optarg) || (*ep != 0)) in setfunc() 212 mrd.mr_len = strtouq(optarg, &ep, 0); in setfunc() 213 if ((ep == optarg) || (*ep != 0)) in setfunc() 217 if ((*optarg == 0) || (strlen(optarg) > 7)) in setfunc() 219 strcpy(mrd.mr_owner, optarg); in setfunc() 268 mrd.mr_base = strtouq(optarg, &ep, 0); in clearfunc() 269 if ((ep == optarg) || (*ep != 0)) in clearfunc() 273 mrd.mr_len = strtouq(optarg, &ep, 0); in clearfunc() [all …]
|
/freebsd/usr.bin/diff/ |
H A D | diff.c | 172 if(strcasecmp(optarg, a->name) == 0) { in main() 180 printf("unknown algorithm: %s\n", optarg); in main() 196 if (optarg != NULL) { in main() 197 l = strtol(optarg, &ep, 10); in main() 210 ifdefname = optarg; in main() 235 most_recent_pat = xstrdup(optarg); in main() 238 push_ignore_pats(optarg); in main() 245 label[0] = optarg; in main() 247 label[1] = optarg; in main() 279 start = optarg; in main() [all...] |
/freebsd/usr.sbin/fifolog/fifolog_reader/ |
H A D | fifolog_reader.c | 106 opt_B = strtoul(optarg, NULL, 0); in main() 109 opt_B = get_date(optarg); in main() 111 errx(1, "Didn't understand \"%s\"", optarg); in main() 114 opt_E = strtoul(optarg, NULL, 0); in main() 117 opt_E = get_date(optarg); in main() 119 errx(1, "Didn't understand \"%s\"", optarg); in main() 122 opt_o = optarg; in main() 125 opt_R = optarg; in main() 131 opt_T = optarg; in main()
|