bin/cat/cat.c
237
FILE *fp;
bin/cat/cat.c
262
fp = fdopen(fd, "r");
bin/cat/cat.c
263
cook_cat(fp);
bin/cat/cat.c
264
fclose(fp);
bin/cat/cat.c
290
cook_cat(FILE *fp)
bin/cat/cat.c
296
if (fp == stdin && feof(stdin))
bin/cat/cat.c
300
for (prev = '\n'; (ch = getc(fp)) != EOF; prev = ch) {
bin/cat/cat.c
332
(void)ungetc(ch, fp);
bin/cat/cat.c
337
if ((wch = getwc(fp)) == WEOF) {
bin/cat/cat.c
338
if (ferror(fp) && errno == EILSEQ) {
bin/cat/cat.c
339
clearerr(fp);
bin/cat/cat.c
341
memset(&fp->_mbstate, 0, sizeof(mbstate_t));
bin/cat/cat.c
342
if ((ch = getc(fp)) == EOF)
bin/cat/cat.c
370
if (ferror(fp)) {
bin/cat/cat.c
373
clearerr(fp);
bin/ed/io.c
113
get_stream_line(FILE *fp)
bin/ed/io.c
118
while (((c = getc(fp)) != EOF || (!feof(fp) && !ferror(fp))) &&
bin/ed/io.c
127
else if (ferror(fp)) {
bin/ed/io.c
144
FILE *fp;
bin/ed/io.c
148
fp = (*fn == '!') ? popen(fn+1, "w") : fopen(strip_escapes(fn), mode);
bin/ed/io.c
149
if (fp == NULL) {
bin/ed/io.c
154
if ((size = write_stream(fp, n, m)) < 0) {
bin/ed/io.c
158
if ((cs = (*fn == '!') ? pclose(fp) : fclose(fp)) < 0) {
bin/ed/io.c
172
write_stream(FILE *fp, long n, long m)
bin/ed/io.c
185
if (put_stream_line(fp, s, len) < 0)
bin/ed/io.c
195
put_stream_line(FILE *fp, const char *s, int len)
bin/ed/io.c
198
if (fputc(*s++, fp) < 0) {
bin/ed/io.c
37
FILE *fp;
bin/ed/io.c
41
fp = (*fn == '!') ? popen(fn + 1, "r") : fopen(strip_escapes(fn), "r");
bin/ed/io.c
42
if (fp == NULL) {
bin/ed/io.c
47
if ((size = read_stream(fp, n)) < 0) {
bin/ed/io.c
51
if ((cs = (*fn == '!') ? pclose(fp) : fclose(fp)) < 0) {
bin/ed/io.c
68
read_stream(FILE *fp, long n)
bin/ed/io.c
79
for (current_addr = n; (len = get_stream_line(fp)) > 0; size += len) {
bin/kill/kill.c
152
printsignals(FILE *fp)
bin/kill/kill.c
157
(void)fprintf(fp, "%s", sys_signame[n]);
bin/kill/kill.c
159
(void)fprintf(fp, "\n");
bin/kill/kill.c
161
(void)fprintf(fp, " ");
bin/pax/gen_subs.c
106
(void)fprintf(fp, "%s%2ju %-12s %-12s ", f_mode,
bin/pax/gen_subs.c
114
(void)fprintf(fp, "%4lu,%4lu ", (unsigned long)MAJOR(sbp->st_rdev),
bin/pax/gen_subs.c
117
(void)fprintf(fp, "%9ju ", (uintmax_t)sbp->st_size);
bin/pax/gen_subs.c
123
(void)fprintf(fp, "%s %s", f_date, arcn->name);
bin/pax/gen_subs.c
125
(void)fprintf(fp, " == %s\n", arcn->ln_name);
bin/pax/gen_subs.c
127
(void)fprintf(fp, " => %s\n", arcn->ln_name);
bin/pax/gen_subs.c
129
(void)putc('\n', fp);
bin/pax/gen_subs.c
130
(void)fflush(fp);
bin/pax/gen_subs.c
69
ls_list(ARCHD *arcn, time_t now, FILE *fp)
bin/pax/gen_subs.c
80
(void)fprintf(fp, "%s\n", arcn->name);
bin/pax/gen_subs.c
81
(void)fflush(fp);
bin/pax/options.c
1020
FILE *fp;
bin/pax/options.c
1152
if ((fp = fopen(optarg, "r")) == NULL) {
bin/pax/options.c
1156
while ((str = get_line(fp)) != NULL) {
bin/pax/options.c
1159
fclose(fp);
bin/pax/options.c
64
static char *get_line(FILE *fp);
bin/pax/options.c
861
FILE *fp;
bin/pax/options.c
865
fp = stdin;
bin/pax/options.c
866
else if ((fp = fopen(file, "r")) == NULL) {
bin/pax/options.c
870
while ((str = get_line(fp)) != NULL) {
bin/pax/options.c
876
fclose(fp);
bin/pax/options.c
928
FILE *fp;
bin/pax/options.c
938
fp = stdin;
bin/pax/options.c
939
else if ((fp = fopen(file, "r")) == NULL) {
bin/pax/options.c
943
while ((str = get_line(fp)) != NULL) {
bin/pax/options.c
948
fclose(fp);
bin/sh/mknodes.c
155
struct field *fp;
bin/sh/mknodes.c
163
fp = &curstr->field[curstr->nfields];
bin/sh/mknodes.c
164
fp->name = savestr(name);
bin/sh/mknodes.c
166
fp->type = T_NODE;
bin/sh/mknodes.c
169
fp->type = T_NODELIST;
bin/sh/mknodes.c
172
fp->type = T_STRING;
bin/sh/mknodes.c
175
fp->type = T_INT;
bin/sh/mknodes.c
178
fp->type = T_OTHER;
bin/sh/mknodes.c
180
fp->type = T_TEMP;
bin/sh/mknodes.c
184
if (fp->type == T_OTHER || fp->type == T_TEMP) {
bin/sh/mknodes.c
186
fp->decl = savestr(linep);
bin/sh/mknodes.c
190
fp->decl = savestr(decl);
bin/sh/mknodes.c
210
struct field *fp;
bin/sh/mknodes.c
225
for (i = sp->nfields, fp = sp->field ; --i >= 0 ; fp++) {
bin/sh/mknodes.c
226
fprintf(hfile, " %s;\n", fp->decl);
bin/sh/mknodes.c
288
struct field *fp;
bin/sh/mknodes.c
309
fp = &sp->field[i];
bin/sh/mknodes.c
310
switch (fp->type) {
bin/sh/mknodes.c
315
sp->tag, fp->name);
bin/sh/mknodes.c
319
sp->tag, fp->name, sp->tag, fp->name);
bin/sh/mknodes.c
326
sp->tag, fp->name);
bin/sh/mknodes.c
330
sp->tag, fp->name, sp->tag, fp->name);
bin/sh/mknodes.c
337
sp->tag, fp->name);
bin/sh/mknodes.c
341
sp->tag, fp->name, sp->tag, fp->name);
bin/sh/mknodes.c
349
sp->tag, fp->name, sp->tag, fp->name);
bin/sh/mknodes.c
364
indent(int amount, FILE *fp)
bin/sh/mknodes.c
367
putc('\t', fp);
bin/sh/mknodes.c
371
putc(' ', fp);
bin/sh/output.c
327
FILE *fp;
bin/sh/output.c
329
if ((fp = fwopen(dest, doformat_wr)) != NULL) {
bin/sh/output.c
330
vfprintf(fp, f, ap);
bin/sh/output.c
331
fclose(fp);
bin/sh/show.c
101
fputs(" &", fp);
bin/sh/show.c
103
putc('\n', fp);
bin/sh/show.c
106
fprintf(fp, "<node type %d>", n->type);
bin/sh/show.c
108
putc('\n', fp);
bin/sh/show.c
116
shcmd(union node *cmd, FILE *fp)
bin/sh/show.c
127
sharg(np, fp);
bin/sh/show.c
146
fprintf(fp, "%d", np->nfile.fd);
bin/sh/show.c
147
fputs(s, fp);
bin/sh/show.c
150
fprintf(fp, "%d", np->ndup.dupfd);
bin/sh/show.c
152
fprintf(fp, "-");
bin/sh/show.c
154
fprintf(fp, "HERE");
bin/sh/show.c
156
fprintf(fp, "XHERE");
bin/sh/show.c
158
sharg(np->nfile.fname, fp);
bin/sh/show.c
167
sharg(union node *arg, FILE *fp)
bin/sh/show.c
182
putc(*++p, fp);
bin/sh/show.c
185
putc('$', fp);
bin/sh/show.c
186
putc('{', fp);
bin/sh/show.c
189
putc('#', fp);
bin/sh/show.c
192
putc(*p++, fp);
bin/sh/show.c
195
putc(':', fp);
bin/sh/show.c
199
putc('}', fp);
bin/sh/show.c
202
putc('-', fp);
bin/sh/show.c
205
putc('+', fp);
bin/sh/show.c
208
putc('?', fp);
bin/sh/show.c
211
putc('=', fp);
bin/sh/show.c
214
putc('#', fp);
bin/sh/show.c
217
putc('#', fp);
bin/sh/show.c
218
putc('#', fp);
bin/sh/show.c
221
putc('%', fp);
bin/sh/show.c
224
putc('%', fp);
bin/sh/show.c
225
putc('%', fp);
bin/sh/show.c
234
putc('}', fp);
bin/sh/show.c
238
putc('$', fp);
bin/sh/show.c
239
putc('(', fp);
bin/sh/show.c
240
shtree(bqlist->n, -1, NULL, fp);
bin/sh/show.c
241
putc(')', fp);
bin/sh/show.c
244
putc(*p, fp);
bin/sh/show.c
252
indent(int amount, char *pfx, FILE *fp)
bin/sh/show.c
258
fputs(pfx, fp);
bin/sh/show.c
259
putc('\t', fp);
bin/sh/show.c
65
shtree(union node *n, int ind, char *pfx, FILE *fp)
bin/sh/show.c
73
indent(ind, pfx, fp);
bin/sh/show.c
84
shtree(n->nbinary.ch1, ind, NULL, fp);
bin/sh/show.c
86
fputs(s, fp);
bin/sh/show.c
87
shtree(n->nbinary.ch2, ind, NULL, fp);
bin/sh/show.c
90
shcmd(n, fp);
bin/sh/show.c
92
putc('\n', fp);
bin/sh/show.c
96
shcmd(lp->n, fp);
bin/sh/show.c
98
fputs(" | ", fp);
bin/uuidgen/uuidgen.c
108
FILE *fp;
bin/uuidgen/uuidgen.c
115
fp = stdout; /* default output file */
bin/uuidgen/uuidgen.c
137
if (fp != stdout)
bin/uuidgen/uuidgen.c
139
fp = fopen(optarg, "w");
bin/uuidgen/uuidgen.c
140
if (fp == NULL)
bin/uuidgen/uuidgen.c
198
fprintf(fp, "%s\n", p);
bin/uuidgen/uuidgen.c
206
if (fp != stdout)
bin/uuidgen/uuidgen.c
207
fclose(fp);
crypto/heimdal/appl/login/login_access.c
118
fclose(fp);
crypto/heimdal/appl/login/login_access.c
60
FILE *fp;
crypto/heimdal/appl/login/login_access.c
84
if ((fp = fopen(_PATH_LOGACCESS, "r")) != 0) {
crypto/heimdal/appl/login/login_access.c
85
while (!match && fgets(line, sizeof(line), fp)) {
crypto/heimdal/appl/rcp/rcp.c
684
static FILE *fp;
crypto/heimdal/appl/rcp/rcp.c
688
if (fp == NULL && !(fp = fdopen(remout, "w")))
crypto/heimdal/appl/rcp/rcp.c
691
fprintf(fp, "%c", 0x01);
crypto/heimdal/appl/rcp/rcp.c
692
fprintf(fp, "rcp: ");
crypto/heimdal/appl/rcp/rcp.c
693
vfprintf(fp, fmt, ap);
crypto/heimdal/appl/rcp/rcp.c
694
fprintf(fp, "\n");
crypto/heimdal/appl/rcp/rcp.c
695
fflush(fp);
crypto/heimdal/appl/rsh/login_access.c
118
fclose(fp);
crypto/heimdal/appl/rsh/login_access.c
60
FILE *fp;
crypto/heimdal/appl/rsh/login_access.c
84
if ((fp = fopen(_PATH_LOGACCESS, "r")) != 0) {
crypto/heimdal/appl/rsh/login_access.c
85
while (!match && fgets(line, sizeof(line), fp)) {
crypto/heimdal/appl/telnet/libtelnet/rsaencpwd.c
155
FILE *fp;
crypto/heimdal/appl/telnet/libtelnet/rsaencpwd.c
164
if ((fp=fopen(key_file, "r"))==NULL) return(0);
crypto/heimdal/appl/telnet/libtelnet/rsaencpwd.c
165
fclose(fp);
crypto/heimdal/appl/telnet/libtelnet/rsaencpwd.c
203
FILE *fp;
crypto/heimdal/appl/telnet/libtelnet/rsaencpwd.c
212
if ((fp=fopen(key_file, "r"))==NULL) {
crypto/heimdal/appl/telnet/libtelnet/rsaencpwd.c
220
fscanf(fp, "%x;", &len);
crypto/heimdal/appl/telnet/libtelnet/rsaencpwd.c
222
j = getc(fp); key[i]=j;
crypto/heimdal/appl/telnet/libtelnet/rsaencpwd.c
224
fclose(fp);
crypto/heimdal/appl/telnet/libtelnet/rsaencpwd.c
267
if ((fp=fopen(key_file, "r"))==NULL) {
crypto/heimdal/appl/telnet/libtelnet/rsaencpwd.c
275
fscanf(fp, "%x;", &len);
crypto/heimdal/appl/telnet/libtelnet/rsaencpwd.c
277
j = getc(fp);
crypto/heimdal/appl/telnet/libtelnet/rsaencpwd.c
282
fscanf(fp, "%x;", &len);
crypto/heimdal/appl/telnet/libtelnet/rsaencpwd.c
284
j = getc(fp); key[i]=j;
crypto/heimdal/appl/telnet/libtelnet/rsaencpwd.c
286
fclose(fp);
crypto/heimdal/lib/gssapi/mech/gss_mech_switch.c
232
FILE *fp;
crypto/heimdal/lib/gssapi/mech/gss_mech_switch.c
261
fp = fopen(_PATH_GSS_MECH, "r");
crypto/heimdal/lib/gssapi/mech/gss_mech_switch.c
262
if (!fp) {
crypto/heimdal/lib/gssapi/mech/gss_mech_switch.c
266
rk_cloexec_file(fp);
crypto/heimdal/lib/gssapi/mech/gss_mech_switch.c
268
while (fgets(buf, sizeof(buf), fp)) {
crypto/heimdal/lib/gssapi/mech/gss_mech_switch.c
424
fclose(fp);
crypto/heimdal/lib/kadm5/ipropd_master.c
188
FILE *fp;
crypto/heimdal/lib/kadm5/ipropd_master.c
204
fp = fopen (fn, "r");
crypto/heimdal/lib/kadm5/ipropd_master.c
206
if (fp == NULL)
crypto/heimdal/lib/kadm5/ipropd_master.c
208
while (fgets(buf, sizeof(buf), fp) != NULL) {
crypto/heimdal/lib/kadm5/ipropd_master.c
215
fclose (fp);
crypto/heimdal/lib/kadm5/ipropd_master.c
693
FILE *fp;
crypto/heimdal/lib/kadm5/ipropd_master.c
695
fp = open_stats(context);
crypto/heimdal/lib/kadm5/ipropd_master.c
696
if (fp == NULL)
crypto/heimdal/lib/kadm5/ipropd_master.c
699
fprintf(fp, "master down at %s\n", str);
crypto/heimdal/lib/kadm5/ipropd_master.c
701
fclose(fp);
crypto/heimdal/lib/kadm5/ipropd_master.c
710
FILE *fp;
crypto/heimdal/lib/kadm5/ipropd_master.c
712
fp = open_stats(context);
crypto/heimdal/lib/kadm5/ipropd_master.c
713
if (fp == NULL)
crypto/heimdal/lib/kadm5/ipropd_master.c
717
fprintf(fp, "Status for slaves, last updated: %s\n\n", str);
crypto/heimdal/lib/kadm5/ipropd_master.c
719
fprintf(fp, "Master version: %lu\n\n", (unsigned long)current_version);
crypto/heimdal/lib/kadm5/ipropd_master.c
723
fclose(fp);
crypto/heimdal/lib/kadm5/ipropd_master.c
766
rtbl_format(tbl, fp);
crypto/heimdal/lib/kadm5/ipropd_master.c
769
fclose(fp);
crypto/heimdal/lib/krb5/log.c
149
struct facility *fp = log_realloc(fac);
crypto/heimdal/lib/krb5/log.c
150
if(fp == NULL) {
crypto/heimdal/lib/krb5/log.c
155
fp->min = min;
crypto/heimdal/lib/krb5/log.c
156
fp->max = max;
crypto/heimdal/lib/krb5/log.c
157
fp->log_func = log_func;
crypto/heimdal/lib/krb5/log.c
158
fp->close_func = close_func;
crypto/heimdal/lib/krb5/log.c
159
fp->data = data;
crypto/heimdal/lib/krb5/log.c
50
struct facility *fp;
crypto/heimdal/lib/krb5/log.c
51
fp = realloc(f->val, (f->len + 1) * sizeof(*f->val));
crypto/heimdal/lib/krb5/log.c
52
if(fp == NULL)
crypto/heimdal/lib/krb5/log.c
55
f->val = fp;
crypto/heimdal/lib/krb5/log.c
56
fp += f->len - 1;
crypto/heimdal/lib/krb5/log.c
57
return fp;
crypto/heimdal/lib/roken/getusershell.c
123
FILE *fp;
crypto/heimdal/lib/roken/getusershell.c
151
if ((fp = fopen(_PATH_SHELLS, "r")) == NULL)
crypto/heimdal/lib/roken/getusershell.c
153
if (fstat(fileno(fp), &statb) == -1) {
crypto/heimdal/lib/roken/getusershell.c
154
fclose(fp);
crypto/heimdal/lib/roken/getusershell.c
158
fclose(fp);
crypto/heimdal/lib/roken/getusershell.c
163
fclose(fp);
crypto/heimdal/lib/roken/getusershell.c
170
while (fgets(cp, MaxPathLen + 1, fp) != NULL) {
crypto/heimdal/lib/roken/getusershell.c
180
fclose(fp);
crypto/heimdal/lib/roken/write_pid.c
42
FILE *fp;
crypto/heimdal/lib/roken/write_pid.c
46
fp = fopen (ret, "w");
crypto/heimdal/lib/roken/write_pid.c
47
if (fp == NULL) {
crypto/heimdal/lib/roken/write_pid.c
51
fprintf (fp, "%u", (unsigned)getpid());
crypto/heimdal/lib/roken/write_pid.c
52
fclose (fp);
crypto/krb5/src/clients/ksu/authorization.c
184
k5login_lookup(FILE *fp, char *princname, krb5_boolean *found)
crypto/krb5/src/clients/ksu/authorization.c
193
retval = get_line(fp, &line);
crypto/krb5/src/clients/ksu/authorization.c
214
retval = get_line(fp, &line);
crypto/krb5/src/clients/ksu/authorization.c
244
k5users_lookup(FILE *fp, char *princname, char *cmd,
crypto/krb5/src/clients/ksu/authorization.c
254
retval = get_line(fp, &line);
crypto/krb5/src/clients/ksu/authorization.c
308
retval = get_line(fp, &line);
crypto/krb5/src/clients/ksu/authorization.c
44
fowner(FILE *fp, uid_t uid)
crypto/krb5/src/clients/ksu/authorization.c
52
if (fstat(fileno(fp), &sbuf)) {
crypto/krb5/src/clients/ksu/authorization.c
565
get_line(FILE *fp, char **out_line)
crypto/krb5/src/clients/ksu/authorization.c
574
while (( r = fgets(line_ptr, BUFSIZ , fp)) != NULL){
crypto/krb5/src/clients/ksu/heuristic.c
141
filter(FILE *fp, char *cmd, char **k5users_list, char ***k5users_filt_list)
crypto/krb5/src/clients/ksu/heuristic.c
159
retval= k5users_lookup(fp, k5users_list[i], cmd, &found, &out_cmd);
crypto/krb5/src/clients/ksu/heuristic.c
45
get_all_princ_from_file(FILE *fp, char ***plist)
crypto/krb5/src/clients/ksu/heuristic.c
55
retval = get_line(fp, &line);
crypto/krb5/src/clients/ksu/heuristic.c
77
retval = get_line(fp, &line);
crypto/krb5/src/clients/kvno/kvno.c
198
read_line(FILE *fp, char *buf, size_t bufsize)
crypto/krb5/src/clients/kvno/kvno.c
202
if (fgets(buf, bufsize, fp) == NULL)
crypto/krb5/src/clients/kvno/kvno.c
222
FILE *fp = NULL;
crypto/krb5/src/clients/kvno/kvno.c
232
fp = fopen(file_name, "r");
crypto/krb5/src/clients/kvno/kvno.c
233
if (fp == NULL)
crypto/krb5/src/clients/kvno/kvno.c
237
line = read_line(fp, linebuf, sizeof(linebuf));
crypto/krb5/src/clients/kvno/kvno.c
249
line = read_line(fp, linebuf, sizeof(linebuf));
crypto/krb5/src/clients/kvno/kvno.c
285
fclose(fp);
crypto/krb5/src/kadmin/dbutil/dump.c
261
dump_octets_or_minus1(FILE *fp, unsigned char *data, size_t len)
crypto/krb5/src/kadmin/dbutil/dump.c
265
fprintf(fp, "%02x", *data++);
crypto/krb5/src/kadmin/dbutil/dump.c
267
fprintf(fp, "-1");
crypto/krb5/src/kadmin/dbutil/dump.c
295
const char *name, FILE *fp, krb5_boolean verbose,
crypto/krb5/src/kadmin/dbutil/dump.c
335
fprintf(fp, "princ\t%d\t%lu\t%d\t%d\t%d\t%s\t", (int)entry->len,
crypto/krb5/src/kadmin/dbutil/dump.c
338
fprintf(fp, "%d\t%d\t%d\t%u\t%u\t%u\t%u\t%d", entry->attributes,
crypto/krb5/src/kadmin/dbutil/dump.c
347
dump_tl_data(fp, entry->tl_data, !kadm);
crypto/krb5/src/kadmin/dbutil/dump.c
348
fprintf(fp, "\t");
crypto/krb5/src/kadmin/dbutil/dump.c
353
fprintf(fp, "%d\t%d\t", (int)kdata->key_data_ver,
crypto/krb5/src/kadmin/dbutil/dump.c
356
fprintf(fp, "%d\t%d\t", kdata->key_data_type[i],
crypto/krb5/src/kadmin/dbutil/dump.c
358
dump_octets_or_minus1(fp, kdata->key_data_contents[i],
crypto/krb5/src/kadmin/dbutil/dump.c
360
fprintf(fp, "\t");
crypto/krb5/src/kadmin/dbutil/dump.c
365
dump_octets_or_minus1(fp, entry->e_data, entry->e_length);
crypto/krb5/src/kadmin/dbutil/dump.c
368
fprintf(fp, ";\n");
crypto/krb5/src/kadmin/dbutil/dump.c
379
const char *name, FILE *fp, krb5_boolean verbose,
crypto/krb5/src/kadmin/dbutil/dump.c
382
return k5beta7_common(context, entry, name, fp, verbose, omit_nra, FALSE);
crypto/krb5/src/kadmin/dbutil/dump.c
387
const char *name, FILE *fp, krb5_boolean verbose,
crypto/krb5/src/kadmin/dbutil/dump.c
390
return k5beta7_common(context, entry, name, fp, verbose, omit_nra, TRUE);
crypto/krb5/src/kadmin/dbutil/dump.c
50
FILE *fp, krb5_boolean verbose,
crypto/krb5/src/kadmin/dbutil/dump.c
52
typedef int (*load_func)(krb5_context context, const char *dumpfile, FILE *fp,
crypto/krb5/src/kadmin/dbutil/dump.c
544
read_octets_or_minus1(FILE *fp, size_t len, unsigned char **out)
crypto/krb5/src/kadmin/dbutil/dump.c
551
return fscanf(fp, "%d", &ival) != 1 || ival != -1;
crypto/krb5/src/kadmin/dbutil/dump.c
555
if (read_octet_string(fp, buf, len)) {
crypto/krb5/src/kadmin/server/auth_acl.c
103
get_line(FILE *fp, const char *fname, int *lineno, int *incr)
crypto/krb5/src/kadmin/server/auth_acl.c
122
if (fgets(p, chunksize, fp) == NULL) {
crypto/krb5/src/kadmin/server/auth_acl.c
390
FILE *fp;
crypto/krb5/src/kadmin/server/auth_acl.c
398
fp = fopen(fname, "r");
crypto/krb5/src/kadmin/server/auth_acl.c
399
if (fp == NULL) {
crypto/krb5/src/kadmin/server/auth_acl.c
408
set_cloexec_file(fp);
crypto/krb5/src/kadmin/server/auth_acl.c
414
while ((line = get_line(fp, fname, &lineno, &incr)) != NULL) {
crypto/krb5/src/kadmin/server/auth_acl.c
426
fclose(fp);
crypto/krb5/src/kadmin/server/auth_acl.c
433
fclose(fp);
crypto/krb5/src/kprop/kpropd.c
182
FILE *fp;
crypto/krb5/src/kprop/kpropd.c
186
fp = fopen(path, "w");
crypto/krb5/src/kprop/kpropd.c
187
if (fp == NULL)
crypto/krb5/src/kprop/kpropd.c
190
st1 = (fprintf(fp, "%ld\n", pid) < 0) ? errno : 0;
crypto/krb5/src/kprop/kpropd.c
191
st2 = (fclose(fp) == EOF) ? errno : 0;
crypto/krb5/src/lib/crypto/builtin/des/destest.c
178
des_cblock_print_file(mit_des_cblock x, FILE *fp)
crypto/krb5/src/lib/crypto/builtin/des/destest.c
182
fprintf(fp," 0x { ");
crypto/krb5/src/lib/crypto/builtin/des/destest.c
185
fprintf(fp,"%x",*y++);
crypto/krb5/src/lib/crypto/builtin/des/destest.c
187
fprintf(fp,", ");
crypto/krb5/src/lib/crypto/builtin/des/destest.c
189
fprintf(fp," }");
crypto/krb5/src/lib/krb5/ccache/cc_dir.c
149
FILE *fp;
crypto/krb5/src/lib/krb5/ccache/cc_dir.c
156
fp = fopen(primary_path, "r");
crypto/krb5/src/lib/krb5/ccache/cc_dir.c
157
if (fp == NULL)
crypto/krb5/src/lib/krb5/ccache/cc_dir.c
159
ret = fgets(buf, sizeof(buf), fp);
crypto/krb5/src/lib/krb5/ccache/cc_dir.c
160
fclose(fp);
crypto/krb5/src/lib/krb5/ccache/cc_dir.c
184
FILE *fp = NULL;
crypto/krb5/src/lib/krb5/ccache/cc_dir.c
195
fp = fdopen(fd, "w");
crypto/krb5/src/lib/krb5/ccache/cc_dir.c
196
if (fp == NULL)
crypto/krb5/src/lib/krb5/ccache/cc_dir.c
199
if (fprintf(fp, "%s\n", contents) < 0)
crypto/krb5/src/lib/krb5/ccache/cc_dir.c
201
status = fclose(fp);
crypto/krb5/src/lib/krb5/ccache/cc_dir.c
202
fp = NULL;
crypto/krb5/src/lib/krb5/ccache/cc_dir.c
205
fp = NULL;
crypto/krb5/src/lib/krb5/ccache/cc_dir.c
213
if (fp != NULL)
crypto/krb5/src/lib/krb5/ccache/cc_dir.c
214
fclose(fp);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
1000
ret = open_cache_file(context, data->filename, TRUE, &fp);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
1003
ret = read_header(context, fp, &version);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
1013
nwritten = write(fileno(fp), buf.data, buf.len);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
1023
ret2 = close_cache_file(context, fp);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
1085
start_offset = ftell(fcursor->fp);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
109
FILE *fp;
crypto/krb5/src/lib/krb5/ccache/cc_file.c
129
get_size(krb5_context context, FILE *fp, size_t *size_out)
crypto/krb5/src/lib/krb5/ccache/cc_file.c
134
if (fstat(fileno(fp), &sb) == -1)
crypto/krb5/src/lib/krb5/ccache/cc_file.c
146
read_bytes(krb5_context context, FILE *fp, void *buf, size_t len)
crypto/krb5/src/lib/krb5/ccache/cc_file.c
150
nread = fread(buf, 1, len, fp);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
152
return ferror(fp) ? errno : KRB5_CC_END;
crypto/krb5/src/lib/krb5/ccache/cc_file.c
159
read32(krb5_context context, FILE *fp, int version, struct k5buf *buf,
crypto/krb5/src/lib/krb5/ccache/cc_file.c
165
ret = read_bytes(context, fp, bytes, 4);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
177
read16(krb5_context context, FILE *fp, int version, uint16_t *out)
crypto/krb5/src/lib/krb5/ccache/cc_file.c
182
ret = read_bytes(context, fp, bytes, 2);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
191
load_bytes(krb5_context context, FILE *fp, size_t len, struct k5buf *buf)
crypto/krb5/src/lib/krb5/ccache/cc_file.c
196
return (ptr == NULL) ? KRB5_CC_NOMEM : read_bytes(context, fp, ptr, len);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
202
load_data(krb5_context context, FILE *fp, int version, size_t maxsize,
crypto/krb5/src/lib/krb5/ccache/cc_file.c
208
ret = read32(context, fp, version, buf, &count);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
213
return load_bytes(context, fp, count, buf);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
219
load_principal(krb5_context context, FILE *fp, int version, size_t maxsize,
crypto/krb5/src/lib/krb5/ccache/cc_file.c
226
ret = load_bytes(context, fp, 4, buf);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
230
ret = read32(context, fp, version, buf, &count);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
237
ret = load_data(context, fp, version, maxsize, buf);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
247
load_cred(krb5_context context, FILE *fp, int version, size_t maxsize,
crypto/krb5/src/lib/krb5/ccache/cc_file.c
254
ret = load_principal(context, fp, version, maxsize, buf);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
257
ret = load_principal(context, fp, version, maxsize, buf);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
262
ret = load_bytes(context, fp, (version == 3) ? 4 : 2, buf);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
265
ret = load_data(context, fp, version, maxsize, buf);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
270
ret = load_bytes(context, fp, 4 * 4 + 1 + 4, buf);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
276
ret = read32(context, fp, version, buf, &count);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
280
ret = load_bytes(context, fp, 2, buf);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
283
ret = load_data(context, fp, version, maxsize, buf);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
290
ret = load_data(context, fp, version, maxsize, buf);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
293
return load_data(context, fp, version, maxsize, buf);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
297
read_principal(krb5_context context, FILE *fp, int version,
crypto/krb5/src/lib/krb5/ccache/cc_file.c
308
ret = get_size(context, fp, &maxsize);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
311
ret = load_principal(context, fp, version, maxsize, &buf);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
337
FILE *fp;
crypto/krb5/src/lib/krb5/ccache/cc_file.c
354
fp = fdopen(fd, writable ? "r+b" : "rb");
crypto/krb5/src/lib/krb5/ccache/cc_file.c
355
if (fp == NULL) {
crypto/krb5/src/lib/krb5/ccache/cc_file.c
361
*fp_out = fp;
crypto/krb5/src/lib/krb5/ccache/cc_file.c
367
close_cache_file(krb5_context context, FILE *fp)
crypto/krb5/src/lib/krb5/ccache/cc_file.c
372
if (fp == NULL)
crypto/krb5/src/lib/krb5/ccache/cc_file.c
374
ret = krb5_unlock_file(context, fileno(fp));
crypto/krb5/src/lib/krb5/ccache/cc_file.c
375
st = fclose(fp);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
384
read_header(krb5_context context, FILE *fp, int *version_out)
crypto/krb5/src/lib/krb5/ccache/cc_file.c
396
ret = read_bytes(context, fp, i16buf, 2);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
408
if (read16(context, fp, version, &fields_len))
crypto/krb5/src/lib/krb5/ccache/cc_file.c
411
if (fields_len < 4 || read16(context, fp, version, &tag) ||
crypto/krb5/src/lib/krb5/ccache/cc_file.c
412
read16(context, fp, version, &flen) || flen > fields_len - 4)
crypto/krb5/src/lib/krb5/ccache/cc_file.c
418
read32(context, fp, version, NULL, &time_offset) ||
crypto/krb5/src/lib/krb5/ccache/cc_file.c
419
read32(context, fp, version, NULL, &usec_offset))
crypto/krb5/src/lib/krb5/ccache/cc_file.c
433
if (flen && fseek(fp, flen, SEEK_CUR) != 0)
crypto/krb5/src/lib/krb5/ccache/cc_file.c
708
FILE *fp = NULL;
crypto/krb5/src/lib/krb5/ccache/cc_file.c
720
ret = open_cache_file(context, data->filename, FALSE, &fp);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
723
ret = read_header(context, fp, &version);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
728
ret = read_principal(context, fp, version, &princ);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
733
(void)krb5_unlock_file(context, fileno(fp));
crypto/krb5/src/lib/krb5/ccache/cc_file.c
734
fcursor->fp = fp;
crypto/krb5/src/lib/krb5/ccache/cc_file.c
735
fp = NULL;
crypto/krb5/src/lib/krb5/ccache/cc_file.c
741
(void)close_cache_file(context, fp);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
775
ret = krb5_lock_file(context, fileno(fcursor->fp), KRB5_LOCKMODE_SHARED);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
782
ret = get_size(context, fcursor->fp, &maxsize);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
785
ret = load_cred(context, fcursor->fp, fcursor->version, maxsize, &buf);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
807
(void)krb5_unlock_file(context, fileno(fcursor->fp));
crypto/krb5/src/lib/krb5/ccache/cc_file.c
819
(void)fclose(fcursor->fp);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
957
FILE *fp = NULL;
crypto/krb5/src/lib/krb5/ccache/cc_file.c
961
ret = open_cache_file(context, data->filename, FALSE, &fp);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
964
ret = read_header(context, fp, &version);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
967
ret = read_principal(context, fp, version, princ);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
970
(void)close_cache_file(context, fp);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
992
FILE *fp = NULL;
crypto/krb5/src/lib/krb5/ccache/ccselect_k5identity.c
157
FILE *fp;
crypto/krb5/src/lib/krb5/ccache/ccselect_k5identity.c
171
fp = fopen(filename, "r");
crypto/krb5/src/lib/krb5/ccache/ccselect_k5identity.c
173
if (fp == NULL)
crypto/krb5/src/lib/krb5/ccache/ccselect_k5identity.c
177
while (fgets(buf, sizeof(buf), fp) != NULL) {
crypto/krb5/src/lib/krb5/ccache/ccselect_k5identity.c
181
fclose(fp);
crypto/krb5/src/lib/krb5/keytab/kt_file.c
1316
FILE *fp;
crypto/krb5/src/lib/krb5/keytab/kt_file.c
1321
fp = KTFILEP(id);
crypto/krb5/src/lib/krb5/keytab/kt_file.c
1323
if (fseek(fp, 0, SEEK_SET))
crypto/krb5/src/lib/krb5/keytab/kt_file.c
1325
if (!fread(&kt_vno, sizeof(kt_vno), 1, fp))
crypto/krb5/src/lib/krb5/keytab/kt_file.c
1329
commit_point = ftell(fp);
crypto/krb5/src/lib/krb5/keytab/kt_file.c
1332
if (!fread(&size, sizeof(size), 1, fp)) {
crypto/krb5/src/lib/krb5/keytab/kt_file.c
1335
if (fseek(fp, 0, SEEK_CUR))
crypto/krb5/src/lib/krb5/keytab/kt_file.c
1339
if (!fwrite(&size, sizeof(size), 1, fp))
crypto/krb5/src/lib/krb5/keytab/kt_file.c
1349
if (fseek(fp, size, SEEK_CUR))
crypto/krb5/src/lib/krb5/keytab/kt_file.c
1360
if (fseek(fp, size, SEEK_CUR))
crypto/krb5/src/lib/krb5/keytab/kt_file.c
1366
zero_point = ftell(fp);
crypto/krb5/src/lib/krb5/keytab/kt_file.c
1369
if (fseek(fp, *size_needed, SEEK_CUR))
crypto/krb5/src/lib/krb5/keytab/kt_file.c
1372
if (!fwrite(&size, sizeof(size), 1, fp))
crypto/krb5/src/lib/krb5/keytab/kt_file.c
1374
if (fseek(fp, zero_point, SEEK_SET))
crypto/krb5/src/lib/krb5/os/krbfileio.c
89
k5_sync_disk_file(krb5_context context, FILE *fp)
crypto/krb5/src/lib/krb5/os/krbfileio.c
91
fflush(fp);
crypto/krb5/src/lib/krb5/os/krbfileio.c
93
if (fsync(fileno(fp))) {
crypto/krb5/src/lib/krb5/os/localauth_k5login.c
119
fp = fopen(filename, "r");
crypto/krb5/src/lib/krb5/os/localauth_k5login.c
120
if (fp == NULL) {
crypto/krb5/src/lib/krb5/os/localauth_k5login.c
124
set_cloexec_file(fp);
crypto/krb5/src/lib/krb5/os/localauth_k5login.c
128
if (fstat(fileno(fp), &sbuf)) {
crypto/krb5/src/lib/krb5/os/localauth_k5login.c
138
while (fgets(linebuf, sizeof(linebuf), fp) != NULL) {
crypto/krb5/src/lib/krb5/os/localauth_k5login.c
148
while ((gobble = getc(fp)) != EOF && gobble != '\n');
crypto/krb5/src/lib/krb5/os/localauth_k5login.c
157
if (fp != NULL)
crypto/krb5/src/lib/krb5/os/localauth_k5login.c
158
fclose(fp);
crypto/krb5/src/lib/krb5/os/localauth_k5login.c
92
FILE *fp = NULL;
crypto/krb5/src/lib/krb5/os/os-proto.h
229
krb5_error_code k5_sync_disk_file(krb5_context, FILE *fp);
crypto/krb5/src/lib/krb5/os/prompter.c
109
scratchchar = getc(fp);
crypto/krb5/src/lib/krb5/os/prompter.c
113
errcode = restore_tty(fp, &saveparm, &osigint);
crypto/krb5/src/lib/krb5/os/prompter.c
119
if (fp != NULL)
crypto/krb5/src/lib/krb5/os/prompter.c
120
fclose(fp);
crypto/krb5/src/lib/krb5/os/prompter.c
159
setup_tty(FILE *fp, int hidden, struct termios *saveparm, osiginfo *osigint)
crypto/krb5/src/lib/krb5/os/prompter.c
167
fd = fileno(fp);
crypto/krb5/src/lib/krb5/os/prompter.c
192
restore_tty(FILE* fp, struct termios *saveparm, osiginfo *osigint)
crypto/krb5/src/lib/krb5/os/prompter.c
197
fd = fileno(fp);
crypto/krb5/src/lib/krb5/os/prompter.c
41
FILE *fp;
crypto/krb5/src/lib/krb5/os/prompter.c
61
fp = NULL;
crypto/krb5/src/lib/krb5/os/prompter.c
66
fp = fdopen(fd, "r");
crypto/krb5/src/lib/krb5/os/prompter.c
67
if (fp == NULL)
crypto/krb5/src/lib/krb5/os/prompter.c
69
if (setvbuf(fp, NULL, _IONBF, 0))
crypto/krb5/src/lib/krb5/os/prompter.c
78
errcode = setup_tty(fp, prompts[i].hidden, &saveparm, &osigint);
crypto/krb5/src/lib/krb5/os/prompter.c
90
fp);
crypto/krb5/src/lib/krb5/os/prompter.c
98
restore_tty(fp, &saveparm, &osigint);
crypto/krb5/src/lib/krb5/unicode/ucdata/ucdata.c
104
fp = filename;
crypto/krb5/src/lib/krb5/unicode/ucdata/ucdata.c
105
while (*fp)
crypto/krb5/src/lib/krb5/unicode/ucdata/ucdata.c
106
*pp++ = *fp++;
crypto/krb5/src/lib/krb5/unicode/ucdata/ucdata.c
92
char *fp, *dp, *pp, path[BUFSIZ];
crypto/krb5/src/lib/rpc/xdr_float.c
103
lg = * (int_32 *) fp;
crypto/krb5/src/lib/rpc/xdr_float.c
106
vs = *((struct vax_single *)fp);
crypto/krb5/src/lib/rpc/xdr_float.c
129
*fp = (float) ((int) lg);
crypto/krb5/src/lib/rpc/xdr_float.c
132
vsp = (struct vax_single *)fp;
crypto/krb5/src/lib/rpc/xdr_float.c
89
xdr_float(XDR *xdrs, float *fp)
crypto/krb5/src/plugins/kdb/db2/libdb2/hash/dbm.c
338
return(((HTAB *)db->internal)->fp);
crypto/krb5/src/plugins/kdb/db2/libdb2/hash/hash.c
112
hashp->fp = -1;
crypto/krb5/src/plugins/kdb/db2/libdb2/hash/hash.c
130
if ((hashp->fp = open(file, flags|O_BINARY, mode)) == -1)
crypto/krb5/src/plugins/kdb/db2/libdb2/hash/hash.c
132
(void)fcntl(hashp->fp, F_SETFD, 1);
crypto/krb5/src/plugins/kdb/db2/libdb2/hash/hash.c
185
hashp->mp = mpool_open(&mpool_key, hashp->fp, hashp->hdr.bsize, csize);
crypto/krb5/src/plugins/kdb/db2/libdb2/hash/hash.c
252
(void)close(hashp->fp);
crypto/krb5/src/plugins/kdb/db2/libdb2/hash/hash.c
284
if (hashp->fp == -1) {
crypto/krb5/src/plugins/kdb/db2/libdb2/hash/hash.c
288
return (hashp->fp);
crypto/krb5/src/plugins/kdb/db2/libdb2/hash/hash.c
410
lseek(hashp->fp, 0, SEEK_SET);
crypto/krb5/src/plugins/kdb/db2/libdb2/hash/hash.c
411
num_copied = read(hashp->fp, hdr_dest, sizeof(HASHHDR));
crypto/krb5/src/plugins/kdb/db2/libdb2/hash/hash.c
439
lseek(hashp->fp, 0, SEEK_SET);
crypto/krb5/src/plugins/kdb/db2/libdb2/hash/hash.c
440
num_copied = write(hashp->fp, whdrp, sizeof(HASHHDR));
crypto/krb5/src/plugins/kdb/db2/libdb2/hash/hash.c
505
if (hashp->fp != -1)
crypto/krb5/src/plugins/kdb/db2/libdb2/hash/hash.c
506
(void)close(hashp->fp);
crypto/krb5/src/plugins/kdb/db2/libdb2/hash/hash.h
91
int32_t fp; /* File pointer */
crypto/krb5/src/plugins/kdb/db2/libdb2/test/btree.tests/main.c
666
FILE *fp;
crypto/krb5/src/plugins/kdb/db2/libdb2/test/btree.tests/main.c
669
if ((fp = fopen(argv[1], "w")) == NULL) {
crypto/krb5/src/plugins/kdb/db2/libdb2/test/btree.tests/main.c
675
(void)fprintf(fp, "%.*s\n", (int)key.size, key.data);
crypto/krb5/src/plugins/kdb/db2/libdb2/test/btree.tests/main.c
678
(void)fclose(fp);
crypto/krb5/src/plugins/kdb/db2/libdb2/test/btree.tests/main.c
689
FILE *fp;
crypto/krb5/src/plugins/kdb/db2/libdb2/test/btree.tests/main.c
692
if ((fp = fopen(argv[1], "w")) == NULL) {
crypto/krb5/src/plugins/kdb/db2/libdb2/test/btree.tests/main.c
698
(void)fprintf(fp, "%.*s\n", (int)key.size, key.data);
crypto/krb5/src/plugins/kdb/db2/libdb2/test/btree.tests/main.c
701
(void)fclose(fp);
crypto/krb5/src/plugins/kdb/db2/libdb2/test/btree.tests/main.c
714
FILE *fp;
crypto/krb5/src/plugins/kdb/db2/libdb2/test/btree.tests/main.c
722
if ((fp = fopen(argv[1], "r")) == NULL) {
crypto/krb5/src/plugins/kdb/db2/libdb2/test/btree.tests/main.c
728
for (cnt = 1; (lp = fgetline(fp, &len)) != NULL; ++cnt) {
crypto/krb5/src/plugins/kdb/db2/libdb2/test/btree.tests/main.c
760
(void)fclose(fp);
crypto/krb5/src/plugins/kdb/db2/libdb2/test/hash1.tests/tcreat3.c
63
FILE *fp;
crypto/krb5/src/plugins/kdb/db2/libdb2/test/hash1.tests/tdel.c
106
fp = fopen ( argv[0], "r");
crypto/krb5/src/plugins/kdb/db2/libdb2/test/hash1.tests/tdel.c
108
while ( fgets(wp1, 8192, fp) &&
crypto/krb5/src/plugins/kdb/db2/libdb2/test/hash1.tests/tdel.c
109
fgets(wp2, 8192, fp) &&
crypto/krb5/src/plugins/kdb/db2/libdb2/test/hash1.tests/tdel.c
118
fclose(fp);
crypto/krb5/src/plugins/kdb/db2/libdb2/test/hash1.tests/tdel.c
64
FILE *fp;
crypto/krb5/src/plugins/kdb/db2/libdb2/test/hash1.tests/thash4.c
109
fp = fopen ( argv[0], "r");
crypto/krb5/src/plugins/kdb/db2/libdb2/test/hash1.tests/thash4.c
111
while ( fgets(wp1, 256, fp) &&
crypto/krb5/src/plugins/kdb/db2/libdb2/test/hash1.tests/thash4.c
112
fgets(wp2, 8192, fp) &&
crypto/krb5/src/plugins/kdb/db2/libdb2/test/hash1.tests/thash4.c
127
fclose(fp);
crypto/krb5/src/plugins/kdb/db2/libdb2/test/hash1.tests/thash4.c
65
FILE *fp;
crypto/krb5/src/plugins/kdb/db2/libdb2/test/hash1.tests/tseq.c
63
FILE *fp;
crypto/krb5/src/plugins/kdb/ldap/libkdb_ldap/ldap_service_stash.c
104
fclose(fp);
crypto/krb5/src/plugins/kdb/ldap/libkdb_ldap/ldap_service_stash.c
71
FILE *fp;
crypto/krb5/src/plugins/kdb/ldap/libkdb_ldap/ldap_service_stash.c
75
fp = fopen(filename, "r");
crypto/krb5/src/plugins/kdb/ldap/libkdb_ldap/ldap_service_stash.c
76
if (fp == NULL) {
crypto/krb5/src/plugins/kdb/ldap/libkdb_ldap/ldap_service_stash.c
82
set_cloexec_file(fp);
crypto/krb5/src/plugins/kdb/ldap/libkdb_ldap/ldap_service_stash.c
84
while (fgets(line, RECORDLEN, fp) != NULL) {
crypto/krb5/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c
4071
FILE *fp;
crypto/krb5/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c
4084
fp = fopen(idopts->cert_filename, "rb");
crypto/krb5/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c
4085
if (fp == NULL) {
crypto/krb5/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c
4089
set_cloexec_file(fp);
crypto/krb5/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c
4091
p12 = d2i_PKCS12_fp(fp, NULL);
crypto/krb5/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c
4092
fclose(fp);
crypto/krb5/src/plugins/tls/k5tls/openssl.c
346
FILE *fp;
crypto/krb5/src/plugins/tls/k5tls/openssl.c
351
fp = fopen(path, "r");
crypto/krb5/src/plugins/tls/k5tls/openssl.c
352
if (fp == NULL)
crypto/krb5/src/plugins/tls/k5tls/openssl.c
354
sk = PEM_X509_INFO_read(fp, NULL, NULL, NULL);
crypto/krb5/src/plugins/tls/k5tls/openssl.c
355
fclose(fp);
crypto/krb5/src/util/profile/prof_parse.c
218
FILE *fp;
crypto/krb5/src/util/profile/prof_parse.c
229
fp = fopen(filename, "r");
crypto/krb5/src/util/profile/prof_parse.c
230
if (fp == NULL)
crypto/krb5/src/util/profile/prof_parse.c
232
retval = parse_file(fp, &state, NULL);
crypto/krb5/src/util/profile/prof_parse.c
233
fclose(fp);
crypto/krb5/src/util/support/fake-addrinfo.c
593
struct face *fp, **fpp;
crypto/krb5/src/util/support/fake-addrinfo.c
603
fp = *fpp;
crypto/krb5/src/util/support/fake-addrinfo.c
606
fp, fp->expiration);
crypto/krb5/src/util/support/fake-addrinfo.c
608
if (fp->expiration < now) {
crypto/krb5/src/util/support/fake-addrinfo.c
612
free(fp->name);
crypto/krb5/src/util/support/fake-addrinfo.c
613
free(fp->canonname);
crypto/krb5/src/util/support/fake-addrinfo.c
614
free(fp->addrs4);
crypto/krb5/src/util/support/fake-addrinfo.c
615
free(fp->addrs6);
crypto/krb5/src/util/support/fake-addrinfo.c
616
*fpp = fp->next;
crypto/krb5/src/util/support/fake-addrinfo.c
617
free(fp);
crypto/krb5/src/util/support/fake-addrinfo.c
624
for (fp = krb5int_fac.data; fp; fp = fp->next) {
crypto/krb5/src/util/support/fake-addrinfo.c
626
printf(" comparing entry @%p\n", fp);
crypto/krb5/src/util/support/fake-addrinfo.c
628
if (!strcasecmp(fp->name, name)) {
crypto/krb5/src/util/support/fake-addrinfo.c
632
*entry = fp;
crypto/libecc/include/libecc/curves/aff_pt.h
26
fp x;
crypto/libecc/include/libecc/curves/aff_pt.h
27
fp y;
crypto/libecc/include/libecc/curves/aff_pt.h
55
fp x;
crypto/libecc/include/libecc/curves/aff_pt.h
56
fp y;
crypto/libecc/include/libecc/curves/aff_pt.h
96
fp u;
crypto/libecc/include/libecc/curves/aff_pt.h
97
fp v;
crypto/libecc/include/libecc/curves/ec_edwards.h
26
fp a;
crypto/libecc/include/libecc/curves/ec_edwards.h
27
fp d;
crypto/libecc/include/libecc/curves/ec_montgomery.h
21
fp A;
crypto/libecc/include/libecc/curves/ec_montgomery.h
22
fp B;
crypto/libecc/include/libecc/curves/ec_params.h
73
fp ec_alpha_montgomery;
crypto/libecc/include/libecc/curves/ec_params.h
74
fp ec_gamma_montgomery;
crypto/libecc/include/libecc/curves/ec_params.h
76
fp ec_alpha_edwards;
crypto/libecc/include/libecc/curves/ec_shortw.h
26
fp a;
crypto/libecc/include/libecc/curves/ec_shortw.h
27
fp b;
crypto/libecc/include/libecc/curves/ec_shortw.h
28
fp a_monty;
crypto/libecc/include/libecc/curves/ec_shortw.h
30
fp b3;
crypto/libecc/include/libecc/curves/ec_shortw.h
31
fp b_monty;
crypto/libecc/include/libecc/curves/ec_shortw.h
32
fp b3_monty;
crypto/libecc/include/libecc/curves/prj_pt.h
27
fp X;
crypto/libecc/include/libecc/curves/prj_pt.h
28
fp Y;
crypto/libecc/include/libecc/curves/prj_pt.h
29
fp Z;
crypto/libecc/include/libecc/fp/fp.h
79
typedef fp *fp_t;
crypto/libecc/include/libecc/fp/fp.h
80
typedef const fp *fp_src_t;
crypto/libecc/include/libecc/sig/bip0340.h
54
fp r;
crypto/libecc/src/arithmetic_tests/arithmetic_tests.c
156
fp name##0; \
crypto/libecc/src/arithmetic_tests/arithmetic_tests.c
161
fp name##0, name##1;\
crypto/libecc/src/arithmetic_tests/arithmetic_tests.c
167
fp name##0, name##1, name##2;\
crypto/libecc/src/arithmetic_tests/arithmetic_tests.c
174
fp name##0, name##1, name##2, name##3;\
crypto/libecc/src/arithmetic_tests/arithmetic_tests.c
182
fp name##0, name##1, name##2, name##3, name##4;\
crypto/libecc/src/arithmetic_tests/arithmetic_tests.c
191
fp name##0, name##1, name##2, name##3, name##4, name##5;\
crypto/libecc/src/arithmetic_tests/arithmetic_tests.c
901
fp *fp_tmp;
crypto/libecc/src/curves/aff_pt.c
141
fp tmp1, tmp2;
crypto/libecc/src/curves/aff_pt_edwards.c
108
fp x2, y2, tmp1, tmp2;
crypto/libecc/src/curves/aff_pt_edwards.c
312
fp tmp1, tmp2, A, B;
crypto/libecc/src/curves/aff_pt_edwards.c
398
fp tmp, tmp2, a, d;
crypto/libecc/src/curves/aff_pt_edwards.c
529
fp tmp, tmp2, x, y;
crypto/libecc/src/curves/aff_pt_edwards.c
530
fp tab_x[2];
crypto/libecc/src/curves/aff_pt_edwards.c
532
fp tab_y[2];
crypto/libecc/src/curves/aff_pt_edwards.c
629
fp tmp, u, v;
crypto/libecc/src/curves/aff_pt_edwards.c
630
fp tab_u[2];
crypto/libecc/src/curves/aff_pt_edwards.c
632
fp tab_v[2];
crypto/libecc/src/curves/aff_pt_edwards.c
769
fp tmp;
crypto/libecc/src/curves/aff_pt_edwards.c
819
fp tmp;
crypto/libecc/src/curves/aff_pt_montgomery.c
102
fp Bv2, u3, Au2, tmp;
crypto/libecc/src/curves/aff_pt_montgomery.c
296
fp tmp, tmp2, a, b;
crypto/libecc/src/curves/aff_pt_montgomery.c
396
fp c, gamma_inv, A, tmp;
crypto/libecc/src/curves/aff_pt_montgomery.c
449
fp tmp, tmp2;
crypto/libecc/src/curves/aff_pt_montgomery.c
500
fp tmp, tmp2;
crypto/libecc/src/curves/ec_montgomery.c
38
fp tmp;
crypto/libecc/src/curves/ec_params.c
29
fp tmp_a, tmp_b, tmp_gx, tmp_gy, tmp_gz;
crypto/libecc/src/curves/ec_shortw.c
43
fp tmp, tmp2;
crypto/libecc/src/curves/prj_pt.c
154
fp X, Y, Z;
crypto/libecc/src/curves/prj_pt.c
1959
fp one;
crypto/libecc/src/curves/prj_pt.c
2026
fp zero, one;
crypto/libecc/src/curves/prj_pt.c
251
fp tmp;
crypto/libecc/src/curves/prj_pt.c
305
fp X1, X2, Y1, Y2;
crypto/libecc/src/curves/prj_pt.c
357
fp X1, X2;
crypto/libecc/src/curves/prj_pt.c
385
fp Y1, Y2;
crypto/libecc/src/curves/prj_pt.c
641
fp XX, ZZ, w, s, ss, sss, R, RR, B, h;
crypto/libecc/src/curves/prj_pt.c
742
fp Y1Z2, X1Z2, Z1Z2, u, uu, v, vv, vvv, R, A;
crypto/libecc/src/curves/prj_pt.c
894
fp t0, t1, t2, t3;
crypto/libecc/src/curves/prj_pt.c
976
fp t0, t1, t2, t3, t4, t5;
crypto/libecc/src/ecdh/x25519_448.c
122
fp tmp;
crypto/libecc/src/examples/basic/curve_basic_examples.c
46
fp x, y, fp_tmp1, fp_tmp2;
crypto/libecc/src/examples/basic/curve_ecdh.c
94
static fp x_Alice, x_Bob;
crypto/libecc/src/examples/basic/fp_square_residue.c
27
fp x, x_sqrt1, x_sqrt2;
crypto/libecc/src/examples/sss/sss.c
129
fp a0, a, s;
crypto/libecc/src/examples/sss/sss.c
130
fp exp, base, tmp;
crypto/libecc/src/examples/sss/sss.c
131
fp blind, blind_inv;
crypto/libecc/src/examples/sss/sss.c
293
fp s, x, y;
crypto/libecc/src/examples/sss/sss.c
294
fp x_i, x_j, tmp, tmp2;
crypto/libecc/src/examples/sss/sss.c
295
fp blind, blind_inv, r_inv;
crypto/libecc/src/fp/fp.c
416
fp opp;
crypto/libecc/src/fp/fp_mul.c
120
fp _num;
crypto/libecc/src/fp/fp_pow.c
41
fp base;
crypto/libecc/src/fp/fp_sqrt.c
116
fp z, t, b, r, c, one_fp, tmp_fp, __n;
crypto/libecc/src/fp/fp_sqrt.c
29
fp pow; /* The result if the exponentiation is in Fp */
crypto/libecc/src/fp/fp_sqrt.c
30
fp one; /* The element 1 in the field */
crypto/libecc/src/sig/bip0340.c
1037
fp rx;
crypto/libecc/src/sig/bip0340.c
391
fp *rx;
crypto/libecc/src/sig/bip0340.c
817
fp rx;
crypto/libecc/src/sig/ecfsdsa.c
424
fp rx, ry;
crypto/libecc/src/sig/eddsa.c
369
fp tmp_x, tmp_y, y1;
crypto/libecc/src/sig/eddsa.c
431
fp x, y;
crypto/libecc/src/sig/eddsa.c
432
fp sqrt1, sqrt2;
crypto/libecc/src/sig/eddsa.c
439
fp tmp;
crypto/libecc/src/wycheproof_tests/libecc_wycheproof.c
501
fp x, tmp;
crypto/openssh/auth.c
234
char *fp, *cafp, *ret = NULL;
crypto/openssh/auth.c
240
fp = sshkey_fingerprint(key,
crypto/openssh/auth.c
245
sshkey_type(key), fp == NULL ? "(null)" : fp,
crypto/openssh/auth.c
252
free(fp);
crypto/openssh/auth.c
255
fp = sshkey_fingerprint(key, options.fingerprint_hash,
crypto/openssh/auth.c
258
fp == NULL ? "(null)" : fp,
crypto/openssh/auth.c
261
free(fp);
crypto/openssh/auth.c
556
char *fp = NULL;
crypto/openssh/auth.c
561
if ((fp = sshkey_fingerprint(key, options.fingerprint_hash,
crypto/openssh/auth.c
574
sshkey_type(key), fp, options.revoked_keys_file);
crypto/openssh/auth.c
578
"revoked keys file %s", sshkey_type(key), fp,
crypto/openssh/auth.c
587
free(fp);
crypto/openssh/auth2-hostbased.c
176
char *fp;
crypto/openssh/auth2-hostbased.c
235
if ((fp = sshkey_fingerprint(key->cert->signature_key,
crypto/openssh/auth2-hostbased.c
240
sshkey_type(key->cert->signature_key), fp,
crypto/openssh/auth2-hostbased.c
243
if ((fp = sshkey_fingerprint(key,
crypto/openssh/auth2-hostbased.c
247
sshkey_type(key), fp, cuser, lookup);
crypto/openssh/auth2-hostbased.c
249
free(fp);
crypto/openssh/auth2-pubkey.c
85
char *ret, *fp = sshkey_fingerprint(key,
crypto/openssh/auth2-pubkey.c
88
xasprintf(&ret, "%s %s", sshkey_type(key), fp);
crypto/openssh/auth2-pubkey.c
89
free(fp);
crypto/openssh/auth2-pubkeyfile.c
271
char *key_options = NULL, *fp = NULL;
crypto/openssh/auth2-pubkeyfile.c
319
if ((fp = sshkey_fingerprint(found,
crypto/openssh/auth2-pubkeyfile.c
324
sshkey_is_cert(key) ? "CA" : "key", sshkey_type(found), fp);
crypto/openssh/auth2-pubkeyfile.c
334
sshkey_type(found), fp, loc);
crypto/openssh/auth2-pubkeyfile.c
376
sshkey_type(found), fp, loc);
crypto/openssh/auth2-pubkeyfile.c
393
free(fp);
crypto/openssh/auth2.c
750
char *fp;
crypto/openssh/auth2.c
754
fp = sshkey_fingerprint(authctxt->prev_keys[i],
crypto/openssh/auth2.c
758
fp == NULL ? "UNKNOWN" : fp);
crypto/openssh/auth2.c
759
free(fp);
crypto/openssh/clientloop.c
2240
char *fp, *response;
crypto/openssh/clientloop.c
2247
if ((fp = sshkey_fingerprint(ctx->keys[i],
crypto/openssh/clientloop.c
2253
sshkey_type(ctx->keys[i]), fp);
crypto/openssh/clientloop.c
2255
free(fp);
crypto/openssh/clientloop.c
2258
if ((fp = sshkey_fingerprint(ctx->old_keys[i],
crypto/openssh/clientloop.c
2264
sshkey_type(ctx->old_keys[i]), fp);
crypto/openssh/clientloop.c
2266
free(fp);
crypto/openssh/clientloop.c
2441
char *fp;
crypto/openssh/clientloop.c
2467
fp = sshkey_fingerprint(key, options.fingerprint_hash,
crypto/openssh/clientloop.c
2469
debug3_f("received %s key %s", sshkey_type(key), fp);
crypto/openssh/clientloop.c
2470
free(fp);
crypto/openssh/hostfile.c
601
char *fp, *temp = NULL, *back = NULL;
crypto/openssh/hostfile.c
656
if ((fp = sshkey_fingerprint(keys[i], hash_alg,
crypto/openssh/hostfile.c
688
sshkey_ssh_name(keys[i]), fp);
crypto/openssh/hostfile.c
689
free(fp);
crypto/openssh/krl.c
1305
char *fp, timestamp[64];
crypto/openssh/krl.c
1314
asmprintf(&fp, INT_MAX, &r, "%s", krl->comment);
crypto/openssh/krl.c
1315
fprintf(f, "# Comment: %s\n", fp);
crypto/openssh/krl.c
1316
free(fp);
crypto/openssh/krl.c
1326
if ((fp = sshkey_fingerprint(key, SSH_FP_HASH_DEFAULT,
crypto/openssh/krl.c
1332
fprintf(f, "hash: %s # %s\n", fp, sshkey_ssh_name(key));
crypto/openssh/krl.c
1333
free(fp);
crypto/openssh/krl.c
1337
fp = tohex(rb->blob, rb->len);
crypto/openssh/krl.c
1338
fprintf(f, "hash: SHA256:%s\n", fp);
crypto/openssh/krl.c
1339
free(fp);
crypto/openssh/krl.c
1346
fp = tohex(rb->blob, rb->len);
crypto/openssh/krl.c
1347
fprintf(f, "# hash SHA1:%s\n", fp);
crypto/openssh/krl.c
1348
free(fp);
crypto/openssh/krl.c
1356
if ((fp = sshkey_fingerprint(rc->ca_key,
crypto/openssh/krl.c
1363
sshkey_ssh_name(rc->ca_key), fp);
crypto/openssh/krl.c
1364
free(fp);
crypto/openssh/krl.c
1382
asmprintf(&fp, INT_MAX, &r, "%s", rki->key_id);
crypto/openssh/krl.c
1383
fprintf(f, "id: %s\n", fp);
crypto/openssh/krl.c
1384
free(fp);
crypto/openssh/moduli.c
453
FILE *fp;
crypto/openssh/moduli.c
466
if ((fp = fdopen(r, "w")) == NULL) {
crypto/openssh/moduli.c
472
writeok = (fprintf(fp, "%lu\n", (unsigned long)lineno) > 0);
crypto/openssh/moduli.c
473
closeok = (fclose(fp) == 0);
crypto/openssh/moduli.c
487
FILE *fp;
crypto/openssh/moduli.c
490
if ((fp = fopen(cpfile, "r")) == NULL)
crypto/openssh/moduli.c
492
if (fscanf(fp, "%lu\n", &lineno) < 1)
crypto/openssh/moduli.c
496
fclose(fp);
crypto/openssh/monitor.c
1520
char *sigalg = NULL, *fp = NULL;
crypto/openssh/monitor.c
1565
if ((fp = sshkey_fingerprint(key, options.fingerprint_hash,
crypto/openssh/monitor.c
1585
sshkey_type(key), fp,
crypto/openssh/monitor.c
1597
"not met ", sshkey_type(key), fp,
crypto/openssh/monitor.c
1626
free(fp);
crypto/openssh/openbsd-compat/bsd-getline.c
50
getdelim(char **buf, size_t *bufsiz, int delimiter, FILE *fp)
crypto/openssh/openbsd-compat/bsd-getline.c
62
int c = fgetc(fp);
crypto/openssh/openbsd-compat/bsd-getline.c
64
if (feof(fp)) {
crypto/openssh/openbsd-compat/bsd-getline.c
93
getline(char **buf, size_t *bufsiz, FILE *fp)
crypto/openssh/openbsd-compat/bsd-getline.c
95
return getdelim(buf, bufsiz, '\n', fp);
crypto/openssh/openbsd-compat/port-linux.c
275
FILE *fp;
crypto/openssh/openbsd-compat/port-linux.c
281
if ((fp = fopen(oom_adj_path, "r+")) != NULL) {
crypto/openssh/openbsd-compat/port-linux.c
282
if (fscanf(fp, "%d", &oom_adj_save) != 1)
crypto/openssh/openbsd-compat/port-linux.c
286
rewind(fp);
crypto/openssh/openbsd-compat/port-linux.c
287
if (fprintf(fp, "%d\n", value) <= 0)
crypto/openssh/openbsd-compat/port-linux.c
294
fclose(fp);
crypto/openssh/openbsd-compat/port-linux.c
305
FILE *fp;
crypto/openssh/openbsd-compat/port-linux.c
309
(fp = fopen(oom_adj_path, "w")) == NULL)
crypto/openssh/openbsd-compat/port-linux.c
312
if (fprintf(fp, "%d\n", oom_adj_save) <= 0)
crypto/openssh/openbsd-compat/port-linux.c
317
fclose(fp);
crypto/openssh/regress/misc/ssh-verify-attestation/ssh-verify-attestation.c
334
char *fp;
crypto/openssh/regress/misc/ssh-verify-attestation/ssh-verify-attestation.c
376
if ((fp = sshkey_fingerprint(k, SSH_FP_HASH_DEFAULT,
crypto/openssh/regress/misc/ssh-verify-attestation/ssh-verify-attestation.c
379
debug2("key %s: %s %s", argv[2], sshkey_type(k), fp);
crypto/openssh/regress/misc/ssh-verify-attestation/ssh-verify-attestation.c
380
free(fp);
crypto/openssh/scp.c
2129
static FILE *fp;
crypto/openssh/scp.c
2133
if (fp != NULL || (remout != -1 && (fp = fdopen(remout, "w")))) {
crypto/openssh/scp.c
2134
(void) fprintf(fp, "%c", 0x01);
crypto/openssh/scp.c
2135
(void) fprintf(fp, "scp: ");
crypto/openssh/scp.c
2137
(void) vfprintf(fp, fmt, ap);
crypto/openssh/scp.c
2139
(void) fprintf(fp, "\n");
crypto/openssh/scp.c
2140
(void) fflush(fp);
crypto/openssh/ssh-add.c
534
char *fp;
crypto/openssh/ssh-add.c
550
fp = sshkey_fingerprint(idlist->keys[i],
crypto/openssh/ssh-add.c
553
fp == NULL ? "(null)" : fp, idlist->comments[i],
crypto/openssh/ssh-add.c
555
free(fp);
crypto/openssh/ssh-add.c
612
char *fp;
crypto/openssh/ssh-add.c
622
if ((fp = sshkey_fingerprint(key,
crypto/openssh/ssh-add.c
629
sshkey_type(key), fp);
crypto/openssh/ssh-add.c
630
free(fp);
crypto/openssh/ssh-add.c
638
sshkey_type(key), fp);
crypto/openssh/ssh-add.c
648
free(fp);
crypto/openssh/ssh-agent.c
1006
free(fp);
crypto/openssh/ssh-agent.c
1106
char *fp;
crypto/openssh/ssh-agent.c
1136
if ((fp = sshkey_fingerprint(k, SSH_FP_HASH_DEFAULT,
crypto/openssh/ssh-agent.c
1142
dch->hostname, key_is_ca ? "CA " : "", sshkey_type(k), fp);
crypto/openssh/ssh-agent.c
1143
free(fp);
crypto/openssh/ssh-agent.c
1385
char *fp, *comment = NULL, *sk_provider = NULL;
crypto/openssh/ssh-agent.c
1472
if ((fp = sshkey_fingerprint(k, SSH_FP_HASH_DEFAULT,
crypto/openssh/ssh-agent.c
1477
sshkey_ssh_name(k), fp, comment, seconds, confirm,
crypto/openssh/ssh-agent.c
1479
free(fp);
crypto/openssh/ssh-agent.c
1727
char *fp = NULL;
crypto/openssh/ssh-agent.c
1744
if ((fp = sshkey_fingerprint(key, SSH_FP_HASH_DEFAULT,
crypto/openssh/ssh-agent.c
1750
error_fr(r, "sshkey_verify for %s %s", sshkey_type(key), fp);
crypto/openssh/ssh-agent.c
1765
sshkey_type(key), fp);
crypto/openssh/ssh-agent.c
1770
"for %s %s", sshkey_type(key), fp);
crypto/openssh/ssh-agent.c
1788
debug_f("recorded %s %s (slot %zu of %d)", sshkey_type(key), fp, i,
crypto/openssh/ssh-agent.c
1801
free(fp);
crypto/openssh/ssh-agent.c
325
char *fp;
crypto/openssh/ssh-agent.c
332
fp = NULL;
crypto/openssh/ssh-agent.c
334
(fp = sshkey_fingerprint(dch->keys[i],
crypto/openssh/ssh-agent.c
340
dch->keys[i] == NULL ? "none" : fp,
crypto/openssh/ssh-agent.c
342
free(fp);
crypto/openssh/ssh-agent.c
387
char *fp;
crypto/openssh/ssh-agent.c
392
if ((fp = sshkey_fingerprint(key, SSH_FP_HASH_DEFAULT,
crypto/openssh/ssh-agent.c
396
tag, hostname, sshkey_type(key), fp, dch->nkeys);
crypto/openssh/ssh-agent.c
397
free(fp);
crypto/openssh/ssh-agent.c
402
if ((fp = sshkey_fingerprint(dch->keys[i], SSH_FP_HASH_DEFAULT,
crypto/openssh/ssh-agent.c
407
sshkey_type(dch->keys[i]), fp);
crypto/openssh/ssh-agent.c
408
free(fp);
crypto/openssh/ssh-agent.c
647
char *fp;
crypto/openssh/ssh-agent.c
654
if ((fp = sshkey_fingerprint(id->key, SSH_FP_HASH_DEFAULT,
crypto/openssh/ssh-agent.c
658
sshkey_ssh_name(id->key), fp);
crypto/openssh/ssh-agent.c
661
free(fp);
crypto/openssh/ssh-agent.c
866
char *fp = NULL, *pin = NULL, *prompt = NULL;
crypto/openssh/ssh-agent.c
889
if ((fp = sshkey_fingerprint(key, SSH_FP_HASH_DEFAULT,
crypto/openssh/ssh-agent.c
920
sshkey_type(id->key), fp);
crypto/openssh/ssh-agent.c
959
sshkey_type(id->key), fp,
crypto/openssh/ssh-agent.c
977
sshkey_type(id->key), fp);
crypto/openssh/ssh-keygen.c
1276
char *fp = NULL, *ra = NULL;
crypto/openssh/ssh-keygen.c
1309
fp = sshkey_fingerprint(l->key, fptype, rep);
crypto/openssh/ssh-keygen.c
1312
if (fp == NULL || ra == NULL)
crypto/openssh/ssh-keygen.c
1315
sshkey_type(l->key), fp,
crypto/openssh/ssh-keygen.c
1321
free(fp);
crypto/openssh/ssh-keygen.c
2616
char *wfile = NULL, *asig = NULL, *fp = NULL;
crypto/openssh/ssh-keygen.c
2634
if ((fp = sshkey_fingerprint(signkey, fingerprint_hash,
crypto/openssh/ssh-keygen.c
2638
sshkey_type(signkey), fp);
crypto/openssh/ssh-keygen.c
2639
free(fp);
crypto/openssh/ssh-keygen.c
2836
char *fp = NULL;
crypto/openssh/ssh-keygen.c
2858
if ((fp = sshkey_fingerprint(sign_key, fingerprint_hash,
crypto/openssh/ssh-keygen.c
2861
debug("Valid (unverified) signature from key %s", fp);
crypto/openssh/ssh-keygen.c
2866
free(fp);
crypto/openssh/ssh-keygen.c
2867
fp = NULL;
crypto/openssh/ssh-keygen.c
2886
if ((fp = sshkey_fingerprint(sign_key, fingerprint_hash,
crypto/openssh/ssh-keygen.c
2891
sig_namespace, sshkey_type(sign_key), fp);
crypto/openssh/ssh-keygen.c
2896
sshkey_type(sign_key), fp);
crypto/openssh/ssh-keygen.c
2915
free(fp);
crypto/openssh/ssh-keygen.c
3204
char *fp, *pin = NULL, *pass = NULL, *path, *pubpath;
crypto/openssh/ssh-keygen.c
3235
if ((fp = sshkey_fingerprint(key, fingerprint_hash,
crypto/openssh/ssh-keygen.c
3239
sshkey_type(key), fp, key->sk_application, key->sk_flags);
crypto/openssh/ssh-keygen.c
3382
char *rr_hostname = NULL, *ep, *fp, *ra;
crypto/openssh/ssh-keygen.c
3981
fp = sshkey_fingerprint(public, fingerprint_hash,
crypto/openssh/ssh-keygen.c
3985
if (fp == NULL || ra == NULL)
crypto/openssh/ssh-keygen.c
3990
printf("%s %s\n", fp, comment);
crypto/openssh/ssh-keygen.c
3994
free(fp);
crypto/openssh/ssh-keygen.c
639
get_line(FILE *fp, char *line, size_t len)
crypto/openssh/ssh-keygen.c
645
while ((c = fgetc(fp)) != EOF) {
crypto/openssh/ssh-keygen.c
650
c = fgetc(fp);
crypto/openssh/ssh-keygen.c
651
if (c != EOF && c != '\n' && ungetc(c, fp) == EOF)
crypto/openssh/ssh-keygen.c
672
FILE *fp;
crypto/openssh/ssh-keygen.c
676
if ((fp = fopen(identity_file, "r")) == NULL)
crypto/openssh/ssh-keygen.c
679
while ((blen = get_line(fp, line, sizeof(line))) != -1) {
crypto/openssh/ssh-keygen.c
713
fclose(fp);
crypto/openssh/ssh-keygen.c
720
FILE *fp;
crypto/openssh/ssh-keygen.c
722
if ((fp = fopen(identity_file, "r")) == NULL)
crypto/openssh/ssh-keygen.c
724
if ((pubkey = PEM_read_PUBKEY(fp, NULL, NULL, NULL)) == NULL) {
crypto/openssh/ssh-keygen.c
728
fclose(fp);
crypto/openssh/ssh-keygen.c
767
FILE *fp;
crypto/openssh/ssh-keygen.c
770
if ((fp = fopen(identity_file, "r")) == NULL)
crypto/openssh/ssh-keygen.c
772
if ((rsa = PEM_read_RSAPublicKey(fp, NULL, NULL, NULL)) != NULL) {
crypto/openssh/ssh-keygen.c
781
fclose(fp);
crypto/openssh/ssh-keygen.c
885
char *fp, *ra, **comments = NULL;
crypto/openssh/ssh-keygen.c
896
fp = sshkey_fingerprint(keys[i], fptype, rep);
crypto/openssh/ssh-keygen.c
899
if (fp == NULL || ra == NULL)
crypto/openssh/ssh-keygen.c
902
fp, sshkey_type(keys[i]));
crypto/openssh/ssh-keygen.c
906
free(fp);
crypto/openssh/ssh-keygen.c
942
char *fp = NULL, *ra = NULL;
crypto/openssh/ssh-keygen.c
948
fp = sshkey_fingerprint(public, fptype, rep);
crypto/openssh/ssh-keygen.c
950
if (fp == NULL || ra == NULL)
crypto/openssh/ssh-keygen.c
952
mprintf("%u %s %s (%s)\n", sshkey_size(public), fp,
crypto/openssh/ssh-keygen.c
957
free(fp);
crypto/openssh/ssh-keyscan.c
673
FILE *fp;
crypto/openssh/ssh-keyscan.c
808
fp = stdin;
crypto/openssh/ssh-keyscan.c
809
else if ((fp = fopen(argv[j], "r")) == NULL)
crypto/openssh/ssh-keyscan.c
811
fp == stdin ? "<stdin>" : argv[j], strerror(errno));
crypto/openssh/ssh-keyscan.c
813
while (getline(&line, &linesize, fp) != -1) {
crypto/openssh/ssh-keyscan.c
832
if (ferror(fp))
crypto/openssh/ssh-keyscan.c
834
fp == stdin ? "<stdin>" : argv[j], strerror(errno));
crypto/openssh/ssh-keyscan.c
836
if (fp != stdin)
crypto/openssh/ssh-keyscan.c
837
fclose(fp);
crypto/openssh/ssh-keysign.c
185
char *host, *fp, *pkalg;
crypto/openssh/ssh-keysign.c
291
if ((fp = sshkey_fingerprint(key, options.fingerprint_hash,
crypto/openssh/ssh-keysign.c
295
sshkey_type(key), fp ? fp : "");
crypto/openssh/ssh-pkcs11.c
1106
char *fp;
crypto/openssh/ssh-pkcs11.c
1108
if ((fp = sshkey_fingerprint(key, SSH_FP_HASH_DEFAULT,
crypto/openssh/ssh-pkcs11.c
1114
(u_long)slotidx, sshkey_type(key), fp);
crypto/openssh/ssh-pkcs11.c
1115
free(fp);
crypto/openssh/sshconnect.c
1151
fp = sshkey_fingerprint(host_key,
crypto/openssh/sshconnect.c
1155
if (fp == NULL || ra == NULL)
crypto/openssh/sshconnect.c
1157
logit("Host key fingerprint is %s\n%s", fp, ra);
crypto/openssh/sshconnect.c
1159
free(fp);
crypto/openssh/sshconnect.c
1202
fp = sshkey_fingerprint(host_key,
crypto/openssh/sshconnect.c
1206
if (fp == NULL || ra == NULL)
crypto/openssh/sshconnect.c
1209
type, fp);
crypto/openssh/sshconnect.c
1228
confirmed = confirm(msg1, fp);
crypto/openssh/sshconnect.c
1230
free(fp);
crypto/openssh/sshconnect.c
1485
char valid[64], *fp = NULL, *cafp = NULL;
crypto/openssh/sshconnect.c
1488
if ((fp = sshkey_fingerprint(host_key,
crypto/openssh/sshconnect.c
1506
sshkey_ssh_name(host_key), fp,
crypto/openssh/sshconnect.c
1516
debug("Server host key: %s %s", sshkey_ssh_name(host_key), fp);
crypto/openssh/sshconnect.c
1521
sshkey_type(host_key), fp);
crypto/openssh/sshconnect.c
1534
sshkey_type(host_key), fp,
crypto/openssh/sshconnect.c
1541
fp, options.revoked_host_keys);
crypto/openssh/sshconnect.c
1582
free(fp);
crypto/openssh/sshconnect.c
1647
char *fp, *ra;
crypto/openssh/sshconnect.c
1656
fp = sshkey_fingerprint(found->key,
crypto/openssh/sshconnect.c
1660
if (fp == NULL || ra == NULL)
crypto/openssh/sshconnect.c
1667
sshkey_type(found->key), fp);
crypto/openssh/sshconnect.c
1671
free(fp);
crypto/openssh/sshconnect.c
1680
char *fp;
crypto/openssh/sshconnect.c
1682
fp = sshkey_fingerprint(host_key, options.fingerprint_hash,
crypto/openssh/sshconnect.c
1684
if (fp == NULL)
crypto/openssh/sshconnect.c
1694
sshkey_type(host_key), fp);
crypto/openssh/sshconnect.c
1697
free(fp);
crypto/openssh/sshconnect.c
976
char hostline[1000], *hostp, *fp, *ra;
crypto/openssh/sshconnect2.c
1211
char *fp = NULL, *pin = NULL, *prompt = NULL;
crypto/openssh/sshconnect2.c
1247
if ((fp = sshkey_fingerprint(sign_key,
crypto/openssh/sshconnect2.c
1252
sshkey_type(sign_key), fp);
crypto/openssh/sshconnect2.c
1253
free(fp);
crypto/openssh/sshconnect2.c
1319
char *alg = NULL, *fp = NULL;
crypto/openssh/sshconnect2.c
1330
if ((fp = sshkey_fingerprint(id->key, options.fingerprint_hash,
crypto/openssh/sshconnect2.c
1334
debug3_f("using %s with %s %s", method, sshkey_type(id->key), fp);
crypto/openssh/sshconnect2.c
1397
debug3_f("signing using %s %s", alg, fp);
crypto/openssh/sshconnect2.c
1442
loc, sshkey_type(id->key), fp);
crypto/openssh/sshconnect2.c
1474
free(fp);
crypto/openssh/sshconnect2.c
2134
char *fp = NULL, *chost = NULL, *lname = NULL;
crypto/openssh/sshconnect2.c
2184
if ((fp = sshkey_fingerprint(private, options.fingerprint_hash,
crypto/openssh/sshconnect2.c
2190
sshkey_ssh_name(private), fp, authctxt->active_ktype);
crypto/openssh/sshconnect2.c
2231
sshkey_ssh_name(private), fp);
crypto/openssh/sshconnect2.c
2254
free(fp);
crypto/openssh/sshconnect2.c
657
char *fp = NULL, *ret = NULL;
crypto/openssh/sshconnect2.c
661
fp = sshkey_fingerprint(id->key, options.fingerprint_hash,
crypto/openssh/sshconnect2.c
673
fp ? fp : "",
crypto/openssh/sshconnect2.c
676
free(fp);
crypto/openssh/sshconnect2.c
688
char *pkalg = NULL, *fp = NULL, *ident = NULL;
crypto/openssh/sshconnect2.c
729
fp = sshkey_fingerprint(key, options.fingerprint_hash,
crypto/openssh/sshconnect2.c
732
sshkey_type(key), fp == NULL ? "<ERROR>" : fp);
crypto/openssh/sshconnect2.c
743
free(fp);
crypto/openssh/sshd-session.c
583
char *fp;
crypto/openssh/sshd-session.c
596
fp = sshkey_fingerprint(key, options.fingerprint_hash,
crypto/openssh/sshd-session.c
598
debug3_f("key %d: %s %s", i, sshkey_ssh_name(key), fp);
crypto/openssh/sshd-session.c
599
free(fp);
crypto/openssh/sshd.c
1367
char *args, *fp, *line, *logfile = NULL, **rexec_argv = NULL;
crypto/openssh/sshd.c
1734
if ((fp = sshkey_fingerprint(pubkey, options.fingerprint_hash,
crypto/openssh/sshd.c
1738
key ? "private" : "agent", i, sshkey_ssh_name(pubkey), fp);
crypto/openssh/sshd.c
1739
free(fp);
crypto/openssl/apps/include/apps.h
77
void unbuffer(FILE *fp);
crypto/openssl/apps/lib/apps.c
3036
void unbuffer(FILE *fp)
crypto/openssl/apps/lib/apps.c
3049
setbuf(fp, NULL);
crypto/openssl/apps/lib/apps.c
3089
FILE *fp = NULL;
crypto/openssl/apps/lib/apps.c
3130
fp = fdopen(fd, modestr('w', format));
crypto/openssl/apps/lib/apps.c
3133
fp = fopen(filename, modestr('w', format));
crypto/openssl/apps/lib/apps.c
3135
if (fp == NULL)
crypto/openssl/apps/lib/apps.c
3140
b = BIO_new_fp(fp, bflags);
crypto/openssl/apps/lib/apps.c
3149
if (fp != NULL)
crypto/openssl/apps/lib/apps.c
3150
fclose(fp);
crypto/openssl/apps/list.c
1136
const FUNCTION *fp;
crypto/openssl/apps/list.c
1139
for (fp = functions; fp->name != NULL; fp++)
crypto/openssl/apps/list.c
1140
if (strcmp(fp->name, command) == 0)
crypto/openssl/apps/list.c
1142
if (fp->name == NULL) {
crypto/openssl/apps/list.c
1148
if ((o = fp->help) == NULL)
crypto/openssl/apps/list.c
1204
FUNCTION *fp;
crypto/openssl/apps/list.c
1212
for (fp = functions; fp->name != NULL; fp++) {
crypto/openssl/apps/list.c
1213
if (fp->type != ft)
crypto/openssl/apps/list.c
1217
if (!is_cipher_available(fp->name))
crypto/openssl/apps/list.c
1221
if (!is_md_available(fp->name))
crypto/openssl/apps/list.c
1228
BIO_printf(bio_out, "%s\n", fp->name);
crypto/openssl/apps/list.c
1232
BIO_printf(bio_out, "%-*s", dc.width, fp->name);
crypto/openssl/apps/openssl.c
240
FUNCTION f, *fp;
crypto/openssl/apps/openssl.c
285
fp = lh_FUNCTION_retrieve(prog, &f);
crypto/openssl/apps/openssl.c
286
if (fp == NULL) {
crypto/openssl/apps/openssl.c
346
FUNCTION *fp;
crypto/openssl/apps/openssl.c
383
for (fp = functions; fp->name != NULL; fp++) {
crypto/openssl/apps/openssl.c
389
if (fp->type != tp) {
crypto/openssl/apps/openssl.c
390
tp = fp->type;
crypto/openssl/apps/openssl.c
403
BIO_printf(bio_err, "%-*s", dc.width, fp->name);
crypto/openssl/apps/openssl.c
411
FUNCTION f, *fp;
crypto/openssl/apps/openssl.c
417
fp = lh_FUNCTION_retrieve(prog, &f);
crypto/openssl/apps/openssl.c
418
if (fp == NULL) {
crypto/openssl/apps/openssl.c
422
fp = &f;
crypto/openssl/apps/openssl.c
426
fp = &f;
crypto/openssl/apps/openssl.c
429
if (fp != NULL) {
crypto/openssl/apps/openssl.c
430
if (fp->deprecated_alternative != NULL)
crypto/openssl/apps/openssl.c
431
warn_deprecated(fp);
crypto/openssl/apps/openssl.c
432
return fp->func(argc, argv);
crypto/openssl/apps/openssl.c
48
static void warn_deprecated(const FUNCTION *fp)
crypto/openssl/apps/openssl.c
50
if (fp->deprecated_version != NULL)
crypto/openssl/apps/openssl.c
52
fp->name, fp->deprecated_version);
crypto/openssl/apps/openssl.c
54
BIO_printf(bio_err, "The command %s is deprecated.", fp->name);
crypto/openssl/apps/openssl.c
55
if (strcmp(fp->deprecated_alternative, DEPRECATED_NO_ALTERNATIVE) != 0)
crypto/openssl/apps/openssl.c
56
BIO_printf(bio_err, " Use '%s' instead.", fp->deprecated_alternative);
crypto/openssl/apps/s_server.c
3635
FILE *fp = NULL;
crypto/openssl/apps/s_server.c
3641
BIO_get_fp(file, &fp);
crypto/openssl/apps/s_server.c
3642
fd = fileno(fp);
crypto/openssl/crypto/asn1/a_strex.c
567
int X509_NAME_print_ex_fp(FILE *fp, const X509_NAME *nm, int indent,
crypto/openssl/crypto/asn1/a_strex.c
573
btmp = BIO_new_fp(fp, BIO_NOCLOSE);
crypto/openssl/crypto/asn1/a_strex.c
580
return do_name_ex(send_fp_chars, fp, nm, indent, flags);
crypto/openssl/crypto/asn1/a_strex.c
590
int ASN1_STRING_print_ex_fp(FILE *fp, const ASN1_STRING *str, unsigned long flags)
crypto/openssl/crypto/asn1/a_strex.c
592
return do_print_ex(send_fp_chars, fp, flags, str);
crypto/openssl/crypto/asn1/bio_asn1.c
313
static long asn1_bio_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
crypto/openssl/crypto/asn1/bio_asn1.c
318
return BIO_callback_ctrl(next, cmd, fp);
crypto/openssl/crypto/asn1/bio_asn1.c
69
static long asn1_bio_callback_ctrl(BIO *h, int cmd, BIO_info_cb *fp);
crypto/openssl/crypto/bio/bf_buff.c
22
static long buffer_callback_ctrl(BIO *h, int cmd, BIO_info_cb *fp);
crypto/openssl/crypto/bio/bf_buff.c
411
static long buffer_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
crypto/openssl/crypto/bio/bf_buff.c
415
return BIO_callback_ctrl(b->next_bio, cmd, fp);
crypto/openssl/crypto/bio/bf_lbuf.c
23
static long linebuffer_callback_ctrl(BIO *h, int cmd, BIO_info_cb *fp);
crypto/openssl/crypto/bio/bf_lbuf.c
318
static long linebuffer_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
crypto/openssl/crypto/bio/bf_lbuf.c
322
return BIO_callback_ctrl(b->next_bio, cmd, fp);
crypto/openssl/crypto/bio/bf_nbio.c
170
static long nbiof_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
crypto/openssl/crypto/bio/bf_nbio.c
174
return BIO_callback_ctrl(b->next_bio, cmd, fp);
crypto/openssl/crypto/bio/bf_nbio.c
27
static long nbiof_callback_ctrl(BIO *h, int cmd, BIO_info_cb *fp);
crypto/openssl/crypto/bio/bf_null.c
24
static long nullf_callback_ctrl(BIO *h, int cmd, BIO_info_cb *fp);
crypto/openssl/crypto/bio/bf_null.c
94
static long nullf_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
crypto/openssl/crypto/bio/bf_null.c
98
return BIO_callback_ctrl(b->next_bio, cmd, fp);
crypto/openssl/crypto/bio/bf_prefix.c
194
static long prefix_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
crypto/openssl/crypto/bio/bf_prefix.c
196
return BIO_callback_ctrl(BIO_next(b), cmd, fp);
crypto/openssl/crypto/bio/bf_prefix.c
23
static long prefix_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp);
crypto/openssl/crypto/bio/bf_readbuff.c
211
static long readbuffer_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
crypto/openssl/crypto/bio/bf_readbuff.c
215
return BIO_callback_ctrl(b->next_bio, cmd, fp);
crypto/openssl/crypto/bio/bf_readbuff.c
31
static long readbuffer_callback_ctrl(BIO *h, int cmd, BIO_info_cb *fp);
crypto/openssl/crypto/bio/bio_dump.c
100
static int write_fp(const void *data, size_t len, void *fp)
crypto/openssl/crypto/bio/bio_dump.c
102
return UP_fwrite(data, len, 1, fp);
crypto/openssl/crypto/bio/bio_dump.c
105
int BIO_dump_fp(FILE *fp, const void *s, int len)
crypto/openssl/crypto/bio/bio_dump.c
107
return BIO_dump_cb(write_fp, fp, s, len);
crypto/openssl/crypto/bio/bio_dump.c
110
int BIO_dump_indent_fp(FILE *fp, const void *s, int len, int indent)
crypto/openssl/crypto/bio/bio_dump.c
112
return BIO_dump_indent_cb(write_fp, fp, s, len, indent);
crypto/openssl/crypto/bio/bio_lib.c
682
long BIO_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
crypto/openssl/crypto/bio/bio_lib.c
695
ret = bio_call_callback(b, BIO_CB_CTRL, (void *)&fp, 0, cmd, 0, 1L,
crypto/openssl/crypto/bio/bio_lib.c
701
ret = b->method->callback_ctrl(b, cmd, fp);
crypto/openssl/crypto/bio/bio_lib.c
704
ret = bio_call_callback(b, BIO_CB_CTRL | BIO_CB_RETURN, (void *)&fp, 0,
crypto/openssl/crypto/bio/bss_conn.c
718
static long conn_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
crypto/openssl/crypto/bio/bss_conn.c
727
data->info_callback = fp;
crypto/openssl/crypto/bio/bss_file.c
182
FILE *fp = (FILE *)b->ptr;
crypto/openssl/crypto/bio/bss_file.c
193
ret = (long)fseek(fp, num, 0);
crypto/openssl/crypto/bio/bss_file.c
197
ret = (long)UP_feof(fp);
crypto/openssl/crypto/bio/bss_file.c
199
ret = (long)feof(fp);
crypto/openssl/crypto/bio/bss_file.c
210
if (GetFileType((HANDLE)_get_osfhandle(_fileno(fp))) != FILE_TYPE_DISK)
crypto/openssl/crypto/bio/bss_file.c
213
ret = ftell(fp);
crypto/openssl/crypto/bio/bss_file.c
215
ret = ftell(fp);
crypto/openssl/crypto/bio/bss_file.c
297
fp = openssl_fopen(ptr, p);
crypto/openssl/crypto/bio/bss_file.c
298
if (fp == NULL) {
crypto/openssl/crypto/bio/bss_file.c
306
b->ptr = fp;
crypto/openssl/crypto/bn/bn_ctx.c
207
unsigned int fp = BN_STACK_pop(&ctx->stack);
crypto/openssl/crypto/bn/bn_ctx.c
209
if (fp < ctx->used)
crypto/openssl/crypto/bn/bn_ctx.c
210
BN_POOL_release(&ctx->pool, ctx->used - fp);
crypto/openssl/crypto/bn/bn_ctx.c
211
ctx->used = fp;
crypto/openssl/crypto/bn/bn_print.c
17
int BN_print_fp(FILE *fp, const BIGNUM *a)
crypto/openssl/crypto/bn/bn_print.c
24
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/openssl/crypto/comp/c_brotli.c
411
static long bio_brotli_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp);
crypto/openssl/crypto/comp/c_brotli.c
791
static long bio_brotli_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
crypto/openssl/crypto/comp/c_brotli.c
796
return BIO_callback_ctrl(next, cmd, fp);
crypto/openssl/crypto/comp/c_zlib.c
366
static long bio_zlib_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp);
crypto/openssl/crypto/comp/c_zlib.c
712
static long bio_zlib_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
crypto/openssl/crypto/comp/c_zlib.c
718
return BIO_callback_ctrl(next, cmd, fp);
crypto/openssl/crypto/comp/c_zstd.c
476
static long bio_zstd_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp);
crypto/openssl/crypto/comp/c_zstd.c
839
static long bio_zstd_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
crypto/openssl/crypto/comp/c_zstd.c
844
return BIO_callback_ctrl(next, cmd, fp);
crypto/openssl/crypto/conf/conf_lib.c
262
int NCONF_load_fp(CONF *conf, FILE *fp, long *eline)
crypto/openssl/crypto/conf/conf_lib.c
266
if ((btmp = BIO_new_fp(fp, BIO_NOCLOSE)) == NULL) {
crypto/openssl/crypto/conf/conf_lib.c
69
LHASH_OF(CONF_VALUE) *CONF_load_fp(LHASH_OF(CONF_VALUE) *conf, FILE *fp,
crypto/openssl/crypto/conf/conf_lib.c
74
if ((btmp = BIO_new_fp(fp, BIO_NOCLOSE)) == NULL) {
crypto/openssl/crypto/dh/dh_prn.c
22
int DHparams_print_fp(FILE *fp, const DH *x)
crypto/openssl/crypto/dh/dh_prn.c
31
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/openssl/crypto/dsa/dsa_prn.c
22
int DSA_print_fp(FILE *fp, const DSA *x, int off)
crypto/openssl/crypto/dsa/dsa_prn.c
31
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/openssl/crypto/dsa/dsa_prn.c
37
int DSAparams_print_fp(FILE *fp, const DSA *x)
crypto/openssl/crypto/dsa/dsa_prn.c
46
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/openssl/crypto/ec/eck_prn.c
21
int ECPKParameters_print_fp(FILE *fp, const EC_GROUP *x, int off)
crypto/openssl/crypto/ec/eck_prn.c
223
static int print_bin(BIO *fp, const char *name, const unsigned char *buf,
crypto/openssl/crypto/ec/eck_prn.c
235
if (BIO_write(fp, str, off) <= 0)
crypto/openssl/crypto/ec/eck_prn.c
241
if (BIO_printf(fp, "%s", name) <= 0)
crypto/openssl/crypto/ec/eck_prn.c
248
if (BIO_write(fp, str, off + 1 + 4) <= 0)
crypto/openssl/crypto/ec/eck_prn.c
251
if (BIO_printf(fp, "%02x%s", buf[i], ((i + 1) == len) ? "" : ":") <= 0)
crypto/openssl/crypto/ec/eck_prn.c
254
if (BIO_write(fp, "\n", 1) <= 0)
crypto/openssl/crypto/ec/eck_prn.c
30
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/openssl/crypto/ec/eck_prn.c
36
int EC_KEY_print_fp(FILE *fp, const EC_KEY *x, int off)
crypto/openssl/crypto/ec/eck_prn.c
45
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/openssl/crypto/ec/eck_prn.c
51
int ECParameters_print_fp(FILE *fp, const EC_KEY *x)
crypto/openssl/crypto/ec/eck_prn.c
60
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/openssl/crypto/ec/eck_prn.c
67
static int print_bin(BIO *fp, const char *str, const unsigned char *num,
crypto/openssl/crypto/encode_decode/decoder_lib.c
122
static BIO *bio_from_file(FILE *fp)
crypto/openssl/crypto/encode_decode/decoder_lib.c
130
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/openssl/crypto/encode_decode/decoder_lib.c
134
int OSSL_DECODER_from_fp(OSSL_DECODER_CTX *ctx, FILE *fp)
crypto/openssl/crypto/encode_decode/decoder_lib.c
136
BIO *b = bio_from_file(fp);
crypto/openssl/crypto/encode_decode/encoder_lib.c
102
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/openssl/crypto/encode_decode/encoder_lib.c
106
int OSSL_ENCODER_to_fp(OSSL_ENCODER_CTX *ctx, FILE *fp)
crypto/openssl/crypto/encode_decode/encoder_lib.c
108
BIO *b = bio_from_file(fp);
crypto/openssl/crypto/encode_decode/encoder_lib.c
94
static BIO *bio_from_file(FILE *fp)
crypto/openssl/crypto/err/err_prn.c
177
void ERR_print_errors_fp(FILE *fp)
crypto/openssl/crypto/err/err_prn.c
179
BIO *bio = BIO_new_fp(fp, BIO_NOCLOSE);
crypto/openssl/crypto/evp/bio_b64.c
23
static long b64_callback_ctrl(BIO *h, int cmd, BIO_info_cb *fp);
crypto/openssl/crypto/evp/bio_b64.c
518
static long b64_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
crypto/openssl/crypto/evp/bio_b64.c
525
return BIO_callback_ctrl(next, cmd, fp);
crypto/openssl/crypto/evp/bio_enc.c
400
static long enc_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
crypto/openssl/crypto/evp/bio_enc.c
407
return BIO_callback_ctrl(next, cmd, fp);
crypto/openssl/crypto/evp/bio_md.c
196
static long md_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
crypto/openssl/crypto/evp/bio_md.c
205
return BIO_callback_ctrl(next, cmd, fp);
crypto/openssl/crypto/evp/bio_md.c
26
static long md_callback_ctrl(BIO *h, int cmd, BIO_info_cb *fp);
crypto/openssl/crypto/evp/bio_ok.c
404
static long ok_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
crypto/openssl/crypto/evp/bio_ok.c
413
return BIO_callback_ctrl(next, cmd, fp);
crypto/openssl/crypto/evp/bio_ok.c
88
static long ok_callback_ctrl(BIO *h, int cmd, BIO_info_cb *fp);
crypto/openssl/crypto/evp/p_lib.c
1267
int EVP_PKEY_print_public_fp(FILE *fp, const EVP_PKEY *pkey,
crypto/openssl/crypto/evp/p_lib.c
1271
BIO *b = BIO_new_fp(fp, BIO_NOCLOSE);
crypto/openssl/crypto/evp/p_lib.c
1280
int EVP_PKEY_print_private_fp(FILE *fp, const EVP_PKEY *pkey,
crypto/openssl/crypto/evp/p_lib.c
1284
BIO *b = BIO_new_fp(fp, BIO_NOCLOSE);
crypto/openssl/crypto/evp/p_lib.c
1293
int EVP_PKEY_print_params_fp(FILE *fp, const EVP_PKEY *pkey,
crypto/openssl/crypto/evp/p_lib.c
1297
BIO *b = BIO_new_fp(fp, BIO_NOCLOSE);
crypto/openssl/crypto/http/http_client.c
287
FILE *fp = NULL;
crypto/openssl/crypto/http/http_client.c
323
if (BIO_get_fp(req, &fp) == 1 && fseek(fp, 0, SEEK_END) == 0) {
crypto/openssl/crypto/http/http_client.c
324
req_len = ftell(fp);
crypto/openssl/crypto/http/http_client.c
325
(void)fseek(fp, 0, SEEK_SET);
crypto/openssl/crypto/http/http_client.c
327
fp = NULL;
crypto/openssl/crypto/http/http_client.c
339
fp != NULL /* definitely correct req_len */ ||
crypto/openssl/crypto/idea/i_skey.c
64
register IDEA_INT *fp, *tp, t;
crypto/openssl/crypto/idea/i_skey.c
67
fp = &(ek->data[8][0]);
crypto/openssl/crypto/idea/i_skey.c
69
*(tp++) = inverse(fp[0]);
crypto/openssl/crypto/idea/i_skey.c
70
*(tp++) = ((int)(0x10000L - fp[2]) & 0xffff);
crypto/openssl/crypto/idea/i_skey.c
71
*(tp++) = ((int)(0x10000L - fp[1]) & 0xffff);
crypto/openssl/crypto/idea/i_skey.c
72
*(tp++) = inverse(fp[3]);
crypto/openssl/crypto/idea/i_skey.c
75
fp -= 6;
crypto/openssl/crypto/idea/i_skey.c
76
*(tp++) = fp[4];
crypto/openssl/crypto/idea/i_skey.c
77
*(tp++) = fp[5];
crypto/openssl/crypto/lhash/lh_stats.c
27
void OPENSSL_LH_stats(const OPENSSL_LHASH *lh, FILE *fp)
crypto/openssl/crypto/lhash/lh_stats.c
34
BIO_set_fp(bp, fp, BIO_NOCLOSE);
crypto/openssl/crypto/lhash/lh_stats.c
39
void OPENSSL_LH_node_stats(const OPENSSL_LHASH *lh, FILE *fp)
crypto/openssl/crypto/lhash/lh_stats.c
46
BIO_set_fp(bp, fp, BIO_NOCLOSE);
crypto/openssl/crypto/lhash/lh_stats.c
51
void OPENSSL_LH_node_usage_stats(const OPENSSL_LHASH *lh, FILE *fp)
crypto/openssl/crypto/lhash/lh_stats.c
58
BIO_set_fp(bp, fp, BIO_NOCLOSE);
crypto/openssl/crypto/mem.c
432
int CRYPTO_mem_leaks_fp(FILE *fp)
crypto/openssl/crypto/mem.c
434
(void)fp;
crypto/openssl/crypto/pem/pem_all.c
120
DSA *PEM_read_DSAPrivateKey(FILE *fp, DSA **dsa, pem_password_cb *cb, void *u)
crypto/openssl/crypto/pem/pem_all.c
123
pktmp = PEM_read_PrivateKey(fp, NULL, cb, u);
crypto/openssl/crypto/pem/pem_all.c
165
EC_KEY *PEM_read_ECPrivateKey(FILE *fp, EC_KEY **eckey, pem_password_cb *cb,
crypto/openssl/crypto/pem/pem_all.c
169
pktmp = PEM_read_PrivateKey(fp, NULL, cb, u);
crypto/openssl/crypto/pem/pem_all.c
208
DH *PEM_read_DHparams(FILE *fp, DH **x, pem_password_cb *cb, void *u)
crypto/openssl/crypto/pem/pem_all.c
217
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/openssl/crypto/pem/pem_all.c
79
RSA *PEM_read_RSAPrivateKey(FILE *fp, RSA **rsa, pem_password_cb *cb, void *u)
crypto/openssl/crypto/pem/pem_all.c
82
pktmp = PEM_read_PrivateKey(fp, NULL, cb, u);
crypto/openssl/crypto/pem/pem_info.c
29
*PEM_X509_INFO_read_ex(FILE *fp, STACK_OF(X509_INFO) *sk, pem_password_cb *cb,
crypto/openssl/crypto/pem/pem_info.c
39
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/openssl/crypto/pem/pem_info.c
45
STACK_OF(X509_INFO) *PEM_X509_INFO_read(FILE *fp, STACK_OF(X509_INFO) *sk,
crypto/openssl/crypto/pem/pem_info.c
48
return PEM_X509_INFO_read_ex(fp, sk, cb, u, NULL, NULL);
crypto/openssl/crypto/pem/pem_lib.c
109
void *PEM_ASN1_read(d2i_of_void *d2i, const char *name, FILE *fp, void **x,
crypto/openssl/crypto/pem/pem_lib.c
119
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/openssl/crypto/pem/pem_lib.c
301
int PEM_ASN1_write(i2d_of_void *i2d, const char *name, FILE *fp,
crypto/openssl/crypto/pem/pem_lib.c
313
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/openssl/crypto/pem/pem_lib.c
616
int PEM_write(FILE *fp, const char *name, const char *header,
crypto/openssl/crypto/pem/pem_lib.c
626
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/openssl/crypto/pem/pem_lib.c
702
int PEM_read(FILE *fp, char **name, char **header, unsigned char **data,
crypto/openssl/crypto/pem/pem_lib.c
712
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/openssl/crypto/pem/pem_local.h
139
IMPLEMENT_PEM_provided_write_to(name, TYPE, type, str, asn1, FILE, fp, write)
crypto/openssl/crypto/pem/pem_local.h
141
IMPLEMENT_PEM_provided_write_cb_to(name, TYPE, type, str, asn1, FILE, fp, write)
crypto/openssl/crypto/pem/pem_pk8.c
207
int i2d_PKCS8PrivateKey_fp(FILE *fp, const EVP_PKEY *x, const EVP_CIPHER *enc,
crypto/openssl/crypto/pem/pem_pk8.c
211
return do_pk8pkey_fp(fp, x, 1, -1, enc, kstr, klen, cb, u, NULL);
crypto/openssl/crypto/pem/pem_pk8.c
214
int i2d_PKCS8PrivateKey_nid_fp(FILE *fp, const EVP_PKEY *x, int nid,
crypto/openssl/crypto/pem/pem_pk8.c
218
return do_pk8pkey_fp(fp, x, 1, nid, NULL, kstr, klen, cb, u, NULL);
crypto/openssl/crypto/pem/pem_pk8.c
221
int PEM_write_PKCS8PrivateKey_nid(FILE *fp, const EVP_PKEY *x, int nid,
crypto/openssl/crypto/pem/pem_pk8.c
225
return do_pk8pkey_fp(fp, x, 0, nid, NULL, kstr, klen, cb, u, NULL);
crypto/openssl/crypto/pem/pem_pk8.c
228
int PEM_write_PKCS8PrivateKey(FILE *fp, const EVP_PKEY *x, const EVP_CIPHER *enc,
crypto/openssl/crypto/pem/pem_pk8.c
232
return do_pk8pkey_fp(fp, x, 0, -1, enc, kstr, klen, cb, u, NULL);
crypto/openssl/crypto/pem/pem_pk8.c
235
static int do_pk8pkey_fp(FILE *fp, const EVP_PKEY *x, int isder, int nid,
crypto/openssl/crypto/pem/pem_pk8.c
242
if ((bp = BIO_new_fp(fp, BIO_NOCLOSE)) == NULL) {
crypto/openssl/crypto/pem/pem_pk8.c
251
EVP_PKEY *d2i_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY **x, pem_password_cb *cb,
crypto/openssl/crypto/pem/pem_pk8.c
257
if ((bp = BIO_new_fp(fp, BIO_NOCLOSE)) == NULL) {
crypto/openssl/crypto/pem/pem_pkey.c
278
EVP_PKEY *PEM_read_PUBKEY_ex(FILE *fp, EVP_PKEY **x,
crypto/openssl/crypto/pem/pem_pkey.c
289
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/openssl/crypto/pem/pem_pkey.c
295
EVP_PKEY *PEM_read_PUBKEY(FILE *fp, EVP_PKEY **x, pem_password_cb *cb, void *u)
crypto/openssl/crypto/pem/pem_pkey.c
297
return PEM_read_PUBKEY_ex(fp, x, cb, u, NULL, NULL);
crypto/openssl/crypto/pem/pem_pkey.c
408
EVP_PKEY *PEM_read_PrivateKey_ex(FILE *fp, EVP_PKEY **x, pem_password_cb *cb,
crypto/openssl/crypto/pem/pem_pkey.c
419
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/openssl/crypto/pem/pem_pkey.c
425
EVP_PKEY *PEM_read_PrivateKey(FILE *fp, EVP_PKEY **x, pem_password_cb *cb,
crypto/openssl/crypto/pem/pem_pkey.c
428
return PEM_read_PrivateKey_ex(fp, x, cb, u, NULL, NULL);
crypto/openssl/crypto/pkcs12/p12_utl.c
241
int i2d_PKCS12_fp(FILE *fp, const PKCS12 *p12)
crypto/openssl/crypto/pkcs12/p12_utl.c
243
return ASN1_item_i2d_fp(ASN1_ITEM_rptr(PKCS12), fp, p12);
crypto/openssl/crypto/pkcs12/p12_utl.c
264
PKCS12 *d2i_PKCS12_fp(FILE *fp, PKCS12 **p12)
crypto/openssl/crypto/pkcs12/p12_utl.c
277
return ASN1_item_d2i_fp_ex(ASN1_ITEM_rptr(PKCS12), fp, p12, libctx, propq);
crypto/openssl/crypto/rand/rand_egd.c
109
FILE *fp = NULL;
crypto/openssl/crypto/rand/rand_egd.c
177
fp = fdopen(fd, "r+");
crypto/openssl/crypto/rand/rand_egd.c
178
if (fp == NULL) {
crypto/openssl/crypto/rand/rand_egd.c
182
setbuf(fp, NULL);
crypto/openssl/crypto/rand/rand_egd.c
187
if (fwrite(tempbuf, sizeof(char), 2, fp) != 2 || fflush(fp) == EOF)
crypto/openssl/crypto/rand/rand_egd.c
189
if (fread(tempbuf, sizeof(char), 1, fp) != 1 || tempbuf[0] == 0)
crypto/openssl/crypto/rand/rand_egd.c
202
i = fread(buf, sizeof(char), numbytes, fp);
crypto/openssl/crypto/rand/rand_egd.c
210
if (fp != NULL)
crypto/openssl/crypto/rand/rand_egd.c
211
fclose(fp);
crypto/openssl/crypto/rsa/rsa_prn.c
22
int RSA_print_fp(FILE *fp, const RSA *x, int off)
crypto/openssl/crypto/rsa/rsa_prn.c
31
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/openssl/crypto/ts/ts_asn1.c
112
TS_TST_INFO *d2i_TS_TST_INFO_fp(FILE *fp, TS_TST_INFO **a)
crypto/openssl/crypto/ts/ts_asn1.c
114
return ASN1_d2i_fp_of(TS_TST_INFO, TS_TST_INFO_new, d2i_TS_TST_INFO, fp,
crypto/openssl/crypto/ts/ts_asn1.c
118
int i2d_TS_TST_INFO_fp(FILE *fp, const TS_TST_INFO *a)
crypto/openssl/crypto/ts/ts_asn1.c
120
return ASN1_i2d_fp_of(TS_TST_INFO, i2d_TS_TST_INFO, fp, a);
crypto/openssl/crypto/ts/ts_asn1.c
192
TS_RESP *d2i_TS_RESP_fp(FILE *fp, TS_RESP **a)
crypto/openssl/crypto/ts/ts_asn1.c
194
return ASN1_d2i_fp_of(TS_RESP, TS_RESP_new, d2i_TS_RESP, fp, a);
crypto/openssl/crypto/ts/ts_asn1.c
197
int i2d_TS_RESP_fp(FILE *fp, const TS_RESP *a)
crypto/openssl/crypto/ts/ts_asn1.c
199
return ASN1_i2d_fp_of(TS_RESP, i2d_TS_RESP, fp, a);
crypto/openssl/crypto/ts/ts_asn1.c
33
TS_MSG_IMPRINT *d2i_TS_MSG_IMPRINT_fp(FILE *fp, TS_MSG_IMPRINT **a)
crypto/openssl/crypto/ts/ts_asn1.c
36
d2i_TS_MSG_IMPRINT, fp, a);
crypto/openssl/crypto/ts/ts_asn1.c
39
int i2d_TS_MSG_IMPRINT_fp(FILE *fp, const TS_MSG_IMPRINT *a)
crypto/openssl/crypto/ts/ts_asn1.c
41
return ASN1_i2d_fp_of(TS_MSG_IMPRINT, i2d_TS_MSG_IMPRINT, fp, a);
crypto/openssl/crypto/ts/ts_asn1.c
66
TS_REQ *d2i_TS_REQ_fp(FILE *fp, TS_REQ **a)
crypto/openssl/crypto/ts/ts_asn1.c
68
return ASN1_d2i_fp_of(TS_REQ, TS_REQ_new, d2i_TS_REQ, fp, a);
crypto/openssl/crypto/ts/ts_asn1.c
71
int i2d_TS_REQ_fp(FILE *fp, const TS_REQ *a)
crypto/openssl/crypto/ts/ts_asn1.c
73
return ASN1_i2d_fp_of(TS_REQ, i2d_TS_REQ, fp, a);
crypto/openssl/crypto/x509/t_crl.c
19
int X509_CRL_print_fp(FILE *fp, X509_CRL *x)
crypto/openssl/crypto/x509/t_crl.c
28
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/openssl/crypto/x509/t_req.c
21
int X509_REQ_print_fp(FILE *fp, X509_REQ *x)
crypto/openssl/crypto/x509/t_req.c
30
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/openssl/crypto/x509/t_x509.c
26
int X509_print_fp(FILE *fp, X509 *x)
crypto/openssl/crypto/x509/t_x509.c
28
return X509_print_ex_fp(fp, x, XN_FLAG_COMPAT, X509_FLAG_COMPAT);
crypto/openssl/crypto/x509/t_x509.c
31
int X509_print_ex_fp(FILE *fp, X509 *x, unsigned long nmflag,
crypto/openssl/crypto/x509/t_x509.c
41
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/openssl/crypto/x509/v3_addr.c
1281
IPAddressFamily *fp = sk_IPAddressFamily_value(x->rfc3779_addr, k);
crypto/openssl/crypto/x509/v3_addr.c
1283
if (fp == NULL) {
crypto/openssl/crypto/x509/v3_addr.c
1291
if (!IPAddressFamily_check_len(fc) || !IPAddressFamily_check_len(fp))
crypto/openssl/crypto/x509/v3_addr.c
1294
if (fp->ipAddressChoice->type == IPAddressChoice_addressesOrRanges) {
crypto/openssl/crypto/x509/v3_addr.c
1296
|| addr_contains(fp->ipAddressChoice->u.addressesOrRanges,
crypto/openssl/crypto/x509/v3_addr.c
1299
(void)sk_IPAddressFamily_set(child, j, fp);
crypto/openssl/crypto/x509/v3_addr.c
1311
IPAddressFamily *fp = sk_IPAddressFamily_value(x->rfc3779_addr, j);
crypto/openssl/crypto/x509/v3_addr.c
1313
if (!IPAddressFamily_check_len(fp))
crypto/openssl/crypto/x509/v3_addr.c
1316
if (fp->ipAddressChoice->type == IPAddressChoice_inherit
crypto/openssl/crypto/x509/v3_addr.c
1317
&& sk_IPAddressFamily_find(child, fp) >= 0)
crypto/openssl/crypto/x509/v3_prn.c
204
int X509V3_EXT_print_fp(FILE *fp, X509_EXTENSION *ext, int flag, int indent)
crypto/openssl/crypto/x509/v3_prn.c
209
if ((bio_tmp = BIO_new_fp(fp, BIO_NOCLOSE)) == NULL)
crypto/openssl/crypto/x509/x_all.c
216
X509 *d2i_X509_fp(FILE *fp, X509 **x509)
crypto/openssl/crypto/x509/x_all.c
218
return ASN1_item_d2i_fp(ASN1_ITEM_rptr(X509), fp, x509);
crypto/openssl/crypto/x509/x_all.c
221
int i2d_X509_fp(FILE *fp, const X509 *x509)
crypto/openssl/crypto/x509/x_all.c
223
return ASN1_item_i2d_fp(ASN1_ITEM_rptr(X509), fp, x509);
crypto/openssl/crypto/x509/x_all.c
238
X509_CRL *d2i_X509_CRL_fp(FILE *fp, X509_CRL **crl)
crypto/openssl/crypto/x509/x_all.c
240
return ASN1_item_d2i_fp(ASN1_ITEM_rptr(X509_CRL), fp, crl);
crypto/openssl/crypto/x509/x_all.c
243
int i2d_X509_CRL_fp(FILE *fp, const X509_CRL *crl)
crypto/openssl/crypto/x509/x_all.c
245
return ASN1_item_i2d_fp(ASN1_ITEM_rptr(X509_CRL), fp, crl);
crypto/openssl/crypto/x509/x_all.c
260
PKCS7 *d2i_PKCS7_fp(FILE *fp, PKCS7 **p7)
crypto/openssl/crypto/x509/x_all.c
271
ret = ASN1_item_d2i_fp_ex(ASN1_ITEM_rptr(PKCS7), fp, p7, libctx, propq);
crypto/openssl/crypto/x509/x_all.c
277
int i2d_PKCS7_fp(FILE *fp, const PKCS7 *p7)
crypto/openssl/crypto/x509/x_all.c
279
return ASN1_item_i2d_fp(ASN1_ITEM_rptr(PKCS7), fp, p7);
crypto/openssl/crypto/x509/x_all.c
306
X509_REQ *d2i_X509_REQ_fp(FILE *fp, X509_REQ **req)
crypto/openssl/crypto/x509/x_all.c
308
return ASN1_item_d2i_fp(ASN1_ITEM_rptr(X509_REQ), fp, req);
crypto/openssl/crypto/x509/x_all.c
311
int i2d_X509_REQ_fp(FILE *fp, const X509_REQ *req)
crypto/openssl/crypto/x509/x_all.c
313
return ASN1_item_i2d_fp(ASN1_ITEM_rptr(X509_REQ), fp, req);
crypto/openssl/crypto/x509/x_all.c
336
RSA *d2i_RSAPrivateKey_fp(FILE *fp, RSA **rsa)
crypto/openssl/crypto/x509/x_all.c
338
return ASN1_item_d2i_fp(ASN1_ITEM_rptr(RSAPrivateKey), fp, rsa);
crypto/openssl/crypto/x509/x_all.c
341
int i2d_RSAPrivateKey_fp(FILE *fp, const RSA *rsa)
crypto/openssl/crypto/x509/x_all.c
343
return ASN1_item_i2d_fp(ASN1_ITEM_rptr(RSAPrivateKey), fp, rsa);
crypto/openssl/crypto/x509/x_all.c
346
RSA *d2i_RSAPublicKey_fp(FILE *fp, RSA **rsa)
crypto/openssl/crypto/x509/x_all.c
348
return ASN1_item_d2i_fp(ASN1_ITEM_rptr(RSAPublicKey), fp, rsa);
crypto/openssl/crypto/x509/x_all.c
351
RSA *d2i_RSA_PUBKEY_fp(FILE *fp, RSA **rsa)
crypto/openssl/crypto/x509/x_all.c
355
(D2I_OF(void))d2i_RSA_PUBKEY, fp,
crypto/openssl/crypto/x509/x_all.c
359
int i2d_RSAPublicKey_fp(FILE *fp, const RSA *rsa)
crypto/openssl/crypto/x509/x_all.c
361
return ASN1_item_i2d_fp(ASN1_ITEM_rptr(RSAPublicKey), fp, rsa);
crypto/openssl/crypto/x509/x_all.c
364
int i2d_RSA_PUBKEY_fp(FILE *fp, const RSA *rsa)
crypto/openssl/crypto/x509/x_all.c
366
return ASN1_i2d_fp((I2D_OF(void))i2d_RSA_PUBKEY, fp, rsa);
crypto/openssl/crypto/x509/x_all.c
402
DSA *d2i_DSAPrivateKey_fp(FILE *fp, DSA **dsa)
crypto/openssl/crypto/x509/x_all.c
404
return ASN1_d2i_fp_of(DSA, DSA_new, d2i_DSAPrivateKey, fp, dsa);
crypto/openssl/crypto/x509/x_all.c
407
int i2d_DSAPrivateKey_fp(FILE *fp, const DSA *dsa)
crypto/openssl/crypto/x509/x_all.c
409
return ASN1_i2d_fp_of(DSA, i2d_DSAPrivateKey, fp, dsa);
crypto/openssl/crypto/x509/x_all.c
412
DSA *d2i_DSA_PUBKEY_fp(FILE *fp, DSA **dsa)
crypto/openssl/crypto/x509/x_all.c
414
return ASN1_d2i_fp_of(DSA, DSA_new, d2i_DSA_PUBKEY, fp, dsa);
crypto/openssl/crypto/x509/x_all.c
417
int i2d_DSA_PUBKEY_fp(FILE *fp, const DSA *dsa)
crypto/openssl/crypto/x509/x_all.c
419
return ASN1_i2d_fp_of(DSA, i2d_DSA_PUBKEY, fp, dsa);
crypto/openssl/crypto/x509/x_all.c
447
EC_KEY *d2i_EC_PUBKEY_fp(FILE *fp, EC_KEY **eckey)
crypto/openssl/crypto/x509/x_all.c
449
return ASN1_d2i_fp_of(EC_KEY, EC_KEY_new, d2i_EC_PUBKEY, fp, eckey);
crypto/openssl/crypto/x509/x_all.c
452
int i2d_EC_PUBKEY_fp(FILE *fp, const EC_KEY *eckey)
crypto/openssl/crypto/x509/x_all.c
454
return ASN1_i2d_fp_of(EC_KEY, i2d_EC_PUBKEY, fp, eckey);
crypto/openssl/crypto/x509/x_all.c
457
EC_KEY *d2i_ECPrivateKey_fp(FILE *fp, EC_KEY **eckey)
crypto/openssl/crypto/x509/x_all.c
459
return ASN1_d2i_fp_of(EC_KEY, EC_KEY_new, d2i_ECPrivateKey, fp, eckey);
crypto/openssl/crypto/x509/x_all.c
462
int i2d_ECPrivateKey_fp(FILE *fp, const EC_KEY *eckey)
crypto/openssl/crypto/x509/x_all.c
464
return ASN1_i2d_fp_of(EC_KEY, i2d_ECPrivateKey, fp, eckey);
crypto/openssl/crypto/x509/x_all.c
651
X509_SIG *d2i_PKCS8_fp(FILE *fp, X509_SIG **p8)
crypto/openssl/crypto/x509/x_all.c
653
return ASN1_d2i_fp_of(X509_SIG, X509_SIG_new, d2i_X509_SIG, fp, p8);
crypto/openssl/crypto/x509/x_all.c
656
int i2d_PKCS8_fp(FILE *fp, const X509_SIG *p8)
crypto/openssl/crypto/x509/x_all.c
658
return ASN1_i2d_fp_of(X509_SIG, i2d_X509_SIG, fp, p8);
crypto/openssl/crypto/x509/x_all.c
673
X509_PUBKEY *d2i_X509_PUBKEY_fp(FILE *fp, X509_PUBKEY **xpk)
crypto/openssl/crypto/x509/x_all.c
676
fp, xpk);
crypto/openssl/crypto/x509/x_all.c
679
int i2d_X509_PUBKEY_fp(FILE *fp, const X509_PUBKEY *xpk)
crypto/openssl/crypto/x509/x_all.c
681
return ASN1_i2d_fp_of(X509_PUBKEY, i2d_X509_PUBKEY, fp, xpk);
crypto/openssl/crypto/x509/x_all.c
697
PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_fp(FILE *fp,
crypto/openssl/crypto/x509/x_all.c
701
d2i_PKCS8_PRIV_KEY_INFO, fp, p8inf);
crypto/openssl/crypto/x509/x_all.c
704
int i2d_PKCS8_PRIV_KEY_INFO_fp(FILE *fp, const PKCS8_PRIV_KEY_INFO *p8inf)
crypto/openssl/crypto/x509/x_all.c
706
return ASN1_i2d_fp_of(PKCS8_PRIV_KEY_INFO, i2d_PKCS8_PRIV_KEY_INFO, fp,
crypto/openssl/crypto/x509/x_all.c
710
int i2d_PKCS8PrivateKeyInfo_fp(FILE *fp, const EVP_PKEY *key)
crypto/openssl/crypto/x509/x_all.c
718
ret = i2d_PKCS8_PRIV_KEY_INFO_fp(fp, p8inf);
crypto/openssl/crypto/x509/x_all.c
723
int i2d_PrivateKey_fp(FILE *fp, const EVP_PKEY *pkey)
crypto/openssl/crypto/x509/x_all.c
725
return ASN1_i2d_fp_of(EVP_PKEY, i2d_PrivateKey, fp, pkey);
crypto/openssl/crypto/x509/x_all.c
728
EVP_PKEY *d2i_PrivateKey_fp(FILE *fp, EVP_PKEY **a)
crypto/openssl/crypto/x509/x_all.c
730
return ASN1_d2i_fp_of(EVP_PKEY, EVP_PKEY_new, d2i_AutoPrivateKey, fp, a);
crypto/openssl/crypto/x509/x_all.c
733
EVP_PKEY *d2i_PrivateKey_ex_fp(FILE *fp, EVP_PKEY **a, OSSL_LIB_CTX *libctx,
crypto/openssl/crypto/x509/x_all.c
743
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/openssl/crypto/x509/x_all.c
749
int i2d_PUBKEY_fp(FILE *fp, const EVP_PKEY *pkey)
crypto/openssl/crypto/x509/x_all.c
751
return ASN1_i2d_fp_of(EVP_PKEY, i2d_PUBKEY, fp, pkey);
crypto/openssl/crypto/x509/x_all.c
754
EVP_PKEY *d2i_PUBKEY_ex_fp(FILE *fp, EVP_PKEY **a, OSSL_LIB_CTX *libctx,
crypto/openssl/crypto/x509/x_all.c
764
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/openssl/crypto/x509/x_all.c
770
EVP_PKEY *d2i_PUBKEY_fp(FILE *fp, EVP_PKEY **a)
crypto/openssl/crypto/x509/x_all.c
772
return ASN1_d2i_fp_of(EVP_PKEY, EVP_PKEY_new, d2i_PUBKEY, fp, a);
crypto/openssl/crypto/x509/x_all.c
862
X509_ACERT *d2i_X509_ACERT_fp(FILE *fp, X509_ACERT **acert)
crypto/openssl/crypto/x509/x_all.c
864
return ASN1_item_d2i_fp(ASN1_ITEM_rptr(X509_ACERT), fp, acert);
crypto/openssl/crypto/x509/x_all.c
867
int i2d_X509_ACERT_fp(FILE *fp, const X509_ACERT *acert)
crypto/openssl/crypto/x509/x_all.c
869
return ASN1_item_i2d_fp(ASN1_ITEM_rptr(X509_ACERT), fp, acert);
crypto/openssl/demos/pkcs12/pkread.c
100
fclose(fp);
crypto/openssl/demos/pkcs12/pkread.c
50
FILE *fp;
crypto/openssl/demos/pkcs12/pkread.c
63
if ((fp = fopen(argv[1], "rb")) == NULL) {
crypto/openssl/demos/pkcs12/pkread.c
67
p12 = d2i_PKCS12_fp(fp, NULL);
crypto/openssl/demos/pkcs12/pkread.c
68
fclose(fp);
crypto/openssl/demos/pkcs12/pkread.c
81
if ((fp = fopen(argv[3], "w")) == NULL) {
crypto/openssl/demos/pkcs12/pkread.c
86
fprintf(fp, "***Friendly Name***\n%s\n", name);
crypto/openssl/demos/pkcs12/pkread.c
88
fprintf(fp, "***Private Key***\n");
crypto/openssl/demos/pkcs12/pkread.c
89
PEM_write_PrivateKey(fp, pkey, NULL, NULL, 0, NULL, NULL);
crypto/openssl/demos/pkcs12/pkread.c
92
fprintf(fp, "***User Certificate***\n");
crypto/openssl/demos/pkcs12/pkread.c
93
PEM_write_X509_AUX(fp, cert);
crypto/openssl/demos/pkcs12/pkread.c
96
fprintf(fp, "***Other Certificates***\n");
crypto/openssl/demos/pkcs12/pkread.c
98
PEM_write_X509_AUX(fp, sk_X509_value(ca, i));
crypto/openssl/demos/pkcs12/pkwrite.c
20
FILE *fp;
crypto/openssl/demos/pkcs12/pkwrite.c
30
if ((fp = fopen(argv[1], "r")) == NULL) {
crypto/openssl/demos/pkcs12/pkwrite.c
34
cert = PEM_read_X509(fp, NULL, NULL, NULL);
crypto/openssl/demos/pkcs12/pkwrite.c
35
rewind(fp);
crypto/openssl/demos/pkcs12/pkwrite.c
36
pkey = PEM_read_PrivateKey(fp, NULL, NULL, NULL);
crypto/openssl/demos/pkcs12/pkwrite.c
37
fclose(fp);
crypto/openssl/demos/pkcs12/pkwrite.c
44
if ((fp = fopen(argv[4], "wb")) == NULL) {
crypto/openssl/demos/pkcs12/pkwrite.c
49
i2d_PKCS12_fp(fp, p12);
crypto/openssl/demos/pkcs12/pkwrite.c
51
fclose(fp);
crypto/openssl/include/internal/quic_ssl.h
64
__owur long ossl_quic_callback_ctrl(SSL *s, int cmd, void (*fp)(void));
crypto/openssl/include/internal/quic_ssl.h
65
__owur long ossl_quic_ctx_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp)(void));
crypto/openssl/include/openssl/asn1.h
943
int ASN1_STRING_print_ex_fp(FILE *fp, const ASN1_STRING *str, unsigned long flags);
crypto/openssl/include/openssl/asn1.h
968
int ASN1_UTCTIME_print(BIO *fp, const ASN1_UTCTIME *a);
crypto/openssl/include/openssl/asn1.h
969
int ASN1_GENERALIZEDTIME_print(BIO *fp, const ASN1_GENERALIZEDTIME *a);
crypto/openssl/include/openssl/bio.h
568
#define BIO_set_fp(b, fp, c) BIO_ctrl(b, BIO_C_SET_FILE_PTR, c, (char *)(fp))
crypto/openssl/include/openssl/bio.h
759
long BIO_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp);
crypto/openssl/include/openssl/bio.h
835
int BIO_dump_fp(FILE *fp, const void *s, int len);
crypto/openssl/include/openssl/bio.h
836
int BIO_dump_indent_fp(FILE *fp, const void *s, int len, int indent);
crypto/openssl/include/openssl/bn.h
332
int BN_print_fp(FILE *fp, const BIGNUM *a);
crypto/openssl/include/openssl/conf.h
122
LHASH_OF(CONF_VALUE) *CONF_load_fp(LHASH_OF(CONF_VALUE) *conf, FILE *fp,
crypto/openssl/include/openssl/conf.h
164
int NCONF_load_fp(CONF *conf, FILE *fp, long *eline);
crypto/openssl/include/openssl/dh.h
177
#define d2i_DHparams_fp(fp, x) \
crypto/openssl/include/openssl/dh.h
180
(fp), \
crypto/openssl/include/openssl/dh.h
182
#define i2d_DHparams_fp(fp, x) \
crypto/openssl/include/openssl/dh.h
183
ASN1_i2d_fp(i2d_DHparams, (fp), (unsigned char *)(x))
crypto/openssl/include/openssl/dh.h
189
#define d2i_DHxparams_fp(fp, x) \
crypto/openssl/include/openssl/dh.h
192
(fp), \
crypto/openssl/include/openssl/dh.h
194
#define i2d_DHxparams_fp(fp, x) \
crypto/openssl/include/openssl/dh.h
195
ASN1_i2d_fp(i2d_DHxparams, (fp), (unsigned char *)(x))
crypto/openssl/include/openssl/dh.h
244
OSSL_DEPRECATEDIN_3_0 int DHparams_print_fp(FILE *fp, const DH *x);
crypto/openssl/include/openssl/dsa.h
105
#define d2i_DSAparams_fp(fp, x) \
crypto/openssl/include/openssl/dsa.h
107
(d2i_of_void *)d2i_DSAparams, (fp), \
crypto/openssl/include/openssl/dsa.h
109
#define i2d_DSAparams_fp(fp, x) \
crypto/openssl/include/openssl/dsa.h
110
ASN1_i2d_fp(i2d_DSAparams, (fp), (unsigned char *)(x))
crypto/openssl/include/openssl/dsa.h
183
OSSL_DEPRECATEDIN_3_0 int DSAparams_print_fp(FILE *fp, const DSA *x);
crypto/openssl/include/openssl/ec.h
1279
OSSL_DEPRECATEDIN_3_0 int ECParameters_print_fp(FILE *fp, const EC_KEY *key);
crypto/openssl/include/openssl/ec.h
1287
OSSL_DEPRECATEDIN_3_0 int EC_KEY_print_fp(FILE *fp, const EC_KEY *key, int off);
crypto/openssl/include/openssl/ec.h
930
#define d2i_ECPKParameters_fp(fp, x) \
crypto/openssl/include/openssl/ec.h
931
(EC_GROUP *)ASN1_d2i_fp(NULL, (d2i_of_void *)d2i_ECPKParameters, (fp), \
crypto/openssl/include/openssl/ec.h
933
#define i2d_ECPKParameters_fp(fp, x) \
crypto/openssl/include/openssl/ec.h
934
ASN1_i2d_fp((i2d_of_void *)i2d_ECPKParameters, (fp), (void *)(x))
crypto/openssl/include/openssl/ec.h
940
OSSL_DEPRECATEDIN_3_0 int ECPKParameters_print_fp(FILE *fp, const EC_GROUP *x,
crypto/openssl/include/openssl/encoder.h
105
int OSSL_ENCODER_to_fp(OSSL_ENCODER_CTX *ctx, FILE *fp);
crypto/openssl/include/openssl/err.h
469
void ERR_print_errors_fp(FILE *fp);
crypto/openssl/include/openssl/evp.h
1477
int EVP_PKEY_print_public_fp(FILE *fp, const EVP_PKEY *pkey,
crypto/openssl/include/openssl/evp.h
1479
int EVP_PKEY_print_private_fp(FILE *fp, const EVP_PKEY *pkey,
crypto/openssl/include/openssl/evp.h
1481
int EVP_PKEY_print_params_fp(FILE *fp, const EVP_PKEY *pkey,
crypto/openssl/include/openssl/lhash.h
120
OSSL_DEPRECATEDIN_3_1 void OPENSSL_LH_stats(const OPENSSL_LHASH *lh, FILE *fp);
crypto/openssl/include/openssl/lhash.h
121
OSSL_DEPRECATEDIN_3_1 void OPENSSL_LH_node_stats(const OPENSSL_LHASH *lh, FILE *fp);
crypto/openssl/include/openssl/lhash.h
122
OSSL_DEPRECATEDIN_3_1 void OPENSSL_LH_node_usage_stats(const OPENSSL_LHASH *lh, FILE *fp);
crypto/openssl/include/openssl/pem.h
117
type *PEM_read_##name(FILE *fp, type **x, pem_password_cb *cb, void *u) \
crypto/openssl/include/openssl/pem.h
119
return PEM_ASN1_read((d2i_of_void *)d2i_##asn1, str, fp, \
crypto/openssl/include/openssl/pem.h
417
int PEM_read(FILE *fp, char **name, char **header,
crypto/openssl/include/openssl/pem.h
419
int PEM_write(FILE *fp, const char *name, const char *hdr,
crypto/openssl/include/openssl/pem.h
421
void *PEM_ASN1_read(d2i_of_void *d2i, const char *name, FILE *fp, void **x,
crypto/openssl/include/openssl/pem.h
423
int PEM_ASN1_write(i2d_of_void *i2d, const char *name, FILE *fp,
crypto/openssl/include/openssl/pem.h
427
STACK_OF(X509_INFO) *PEM_X509_INFO_read(FILE *fp, STACK_OF(X509_INFO) *sk,
crypto/openssl/include/openssl/pem.h
430
*PEM_X509_INFO_read_ex(FILE *fp, STACK_OF(X509_INFO) *sk, pem_password_cb *cb,
crypto/openssl/include/openssl/pem.h
508
int i2d_PKCS8PrivateKey_fp(FILE *fp, const EVP_PKEY *x, const EVP_CIPHER *enc,
crypto/openssl/include/openssl/pem.h
511
int i2d_PKCS8PrivateKey_nid_fp(FILE *fp, const EVP_PKEY *x, int nid,
crypto/openssl/include/openssl/pem.h
514
int PEM_write_PKCS8PrivateKey_nid(FILE *fp, const EVP_PKEY *x, int nid,
crypto/openssl/include/openssl/pem.h
518
EVP_PKEY *d2i_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY **x, pem_password_cb *cb,
crypto/openssl/include/openssl/pem.h
521
int PEM_write_PKCS8PrivateKey(FILE *fp, const EVP_PKEY *x, const EVP_CIPHER *enc,
crypto/openssl/include/openssl/pkcs12.h
359
int i2d_PKCS12_fp(FILE *fp, const PKCS12 *p12);
crypto/openssl/include/openssl/pkcs12.h
363
PKCS12 *d2i_PKCS12_fp(FILE *fp, PKCS12 **p12);
crypto/openssl/include/openssl/pkcs7.h
316
PKCS7 *d2i_PKCS7_fp(FILE *fp, PKCS7 **p7);
crypto/openssl/include/openssl/pkcs7.h
317
int i2d_PKCS7_fp(FILE *fp, const PKCS7 *p7);
crypto/openssl/include/openssl/rsa.h
349
OSSL_DEPRECATEDIN_3_0 int RSA_print_fp(FILE *fp, const RSA *r, int offset);
crypto/openssl/include/openssl/ssl.h
1800
int SSL_SESSION_print_fp(FILE *fp, const SSL_SESSION *ses);
crypto/openssl/include/openssl/ssl.h
1802
int SSL_SESSION_print(BIO *fp, const SSL_SESSION *ses);
crypto/openssl/include/openssl/tls1.h
366
int SSL_CTX_set_tlsext_ticket_key_evp_cb(SSL_CTX *ctx, int (*fp)(SSL *, unsigned char *, unsigned char *, EVP_CIPHER_CTX *, EVP_MAC_CTX *, int));
crypto/openssl/include/openssl/ts.h
112
TS_TST_INFO *d2i_TS_TST_INFO_fp(FILE *fp, TS_TST_INFO **a);
crypto/openssl/include/openssl/ts.h
113
int i2d_TS_TST_INFO_fp(FILE *fp, const TS_TST_INFO *a);
crypto/openssl/include/openssl/ts.h
74
TS_REQ *d2i_TS_REQ_fp(FILE *fp, TS_REQ **a);
crypto/openssl/include/openssl/ts.h
75
int i2d_TS_REQ_fp(FILE *fp, const TS_REQ *a);
crypto/openssl/include/openssl/ts.h
77
TS_REQ *d2i_TS_REQ_bio(BIO *fp, TS_REQ **a);
crypto/openssl/include/openssl/ts.h
78
int i2d_TS_REQ_bio(BIO *fp, const TS_REQ *a);
crypto/openssl/include/openssl/ts.h
85
TS_MSG_IMPRINT *d2i_TS_MSG_IMPRINT_fp(FILE *fp, TS_MSG_IMPRINT **a);
crypto/openssl/include/openssl/ts.h
86
int i2d_TS_MSG_IMPRINT_fp(FILE *fp, const TS_MSG_IMPRINT *a);
crypto/openssl/include/openssl/ts.h
96
TS_RESP *d2i_TS_RESP_fp(FILE *fp, TS_RESP **a);
crypto/openssl/include/openssl/ts.h
97
int i2d_TS_RESP_fp(FILE *fp, const TS_RESP *a);
crypto/openssl/include/openssl/x509.h
1021
int X509_NAME_print_ex_fp(FILE *fp, const X509_NAME *nm, int indent,
crypto/openssl/include/openssl/x509.h
576
X509 *d2i_X509_fp(FILE *fp, X509 **x509);
crypto/openssl/include/openssl/x509.h
577
int i2d_X509_fp(FILE *fp, const X509 *x509);
crypto/openssl/include/openssl/x509.h
578
X509_CRL *d2i_X509_CRL_fp(FILE *fp, X509_CRL **crl);
crypto/openssl/include/openssl/x509.h
579
int i2d_X509_CRL_fp(FILE *fp, const X509_CRL *crl);
crypto/openssl/include/openssl/x509.h
580
X509_REQ *d2i_X509_REQ_fp(FILE *fp, X509_REQ **req);
crypto/openssl/include/openssl/x509.h
581
int i2d_X509_REQ_fp(FILE *fp, const X509_REQ *req);
crypto/openssl/include/openssl/x509.h
583
OSSL_DEPRECATEDIN_3_0 RSA *d2i_RSAPrivateKey_fp(FILE *fp, RSA **rsa);
crypto/openssl/include/openssl/x509.h
584
OSSL_DEPRECATEDIN_3_0 int i2d_RSAPrivateKey_fp(FILE *fp, const RSA *rsa);
crypto/openssl/include/openssl/x509.h
585
OSSL_DEPRECATEDIN_3_0 RSA *d2i_RSAPublicKey_fp(FILE *fp, RSA **rsa);
crypto/openssl/include/openssl/x509.h
586
OSSL_DEPRECATEDIN_3_0 int i2d_RSAPublicKey_fp(FILE *fp, const RSA *rsa);
crypto/openssl/include/openssl/x509.h
587
OSSL_DEPRECATEDIN_3_0 RSA *d2i_RSA_PUBKEY_fp(FILE *fp, RSA **rsa);
crypto/openssl/include/openssl/x509.h
588
OSSL_DEPRECATEDIN_3_0 int i2d_RSA_PUBKEY_fp(FILE *fp, const RSA *rsa);
crypto/openssl/include/openssl/x509.h
592
OSSL_DEPRECATEDIN_3_0 DSA *d2i_DSA_PUBKEY_fp(FILE *fp, DSA **dsa);
crypto/openssl/include/openssl/x509.h
593
OSSL_DEPRECATEDIN_3_0 int i2d_DSA_PUBKEY_fp(FILE *fp, const DSA *dsa);
crypto/openssl/include/openssl/x509.h
594
OSSL_DEPRECATEDIN_3_0 DSA *d2i_DSAPrivateKey_fp(FILE *fp, DSA **dsa);
crypto/openssl/include/openssl/x509.h
595
OSSL_DEPRECATEDIN_3_0 int i2d_DSAPrivateKey_fp(FILE *fp, const DSA *dsa);
crypto/openssl/include/openssl/x509.h
600
OSSL_DEPRECATEDIN_3_0 EC_KEY *d2i_EC_PUBKEY_fp(FILE *fp, EC_KEY **eckey);
crypto/openssl/include/openssl/x509.h
601
OSSL_DEPRECATEDIN_3_0 int i2d_EC_PUBKEY_fp(FILE *fp, const EC_KEY *eckey);
crypto/openssl/include/openssl/x509.h
602
OSSL_DEPRECATEDIN_3_0 EC_KEY *d2i_ECPrivateKey_fp(FILE *fp, EC_KEY **eckey);
crypto/openssl/include/openssl/x509.h
603
OSSL_DEPRECATEDIN_3_0 int i2d_ECPrivateKey_fp(FILE *fp, const EC_KEY *eckey);
crypto/openssl/include/openssl/x509.h
606
X509_SIG *d2i_PKCS8_fp(FILE *fp, X509_SIG **p8);
crypto/openssl/include/openssl/x509.h
607
int i2d_PKCS8_fp(FILE *fp, const X509_SIG *p8);
crypto/openssl/include/openssl/x509.h
608
X509_PUBKEY *d2i_X509_PUBKEY_fp(FILE *fp, X509_PUBKEY **xpk);
crypto/openssl/include/openssl/x509.h
609
int i2d_X509_PUBKEY_fp(FILE *fp, const X509_PUBKEY *xpk);
crypto/openssl/include/openssl/x509.h
610
PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_fp(FILE *fp,
crypto/openssl/include/openssl/x509.h
612
int i2d_PKCS8_PRIV_KEY_INFO_fp(FILE *fp, const PKCS8_PRIV_KEY_INFO *p8inf);
crypto/openssl/include/openssl/x509.h
613
int i2d_PKCS8PrivateKeyInfo_fp(FILE *fp, const EVP_PKEY *key);
crypto/openssl/include/openssl/x509.h
614
int i2d_PrivateKey_fp(FILE *fp, const EVP_PKEY *pkey);
crypto/openssl/include/openssl/x509.h
615
EVP_PKEY *d2i_PrivateKey_ex_fp(FILE *fp, EVP_PKEY **a, OSSL_LIB_CTX *libctx,
crypto/openssl/include/openssl/x509.h
617
EVP_PKEY *d2i_PrivateKey_fp(FILE *fp, EVP_PKEY **a);
crypto/openssl/include/openssl/x509.h
618
int i2d_PUBKEY_fp(FILE *fp, const EVP_PKEY *pkey);
crypto/openssl/include/openssl/x509.h
619
EVP_PKEY *d2i_PUBKEY_ex_fp(FILE *fp, EVP_PKEY **a, OSSL_LIB_CTX *libctx,
crypto/openssl/include/openssl/x509.h
621
EVP_PKEY *d2i_PUBKEY_fp(FILE *fp, EVP_PKEY **a);
crypto/openssl/include/openssl/x509_acert.h
40
X509_ACERT *d2i_X509_ACERT_fp(FILE *fp, X509_ACERT **acert);
crypto/openssl/include/openssl/x509_acert.h
41
int i2d_X509_ACERT_fp(FILE *fp, const X509_ACERT *acert);
crypto/openssl/ms/applink.c
71
static int app_feof(FILE *fp)
crypto/openssl/ms/applink.c
73
return feof(fp);
crypto/openssl/ms/applink.c
76
static int app_ferror(FILE *fp)
crypto/openssl/ms/applink.c
78
return ferror(fp);
crypto/openssl/ms/applink.c
81
static void app_clearerr(FILE *fp)
crypto/openssl/ms/applink.c
83
clearerr(fp);
crypto/openssl/ms/applink.c
86
static int app_fileno(FILE *fp)
crypto/openssl/ms/applink.c
88
return _fileno(fp);
crypto/openssl/ms/applink.c
91
static int app_fsetmod(FILE *fp, char mod)
crypto/openssl/ms/applink.c
93
return _setmode(_fileno(fp), mod == 'b' ? _O_BINARY : _O_TEXT);
crypto/openssl/ssl/bio_ssl.c
27
static long ssl_callback_ctrl(BIO *h, int cmd, BIO_info_cb *fp);
crypto/openssl/ssl/bio_ssl.c
415
static long ssl_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
crypto/openssl/ssl/bio_ssl.c
425
ret = BIO_callback_ctrl(SSL_get_rbio(ssl), cmd, fp);
crypto/openssl/ssl/quic/quic_impl.c
5061
long ossl_quic_callback_ctrl(SSL *s, int cmd, void (*fp)(void))
crypto/openssl/ssl/quic/quic_impl.c
5070
ossl_quic_channel_set_msg_callback(ctx.qc->ch, (ossl_msg_cb)fp,
crypto/openssl/ssl/quic/quic_impl.c
5073
return ssl3_callback_ctrl(ctx.qc->tls, cmd, fp);
crypto/openssl/ssl/quic/quic_impl.c
5078
return ssl3_callback_ctrl(ctx.qc->tls, cmd, fp);
crypto/openssl/ssl/quic/quic_impl.c
5082
long ossl_quic_ctx_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp)(void))
crypto/openssl/ssl/quic/quic_impl.c
5084
return ssl3_ctx_callback_ctrl(ctx, cmd, fp);
crypto/openssl/ssl/s3_lib.c
4314
long ssl3_callback_ctrl(SSL *s, int cmd, void (*fp)(void))
crypto/openssl/ssl/s3_lib.c
4325
sc->cert->dh_tmp_cb = (DH *(*)(SSL *, int, int))fp;
crypto/openssl/ssl/s3_lib.c
4331
const unsigned char *, int, void *))fp;
crypto/openssl/ssl/s3_lib.c
4336
sc->not_resumable_session_cb = (int (*)(SSL *, int))fp;
crypto/openssl/ssl/s3_lib.c
4341
sc->msg_callback = (ossl_msg_cb)fp;
crypto/openssl/ssl/s3_lib.c
4591
long ssl3_ctx_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp)(void))
crypto/openssl/ssl/s3_lib.c
4596
ctx->cert->dh_tmp_cb = (DH *(*)(SSL *, int, int))fp;
crypto/openssl/ssl/s3_lib.c
4600
ctx->ext.servername_cb = (int (*)(SSL *, int *, void *))fp;
crypto/openssl/ssl/s3_lib.c
4604
ctx->ext.status_cb = (int (*)(SSL *, void *))fp;
crypto/openssl/ssl/s3_lib.c
4612
HMAC_CTX *, int))fp;
crypto/openssl/ssl/s3_lib.c
4619
ctx->srp_ctx.SRP_verify_param_callback = (int (*)(SSL *, void *))fp;
crypto/openssl/ssl/s3_lib.c
4623
ctx->srp_ctx.TLS_ext_srp_username_callback = (int (*)(SSL *, int *, void *))fp;
crypto/openssl/ssl/s3_lib.c
4627
ctx->srp_ctx.SRP_give_srp_client_pwd_callback = (char *(*)(SSL *, void *))fp;
crypto/openssl/ssl/s3_lib.c
4631
ctx->not_resumable_session_cb = (int (*)(SSL *, int))fp;
crypto/openssl/ssl/s3_lib.c
4639
int SSL_CTX_set_tlsext_ticket_key_evp_cb(SSL_CTX *ctx, int (*fp)(SSL *, unsigned char *, unsigned char *, EVP_CIPHER_CTX *, EVP_MAC_CTX *, int))
crypto/openssl/ssl/s3_lib.c
4641
ctx->ext.ticket_key_evp_cb = fp;
crypto/openssl/ssl/ssl_lib.c
3069
long SSL_callback_ctrl(SSL *s, int cmd, void (*fp)(void))
crypto/openssl/ssl/ssl_lib.c
3071
return s->method->ssl_callback_ctrl(s, cmd, fp);
crypto/openssl/ssl/ssl_lib.c
3209
long SSL_CTX_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp)(void))
crypto/openssl/ssl/ssl_lib.c
3215
void *arg))(fp);
crypto/openssl/ssl/ssl_lib.c
3219
return ctx->method->ssl_ctx_callback_ctrl(ctx, cmd, fp);
crypto/openssl/ssl/ssl_lib.c
3961
FILE *fp = NULL;
crypto/openssl/ssl/ssl_lib.c
3967
fp = fdopen(fdno, "a");
crypto/openssl/ssl/ssl_lib.c
3968
if (fp == NULL) {
crypto/openssl/ssl/ssl_lib.c
3973
if ((b = BIO_new_fp(fp, BIO_CLOSE)) == NULL)
crypto/openssl/ssl/ssl_lib.c
3974
fclose(fp);
crypto/openssl/ssl/ssl_local.h
2689
__owur long ssl3_callback_ctrl(SSL *s, int cmd, void (*fp)(void));
crypto/openssl/ssl/ssl_local.h
2690
__owur long ssl3_ctx_callback_ctrl(SSL_CTX *s, int cmd, void (*fp)(void));
crypto/openssl/ssl/ssl_local.h
440
long (*ssl_callback_ctrl)(SSL *s, int cb_id, void (*fp)(void));
crypto/openssl/ssl/ssl_local.h
441
long (*ssl_ctx_callback_ctrl)(SSL_CTX *s, int cb_id, void (*fp)(void));
crypto/openssl/ssl/ssl_txt.c
18
int SSL_SESSION_print_fp(FILE *fp, const SSL_SESSION *x)
crypto/openssl/ssl/ssl_txt.c
27
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/openssl/test/bntest.c
3360
while (!BIO_eof(s->fp) && test_readstanza(s)) {
crypto/openssl/test/danetest.c
106
&& PEM_read_bio(fp, &name, &header, &data, &len) == 1;
crypto/openssl/test/danetest.c
90
static STACK_OF(X509) *load_chain(BIO *fp, int nelem)
crypto/openssl/test/ec_internal_test.c
442
FILE *fp = NULL;
crypto/openssl/test/ec_internal_test.c
451
if (!TEST_ptr(fp = fopen("params.der", "wb"))
crypto/openssl/test/ec_internal_test.c
452
|| !TEST_true(i2d_ECPKParameters_fp(fp, g1)))
crypto/openssl/test/ec_internal_test.c
456
if (!TEST_int_eq(fclose(fp), 0)) {
crypto/openssl/test/ec_internal_test.c
457
fp = NULL;
crypto/openssl/test/ec_internal_test.c
460
fp = NULL;
crypto/openssl/test/ec_internal_test.c
463
if (!TEST_ptr(fp = fopen("params.der", "rb"))
crypto/openssl/test/ec_internal_test.c
464
|| !TEST_ptr(g2 = d2i_ECPKParameters_fp(fp, NULL)))
crypto/openssl/test/ec_internal_test.c
470
if (fp != NULL)
crypto/openssl/test/ec_internal_test.c
471
fclose(fp);
crypto/openssl/test/evp_extra_test2.c
1762
FILE *fp = NULL;
crypto/openssl/test/evp_extra_test2.c
1766
if (!TEST_ptr(fp = fopen(filename, "wb"))
crypto/openssl/test/evp_extra_test2.c
1768
|| !TEST_true(i2d_PUBKEY_fp(fp, key))
crypto/openssl/test/evp_extra_test2.c
1769
|| !TEST_int_eq(fclose(fp), 0))
crypto/openssl/test/evp_extra_test2.c
1771
fp = NULL;
crypto/openssl/test/evp_extra_test2.c
1773
if (!TEST_ptr(fp = fopen(filename, "rb"))
crypto/openssl/test/evp_extra_test2.c
1774
|| !TEST_ptr(outkey = d2i_PUBKEY_ex_fp(fp, NULL, mainctx, NULL))
crypto/openssl/test/evp_extra_test2.c
1783
fclose(fp);
crypto/openssl/test/evp_test.c
5125
if (BIO_eof(t->s.fp))
crypto/openssl/test/evp_test.c
5348
while (!BIO_eof(t->s.fp)) {
crypto/openssl/test/json_test.c
561
#define GET_FP() (GET_WORD().fp)
crypto/openssl/test/json_test.c
63
void (*fp)(void);
crypto/openssl/test/params_conversion_test.c
334
while (!BIO_eof(s->fp)) {
crypto/openssl/test/testutil.h
586
BIO *fp; /* Input file */
crypto/openssl/test/testutil/stanza.c
24
if (!TEST_ptr(s->fp = BIO_new_file(testfile, "r")))
crypto/openssl/test/testutil/stanza.c
34
BIO_free(s->fp);
crypto/openssl/test/testutil/stanza.c
53
while (BIO_gets(s->fp, tmpbuf, sizeof(tmpbuf))) {
crypto/openssl/test/testutil/stanza.c
92
for (s->numpairs = 0; BIO_gets(s->fp, buff, sizeof(buff));) {
crypto/openssl/test/timing_load_creds.c
106
FILE *fp;
crypto/openssl/test/timing_load_creds.c
161
fp = fopen(av[0], "r");
crypto/openssl/test/timing_load_creds.c
162
if ((long)fread(contents, 1, sb.st_size, fp) != sb.st_size) {
crypto/openssl/test/timing_load_creds.c
167
fclose(fp);
crypto/openssl/test/x509aux.c
154
BIO_free(fp);
crypto/openssl/test/x509aux.c
31
BIO *fp = BIO_new_file(test_get_argument(num), "r");
crypto/openssl/test/x509aux.c
33
if (!TEST_ptr(fp))
crypto/openssl/test/x509aux.c
36
for (c = 0; !err && PEM_read_bio(fp, &name, &header, &data, &len); ++c) {
include/printf.h
118
int __xvprintf(FILE *fp, const char *fmt0, va_list ap);
include/ssp/stdio.h
100
#define fgets(str, len, fp) __extension__ ({ \
include/ssp/stdio.h
102
__fgets_chk(_ssp_str, len, __ssp_bos(_ssp_str), fp); \
include/stdio.h
510
#define getc(fp) (!__isthreaded ? __sgetc(fp) : (getc)(fp))
include/stdio.h
511
#define putc(x, fp) (!__isthreaded ? __sputc(x, fp) : (putc)(x, fp))
include/stdio.h
528
#define getc_unlocked(fp) __sgetc(fp)
include/stdio.h
529
#define putc_unlocked(x, fp) __sputc(x, fp)
include/wchar.h
194
#define getwc(fp) fgetwc(fp)
include/wchar.h
196
#define putwc(wc, fp) fputwc(wc, fp)
lib/lib80211/lib80211_regdomain.c
420
struct freqband *fp;
lib/lib80211/lib80211_regdomain.c
457
LIST_FOREACH(fp, &rdp->freqbands, next) {
lib/lib80211/lib80211_regdomain.c
458
rdp->ident[i].id = fp->id;
lib/lib80211/lib80211_regdomain.c
459
rdp->ident[i].p = fp;
lib/lib80211/lib80211_regdomain.c
608
struct freqband *fp = LIST_FIRST(&rdp->freqbands);
lib/lib80211/lib80211_regdomain.c
609
if (fp == NULL)
lib/lib80211/lib80211_regdomain.c
611
LIST_REMOVE(fp, next);
lib/lib80211/lib80211_regdomain.c
612
free(fp);
lib/libbsdstat/bsdstat.c
42
char *fp, *tok;
lib/libbsdstat/bsdstat.c
47
for (fp = fmt; (tok = strsep(&fp, ", ")) != NULL;) {
lib/libc/db/hash/hash.c
104
hashp->fp = -1;
lib/libc/db/hash/hash.c
119
if ((hashp->fp = _open(file, flags | O_CLOEXEC, mode)) == -1)
lib/libc/db/hash/hash.c
121
new_table = _fstat(hashp->fp, &statbuf) == 0 &&
lib/libc/db/hash/hash.c
137
hdrsize = _read(hashp->fp, &hashp->hdr, sizeof(HASHHDR));
lib/libc/db/hash/hash.c
226
(void)_close(hashp->fp);
lib/libc/db/hash/hash.c
258
if (hashp->fp == -1) {
lib/libc/db/hash/hash.c
262
return (hashp->fp);
lib/libc/db/hash/hash.c
420
if (hashp->fp != -1) {
lib/libc/db/hash/hash.c
422
(void)_fsync(hashp->fp);
lib/libc/db/hash/hash.c
423
(void)_close(hashp->fp);
lib/libc/db/hash/hash.c
459
if (hashp->fp != -1 && _fsync(hashp->fp) != 0)
lib/libc/db/hash/hash.c
477
int fp, i, wsize;
lib/libc/db/hash/hash.c
485
fp = hashp->fp;
lib/libc/db/hash/hash.c
491
if ((wsize = pwrite(fp, whdrp, sizeof(HASHHDR), (off_t)0)) == -1)
lib/libc/db/hash/hash.h
96
int fp; /* File pointer */
lib/libc/db/hash/hash_page.c
520
fd = hashp->fp;
lib/libc/db/hash/hash_page.c
576
if ((hashp->fp == -1) && open_temp(hashp))
lib/libc/db/hash/hash_page.c
578
fd = hashp->fp;
lib/libc/db/hash/hash_page.c
866
if ((hashp->fp = mkostemp(path, O_CLOEXEC)) != -1)
lib/libc/db/hash/hash_page.c
869
return (hashp->fp != -1 ? 0 : -1);
lib/libc/db/hash/ndbm.c
207
return(((HTAB *)db->internal)->fp);
lib/libc/db/test/btree.tests/main.c
583
FILE *fp;
lib/libc/db/test/btree.tests/main.c
586
if ((fp = fopen(argv[1], "w")) == NULL) {
lib/libc/db/test/btree.tests/main.c
592
(void)fprintf(fp, "%s\n", key.data);
lib/libc/db/test/btree.tests/main.c
606
FILE *fp;
lib/libc/db/test/btree.tests/main.c
614
if ((fp = fopen(argv[1], "r")) == NULL) {
lib/libc/db/test/btree.tests/main.c
620
for (cnt = 1; (lp = fgetline(fp, &len)) != NULL; ++cnt) {
lib/libc/db/test/btree.tests/main.c
652
(void)fclose(fp);
lib/libc/db/test/hash.tests/tcreat3.c
51
FILE *fp;
lib/libc/db/test/hash.tests/tdel.c
106
fclose(fp);
lib/libc/db/test/hash.tests/tdel.c
52
FILE *fp;
lib/libc/db/test/hash.tests/tdel.c
94
fp = fopen ( argv[0], "r");
lib/libc/db/test/hash.tests/tdel.c
96
while ( fgets(wp1, 8192, fp) &&
lib/libc/db/test/hash.tests/tdel.c
97
fgets(wp2, 8192, fp) &&
lib/libc/db/test/hash.tests/thash4.c
100
while ( fgets(wp1, 256, fp) &&
lib/libc/db/test/hash.tests/thash4.c
101
fgets(wp2, 8192, fp) &&
lib/libc/db/test/hash.tests/thash4.c
116
fclose(fp);
lib/libc/db/test/hash.tests/thash4.c
54
FILE *fp;
lib/libc/db/test/hash.tests/thash4.c
98
fp = fopen ( argv[0], "r");
lib/libc/db/test/hash.tests/tseq.c
51
FILE *fp;
lib/libc/gen/err.c
60
err_set_file(void *fp)
lib/libc/gen/err.c
62
if (fp)
lib/libc/gen/err.c
63
err_file = fp;
lib/libc/gen/fmtmsg.c
51
FILE *fp;
lib/libc/gen/fmtmsg.c
85
if ((fp = fopen("/dev/console", "ae")) == NULL) {
lib/libc/gen/fmtmsg.c
89
fprintf(fp, "%s", output);
lib/libc/gen/fmtmsg.c
90
fclose(fp);
lib/libc/gen/getgrent.c
1228
if (st->fp != NULL)
lib/libc/gen/getgrent.c
1229
fclose(st->fp);
lib/libc/gen/getgrent.c
1267
if (st->fp != NULL)
lib/libc/gen/getgrent.c
1268
rewind(st->fp);
lib/libc/gen/getgrent.c
1270
st->fp = fopen(_PATH_GROUP, "re");
lib/libc/gen/getgrent.c
1277
if (st->fp != NULL) {
lib/libc/gen/getgrent.c
1278
fclose(st->fp);
lib/libc/gen/getgrent.c
1279
st->fp = NULL;
lib/libc/gen/getgrent.c
133
FILE *fp;
lib/libc/gen/getgrent.c
1354
if (st->fp == NULL) {
lib/libc/gen/getgrent.c
1355
st->fp = fopen(_PATH_GROUP, "re");
lib/libc/gen/getgrent.c
1356
if (st->fp == NULL) {
lib/libc/gen/getgrent.c
1365
pos = ftello(st->fp);
lib/libc/gen/getgrent.c
1367
rewind(st->fp);
lib/libc/gen/getgrent.c
1428
while ((line = fgetln(st->fp, &linesize)) != NULL) {
lib/libc/gen/getgrent.c
1469
pos = ftello(st->fp);
lib/libc/gen/getgrent.c
1472
if (st->fp != NULL && !stayopen) {
lib/libc/gen/getgrent.c
1473
fclose(st->fp);
lib/libc/gen/getgrent.c
1474
st->fp = NULL;
lib/libc/gen/getgrent.c
1476
if (st->fp != NULL && how != nss_lt_all)
lib/libc/gen/getgrent.c
1477
fseeko(st->fp, pos, SEEK_SET);
lib/libc/gen/getgrent.c
1480
else if (rv == NS_RETURN && *errnop == ERANGE && st->fp != NULL)
lib/libc/gen/getgrent.c
1481
fseeko(st->fp, pos, SEEK_SET);
lib/libc/gen/getgrent.c
801
if (((struct files_state *)p)->fp != NULL)
lib/libc/gen/getgrent.c
802
fclose(((struct files_state *)p)->fp);
lib/libc/gen/getgrent.c
819
if (st->fp != NULL)
lib/libc/gen/getgrent.c
820
rewind(st->fp);
lib/libc/gen/getgrent.c
822
st->fp = fopen(_PATH_GROUP, "re");
lib/libc/gen/getgrent.c
826
if (st->fp != NULL) {
lib/libc/gen/getgrent.c
827
fclose(st->fp);
lib/libc/gen/getgrent.c
828
st->fp = NULL;
lib/libc/gen/getgrent.c
874
if (st->fp == NULL) {
lib/libc/gen/getgrent.c
875
st->fp = fopen(_PATH_GROUP, "re");
lib/libc/gen/getgrent.c
876
if (st->fp == NULL) {
lib/libc/gen/getgrent.c
884
pos = ftello(st->fp);
lib/libc/gen/getgrent.c
886
rewind(st->fp);
lib/libc/gen/getgrent.c
888
while ((line = fgetln(st->fp, &linesize)) != NULL) {
lib/libc/gen/getgrent.c
910
pos = ftello(st->fp);
lib/libc/gen/getgrent.c
912
if (st->fp != NULL && !stayopen) {
lib/libc/gen/getgrent.c
913
fclose(st->fp);
lib/libc/gen/getgrent.c
914
st->fp = NULL;
lib/libc/gen/getgrent.c
916
if (st->fp != NULL && how != nss_lt_all)
lib/libc/gen/getgrent.c
917
fseeko(st->fp, pos, SEEK_SET);
lib/libc/gen/getgrent.c
920
else if (rv == NS_RETURN && *errnop == ERANGE && st->fp != NULL)
lib/libc/gen/getgrent.c
921
fseeko(st->fp, pos, SEEK_SET);
lib/libc/gen/getgrent.c
99
FILE *fp;
lib/libc/gen/getusershell.c
106
FILE *fp;
lib/libc/gen/getusershell.c
113
if ((fp = fopen(_PATH_SHELLS, "re")) == NULL)
lib/libc/gen/getusershell.c
116
while (fgets(line, MAXPATHLEN + 1, fp) != NULL) {
lib/libc/gen/getusershell.c
128
(void)fclose(fp);
lib/libc/gen/popen.c
155
(void)_close(fileno(p->fp));
lib/libc/gen/popen.c
166
cur->fp = iop;
lib/libc/gen/popen.c
200
if (cur->fp == iop)
lib/libc/gen/popen.c
54
FILE *fp;
lib/libc/gen/pututxline.c
107
partial = ftello(fp);
lib/libc/gen/pututxline.c
124
ret = fseeko(fp, partial, SEEK_SET);
lib/libc/gen/pututxline.c
128
else if (fwrite(fu, sizeof(*fu), 1, fp) < 1)
lib/libc/gen/pututxline.c
132
fclose(fp);
lib/libc/gen/pututxline.c
141
FILE *fp;
lib/libc/gen/pututxline.c
148
fp = futx_open(_PATH_UTX_ACTIVE);
lib/libc/gen/pututxline.c
149
if (fp == NULL)
lib/libc/gen/pututxline.c
153
while (fread(&fe, sizeof(fe), 1, fp) == 1 && ret != 0)
lib/libc/gen/pututxline.c
162
if (fseeko(fp, -(off_t)sizeof(fe), SEEK_CUR) == -1)
lib/libc/gen/pututxline.c
164
else if (fwrite(fu, sizeof(*fu), 1, fp) < 1)
lib/libc/gen/pututxline.c
171
fclose(fp);
lib/libc/gen/pututxline.c
201
FILE *fp;
lib/libc/gen/pututxline.c
211
fp = futx_open(_PATH_UTX_LASTLOGIN);
lib/libc/gen/pututxline.c
212
if (fp == NULL)
lib/libc/gen/pututxline.c
214
while (fread(&fe, sizeof fe, 1, fp) == 1) {
lib/libc/gen/pututxline.c
219
ret = fseeko(fp, -(off_t)sizeof fe, SEEK_CUR);
lib/libc/gen/pututxline.c
224
else if (fwrite(fu, sizeof *fu, 1, fp) < 1) {
lib/libc/gen/pututxline.c
228
fclose(fp);
lib/libc/gen/pututxline.c
45
FILE *fp;
lib/libc/gen/pututxline.c
60
fp = fdopen(fd, "r+");
lib/libc/gen/pututxline.c
61
if (fp == NULL) {
lib/libc/gen/pututxline.c
65
return (fp);
lib/libc/gen/pututxline.c
71
FILE *fp;
lib/libc/gen/pututxline.c
83
fp = futx_open(_PATH_UTX_ACTIVE);
lib/libc/gen/pututxline.c
84
if (fp == NULL)
lib/libc/gen/pututxline.c
86
while (fread(&fe, sizeof(fe), 1, fp) == 1) {
lib/libc/gen/pututxline.c
98
ret = fseeko(fp, -(off_t)sizeof(fe), SEEK_CUR);
lib/libc/gen/syslog.c
143
FILE *fp, *fmt_fp;
lib/libc/gen/syslog.c
168
fp = fwopen(&tbuf_cookie, writehook);
lib/libc/gen/syslog.c
169
if (fp == NULL)
lib/libc/gen/syslog.c
173
(void)fprintf(fp, "<%d>1 ", pri);
lib/libc/gen/syslog.c
185
(void)fprintf(fp,
lib/libc/gen/syslog.c
193
(void)fputs(NILVALUE " ", fp);
lib/libc/gen/syslog.c
196
(void)fprintf(fp, "%s ",
lib/libc/gen/syslog.c
200
(void)fflush(fp);
lib/libc/gen/syslog.c
209
(void)fprintf(fp, "%.*s ", LogTagLength, LogTag);
lib/libc/gen/syslog.c
211
(void)fprintf(fp, "%s ", LogTag == NULL ? NILVALUE : LogTag);
lib/libc/gen/syslog.c
219
(void)fprintf(fp, "%d ", (int)LogPid);
lib/libc/gen/syslog.c
221
(void)fputs(NILVALUE " ", fp);
lib/libc/gen/syslog.c
223
(void)fputs(NILVALUE " ", fp);
lib/libc/gen/syslog.c
233
fclose(fp);
lib/libc/gen/syslog.c
267
(void)vfprintf(fp, fmt, ap);
lib/libc/gen/syslog.c
268
(void)fclose(fp);
lib/libc/include/libc_private.h
95
#define FLOCKFILE(fp) if (__isthreaded) _FLOCKFILE(fp)
lib/libc/include/libc_private.h
96
#define FUNLOCKFILE(fp) if (__isthreaded) _funlockfile(fp)
lib/libc/locale/collate.c
457
wchar_t *bp, *fp, c;
lib/libc/locale/collate.c
464
fp = tr + wcslen(tr) - 1;
lib/libc/locale/collate.c
465
while (bp < fp) {
lib/libc/locale/collate.c
467
*bp++ = *fp;
lib/libc/locale/collate.c
468
*fp-- = c;
lib/libc/locale/collate.c
604
wchar_t *bp, *fp, c;
lib/libc/locale/collate.c
611
fp = tr + wcslen(tr) - 1;
lib/libc/locale/collate.c
612
while (bp < fp) {
lib/libc/locale/collate.c
614
*bp++ = *fp;
lib/libc/locale/collate.c
615
*fp-- = c;
lib/libc/net/ether_addr.c
140
FILE *fp;
lib/libc/net/ether_addr.c
151
if ((fp = fopen(_PATH_ETHERS, "re")) == NULL)
lib/libc/net/ether_addr.c
153
while (fgets(buf,BUFSIZ,fp)) {
lib/libc/net/ether_addr.c
175
fclose(fp);
lib/libc/net/ether_addr.c
180
fclose(fp);
lib/libc/net/ether_addr.c
190
FILE *fp;
lib/libc/net/ether_addr.c
200
if ((fp = fopen(_PATH_ETHERS, "re")) == NULL)
lib/libc/net/ether_addr.c
202
while (fgets(buf,BUFSIZ,fp)) {
lib/libc/net/ether_addr.c
223
fclose(fp);
lib/libc/net/ether_addr.c
228
fclose(fp);
lib/libc/net/eui64.c
217
FILE *fp;
lib/libc/net/eui64.c
227
if ((fp = fopen(_PATH_EUI64, "re")) == NULL)
lib/libc/net/eui64.c
230
while (fgets(buf,BUFSIZ,fp)) {
lib/libc/net/eui64.c
253
fclose(fp);
lib/libc/net/eui64.c
258
fclose(fp);
lib/libc/net/eui64.c
268
FILE *fp;
lib/libc/net/eui64.c
277
if ((fp = fopen(_PATH_EUI64, "re")) == NULL)
lib/libc/net/eui64.c
280
while (fgets(buf,BUFSIZ,fp)) {
lib/libc/net/eui64.c
301
fclose(fp);
lib/libc/net/eui64.c
306
fclose(fp);
lib/libc/net/getprotoent.c
339
if (ped->fp == NULL)
lib/libc/net/getprotoent.c
340
ped->fp = fopen(_PATH_PROTOCOLS, "re");
lib/libc/net/getprotoent.c
342
rewind(ped->fp);
lib/libc/net/getprotoent.c
349
if (ped->fp) {
lib/libc/net/getprotoent.c
350
fclose(ped->fp);
lib/libc/net/getprotoent.c
351
ped->fp = NULL;
lib/libc/net/getprotoent.c
363
if (ped->fp == NULL && (ped->fp = fopen(_PATH_PROTOCOLS, "re")) == NULL)
lib/libc/net/getprotoent.c
366
if ((p = fgets(ped->line, sizeof ped->line, ped->fp)) == NULL)
lib/libc/net/getprotoent.c
61
if (ped->fp) {
lib/libc/net/getprotoent.c
62
fclose(ped->fp);
lib/libc/net/getprotoent.c
63
ped->fp = NULL;
lib/libc/net/getservent.c
255
f = ((struct files_state *)p)->fp;
lib/libc/net/getservent.c
330
if (st->fp == NULL)
lib/libc/net/getservent.c
333
if (st->fp == NULL && (st->fp = fopen(_PATH_SERVICES, "re")) == NULL) {
lib/libc/net/getservent.c
341
rewind(st->fp);
lib/libc/net/getservent.c
348
if ((line = fgetln(st->fp, &linesize)) == NULL) {
lib/libc/net/getservent.c
421
if (!stayopen && st->fp != NULL) {
lib/libc/net/getservent.c
422
fclose(st->fp);
lib/libc/net/getservent.c
423
st->fp = NULL;
lib/libc/net/getservent.c
446
if (st->fp == NULL)
lib/libc/net/getservent.c
447
st->fp = fopen(_PATH_SERVICES, "re");
lib/libc/net/getservent.c
449
rewind(st->fp);
lib/libc/net/getservent.c
453
if (st->fp != NULL) {
lib/libc/net/getservent.c
454
fclose(st->fp);
lib/libc/net/getservent.c
455
st->fp = NULL;
lib/libc/net/getservent.c
83
FILE *fp;
lib/libc/net/hesiod.c
259
FILE *fp;
lib/libc/net/hesiod.c
266
fp = fopen(filename, "re");
lib/libc/net/hesiod.c
267
if (!fp) {
lib/libc/net/hesiod.c
280
while (fgets(buf, sizeof(buf), fp) != NULL) {
lib/libc/net/hesiod.c
304
fclose(fp);
lib/libc/net/hesiod.c
330
fclose(fp);
lib/libc/net/netdb_private.h
97
FILE *fp;
lib/libc/regex/grot/split.c
113
*fp++ = p;
lib/libc/regex/grot/split.c
21
char **fp = fields;
lib/libc/regex/grot/split.c
45
*fp++ = p;
lib/libc/regex/grot/split.c
69
*fp++ = p;
lib/libc/regex/grot/split.c
73
if (trimtrail && **(fp-1) == '\0')
lib/libc/resolv/res_init.c
160
FILE *fp;
lib/libc/resolv/res_init.c
284
if ((fp = fopen(_PATH_RESCONF, "re")) != NULL) {
lib/libc/resolv/res_init.c
289
if (_fstat(fileno(fp), &sb) == 0) {
lib/libc/resolv/res_init.c
298
while (fgets(buf, sizeof(buf), fp) != NULL) {
lib/libc/resolv/res_init.c
500
(void) fclose(fp);
lib/libc/resolv/res_query.c
444
FILE *fp;
lib/libc/resolv/res_query.c
449
if (file == NULL || (fp = fopen(file, "re")) == NULL)
lib/libc/resolv/res_query.c
451
setbuf(fp, NULL);
lib/libc/resolv/res_query.c
453
while (fgets(buf, sizeof(buf), fp)) {
lib/libc/resolv/res_query.c
470
fclose(fp);
lib/libc/resolv/res_query.c
474
fclose(fp);
lib/libc/rpc/getrpcent.c
196
f = ((struct files_state *)p)->fp;
lib/libc/rpc/getrpcent.c
248
if (st->fp == NULL && (st->fp = fopen(RPCDB, "r")) == NULL) {
lib/libc/rpc/getrpcent.c
256
rewind(st->fp);
lib/libc/rpc/getrpcent.c
261
if ((line = fgetln(st->fp, &linesize)) == NULL) {
lib/libc/rpc/getrpcent.c
322
if (!stayopen && st->fp!=NULL) {
lib/libc/rpc/getrpcent.c
323
fclose(st->fp);
lib/libc/rpc/getrpcent.c
324
st->fp = NULL;
lib/libc/rpc/getrpcent.c
348
if (st->fp == NULL)
lib/libc/rpc/getrpcent.c
349
st->fp = fopen(RPCDB, "r");
lib/libc/rpc/getrpcent.c
351
rewind(st->fp);
lib/libc/rpc/getrpcent.c
355
if (st->fp != NULL) {
lib/libc/rpc/getrpcent.c
356
fclose(st->fp);
lib/libc/rpc/getrpcent.c
357
st->fp = NULL;
lib/libc/rpc/getrpcent.c
84
FILE *fp;
lib/libc/secure/fgets_chk.c
45
__fgets_chk(char * __restrict buf, int len, size_t slen, FILE *fp)
lib/libc/secure/fgets_chk.c
48
return (fgets(buf, len, fp));
lib/libc/secure/fgets_chk.c
53
return (fgets(buf, len, fp));
lib/libc/stdio/_flock_stub.c
100
fp->_fl_owner = curthread;
lib/libc/stdio/_flock_stub.c
101
fp->_fl_count = 1;
lib/libc/stdio/_flock_stub.c
109
_funlockfile(FILE *fp)
lib/libc/stdio/_flock_stub.c
116
if (fp->_fl_owner == curthread) {
lib/libc/stdio/_flock_stub.c
121
if (fp->_fl_count > 1)
lib/libc/stdio/_flock_stub.c
127
fp->_fl_count--;
lib/libc/stdio/_flock_stub.c
133
fp->_fl_count = 0;
lib/libc/stdio/_flock_stub.c
134
fp->_fl_owner = NULL;
lib/libc/stdio/_flock_stub.c
135
_pthread_mutex_unlock(&fp->_fl_mutex);
lib/libc/stdio/_flock_stub.c
61
_flockfile(FILE *fp)
lib/libc/stdio/_flock_stub.c
65
if (fp->_fl_owner == curthread)
lib/libc/stdio/_flock_stub.c
66
fp->_fl_count++;
lib/libc/stdio/_flock_stub.c
72
_pthread_mutex_lock(&fp->_fl_mutex);
lib/libc/stdio/_flock_stub.c
73
fp->_fl_owner = curthread;
lib/libc/stdio/_flock_stub.c
74
fp->_fl_count = 1;
lib/libc/stdio/_flock_stub.c
82
_flockfile_debug_stub(FILE *fp, char *fname, int lineno)
lib/libc/stdio/_flock_stub.c
84
_flockfile(fp);
lib/libc/stdio/_flock_stub.c
88
_ftrylockfile(FILE *fp)
lib/libc/stdio/_flock_stub.c
93
if (fp->_fl_owner == curthread)
lib/libc/stdio/_flock_stub.c
94
fp->_fl_count++;
lib/libc/stdio/_flock_stub.c
99
else if (_pthread_mutex_trylock(&fp->_fl_mutex) == 0) {
lib/libc/stdio/clrerr.c
44
clearerr(FILE *fp)
lib/libc/stdio/clrerr.c
46
FLOCKFILE(fp);
lib/libc/stdio/clrerr.c
47
__sclearerr(fp);
lib/libc/stdio/clrerr.c
48
FUNLOCKFILE(fp);
lib/libc/stdio/clrerr.c
52
clearerr_unlocked(FILE *fp)
lib/libc/stdio/clrerr.c
55
__sclearerr(fp);
lib/libc/stdio/fclose.c
101
} else if (fp->_file < 0) {
lib/libc/stdio/fclose.c
107
(void)cleanfile(fp, true);
lib/libc/stdio/fclose.c
111
*fdp = fp->_file;
lib/libc/stdio/fclose.c
112
r = cleanfile(fp, false);
lib/libc/stdio/fclose.c
120
fclose(FILE *fp)
lib/libc/stdio/fclose.c
124
if (fp->_flags == 0) { /* not open! */
lib/libc/stdio/fclose.c
129
FLOCKFILE_CANCELSAFE(fp);
lib/libc/stdio/fclose.c
130
r = cleanfile(fp, true);
lib/libc/stdio/fclose.c
47
cleanfile(FILE *fp, bool c)
lib/libc/stdio/fclose.c
51
r = fp->_flags & __SWR ? __sflush(fp) : 0;
lib/libc/stdio/fclose.c
53
if (fp->_close != NULL && (*fp->_close)(fp->_cookie) < 0)
lib/libc/stdio/fclose.c
57
if (fp->_flags & __SMBF)
lib/libc/stdio/fclose.c
58
free((char *)fp->_bf._base);
lib/libc/stdio/fclose.c
59
if (HASUB(fp))
lib/libc/stdio/fclose.c
60
FREEUB(fp);
lib/libc/stdio/fclose.c
61
if (HASLB(fp))
lib/libc/stdio/fclose.c
62
FREELB(fp);
lib/libc/stdio/fclose.c
63
fp->_file = -1;
lib/libc/stdio/fclose.c
64
fp->_r = fp->_w = 0; /* Mess up if reaccessed. */
lib/libc/stdio/fclose.c
77
fp->_flags = 0; /* Release this FILE for reuse. */
lib/libc/stdio/fclose.c
84
fdclose(FILE *fp, int *fdp)
lib/libc/stdio/fclose.c
91
if (fp->_flags == 0) { /* not open! */
lib/libc/stdio/fclose.c
96
FLOCKFILE_CANCELSAFE(fp);
lib/libc/stdio/fclose.c
98
if (fp->_close != __sclose) {
lib/libc/stdio/fdopen.c
101
fp->_flags2 |= __S2OAP;
lib/libc/stdio/fdopen.c
103
fp->_flags |= __SAPP;
lib/libc/stdio/fdopen.c
104
fp->_file = fd;
lib/libc/stdio/fdopen.c
105
fp->_cookie = fp;
lib/libc/stdio/fdopen.c
106
fp->_read = __sread;
lib/libc/stdio/fdopen.c
107
fp->_write = __swrite;
lib/libc/stdio/fdopen.c
108
fp->_seek = __sseek;
lib/libc/stdio/fdopen.c
109
fp->_close = __sclose;
lib/libc/stdio/fdopen.c
110
return (fp);
lib/libc/stdio/fdopen.c
48
FILE *fp;
lib/libc/stdio/fdopen.c
76
if ((fp = __sfp()) == NULL)
lib/libc/stdio/fdopen.c
82
fp->_flags = 0;
lib/libc/stdio/fdopen.c
88
fp->_flags = 0;
lib/libc/stdio/fdopen.c
94
fp->_flags = flags;
lib/libc/stdio/feof.c
44
feof(FILE *fp)
lib/libc/stdio/feof.c
48
FLOCKFILE(fp);
lib/libc/stdio/feof.c
49
ret= __sfeof(fp);
lib/libc/stdio/feof.c
50
FUNLOCKFILE(fp);
lib/libc/stdio/feof.c
55
feof_unlocked(FILE *fp)
lib/libc/stdio/feof.c
58
return (__sfeof(fp));
lib/libc/stdio/ferror.c
44
ferror(FILE *fp)
lib/libc/stdio/ferror.c
48
FLOCKFILE(fp);
lib/libc/stdio/ferror.c
49
ret = __sferror(fp);
lib/libc/stdio/ferror.c
50
FUNLOCKFILE(fp);
lib/libc/stdio/ferror.c
55
ferror_unlocked(FILE *fp)
lib/libc/stdio/ferror.c
58
return (__sferror(fp));
lib/libc/stdio/fflush.c
100
__sflush(FILE *fp)
lib/libc/stdio/fflush.c
105
f = fp->_flags;
lib/libc/stdio/fflush.c
109
if ((p = fp->_bf._base) == NULL)
lib/libc/stdio/fflush.c
112
n = fp->_p - p; /* write this much */
lib/libc/stdio/fflush.c
118
fp->_p = p;
lib/libc/stdio/fflush.c
119
fp->_w = f & (__SLBF|__SNBF) ? 0 : fp->_bf._size;
lib/libc/stdio/fflush.c
122
t = _swrite(fp, (char *)p, n);
lib/libc/stdio/fflush.c
124
if (p > fp->_p)
lib/libc/stdio/fflush.c
126
memmove(fp->_p, p, n);
lib/libc/stdio/fflush.c
128
fp->_p += n;
lib/libc/stdio/fflush.c
129
if ((fp->_flags & __SNBF) == 0)
lib/libc/stdio/fflush.c
130
fp->_w -= n;
lib/libc/stdio/fflush.c
131
fp->_flags |= __SERR;
lib/libc/stdio/fflush.c
139
sflush_locked(FILE *fp)
lib/libc/stdio/fflush.c
143
FLOCKFILE_CANCELSAFE(fp);
lib/libc/stdio/fflush.c
144
ret = __sflush(fp);
lib/libc/stdio/fflush.c
49
fflush(FILE *fp)
lib/libc/stdio/fflush.c
53
if (fp == NULL)
lib/libc/stdio/fflush.c
55
FLOCKFILE_CANCELSAFE(fp);
lib/libc/stdio/fflush.c
71
if ((fp->_flags & (__SWR | __SRW)) == 0)
lib/libc/stdio/fflush.c
74
retval = __sflush(fp);
lib/libc/stdio/fflush.c
84
__fflush(FILE *fp)
lib/libc/stdio/fflush.c
88
if (fp == NULL)
lib/libc/stdio/fflush.c
90
if ((fp->_flags & (__SWR | __SRW)) == 0)
lib/libc/stdio/fflush.c
93
retval = __sflush(fp);
lib/libc/stdio/fgetc.c
42
fgetc(FILE *fp)
lib/libc/stdio/fgetc.c
45
FLOCKFILE_CANCELSAFE(fp);
lib/libc/stdio/fgetc.c
48
retval = __sgetc(fp);
lib/libc/stdio/fgetln.c
100
fp->_flags |= __SMOD;
lib/libc/stdio/fgetln.c
101
fp->_r -= len;
lib/libc/stdio/fgetln.c
102
fp->_p = p;
lib/libc/stdio/fgetln.c
116
for (len = fp->_r, off = 0;; len += fp->_r) {
lib/libc/stdio/fgetln.c
124
if (__slbexpand(fp, len + OPTIMISTIC))
lib/libc/stdio/fgetln.c
126
(void)memcpy((void *)(fp->_lb._base + off), (void *)fp->_p,
lib/libc/stdio/fgetln.c
129
if (__srefill(fp)) {
lib/libc/stdio/fgetln.c
130
if (__sfeof(fp))
lib/libc/stdio/fgetln.c
134
if ((p = memchr((void *)fp->_p, '\n', (size_t)fp->_r)) == NULL)
lib/libc/stdio/fgetln.c
139
diff = p - fp->_p;
lib/libc/stdio/fgetln.c
141
if (__slbexpand(fp, len))
lib/libc/stdio/fgetln.c
143
(void)memcpy((void *)(fp->_lb._base + off), (void *)fp->_p,
lib/libc/stdio/fgetln.c
145
fp->_r -= diff;
lib/libc/stdio/fgetln.c
146
fp->_p = p;
lib/libc/stdio/fgetln.c
150
ret = (char *)fp->_lb._base;
lib/libc/stdio/fgetln.c
157
fp->_flags |= __SERR;
lib/libc/stdio/fgetln.c
49
__slbexpand(FILE *fp, size_t newsize)
lib/libc/stdio/fgetln.c
53
if (fp->_lb._size >= newsize)
lib/libc/stdio/fgetln.c
59
if ((p = realloc(fp->_lb._base, newsize)) == NULL)
lib/libc/stdio/fgetln.c
61
fp->_lb._base = p;
lib/libc/stdio/fgetln.c
62
fp->_lb._size = newsize;
lib/libc/stdio/fgetln.c
74
fgetln(FILE *fp, size_t *lenp)
lib/libc/stdio/fgetln.c
81
FLOCKFILE_CANCELSAFE(fp);
lib/libc/stdio/fgetln.c
82
ORIENT(fp, -1);
lib/libc/stdio/fgetln.c
84
if (fp->_r <= 0 && __srefill(fp)) {
lib/libc/stdio/fgetln.c
91
if ((p = memchr((void *)fp->_p, '\n', (size_t)fp->_r)) != NULL) {
lib/libc/stdio/fgetln.c
98
ret = (char *)fp->_p;
lib/libc/stdio/fgetln.c
99
*lenp = len = p - fp->_p;
lib/libc/stdio/fgetpos.c
38
fgetpos(FILE * __restrict fp, fpos_t * __restrict pos)
lib/libc/stdio/fgetpos.c
43
if ((*pos = ftello(fp)) == (fpos_t)-1)
lib/libc/stdio/fgets.c
104
fp->_r -= len;
lib/libc/stdio/fgets.c
105
fp->_p += len;
lib/libc/stdio/fgets.c
51
fgets(char * __restrict buf, int n, FILE * __restrict fp)
lib/libc/stdio/fgets.c
57
FLOCKFILE_CANCELSAFE(fp);
lib/libc/stdio/fgets.c
58
ORIENT(fp, -1);
lib/libc/stdio/fgets.c
61
fp->_flags |= __SERR;
lib/libc/stdio/fgets.c
73
if ((len = fp->_r) <= 0) {
lib/libc/stdio/fgets.c
74
if (__srefill(fp)) {
lib/libc/stdio/fgets.c
76
if (!__sfeof(fp) || s == buf) {
lib/libc/stdio/fgets.c
82
len = fp->_r;
lib/libc/stdio/fgets.c
84
p = fp->_p;
lib/libc/stdio/fgets.c
97
fp->_r -= len;
lib/libc/stdio/fgets.c
98
fp->_p = t;
lib/libc/stdio/fgetwc.c
102
} while (__srefill(fp) == 0);
lib/libc/stdio/fgetwc.c
103
if (__sfeof(fp)) {
lib/libc/stdio/fgetwc.c
104
fp->_flags |= __SERR;
lib/libc/stdio/fgetwc.c
49
fgetwc_l(FILE *fp, locale_t locale)
lib/libc/stdio/fgetwc.c
54
FLOCKFILE_CANCELSAFE(fp);
lib/libc/stdio/fgetwc.c
55
ORIENT(fp, 1);
lib/libc/stdio/fgetwc.c
56
r = __fgetwc(fp, locale);
lib/libc/stdio/fgetwc.c
63
fgetwc(FILE *fp)
lib/libc/stdio/fgetwc.c
65
return fgetwc_l(fp, __get_locale());
lib/libc/stdio/fgetwc.c
75
__fgetwc_mbs(FILE *fp, mbstate_t *mbs, int *nread, locale_t locale)
lib/libc/stdio/fgetwc.c
82
if (fp->_r <= 0 && __srefill(fp))
lib/libc/stdio/fgetwc.c
85
nconv = l->__mbrtowc(&wc, fp->_p, fp->_r, mbs);
lib/libc/stdio/fgetwc.c
87
fp->_flags |= __SERR;
lib/libc/stdio/fgetwc.c
92
fp->_p++;
lib/libc/stdio/fgetwc.c
93
fp->_r--;
lib/libc/stdio/fgetwc.c
97
fp->_p += nconv;
lib/libc/stdio/fgetwc.c
98
fp->_r -= nconv;
lib/libc/stdio/fgetwln.c
45
fgetwln_l(FILE * __restrict fp, size_t *lenp, locale_t locale)
lib/libc/stdio/fgetwln.c
54
FLOCKFILE_CANCELSAFE(fp);
lib/libc/stdio/fgetwln.c
55
ORIENT(fp, 1);
lib/libc/stdio/fgetwln.c
57
savserr = fp->_flags & __SERR;
lib/libc/stdio/fgetwln.c
58
fp->_flags &= ~__SERR;
lib/libc/stdio/fgetwln.c
61
while ((wc = __fgetwc(fp, locale)) != WEOF) {
lib/libc/stdio/fgetwln.c
63
if (len * sizeof(wchar_t) >= fp->_lb._size &&
lib/libc/stdio/fgetwln.c
64
__slbexpand(fp, (len + GROW) * sizeof(wchar_t))) {
lib/libc/stdio/fgetwln.c
65
fp->_flags |= __SERR;
lib/libc/stdio/fgetwln.c
68
*((wchar_t *)fp->_lb._base + len++) = wc;
lib/libc/stdio/fgetwln.c
73
if (__sferror(fp))
lib/libc/stdio/fgetwln.c
76
fp->_flags |= savserr;
lib/libc/stdio/fgetwln.c
81
ret = (wchar_t *)fp->_lb._base;
lib/libc/stdio/fgetwln.c
93
fgetwln(FILE * __restrict fp, size_t *lenp)
lib/libc/stdio/fgetwln.c
95
return fgetwln_l(fp, lenp, __get_locale());
lib/libc/stdio/fgetws.c
100
(sret = __srefill(fp)) == 0));
lib/libc/stdio/fgetws.c
101
if (sret && !__sfeof(fp))
lib/libc/stdio/fgetws.c
104
if (!l->__mbsinit(&fp->_mbstate)) {
lib/libc/stdio/fgetws.c
106
fp->_flags |= __SERR;
lib/libc/stdio/fgetws.c
126
fgetws(wchar_t * __restrict ws, int n, FILE * __restrict fp)
lib/libc/stdio/fgetws.c
128
return fgetws_l(ws, n, fp, __get_locale());
lib/libc/stdio/fgetws.c
45
fgetws_l(wchar_t * __restrict ws, int n, FILE * __restrict fp, locale_t locale)
lib/libc/stdio/fgetws.c
55
FLOCKFILE_CANCELSAFE(fp);
lib/libc/stdio/fgetws.c
56
ORIENT(fp, 1);
lib/libc/stdio/fgetws.c
59
fp->_flags |= __SERR;
lib/libc/stdio/fgetws.c
68
if (fp->_r <= 0 && __srefill(fp))
lib/libc/stdio/fgetws.c
74
src = fp->_p;
lib/libc/stdio/fgetws.c
75
nl = memchr(fp->_p, '\n', fp->_r);
lib/libc/stdio/fgetws.c
77
nl != NULL ? (nl - fp->_p + 1) : fp->_r,
lib/libc/stdio/fgetws.c
78
n - 1, &fp->_mbstate);
lib/libc/stdio/fgetws.c
81
fp->_flags |= __SERR;
lib/libc/stdio/fgetws.c
92
src = memchr(fp->_p, '\0', fp->_r);
lib/libc/stdio/fgetws.c
95
fp->_r -= (unsigned char *)src - fp->_p;
lib/libc/stdio/fgetws.c
96
fp->_p = (unsigned char *)src;
lib/libc/stdio/fgetws.c
99
} while ((wsp == ws || wsp[-1] != L'\n') && n > 1 && (fp->_r > 0 ||
lib/libc/stdio/fileno.c
45
__fileno_impl(FILE *fp)
lib/libc/stdio/fileno.c
49
fd = fp->_file;
lib/libc/stdio/fileno.c
56
fileno(FILE *fp)
lib/libc/stdio/fileno.c
61
FLOCKFILE(fp);
lib/libc/stdio/fileno.c
62
fd = __fileno_impl(fp);
lib/libc/stdio/fileno.c
63
FUNLOCKFILE(fp);
lib/libc/stdio/fileno.c
65
fd = __fileno_impl(fp);
lib/libc/stdio/fileno.c
72
fileno_unlocked(FILE *fp)
lib/libc/stdio/fileno.c
74
return (__fileno_impl(fp));
lib/libc/stdio/findfp.c
117
FILE *fp;
lib/libc/stdio/findfp.c
128
for (fp = g->iobs, n = g->niobs; --n >= 0; fp++)
lib/libc/stdio/findfp.c
129
if (fp->_flags == 0)
lib/libc/stdio/findfp.c
138
fp = g->iobs;
lib/libc/stdio/findfp.c
140
fp->_flags = 1; /* reserve this slot; caller sets real flags */
lib/libc/stdio/findfp.c
142
fp->_p = NULL; /* no current pointer */
lib/libc/stdio/findfp.c
143
fp->_w = 0; /* nothing to read or write */
lib/libc/stdio/findfp.c
144
fp->_r = 0;
lib/libc/stdio/findfp.c
145
fp->_bf._base = NULL; /* no buffer */
lib/libc/stdio/findfp.c
146
fp->_bf._size = 0;
lib/libc/stdio/findfp.c
147
fp->_lbfsize = 0; /* not line buffered */
lib/libc/stdio/findfp.c
148
fp->_file = -1; /* no file */
lib/libc/stdio/findfp.c
150
fp->_ub._base = NULL; /* no ungetc buffer */
lib/libc/stdio/findfp.c
151
fp->_ub._size = 0;
lib/libc/stdio/findfp.c
152
fp->_lb._base = NULL; /* no line buffer */
lib/libc/stdio/findfp.c
153
fp->_lb._size = 0;
lib/libc/stdio/findfp.c
155
fp->_orientation = 0;
lib/libc/stdio/findfp.c
156
memset(&fp->_mbstate, 0, sizeof(mbstate_t));
lib/libc/stdio/findfp.c
157
fp->_flags2 = 0;
lib/libc/stdio/findfp.c
158
return (fp);
lib/libc/stdio/fopen.c
50
FILE *fp;
lib/libc/stdio/fopen.c
56
if ((fp = __sfp()) == NULL)
lib/libc/stdio/fopen.c
59
fp->_flags = 0; /* release */
lib/libc/stdio/fopen.c
70
fp->_flags = 0; /* release */
lib/libc/stdio/fopen.c
75
fp->_file = f;
lib/libc/stdio/fopen.c
76
fp->_flags = flags;
lib/libc/stdio/fopen.c
77
fp->_cookie = fp;
lib/libc/stdio/fopen.c
78
fp->_read = __sread;
lib/libc/stdio/fopen.c
79
fp->_write = __swrite;
lib/libc/stdio/fopen.c
80
fp->_seek = __sseek;
lib/libc/stdio/fopen.c
81
fp->_close = __sclose;
lib/libc/stdio/fopen.c
91
fp->_flags2 |= __S2OAP;
lib/libc/stdio/fopen.c
92
(void)_sseek(fp, (fpos_t)0, SEEK_END);
lib/libc/stdio/fopen.c
94
return (fp);
lib/libc/stdio/fopencookie.c
51
FILE *fp;
lib/libc/stdio/fopencookie.c
71
fp = funopen(thunk, readfn, writefn, _fopencookie_seek,
lib/libc/stdio/fopencookie.c
73
if (fp == NULL) {
lib/libc/stdio/fopencookie.c
79
fp->_flags |= __SAPP;
lib/libc/stdio/fopencookie.c
81
return (fp);
lib/libc/stdio/fprintf.c
45
fprintf(FILE * __restrict fp, const char * __restrict fmt, ...)
lib/libc/stdio/fprintf.c
51
ret = vfprintf_l(fp, __get_locale(), fmt, ap);
lib/libc/stdio/fprintf.c
56
fprintf_l(FILE * __restrict fp, locale_t locale, const char * __restrict fmt, ...)
lib/libc/stdio/fprintf.c
63
ret = vfprintf_l(fp, locale, fmt, ap);
lib/libc/stdio/fpurge.c
48
fpurge(FILE *fp)
lib/libc/stdio/fpurge.c
51
FLOCKFILE(fp);
lib/libc/stdio/fpurge.c
52
if (!fp->_flags) {
lib/libc/stdio/fpurge.c
56
if (HASUB(fp))
lib/libc/stdio/fpurge.c
57
FREEUB(fp);
lib/libc/stdio/fpurge.c
58
fp->_p = fp->_bf._base;
lib/libc/stdio/fpurge.c
59
fp->_r = 0;
lib/libc/stdio/fpurge.c
60
fp->_w = fp->_flags & (__SLBF|__SNBF|__SRD) ? 0 : fp->_bf._size;
lib/libc/stdio/fpurge.c
63
FUNLOCKFILE(fp);
lib/libc/stdio/fputc.c
44
fputc_unlocked(int c, FILE *fp)
lib/libc/stdio/fputc.c
49
return (__sputc(c, fp));
lib/libc/stdio/fputc.c
53
fputc(int c, FILE *fp)
lib/libc/stdio/fputc.c
57
FLOCKFILE_CANCELSAFE(fp);
lib/libc/stdio/fputc.c
58
retval = fputc_unlocked(c, fp);
lib/libc/stdio/fputs.c
48
fputs_unlocked(const char * __restrict s, FILE * __restrict fp)
lib/libc/stdio/fputs.c
58
ORIENT(fp, -1);
lib/libc/stdio/fputs.c
59
retval = __sfvwrite(fp, &uio);
lib/libc/stdio/fputs.c
66
fputs(const char * __restrict s, FILE * __restrict fp)
lib/libc/stdio/fputs.c
70
FLOCKFILE_CANCELSAFE(fp);
lib/libc/stdio/fputs.c
71
retval = fputs_unlocked(s, fp);
lib/libc/stdio/fputwc.c
49
__fputwc(wchar_t wc, FILE *fp, locale_t locale)
lib/libc/stdio/fputwc.c
55
if ((len = l->__wcrtomb(buf, wc, &fp->_mbstate)) == (size_t)-1) {
lib/libc/stdio/fputwc.c
56
fp->_flags |= __SERR;
lib/libc/stdio/fputwc.c
61
if (__sputc((unsigned char)buf[i], fp) == EOF)
lib/libc/stdio/fputwc.c
71
fputwc_l(wchar_t wc, FILE *fp, locale_t locale)
lib/libc/stdio/fputwc.c
76
FLOCKFILE_CANCELSAFE(fp);
lib/libc/stdio/fputwc.c
77
ORIENT(fp, 1);
lib/libc/stdio/fputwc.c
78
r = __fputwc(wc, fp, locale);
lib/libc/stdio/fputwc.c
84
fputwc(wchar_t wc, FILE *fp)
lib/libc/stdio/fputwc.c
86
return fputwc_l(wc, fp, __get_locale());
lib/libc/stdio/fputws.c
46
fputws_l(const wchar_t * __restrict ws, FILE * __restrict fp, locale_t locale)
lib/libc/stdio/fputws.c
58
FLOCKFILE_CANCELSAFE(fp);
lib/libc/stdio/fputws.c
59
ORIENT(fp, 1);
lib/libc/stdio/fputws.c
60
if (prepwrite(fp) != 0)
lib/libc/stdio/fputws.c
68
&fp->_mbstate);
lib/libc/stdio/fputws.c
72
if (__sfvwrite(fp, &uio) != 0)
lib/libc/stdio/fputws.c
82
fputws(const wchar_t * __restrict ws, FILE * __restrict fp)
lib/libc/stdio/fputws.c
84
return fputws_l(ws, fp, __get_locale());
lib/libc/stdio/fread.c
104
if ((fp->_flags & __SNBF) != 0 && buf != NULL) {
lib/libc/stdio/fread.c
107
fp->_bf._base = fp->_p = p;
lib/libc/stdio/fread.c
108
fp->_bf._size = resid;
lib/libc/stdio/fread.c
110
if (__srefill(fp)) {
lib/libc/stdio/fread.c
115
p += fp->_r;
lib/libc/stdio/fread.c
116
resid -= fp->_r;
lib/libc/stdio/fread.c
120
fp->_bf._base = fp->_p = fp->_nbuf;
lib/libc/stdio/fread.c
121
fp->_bf._size = 1;
lib/libc/stdio/fread.c
122
fp->_r = 0;
lib/libc/stdio/fread.c
127
while (resid > (r = fp->_r)) {
lib/libc/stdio/fread.c
129
(void)memcpy((void *)p, (void *)fp->_p, (size_t)r);
lib/libc/stdio/fread.c
130
fp->_p += r;
lib/libc/stdio/fread.c
135
if (__srefill(fp)) {
lib/libc/stdio/fread.c
140
(void)memcpy((void *)p, (void *)fp->_p, resid);
lib/libc/stdio/fread.c
141
fp->_r -= resid;
lib/libc/stdio/fread.c
142
fp->_p += resid;
lib/libc/stdio/fread.c
51
FILE * __restrict fp)
lib/libc/stdio/fread.c
55
FLOCKFILE_CANCELSAFE(fp);
lib/libc/stdio/fread.c
56
ret = __fread(buf, size, count, fp);
lib/libc/stdio/fread.c
62
__fread(void * __restrict buf, size_t size, size_t count, FILE * __restrict fp)
lib/libc/stdio/fread.c
84
fp->_flags |= __SERR;
lib/libc/stdio/fread.c
93
ORIENT(fp, -1);
lib/libc/stdio/fread.c
94
if (fp->_r < 0)
lib/libc/stdio/fread.c
95
fp->_r = 0;
lib/libc/stdio/freopen.c
100
(void) __sflush(fp);
lib/libc/stdio/freopen.c
104
if (_fcntl(fp->_file, F_SETFL, dflags) < 0) {
lib/libc/stdio/freopen.c
106
fclose(fp);
lib/libc/stdio/freopen.c
108
fp = NULL;
lib/libc/stdio/freopen.c
113
(void) ftruncate(fp->_file, (off_t)0);
lib/libc/stdio/freopen.c
115
(void) _sseek(fp, (fpos_t)0, SEEK_SET);
lib/libc/stdio/freopen.c
117
fdflags = _fcntl(fp->_file, F_GETFD, 0);
lib/libc/stdio/freopen.c
119
(void) _fcntl(fp->_file, F_SETFD,
lib/libc/stdio/freopen.c
122
f = fp->_file;
lib/libc/stdio/freopen.c
136
if (fp->_flags == 0) {
lib/libc/stdio/freopen.c
137
fp->_flags = __SEOF; /* hold on to it */
lib/libc/stdio/freopen.c
142
if (fp->_flags & __SWR)
lib/libc/stdio/freopen.c
143
(void) __sflush(fp);
lib/libc/stdio/freopen.c
145
isopen = fp->_close != NULL;
lib/libc/stdio/freopen.c
146
if ((wantfd = fp->_file) < 0 && isopen) {
lib/libc/stdio/freopen.c
147
(void) (*fp->_close)(fp->_cookie);
lib/libc/stdio/freopen.c
157
(void) (*fp->_close)(fp->_cookie);
lib/libc/stdio/freopen.c
174
if (fp->_flags & __SMBF)
lib/libc/stdio/freopen.c
175
free((char *)fp->_bf._base);
lib/libc/stdio/freopen.c
176
fp->_w = 0;
lib/libc/stdio/freopen.c
177
fp->_r = 0;
lib/libc/stdio/freopen.c
178
fp->_p = NULL;
lib/libc/stdio/freopen.c
179
fp->_bf._base = NULL;
lib/libc/stdio/freopen.c
180
fp->_bf._size = 0;
lib/libc/stdio/freopen.c
181
fp->_lbfsize = 0;
lib/libc/stdio/freopen.c
182
if (HASUB(fp))
lib/libc/stdio/freopen.c
183
FREEUB(fp);
lib/libc/stdio/freopen.c
184
fp->_ub._size = 0;
lib/libc/stdio/freopen.c
185
if (HASLB(fp))
lib/libc/stdio/freopen.c
186
FREELB(fp);
lib/libc/stdio/freopen.c
187
fp->_lb._size = 0;
lib/libc/stdio/freopen.c
188
fp->_orientation = 0;
lib/libc/stdio/freopen.c
189
memset(&fp->_mbstate, 0, sizeof(mbstate_t));
lib/libc/stdio/freopen.c
190
fp->_flags2 = 0;
lib/libc/stdio/freopen.c
194
(void) (*fp->_close)(fp->_cookie);
lib/libc/stdio/freopen.c
195
fp->_flags = 0; /* set it free */
lib/libc/stdio/freopen.c
197
fp = NULL;
lib/libc/stdio/freopen.c
212
(void)_close(fp->_file);
lib/libc/stdio/freopen.c
223
fp->_flags = 0; /* set it free */
lib/libc/stdio/freopen.c
225
fp = NULL;
lib/libc/stdio/freopen.c
229
fp->_flags = flags;
lib/libc/stdio/freopen.c
230
fp->_file = f;
lib/libc/stdio/freopen.c
231
fp->_cookie = fp;
lib/libc/stdio/freopen.c
232
fp->_read = __sread;
lib/libc/stdio/freopen.c
233
fp->_write = __swrite;
lib/libc/stdio/freopen.c
234
fp->_seek = __sseek;
lib/libc/stdio/freopen.c
235
fp->_close = __sclose;
lib/libc/stdio/freopen.c
245
fp->_flags2 |= __S2OAP;
lib/libc/stdio/freopen.c
246
(void) _sseek(fp, (fpos_t)0, SEEK_END);
lib/libc/stdio/freopen.c
250
return (fp);
lib/libc/stdio/freopen.c
55
FILE * __restrict fp)
lib/libc/stdio/freopen.c
62
(void) fclose(fp);
lib/libc/stdio/freopen.c
67
FLOCKFILE_CANCELSAFE(fp);
lib/libc/stdio/freopen.c
79
if (fp->_flags == 0) {
lib/libc/stdio/freopen.c
81
fp = NULL;
lib/libc/stdio/freopen.c
84
if ((dflags = _fcntl(fp->_file, F_GETFL)) < 0) {
lib/libc/stdio/freopen.c
86
fclose(fp);
lib/libc/stdio/freopen.c
88
fp = NULL;
lib/libc/stdio/freopen.c
94
fclose(fp);
lib/libc/stdio/freopen.c
96
fp = NULL;
lib/libc/stdio/freopen.c
99
if (fp->_flags & __SWR)
lib/libc/stdio/fscanf.c
49
fscanf(FILE * __restrict fp, char const * __restrict fmt, ...)
lib/libc/stdio/fscanf.c
55
FLOCKFILE_CANCELSAFE(fp);
lib/libc/stdio/fscanf.c
56
ret = __svfscanf(fp, __get_locale(), fmt, ap);
lib/libc/stdio/fscanf.c
62
fscanf_l(FILE * __restrict fp, locale_t locale, char const * __restrict fmt, ...)
lib/libc/stdio/fscanf.c
69
FLOCKFILE_CANCELSAFE(fp);
lib/libc/stdio/fscanf.c
70
ret = __svfscanf(fp, locale, fmt, ap);
lib/libc/stdio/fseek.c
101
if ((seekfn = fp->_seek) == NULL) {
lib/libc/stdio/fseek.c
118
if (_ftello(fp, &curoff))
lib/libc/stdio/fseek.c
165
if (fp->_bf._base == NULL)
lib/libc/stdio/fseek.c
166
__smakebuf(fp);
lib/libc/stdio/fseek.c
167
if (fp->_flags & (__SWR | __SRW | __SNBF | __SNPT))
lib/libc/stdio/fseek.c
169
if ((fp->_flags & __SOPT) == 0) {
lib/libc/stdio/fseek.c
171
fp->_file < 0 || _fstat(fp->_file, &st) ||
lib/libc/stdio/fseek.c
173
fp->_flags |= __SNPT;
lib/libc/stdio/fseek.c
176
fp->_blksize = st.st_blksize;
lib/libc/stdio/fseek.c
177
fp->_flags |= __SOPT;
lib/libc/stdio/fseek.c
187
if (_fstat(fp->_file, &st))
lib/libc/stdio/fseek.c
204
if (!havepos && _ftello(fp, &curoff))
lib/libc/stdio/fseek.c
211
if (fp->_flags & __SMOD)
lib/libc/stdio/fseek.c
220
if (HASUB(fp)) {
lib/libc/stdio/fseek.c
221
curoff += fp->_r; /* kill off ungetc */
lib/libc/stdio/fseek.c
222
n = fp->_up - fp->_bf._base;
lib/libc/stdio/fseek.c
224
n += fp->_ur;
lib/libc/stdio/fseek.c
226
n = fp->_p - fp->_bf._base;
lib/libc/stdio/fseek.c
228
n += fp->_r;
lib/libc/stdio/fseek.c
239
fp->_p = fp->_bf._base + o;
lib/libc/stdio/fseek.c
240
fp->_r = n - o;
lib/libc/stdio/fseek.c
241
if (HASUB(fp))
lib/libc/stdio/fseek.c
242
FREEUB(fp);
lib/libc/stdio/fseek.c
243
fp->_flags &= ~__SEOF;
lib/libc/stdio/fseek.c
244
memset(&fp->_mbstate, 0, sizeof(mbstate_t));
lib/libc/stdio/fseek.c
257
curoff = target & ~(fp->_blksize - 1);
lib/libc/stdio/fseek.c
258
if (_sseek(fp, curoff, SEEK_SET) == POS_ERR)
lib/libc/stdio/fseek.c
260
fp->_r = 0;
lib/libc/stdio/fseek.c
261
fp->_p = fp->_bf._base;
lib/libc/stdio/fseek.c
262
if (HASUB(fp))
lib/libc/stdio/fseek.c
263
FREEUB(fp);
lib/libc/stdio/fseek.c
266
if (__srefill(fp) || fp->_r < n)
lib/libc/stdio/fseek.c
268
fp->_p += n;
lib/libc/stdio/fseek.c
269
fp->_r -= n;
lib/libc/stdio/fseek.c
271
fp->_flags &= ~__SEOF;
lib/libc/stdio/fseek.c
272
memset(&fp->_mbstate, 0, sizeof(mbstate_t));
lib/libc/stdio/fseek.c
280
if (__sflush(fp) ||
lib/libc/stdio/fseek.c
281
(ret = _sseek(fp, (fpos_t)offset, whence)) == POS_ERR)
lib/libc/stdio/fseek.c
284
fp->_flags |= __SERR;
lib/libc/stdio/fseek.c
289
if (HASUB(fp))
lib/libc/stdio/fseek.c
290
FREEUB(fp);
lib/libc/stdio/fseek.c
291
fp->_p = fp->_bf._base;
lib/libc/stdio/fseek.c
292
fp->_r = 0;
lib/libc/stdio/fseek.c
294
fp->_flags &= ~__SEOF;
lib/libc/stdio/fseek.c
295
memset(&fp->_mbstate, 0, sizeof(mbstate_t));
lib/libc/stdio/fseek.c
50
fseek(FILE *fp, long offset, int whence)
lib/libc/stdio/fseek.c
59
FLOCKFILE_CANCELSAFE(fp);
lib/libc/stdio/fseek.c
60
ret = _fseeko(fp, (off_t)offset, whence, 1);
lib/libc/stdio/fseek.c
68
fseeko(FILE *fp, off_t offset, int whence)
lib/libc/stdio/fseek.c
77
FLOCKFILE_CANCELSAFE(fp);
lib/libc/stdio/fseek.c
78
ret = _fseeko(fp, offset, whence, 0);
lib/libc/stdio/fseek.c
90
_fseeko(FILE *fp, off_t offset, int whence, int ltest)
lib/libc/stdio/ftell.c
102
} else if (fp->_flags & __SOFF)
lib/libc/stdio/ftell.c
103
pos = fp->_offset;
lib/libc/stdio/ftell.c
105
pos = _sseek(fp, (fpos_t)0, SEEK_CUR);
lib/libc/stdio/ftell.c
109
if (fp->_flags & __SRD) {
lib/libc/stdio/ftell.c
115
if ((pos -= (HASUB(fp) ? fp->_ur : fp->_r)) < 0) {
lib/libc/stdio/ftell.c
116
fp->_flags |= __SERR;
lib/libc/stdio/ftell.c
120
if (HASUB(fp))
lib/libc/stdio/ftell.c
121
pos -= fp->_r; /* Can be negative at this point. */
lib/libc/stdio/ftell.c
122
} else if ((fp->_flags & __SWR) && fp->_p != NULL &&
lib/libc/stdio/ftell.c
123
(n = fp->_p - fp->_bf._base) > 0) {
lib/libc/stdio/ftell.c
48
ftell(FILE *fp)
lib/libc/stdio/ftell.c
52
rv = ftello(fp);
lib/libc/stdio/ftell.c
64
ftello(FILE *fp)
lib/libc/stdio/ftell.c
69
FLOCKFILE(fp);
lib/libc/stdio/ftell.c
70
ret = _ftello(fp, &rv);
lib/libc/stdio/ftell.c
71
FUNLOCKFILE(fp);
lib/libc/stdio/ftell.c
82
_ftello(FILE *fp, fpos_t *offset)
lib/libc/stdio/ftell.c
87
if (fp->_seek == NULL) {
lib/libc/stdio/ftell.c
96
if (!(fp->_flags & __SRD) && (fp->_flags & __SWR) &&
lib/libc/stdio/ftell.c
97
fp->_p != NULL && fp->_p - fp->_bf._base > 0 &&
lib/libc/stdio/ftell.c
98
((fp->_flags & __SAPP) || (fp->_flags2 & __S2OAP))) {
lib/libc/stdio/ftell.c
99
pos = _sseek(fp, (fpos_t)0, SEEK_END);
lib/libc/stdio/funopen.c
47
FILE *fp;
lib/libc/stdio/funopen.c
62
if ((fp = __sfp()) == NULL)
lib/libc/stdio/funopen.c
64
fp->_flags = flags;
lib/libc/stdio/funopen.c
65
fp->_file = -1;
lib/libc/stdio/funopen.c
66
fp->_cookie = (void *)cookie;
lib/libc/stdio/funopen.c
67
fp->_read = readfn;
lib/libc/stdio/funopen.c
68
fp->_write = writefn;
lib/libc/stdio/funopen.c
69
fp->_seek = seekfn;
lib/libc/stdio/funopen.c
70
fp->_close = closefn;
lib/libc/stdio/funopen.c
71
return (fp);
lib/libc/stdio/fvwrite.c
103
if ((fp->_flags & (__SALC | __SSTR)) ==
lib/libc/stdio/fvwrite.c
104
(__SALC | __SSTR) && fp->_w < len) {
lib/libc/stdio/fvwrite.c
105
size_t blen = fp->_p - fp->_bf._base;
lib/libc/stdio/fvwrite.c
111
fp->_w = len + 128;
lib/libc/stdio/fvwrite.c
112
fp->_bf._size = blen + len + 128;
lib/libc/stdio/fvwrite.c
113
fp->_bf._base =
lib/libc/stdio/fvwrite.c
114
reallocf(fp->_bf._base, fp->_bf._size + 1);
lib/libc/stdio/fvwrite.c
115
if (fp->_bf._base == NULL)
lib/libc/stdio/fvwrite.c
117
fp->_p = fp->_bf._base + blen;
lib/libc/stdio/fvwrite.c
119
w = fp->_w;
lib/libc/stdio/fvwrite.c
120
if (fp->_flags & __SSTR) {
lib/libc/stdio/fvwrite.c
125
fp->_w -= w;
lib/libc/stdio/fvwrite.c
126
fp->_p += w;
lib/libc/stdio/fvwrite.c
129
} else if (fp->_p > fp->_bf._base && len > w) {
lib/libc/stdio/fvwrite.c
133
fp->_p += w;
lib/libc/stdio/fvwrite.c
134
if (__fflush(fp))
lib/libc/stdio/fvwrite.c
136
} else if (len >= (w = fp->_bf._size)) {
lib/libc/stdio/fvwrite.c
138
w = _swrite(fp, p, w);
lib/libc/stdio/fvwrite.c
145
fp->_w -= w;
lib/libc/stdio/fvwrite.c
146
fp->_p += w;
lib/libc/stdio/fvwrite.c
169
w = fp->_w + fp->_bf._size;
lib/libc/stdio/fvwrite.c
170
if (fp->_p > fp->_bf._base && s > w) {
lib/libc/stdio/fvwrite.c
173
fp->_p += w;
lib/libc/stdio/fvwrite.c
174
if (__fflush(fp))
lib/libc/stdio/fvwrite.c
176
} else if (s >= (w = fp->_bf._size)) {
lib/libc/stdio/fvwrite.c
177
w = _swrite(fp, p, w);
lib/libc/stdio/fvwrite.c
183
fp->_w -= w;
lib/libc/stdio/fvwrite.c
184
fp->_p += w;
lib/libc/stdio/fvwrite.c
188
if (__fflush(fp))
lib/libc/stdio/fvwrite.c
199
fp->_flags |= __SERR;
lib/libc/stdio/fvwrite.c
48
__sfvwrite(FILE *fp, struct __suio *uio)
lib/libc/stdio/fvwrite.c
60
if (prepwrite(fp) != 0)
lib/libc/stdio/fvwrite.c
64
#define COPY(n) (void)memcpy((void *)fp->_p, (void *)p, (size_t)(n))
lib/libc/stdio/fvwrite.c
77
if (fp->_flags & __SNBF) {
lib/libc/stdio/fvwrite.c
83
w = _swrite(fp, p, MIN(len, BUFSIZ));
lib/libc/stdio/fvwrite.c
89
} else if ((fp->_flags & __SLBF) == 0) {
lib/libc/stdio/fwalk.c
43
FILE *fp;
lib/libc/stdio/fwalk.c
57
for (fp = g->iobs, n = g->niobs; --n >= 0; fp++)
lib/libc/stdio/fwalk.c
58
if ((fp->_flags != 0) && ((fp->_flags & __SIGN) == 0))
lib/libc/stdio/fwalk.c
59
ret |= (*function)(fp);
lib/libc/stdio/fwide.c
38
fwide(FILE *fp, int mode)
lib/libc/stdio/fwide.c
42
FLOCKFILE(fp);
lib/libc/stdio/fwide.c
44
if (mode != 0 && fp->_orientation == 0)
lib/libc/stdio/fwide.c
45
fp->_orientation = mode > 0 ? 1 : -1;
lib/libc/stdio/fwide.c
46
m = fp->_orientation;
lib/libc/stdio/fwide.c
47
FUNLOCKFILE(fp);
lib/libc/stdio/fwprintf.c
40
fwprintf(FILE * __restrict fp, const wchar_t * __restrict fmt, ...)
lib/libc/stdio/fwprintf.c
46
ret = vfwprintf(fp, fmt, ap);
lib/libc/stdio/fwprintf.c
52
fwprintf_l(FILE * __restrict fp, locale_t locale, const wchar_t * __restrict fmt, ...)
lib/libc/stdio/fwprintf.c
58
ret = vfwprintf_l(fp, locale, fmt, ap);
lib/libc/stdio/fwrite.c
100
n = fwrite_unlocked(buf, size, count, fp);
lib/libc/stdio/fwrite.c
50
FILE * __restrict fp)
lib/libc/stdio/fwrite.c
71
fp->_flags |= __SERR;
lib/libc/stdio/fwrite.c
82
ORIENT(fp, -1);
lib/libc/stdio/fwrite.c
88
if (__sfvwrite(fp, &uio) != 0)
lib/libc/stdio/fwrite.c
95
FILE * __restrict fp)
lib/libc/stdio/fwrite.c
99
FLOCKFILE_CANCELSAFE(fp);
lib/libc/stdio/fwscanf.c
40
fwscanf(FILE * __restrict fp, const wchar_t * __restrict fmt, ...)
lib/libc/stdio/fwscanf.c
46
r = vfwscanf(fp, fmt, ap);
lib/libc/stdio/fwscanf.c
52
fwscanf_l(FILE * __restrict fp, locale_t locale, const wchar_t * __restrict fmt, ...)
lib/libc/stdio/fwscanf.c
58
r = vfwscanf_l(fp, locale, fmt, ap);
lib/libc/stdio/getc.c
45
getc(FILE *fp)
lib/libc/stdio/getc.c
48
FLOCKFILE_CANCELSAFE(fp);
lib/libc/stdio/getc.c
51
retval = __sgetc(fp);
lib/libc/stdio/getc.c
57
getc_unlocked(FILE *fp)
lib/libc/stdio/getc.c
60
return (__sgetc(fp));
lib/libc/stdio/getdelim.c
110
FILE * __restrict fp)
lib/libc/stdio/getdelim.c
115
FLOCKFILE_CANCELSAFE(fp);
lib/libc/stdio/getdelim.c
116
ORIENT(fp, -1);
lib/libc/stdio/getdelim.c
126
if (fp->_r <= 0 && __srefill(fp)) {
lib/libc/stdio/getdelim.c
128
if (!__sfeof(fp) || expandtofit(linep, 1, linecapp))
lib/libc/stdio/getdelim.c
136
while ((endp = memchr(fp->_p, delim, fp->_r)) == NULL) {
lib/libc/stdio/getdelim.c
137
if (sappend(linep, &linelen, linecapp, fp->_p, fp->_r))
lib/libc/stdio/getdelim.c
140
if (__srefill(fp)) {
lib/libc/stdio/getdelim.c
141
if (__sfeof(fp))
lib/libc/stdio/getdelim.c
151
fp) == EOF)
lib/libc/stdio/getdelim.c
166
if (sappend(linep, &linelen, linecapp, fp->_p, endp - fp->_p))
lib/libc/stdio/getdelim.c
168
fp->_r -= endp - fp->_p;
lib/libc/stdio/getdelim.c
169
fp->_p = endp;
lib/libc/stdio/getdelim.c
178
fp->_flags |= __SERR;
lib/libc/stdio/getline.c
33
FILE * __restrict fp)
lib/libc/stdio/getline.c
36
return (getdelim(linep, linecapp, '\n', fp));
lib/libc/stdio/getw.c
38
getw(FILE *fp)
lib/libc/stdio/getw.c
42
return (fread((void *)&x, sizeof(x), 1, fp) == 1 ? x : EOF);
lib/libc/stdio/getwc.c
49
getwc(FILE *fp)
lib/libc/stdio/getwc.c
52
return (fgetwc(fp));
lib/libc/stdio/getwc.c
55
getwc_l(FILE *fp, locale_t locale)
lib/libc/stdio/getwc.c
58
return (fgetwc_l(fp, locale));
lib/libc/stdio/local.h
102
#define prepwrite(fp) \
lib/libc/stdio/local.h
103
((((fp)->_flags & __SWR) == 0 || \
lib/libc/stdio/local.h
104
((fp)->_bf._base == NULL && ((fp)->_flags & __SSTR) == 0)) && \
lib/libc/stdio/local.h
105
__swsetup(fp))
lib/libc/stdio/local.h
111
#define HASUB(fp) ((fp)->_ub._base != NULL)
lib/libc/stdio/local.h
112
#define FREEUB(fp) { \
lib/libc/stdio/local.h
113
if ((fp)->_ub._base != (fp)->_ubuf) \
lib/libc/stdio/local.h
114
free((char *)(fp)->_ub._base); \
lib/libc/stdio/local.h
115
(fp)->_ub._base = NULL; \
lib/libc/stdio/local.h
121
#define HASLB(fp) ((fp)->_lb._base != NULL)
lib/libc/stdio/local.h
122
#define FREELB(fp) { \
lib/libc/stdio/local.h
123
free((char *)(fp)->_lb._base); \
lib/libc/stdio/local.h
124
(fp)->_lb._base = NULL; \
lib/libc/stdio/local.h
139
#define ORIENT(fp, o) do { \
lib/libc/stdio/local.h
140
if ((fp)->_orientation == 0) \
lib/libc/stdio/local.h
141
(fp)->_orientation = (o); \
lib/libc/stdio/local.h
145
#define FLOCKFILE_CANCELSAFE(fp) \
lib/libc/stdio/local.h
149
_FLOCKFILE(fp); \
lib/libc/stdio/local.h
151
__stdio_cancel_cleanup, (fp), \
lib/libc/stdio/local.h
59
extern int __fflush(FILE *fp);
lib/libc/stdio/local.h
87
FILE * __restrict fp);
lib/libc/stdio/local.h
91
__fgetwc(FILE *fp, locale_t locale)
lib/libc/stdio/local.h
95
return (__fgetwc_mbs(fp, &fp->_mbstate, &nread, locale));
lib/libc/stdio/makebuf.c
109
fp->_blksize = st.st_blksize;
lib/libc/stdio/makebuf.c
110
return ((st.st_mode & S_IFMT) == S_IFREG && fp->_seek == __sseek ?
lib/libc/stdio/makebuf.c
54
__smakebuf(FILE *fp)
lib/libc/stdio/makebuf.c
61
if (fp->_flags & __SNBF) {
lib/libc/stdio/makebuf.c
62
fp->_bf._base = fp->_p = fp->_nbuf;
lib/libc/stdio/makebuf.c
63
fp->_bf._size = 1;
lib/libc/stdio/makebuf.c
66
flags = __swhatbuf(fp, &size, &couldbetty);
lib/libc/stdio/makebuf.c
68
fp->_flags |= __SNBF;
lib/libc/stdio/makebuf.c
69
fp->_bf._base = fp->_p = fp->_nbuf;
lib/libc/stdio/makebuf.c
70
fp->_bf._size = 1;
lib/libc/stdio/makebuf.c
75
fp->_bf._base = fp->_p = p;
lib/libc/stdio/makebuf.c
76
fp->_bf._size = size;
lib/libc/stdio/makebuf.c
77
if (couldbetty && isatty(fp->_file))
lib/libc/stdio/makebuf.c
79
fp->_flags |= flags;
lib/libc/stdio/makebuf.c
86
__swhatbuf(FILE *fp, size_t *bufsize, int *couldbetty)
lib/libc/stdio/makebuf.c
90
if (fp->_file < 0 || _fstat(fp->_file, &st) < 0) {
lib/libc/stdio/open_memstream.c
177
FILE *fp;
lib/libc/stdio/open_memstream.c
199
fp = funopen(ms, NULL, memstream_write, memstream_seek,
lib/libc/stdio/open_memstream.c
201
if (fp == NULL) {
lib/libc/stdio/open_memstream.c
209
fwide(fp, -1);
lib/libc/stdio/open_memstream.c
210
return (fp);
lib/libc/stdio/open_wmemstream.c
238
FILE *fp;
lib/libc/stdio/open_wmemstream.c
261
fp = funopen(ms, NULL, wmemstream_write, wmemstream_seek,
lib/libc/stdio/open_wmemstream.c
263
if (fp == NULL) {
lib/libc/stdio/open_wmemstream.c
271
fwide(fp, 1);
lib/libc/stdio/open_wmemstream.c
272
return (fp);
lib/libc/stdio/printfcommon.h
153
return (__sprint(iop->fp, &iop->uio, locale));
lib/libc/stdio/printfcommon.h
65
FILE *fp;
lib/libc/stdio/printfcommon.h
71
io_init(struct io_state *iop, FILE *fp)
lib/libc/stdio/printfcommon.h
77
iop->fp = fp;
lib/libc/stdio/printfcommon.h
92
return (__sprint(iop->fp, &iop->uio, locale));
lib/libc/stdio/putc.c
45
putc(int c, FILE *fp)
lib/libc/stdio/putc.c
48
FLOCKFILE_CANCELSAFE(fp);
lib/libc/stdio/putc.c
51
retval = __sputc(c, fp);
lib/libc/stdio/putc.c
57
putc_unlocked(int ch, FILE *fp)
lib/libc/stdio/putc.c
60
return (__sputc(ch, fp));
lib/libc/stdio/putw.c
43
putw(int w, FILE *fp)
lib/libc/stdio/putw.c
53
FLOCKFILE_CANCELSAFE(fp);
lib/libc/stdio/putw.c
54
retval = __sfvwrite(fp, &uio);
lib/libc/stdio/putwc.c
49
putwc_l(wchar_t wc, FILE *fp, locale_t locale)
lib/libc/stdio/putwc.c
52
return (fputwc_l(wc, fp, locale));
lib/libc/stdio/putwc.c
55
putwc(wchar_t wc, FILE *fp)
lib/libc/stdio/putwc.c
57
return putwc_l(wc, fp, __get_locale());
lib/libc/stdio/refill.c
102
if (HASUB(fp)) {
lib/libc/stdio/refill.c
103
FREEUB(fp);
lib/libc/stdio/refill.c
104
if ((fp->_r = fp->_ur) != 0) {
lib/libc/stdio/refill.c
105
fp->_p = fp->_up;
lib/libc/stdio/refill.c
111
if (fp->_bf._base == NULL)
lib/libc/stdio/refill.c
112
__smakebuf(fp);
lib/libc/stdio/refill.c
119
if (fp->_flags & (__SLBF|__SNBF)) {
lib/libc/stdio/refill.c
121
fp->_flags |= __SIGN;
lib/libc/stdio/refill.c
123
fp->_flags &= ~__SIGN;
lib/libc/stdio/refill.c
126
if ((fp->_flags & (__SLBF|__SWR)) == (__SLBF|__SWR))
lib/libc/stdio/refill.c
127
__sflush(fp);
lib/libc/stdio/refill.c
129
fp->_p = fp->_bf._base;
lib/libc/stdio/refill.c
130
fp->_r = _sread(fp, (char *)fp->_p, fp->_bf._size);
lib/libc/stdio/refill.c
131
fp->_flags &= ~__SMOD; /* buffer contents are again pristine */
lib/libc/stdio/refill.c
132
if (fp->_r <= 0) {
lib/libc/stdio/refill.c
133
if (fp->_r == 0)
lib/libc/stdio/refill.c
134
fp->_flags |= __SEOF;
lib/libc/stdio/refill.c
136
fp->_r = 0;
lib/libc/stdio/refill.c
137
fp->_flags |= __SERR;
lib/libc/stdio/refill.c
47
lflush(FILE *fp)
lib/libc/stdio/refill.c
51
if ((fp->_flags & (__SLBF|__SWR)) == (__SLBF|__SWR)) {
lib/libc/stdio/refill.c
52
FLOCKFILE_CANCELSAFE(fp);
lib/libc/stdio/refill.c
53
ret = __sflush(fp);
lib/libc/stdio/refill.c
64
__srefill(FILE *fp)
lib/libc/stdio/refill.c
71
ORIENT(fp, -1);
lib/libc/stdio/refill.c
73
fp->_r = 0; /* largely a convenience for callers */
lib/libc/stdio/refill.c
76
if (fp->_flags & __SEOF)
lib/libc/stdio/refill.c
80
if ((fp->_flags & __SRD) == 0) {
lib/libc/stdio/refill.c
81
if ((fp->_flags & __SRW) == 0) {
lib/libc/stdio/refill.c
83
fp->_flags |= __SERR;
lib/libc/stdio/refill.c
87
if (fp->_flags & __SWR) {
lib/libc/stdio/refill.c
88
if (__sflush(fp))
lib/libc/stdio/refill.c
90
fp->_flags &= ~__SWR;
lib/libc/stdio/refill.c
91
fp->_w = 0;
lib/libc/stdio/refill.c
92
fp->_lbfsize = 0;
lib/libc/stdio/refill.c
94
fp->_flags |= __SRD;
lib/libc/stdio/rewind.c
43
rewind(FILE *fp)
lib/libc/stdio/rewind.c
51
FLOCKFILE(fp);
lib/libc/stdio/rewind.c
52
if (_fseeko(fp, (off_t)0, SEEK_SET, 1) == 0)
lib/libc/stdio/rewind.c
54
clearerr_unlocked(fp); /* POSIX: clear stdio error regardless */
lib/libc/stdio/rewind.c
55
FUNLOCKFILE(fp);
lib/libc/stdio/rget.c
44
__srget(FILE *fp)
lib/libc/stdio/rget.c
46
if (__srefill(fp) == 0) {
lib/libc/stdio/rget.c
47
fp->_r--;
lib/libc/stdio/rget.c
48
return (*fp->_p++);
lib/libc/stdio/setbuf.c
39
setbuf(FILE * __restrict fp, char * __restrict buf)
lib/libc/stdio/setbuf.c
41
(void) setvbuf(fp, buf, buf ? _IOFBF : _IONBF, BUFSIZ);
lib/libc/stdio/setbuffer.c
38
setbuffer(FILE *fp, char *buf, int size)
lib/libc/stdio/setbuffer.c
41
(void)setvbuf(fp, buf, buf ? _IOFBF : _IONBF, (size_t)size);
lib/libc/stdio/setbuffer.c
48
setlinebuf(FILE *fp)
lib/libc/stdio/setbuffer.c
51
return (setvbuf(fp, (char *)NULL, _IOLBF, (size_t)0));
lib/libc/stdio/setvbuf.c
111
fp->_flags = flags | __SNBF;
lib/libc/stdio/setvbuf.c
112
fp->_w = 0;
lib/libc/stdio/setvbuf.c
113
fp->_bf._base = fp->_p = fp->_nbuf;
lib/libc/stdio/setvbuf.c
114
fp->_bf._size = 1;
lib/libc/stdio/setvbuf.c
135
fp->_flags = flags;
lib/libc/stdio/setvbuf.c
136
fp->_bf._base = fp->_p = (unsigned char *)buf;
lib/libc/stdio/setvbuf.c
137
fp->_bf._size = size;
lib/libc/stdio/setvbuf.c
145
fp->_w = 0;
lib/libc/stdio/setvbuf.c
146
fp->_lbfsize = -fp->_bf._size;
lib/libc/stdio/setvbuf.c
148
fp->_w = size;
lib/libc/stdio/setvbuf.c
151
fp->_w = 0;
lib/libc/stdio/setvbuf.c
48
setvbuf(FILE * __restrict fp, char * __restrict buf, int mode, size_t size)
lib/libc/stdio/setvbuf.c
63
FLOCKFILE_CANCELSAFE(fp);
lib/libc/stdio/setvbuf.c
71
(void)__sflush(fp);
lib/libc/stdio/setvbuf.c
72
if (HASUB(fp))
lib/libc/stdio/setvbuf.c
73
FREEUB(fp);
lib/libc/stdio/setvbuf.c
74
fp->_r = fp->_lbfsize = 0;
lib/libc/stdio/setvbuf.c
75
flags = fp->_flags;
lib/libc/stdio/setvbuf.c
77
free((void *)fp->_bf._base);
lib/libc/stdio/setvbuf.c
89
flags |= __swhatbuf(fp, &iosize, &ttyflag);
lib/libc/stdio/stdio.c
101
_swrite(FILE *fp, char const *buf, int n)
lib/libc/stdio/stdio.c
106
if (fp->_flags & __SAPP) {
lib/libc/stdio/stdio.c
108
if (_sseek(fp, (fpos_t)0, SEEK_END) == -1 &&
lib/libc/stdio/stdio.c
109
(fp->_flags & __SOPT))
lib/libc/stdio/stdio.c
113
ret = (*fp->_write)(fp->_cookie, buf, n);
lib/libc/stdio/stdio.c
116
if ((fp->_flags & __SOFF) && !(fp->_flags2 & __S2OAP) &&
lib/libc/stdio/stdio.c
117
fp->_offset <= OFF_MAX - ret)
lib/libc/stdio/stdio.c
118
fp->_offset += ret;
lib/libc/stdio/stdio.c
120
fp->_flags &= ~__SOFF;
lib/libc/stdio/stdio.c
123
fp->_flags &= ~__SOFF;
lib/libc/stdio/stdio.c
128
_sseek(FILE *fp, fpos_t offset, int whence)
lib/libc/stdio/stdio.c
135
ret = (*fp->_seek)(fp->_cookie, offset, whence);
lib/libc/stdio/stdio.c
147
if (HASUB(fp))
lib/libc/stdio/stdio.c
148
FREEUB(fp);
lib/libc/stdio/stdio.c
149
fp->_p = fp->_bf._base;
lib/libc/stdio/stdio.c
150
fp->_r = 0;
lib/libc/stdio/stdio.c
151
fp->_flags &= ~__SEOF;
lib/libc/stdio/stdio.c
153
fp->_flags |= __SERR;
lib/libc/stdio/stdio.c
156
fp->_flags &= ~__SAPP;
lib/libc/stdio/stdio.c
157
fp->_flags &= ~__SOFF;
lib/libc/stdio/stdio.c
159
} else if (fp->_flags & __SOPT) {
lib/libc/stdio/stdio.c
160
fp->_flags |= __SOFF;
lib/libc/stdio/stdio.c
161
fp->_offset = ret;
lib/libc/stdio/stdio.c
51
FILE *fp = cookie;
lib/libc/stdio/stdio.c
53
return(_read(fp->_file, buf, (size_t)n));
lib/libc/stdio/stdio.c
59
FILE *fp = cookie;
lib/libc/stdio/stdio.c
61
return (_write(fp->_file, buf, (size_t)n));
lib/libc/stdio/stdio.c
67
FILE *fp = cookie;
lib/libc/stdio/stdio.c
69
return (lseek(fp->_file, (off_t)offset, whence));
lib/libc/stdio/stdio.c
83
_sread(FILE *fp, char *buf, int n)
lib/libc/stdio/stdio.c
87
ret = (*fp->_read)(fp->_cookie, buf, n);
lib/libc/stdio/stdio.c
89
if (fp->_flags & __SOFF) {
lib/libc/stdio/stdio.c
90
if (fp->_offset <= OFF_MAX - ret)
lib/libc/stdio/stdio.c
91
fp->_offset += ret;
lib/libc/stdio/stdio.c
93
fp->_flags &= ~__SOFF;
lib/libc/stdio/stdio.c
96
fp->_flags &= ~__SOFF;
lib/libc/stdio/tmpfile.c
51
FILE *fp;
lib/libc/stdio/tmpfile.c
80
if ((fp = fdopen(fd, "w+")) == NULL) {
lib/libc/stdio/tmpfile.c
86
return (fp);
lib/libc/stdio/ungetc.c
104
__ungetc(int c, FILE *fp)
lib/libc/stdio/ungetc.c
109
if ((fp->_flags & __SRD) == 0) {
lib/libc/stdio/ungetc.c
114
if ((fp->_flags & __SRW) == 0)
lib/libc/stdio/ungetc.c
116
if (fp->_flags & __SWR) {
lib/libc/stdio/ungetc.c
117
if (__sflush(fp))
lib/libc/stdio/ungetc.c
119
fp->_flags &= ~__SWR;
lib/libc/stdio/ungetc.c
120
fp->_w = 0;
lib/libc/stdio/ungetc.c
121
fp->_lbfsize = 0;
lib/libc/stdio/ungetc.c
123
fp->_flags |= __SRD;
lib/libc/stdio/ungetc.c
131
if (HASUB(fp)) {
lib/libc/stdio/ungetc.c
132
if (fp->_r >= fp->_ub._size && __submore(fp))
lib/libc/stdio/ungetc.c
134
*--fp->_p = c;
lib/libc/stdio/ungetc.c
135
fp->_r++;
lib/libc/stdio/ungetc.c
138
fp->_flags &= ~__SEOF;
lib/libc/stdio/ungetc.c
145
if (fp->_bf._base != NULL && fp->_p > fp->_bf._base &&
lib/libc/stdio/ungetc.c
146
fp->_p[-1] == c) {
lib/libc/stdio/ungetc.c
147
fp->_p--;
lib/libc/stdio/ungetc.c
148
fp->_r++;
lib/libc/stdio/ungetc.c
156
fp->_ur = fp->_r;
lib/libc/stdio/ungetc.c
157
fp->_up = fp->_p;
lib/libc/stdio/ungetc.c
158
fp->_ub._base = fp->_ubuf;
lib/libc/stdio/ungetc.c
159
fp->_ub._size = sizeof(fp->_ubuf);
lib/libc/stdio/ungetc.c
160
fp->_ubuf[sizeof(fp->_ubuf) - 1] = c;
lib/libc/stdio/ungetc.c
161
fp->_p = &fp->_ubuf[sizeof(fp->_ubuf) - 1];
lib/libc/stdio/ungetc.c
162
fp->_r = 1;
lib/libc/stdio/ungetc.c
52
__submore(FILE *fp)
lib/libc/stdio/ungetc.c
57
if (fp->_ub._base == fp->_ubuf) {
lib/libc/stdio/ungetc.c
63
fp->_ub._base = p;
lib/libc/stdio/ungetc.c
64
fp->_ub._size = BUFSIZ;
lib/libc/stdio/ungetc.c
65
p += BUFSIZ - sizeof(fp->_ubuf);
lib/libc/stdio/ungetc.c
66
for (i = sizeof(fp->_ubuf); --i >= 0;)
lib/libc/stdio/ungetc.c
67
p[i] = fp->_ubuf[i];
lib/libc/stdio/ungetc.c
68
fp->_p = p;
lib/libc/stdio/ungetc.c
71
i = fp->_ub._size;
lib/libc/stdio/ungetc.c
72
p = reallocarray(fp->_ub._base, i, 2);
lib/libc/stdio/ungetc.c
77
fp->_p = p + i;
lib/libc/stdio/ungetc.c
78
fp->_ub._base = p;
lib/libc/stdio/ungetc.c
79
fp->_ub._size = i * 2;
lib/libc/stdio/ungetc.c
87
ungetc(int c, FILE *fp)
lib/libc/stdio/ungetc.c
93
FLOCKFILE_CANCELSAFE(fp);
lib/libc/stdio/ungetc.c
94
ORIENT(fp, -1);
lib/libc/stdio/ungetc.c
95
ret = __ungetc(c, fp);
lib/libc/stdio/ungetwc.c
50
__ungetwc(wint_t wc, FILE *fp, locale_t locale)
lib/libc/stdio/ungetwc.c
58
if ((len = l->__wcrtomb(buf, wc, &fp->_mbstate)) == (size_t)-1) {
lib/libc/stdio/ungetwc.c
59
fp->_flags |= __SERR;
lib/libc/stdio/ungetwc.c
63
if (__ungetc((unsigned char)buf[len], fp) == EOF)
lib/libc/stdio/ungetwc.c
73
ungetwc_l(wint_t wc, FILE *fp, locale_t locale)
lib/libc/stdio/ungetwc.c
78
FLOCKFILE_CANCELSAFE(fp);
lib/libc/stdio/ungetwc.c
79
ORIENT(fp, 1);
lib/libc/stdio/ungetwc.c
80
r = __ungetwc(wc, fp, locale);
lib/libc/stdio/ungetwc.c
86
ungetwc(wint_t wc, FILE *fp)
lib/libc/stdio/ungetwc.c
88
return ungetwc_l(wc, fp, __get_locale());
lib/libc/stdio/vfprintf.c
1080
if (__sferror(fp))
lib/libc/stdio/vfprintf.c
1083
fp->_flags |= savserr;
lib/libc/stdio/vfprintf.c
153
__sprint(FILE *fp, struct __suio *uio, locale_t locale)
lib/libc/stdio/vfprintf.c
161
err = __sfvwrite(fp, uio);
lib/libc/stdio/vfprintf.c
173
__sbprintf(FILE *fp, locale_t locale, int serrno, const char *fmt, va_list ap)
lib/libc/stdio/vfprintf.c
180
if (prepwrite(fp) != 0)
lib/libc/stdio/vfprintf.c
184
fake._flags = fp->_flags & ~__SNBF;
lib/libc/stdio/vfprintf.c
185
fake._file = fp->_file;
lib/libc/stdio/vfprintf.c
186
fake._cookie = fp->_cookie;
lib/libc/stdio/vfprintf.c
187
fake._write = fp->_write;
lib/libc/stdio/vfprintf.c
188
fake._orientation = fp->_orientation;
lib/libc/stdio/vfprintf.c
189
fake._mbstate = fp->_mbstate;
lib/libc/stdio/vfprintf.c
201
fp->_flags |= __SERR;
lib/libc/stdio/vfprintf.c
268
vfprintf_l(FILE * __restrict fp, locale_t locale, const char * __restrict fmt0,
lib/libc/stdio/vfprintf.c
275
FLOCKFILE_CANCELSAFE(fp);
lib/libc/stdio/vfprintf.c
277
if ((fp->_flags & (__SNBF|__SWR|__SRW)) == (__SNBF|__SWR) &&
lib/libc/stdio/vfprintf.c
278
fp->_file >= 0)
lib/libc/stdio/vfprintf.c
279
ret = __sbprintf(fp, locale, serrno, fmt0, ap);
lib/libc/stdio/vfprintf.c
281
ret = __vfprintf(fp, locale, serrno, fmt0, ap);
lib/libc/stdio/vfprintf.c
286
vfprintf(FILE * __restrict fp, const char * __restrict fmt0, va_list ap)
lib/libc/stdio/vfprintf.c
288
return vfprintf_l(fp, __get_locale(), fmt0, ap);
lib/libc/stdio/vfprintf.c
302
__vfprintf(FILE *fp, locale_t locale, int serrno, const char *fmt0, va_list ap)
lib/libc/stdio/vfprintf.c
448
return (__xvprintf(fp, fmt0, ap));
lib/libc/stdio/vfprintf.c
451
if (prepwrite(fp) != 0) {
lib/libc/stdio/vfprintf.c
456
savserr = fp->_flags & __SERR;
lib/libc/stdio/vfprintf.c
457
fp->_flags &= ~__SERR;
lib/libc/stdio/vfprintf.c
464
io_init(&io, fp);
lib/libc/stdio/vfprintf.c
671
fp->_flags |= __SERR;
lib/libc/stdio/vfprintf.c
887
fp->_flags |= __SERR;
lib/libc/stdio/vfscanf.c
1003
c = *fp->_p;
lib/libc/stdio/vfscanf.c
113
convert_char(FILE *fp, char * p, int width)
lib/libc/stdio/vfscanf.c
1135
if (--fp->_r > 0)
lib/libc/stdio/vfscanf.c
1136
fp->_p++;
lib/libc/stdio/vfscanf.c
1137
else if (__srefill(fp))
lib/libc/stdio/vfscanf.c
1143
__ungetc(*(u_char *)p, fp);
lib/libc/stdio/vfscanf.c
120
if ((n = fp->_r) < width) {
lib/libc/stdio/vfscanf.c
123
fp->_p += n;
lib/libc/stdio/vfscanf.c
124
if (__srefill(fp)) {
lib/libc/stdio/vfscanf.c
131
fp->_r -= width;
lib/libc/stdio/vfscanf.c
132
fp->_p += width;
lib/libc/stdio/vfscanf.c
138
size_t r = __fread(p, 1, width, fp);
lib/libc/stdio/vfscanf.c
147
convert_wchar(FILE *fp, wchar_t *wcp, int width, locale_t locale)
lib/libc/stdio/vfscanf.c
156
(wi = __fgetwc_mbs(fp, &mbs, &nread, locale)) != WEOF) {
lib/libc/stdio/vfscanf.c
167
convert_ccl(FILE *fp, char * p, int width, const char *ccltab)
lib/libc/stdio/vfscanf.c
174
while (ccltab[*fp->_p]) {
lib/libc/stdio/vfscanf.c
175
n++, fp->_r--, fp->_p++;
lib/libc/stdio/vfscanf.c
178
if (fp->_r <= 0 && __srefill(fp)) {
lib/libc/stdio/vfscanf.c
186
while (ccltab[*fp->_p]) {
lib/libc/stdio/vfscanf.c
187
fp->_r--;
lib/libc/stdio/vfscanf.c
188
*p++ = *fp->_p++;
lib/libc/stdio/vfscanf.c
191
if (fp->_r <= 0 && __srefill(fp)) {
lib/libc/stdio/vfscanf.c
206
convert_wccl(FILE *fp, wchar_t *wcp, int width, const char *ccltab,
lib/libc/stdio/vfscanf.c
216
while ((wi = __fgetwc_mbs(fp, &mbs, &nread, locale)) != WEOF &&
lib/libc/stdio/vfscanf.c
220
__ungetwc(wi, fp, __get_locale());
lib/libc/stdio/vfscanf.c
222
while ((wi = __fgetwc_mbs(fp, &mbs, &nread, locale)) != WEOF &&
lib/libc/stdio/vfscanf.c
228
__ungetwc(wi, fp, __get_locale());
lib/libc/stdio/vfscanf.c
237
convert_string(FILE *fp, char * p, int width)
lib/libc/stdio/vfscanf.c
244
while (!isspace(*fp->_p)) {
lib/libc/stdio/vfscanf.c
245
n++, fp->_r--, fp->_p++;
lib/libc/stdio/vfscanf.c
248
if (fp->_r <= 0 && __srefill(fp))
lib/libc/stdio/vfscanf.c
253
while (!isspace(*fp->_p)) {
lib/libc/stdio/vfscanf.c
254
fp->_r--;
lib/libc/stdio/vfscanf.c
255
*p++ = *fp->_p++;
lib/libc/stdio/vfscanf.c
258
if (fp->_r <= 0 && __srefill(fp))
lib/libc/stdio/vfscanf.c
268
convert_wstring(FILE *fp, wchar_t *wcp, int width, locale_t locale)
lib/libc/stdio/vfscanf.c
277
while ((wi = __fgetwc_mbs(fp, &mbs, &nread, locale)) != WEOF &&
lib/libc/stdio/vfscanf.c
281
__ungetwc(wi, fp, __get_locale());
lib/libc/stdio/vfscanf.c
283
while ((wi = __fgetwc_mbs(fp, &mbs, &nread, locale)) != WEOF &&
lib/libc/stdio/vfscanf.c
289
__ungetwc(wi, fp, __get_locale());
lib/libc/stdio/vfscanf.c
421
parseint(FILE *fp, char * __restrict buf, int width, int base)
lib/libc/stdio/vfscanf.c
428
c = __sgetc(fp);
lib/libc/stdio/vfscanf.c
443
(void) __ungetc(*(u_char *)p, fp);
lib/libc/stdio/vfscanf.c
446
(void) __ungetc(c, fp);
lib/libc/stdio/vfscanf.c
448
(void) __ungetc(c, fp);
lib/libc/stdio/vfscanf.c
457
__vfscanf(FILE *fp, char const *fmt0, va_list ap)
lib/libc/stdio/vfscanf.c
461
FLOCKFILE_CANCELSAFE(fp);
lib/libc/stdio/vfscanf.c
462
ret = __svfscanf(fp, __get_locale(), fmt0, ap);
lib/libc/stdio/vfscanf.c
467
vfscanf_l(FILE *fp, locale_t locale, char const *fmt0, va_list ap)
lib/libc/stdio/vfscanf.c
472
FLOCKFILE_CANCELSAFE(fp);
lib/libc/stdio/vfscanf.c
473
ret = __svfscanf(fp, locale, fmt0, ap);
lib/libc/stdio/vfscanf.c
482
__svfscanf(FILE *fp, locale_t locale, const char *fmt0, va_list ap)
lib/libc/stdio/vfscanf.c
497
ORIENT(fp, -1);
lib/libc/stdio/vfscanf.c
507
while ((fp->_r > 0 || __srefill(fp) == 0) && isspace(*fp->_p))
lib/libc/stdio/vfscanf.c
508
nread++, fp->_r--, fp->_p++;
lib/libc/stdio/vfscanf.c
523
if (fp->_r <= 0 && __srefill(fp))
lib/libc/stdio/vfscanf.c
525
if (*fp->_p != c)
lib/libc/stdio/vfscanf.c
527
fp->_r--, fp->_p++;
lib/libc/stdio/vfscanf.c
714
if (fp->_r <= 0 && __srefill(fp))
lib/libc/stdio/vfscanf.c
722
while (isspace(*fp->_p)) {
lib/libc/stdio/vfscanf.c
724
if (--fp->_r > 0)
lib/libc/stdio/vfscanf.c
725
fp->_p++;
lib/libc/stdio/vfscanf.c
726
else if (__srefill(fp))
lib/libc/stdio/vfscanf.c
746
nr = convert_wchar(fp, GETARG(wchar_t *),
lib/libc/stdio/vfscanf.c
749
nr = convert_char(fp, GETARG(char *), width);
lib/libc/stdio/vfscanf.c
760
nr = convert_wccl(fp, GETARG(wchar_t *), width,
lib/libc/stdio/vfscanf.c
763
nr = convert_ccl(fp, GETARG(char *), width,
lib/libc/stdio/vfscanf.c
779
nr = convert_wstring(fp, GETARG(wchar_t *),
lib/libc/stdio/vfscanf.c
782
nr = convert_string(fp, GETARG(char *), width);
lib/libc/stdio/vfscanf.c
799
nr = parseint(fp, buf, width, base);
lib/libc/stdio/vfscanf.c
836
nr = parsefloat(fp, buf, buf + width, locale);
lib/libc/stdio/vfscanf.c
980
parsefloat(FILE *fp, char *buf, char *end, locale_t locale)
lib/libc/stdio/vfwprintf.c
1136
if (__sferror(fp))
lib/libc/stdio/vfwprintf.c
1139
fp->_flags |= savserr;
lib/libc/stdio/vfwprintf.c
184
__sprint(FILE *fp, struct __suio *uio, locale_t locale)
lib/libc/stdio/vfwprintf.c
195
if (__xfputwc(p[i], fp, locale) == WEOF)
lib/libc/stdio/vfwprintf.c
209
__sbprintf(FILE *fp, locale_t locale, const wchar_t *fmt, va_list ap)
lib/libc/stdio/vfwprintf.c
216
if (prepwrite(fp) != 0)
lib/libc/stdio/vfwprintf.c
220
fake._flags = fp->_flags & ~__SNBF;
lib/libc/stdio/vfwprintf.c
221
fake._file = fp->_file;
lib/libc/stdio/vfwprintf.c
222
fake._cookie = fp->_cookie;
lib/libc/stdio/vfwprintf.c
223
fake._write = fp->_write;
lib/libc/stdio/vfwprintf.c
224
fake._orientation = fp->_orientation;
lib/libc/stdio/vfwprintf.c
225
fake._mbstate = fp->_mbstate;
lib/libc/stdio/vfwprintf.c
237
fp->_flags |= __SERR;
lib/libc/stdio/vfwprintf.c
246
__xfputwc(wchar_t wc, FILE *fp, locale_t locale)
lib/libc/stdio/vfwprintf.c
254
if ((fp->_flags & __SSTR) == 0)
lib/libc/stdio/vfwprintf.c
255
return (__fputwc(wc, fp, locale));
lib/libc/stdio/vfwprintf.c
259
fp->_flags |= __SERR;
lib/libc/stdio/vfwprintf.c
267
return (__sfvwrite(fp, &uio) != EOF ? (wint_t)wc : WEOF);
lib/libc/stdio/vfwprintf.c
347
vfwprintf_l(FILE * __restrict fp, locale_t locale,
lib/libc/stdio/vfwprintf.c
353
FLOCKFILE_CANCELSAFE(fp);
lib/libc/stdio/vfwprintf.c
355
if ((fp->_flags & (__SNBF|__SWR|__SRW)) == (__SNBF|__SWR) &&
lib/libc/stdio/vfwprintf.c
356
fp->_file >= 0)
lib/libc/stdio/vfwprintf.c
357
ret = __sbprintf(fp, locale, fmt0, ap);
lib/libc/stdio/vfwprintf.c
359
ret = __vfwprintf(fp, locale, fmt0, ap);
lib/libc/stdio/vfwprintf.c
364
vfwprintf(FILE * __restrict fp, const wchar_t * __restrict fmt0, va_list ap)
lib/libc/stdio/vfwprintf.c
366
return vfwprintf_l(fp, __get_locale(), fmt0, ap);
lib/libc/stdio/vfwprintf.c
380
__vfwprintf(FILE *fp, locale_t locale, const wchar_t *fmt0, va_list ap)
lib/libc/stdio/vfwprintf.c
523
if (prepwrite(fp) != 0) {
lib/libc/stdio/vfwprintf.c
528
savserr = fp->_flags & __SERR;
lib/libc/stdio/vfwprintf.c
529
fp->_flags &= ~__SERR;
lib/libc/stdio/vfwprintf.c
536
io_init(&io, fp);
lib/libc/stdio/vfwprintf.c
945
fp->_flags |= __SERR;
lib/libc/stdio/vfwscanf.c
126
convert_char(FILE *fp, char * mbp, int width, locale_t locale)
lib/libc/stdio/vfwscanf.c
135
while (width-- != 0 && (wi = __fgetwc(fp, locale)) != WEOF) {
lib/libc/stdio/vfwscanf.c
150
convert_wchar(FILE *fp, wchar_t *wcp, int width, locale_t locale)
lib/libc/stdio/vfwscanf.c
156
while (width-- != 0 && (wi = __fgetwc(fp, locale)) != WEOF) {
lib/libc/stdio/vfwscanf.c
167
convert_ccl(FILE *fp, char * mbp, int width, const struct ccl *ccl,
lib/libc/stdio/vfwscanf.c
177
while ((wi = __fgetwc(fp, locale)) != WEOF &&
lib/libc/stdio/vfwscanf.c
188
__ungetwc(wi, fp, locale);
lib/libc/stdio/vfwscanf.c
195
convert_wccl(FILE *fp, wchar_t *wcp, int width, const struct ccl *ccl,
lib/libc/stdio/vfwscanf.c
204
while ((wi = __fgetwc(fp, locale)) != WEOF &&
lib/libc/stdio/vfwscanf.c
208
__ungetwc(wi, fp, locale);
lib/libc/stdio/vfwscanf.c
211
while ((wi = __fgetwc(fp, locale)) != WEOF &&
lib/libc/stdio/vfwscanf.c
215
__ungetwc(wi, fp, locale);
lib/libc/stdio/vfwscanf.c
225
convert_string(FILE *fp, char * mbp, int width, locale_t locale)
lib/libc/stdio/vfwscanf.c
234
while ((wi = __fgetwc(fp, locale)) != WEOF && width-- != 0 &&
lib/libc/stdio/vfwscanf.c
245
__ungetwc(wi, fp, locale);
lib/libc/stdio/vfwscanf.c
252
convert_wstring(FILE *fp, wchar_t *wcp, int width, locale_t locale)
lib/libc/stdio/vfwscanf.c
259
while ((wi = __fgetwc(fp, locale)) != WEOF &&
lib/libc/stdio/vfwscanf.c
263
__ungetwc(wi, fp, locale);
lib/libc/stdio/vfwscanf.c
265
while ((wi = __fgetwc(fp, locale)) != WEOF &&
lib/libc/stdio/vfwscanf.c
271
__ungetwc(wi, fp, locale);
lib/libc/stdio/vfwscanf.c
403
parseint(FILE *fp, wchar_t * __restrict buf, int width, int base,
lib/libc/stdio/vfwscanf.c
411
c = __fgetwc(fp, locale);
lib/libc/stdio/vfwscanf.c
426
__ungetwc(*wcp, fp, locale);
lib/libc/stdio/vfwscanf.c
429
__ungetwc(c, fp, locale);
lib/libc/stdio/vfwscanf.c
431
__ungetwc(c, fp, locale);
lib/libc/stdio/vfwscanf.c
440
vfwscanf_l(FILE * __restrict fp, locale_t locale,
lib/libc/stdio/vfwscanf.c
446
FLOCKFILE_CANCELSAFE(fp);
lib/libc/stdio/vfwscanf.c
447
ORIENT(fp, 1);
lib/libc/stdio/vfwscanf.c
448
ret = __vfwscanf(fp, locale, fmt, ap);
lib/libc/stdio/vfwscanf.c
453
vfwscanf(FILE * __restrict fp, const wchar_t * __restrict fmt, va_list ap)
lib/libc/stdio/vfwscanf.c
455
return vfwscanf_l(fp, __get_locale(), fmt, ap);
lib/libc/stdio/vfwscanf.c
462
__vfwscanf(FILE * __restrict fp, locale_t locale,
lib/libc/stdio/vfwscanf.c
487
while ((c = __fgetwc(fp, locale)) != WEOF &&
lib/libc/stdio/vfwscanf.c
491
__ungetwc(c, fp, locale);
lib/libc/stdio/vfwscanf.c
506
if ((wi = __fgetwc(fp, locale)) == WEOF)
lib/libc/stdio/vfwscanf.c
509
__ungetwc(wi, fp, locale);
lib/libc/stdio/vfwscanf.c
711
while ((wi = __fgetwc(fp, locale)) != WEOF && iswspace(wi))
lib/libc/stdio/vfwscanf.c
715
__ungetwc(wi, fp, locale);
lib/libc/stdio/vfwscanf.c
728
nr = convert_wchar(fp, GETARG(wchar_t *), width,
lib/libc/stdio/vfwscanf.c
731
nr = convert_char(fp, GETARG(char *), width,
lib/libc/stdio/vfwscanf.c
744
nr = convert_wccl(fp, GETARG(wchar_t *), width,
lib/libc/stdio/vfwscanf.c
747
nr = convert_ccl(fp, GETARG(char *), width,
lib/libc/stdio/vfwscanf.c
763
nr = convert_wstring(fp, GETARG(wchar_t *),
lib/libc/stdio/vfwscanf.c
766
nr = convert_string(fp, GETARG(char *), width,
lib/libc/stdio/vfwscanf.c
779
nr = parseint(fp, buf, width, base, locale);
lib/libc/stdio/vfwscanf.c
817
nr = parsefloat(fp, buf, buf + width, locale);
lib/libc/stdio/vfwscanf.c
846
parsefloat(FILE *fp, wchar_t *buf, wchar_t *end, locale_t locale)
lib/libc/stdio/vfwscanf.c
877
if ((c = __fgetwc(fp, locale)) == WEOF)
lib/libc/stdio/vfwscanf.c
997
__ungetwc(c, fp, locale);
lib/libc/stdio/vfwscanf.c
999
__ungetwc(*p, fp, locale);
lib/libc/stdio/wbuf.c
47
__swbuf(int c, FILE *fp)
lib/libc/stdio/wbuf.c
58
fp->_w = fp->_lbfsize;
lib/libc/stdio/wbuf.c
59
if (prepwrite(fp) != 0) {
lib/libc/stdio/wbuf.c
65
ORIENT(fp, -1);
lib/libc/stdio/wbuf.c
76
n = fp->_p - fp->_bf._base;
lib/libc/stdio/wbuf.c
77
if (n >= fp->_bf._size) {
lib/libc/stdio/wbuf.c
78
if (__fflush(fp) != 0)
lib/libc/stdio/wbuf.c
82
fp->_w--;
lib/libc/stdio/wbuf.c
83
*fp->_p++ = c;
lib/libc/stdio/wbuf.c
84
if (++n == fp->_bf._size || (fp->_flags & __SLBF && c == '\n'))
lib/libc/stdio/wbuf.c
85
if (__fflush(fp) != 0)
lib/libc/stdio/wsetup.c
46
__swsetup(FILE *fp)
lib/libc/stdio/wsetup.c
55
if ((fp->_flags & __SWR) == 0) {
lib/libc/stdio/wsetup.c
56
if ((fp->_flags & __SRW) == 0) {
lib/libc/stdio/wsetup.c
58
fp->_flags |= __SERR;
lib/libc/stdio/wsetup.c
61
if (fp->_flags & __SRD) {
lib/libc/stdio/wsetup.c
63
if (HASUB(fp))
lib/libc/stdio/wsetup.c
64
FREEUB(fp);
lib/libc/stdio/wsetup.c
65
fp->_flags &= ~(__SRD|__SEOF);
lib/libc/stdio/wsetup.c
66
fp->_r = 0;
lib/libc/stdio/wsetup.c
67
fp->_p = fp->_bf._base;
lib/libc/stdio/wsetup.c
69
fp->_flags |= __SWR;
lib/libc/stdio/wsetup.c
75
if (fp->_bf._base == NULL)
lib/libc/stdio/wsetup.c
76
__smakebuf(fp);
lib/libc/stdio/wsetup.c
77
if (fp->_flags & __SLBF) {
lib/libc/stdio/wsetup.c
83
fp->_w = 0;
lib/libc/stdio/wsetup.c
84
fp->_lbfsize = -fp->_bf._size;
lib/libc/stdio/wsetup.c
86
fp->_w = fp->_flags & __SNBF ? 0 : fp->_bf._size;
lib/libc/stdio/xprintf.c
112
__sfvwrite(io->fp, &io->uio);
lib/libc/stdio/xprintf.c
121
if (io->fp->_flags & __SERR)
lib/libc/stdio/xprintf.c
263
__v2printf(FILE *fp, const char *fmt0, unsigned pct, va_list ap)
lib/libc/stdio/xprintf.c
278
io.fp = fp;
lib/libc/stdio/xprintf.c
546
fp, pi, (const void *)pi->arg);
lib/libc/stdio/xprintf.c
552
io.fp->_flags |= __SERR;
lib/libc/stdio/xprintf.c
562
extern int __fflush(FILE *fp);
lib/libc/stdio/xprintf.c
570
__v3printf(FILE *fp, const char *fmt, int pct, va_list ap)
lib/libc/stdio/xprintf.c
577
fake._flags = fp->_flags & ~__SNBF;
lib/libc/stdio/xprintf.c
578
fake._file = fp->_file;
lib/libc/stdio/xprintf.c
579
fake._cookie = fp->_cookie;
lib/libc/stdio/xprintf.c
580
fake._write = fp->_write;
lib/libc/stdio/xprintf.c
581
fake._orientation = fp->_orientation;
lib/libc/stdio/xprintf.c
582
fake._mbstate = fp->_mbstate;
lib/libc/stdio/xprintf.c
594
fp->_flags |= __SERR;
lib/libc/stdio/xprintf.c
599
__xvprintf(FILE *fp, const char *fmt0, va_list ap)
lib/libc/stdio/xprintf.c
614
if ((fp->_flags & (__SNBF|__SWR|__SRW)) == (__SNBF|__SWR) &&
lib/libc/stdio/xprintf.c
615
fp->_file >= 0)
lib/libc/stdio/xprintf.c
616
return (__v3printf(fp, fmt0, u, ap));
lib/libc/stdio/xprintf.c
618
return (__v2printf(fp, fmt0, u, ap));
lib/libc/stdio/xprintf.c
93
FILE *fp;
lib/libc/string/memccpy.c
40
const unsigned char *fp = f;
lib/libc/string/memccpy.c
43
if ((*tp++ = *fp++) == uc)
lib/libc/string/wcscoll.c
103
fp = tr2 + wcslen(tr2) - 1;
lib/libc/string/wcscoll.c
104
while (bp < fp) {
lib/libc/string/wcscoll.c
106
*bp++ = *fp;
lib/libc/string/wcscoll.c
107
*fp-- = c;
lib/libc/string/wcscoll.c
88
wchar_t *bp, *fp, c;
lib/libc/string/wcscoll.c
93
fp = tr1 + wcslen(tr1) - 1;
lib/libc/string/wcscoll.c
94
while (bp < fp) {
lib/libc/string/wcscoll.c
96
*bp++ = *fp;
lib/libc/string/wcscoll.c
97
*fp-- = c;
lib/libc/tests/gen/fnmatch_test.c
48
const char *fp;
lib/libc/tests/gen/fnmatch_test.c
51
fp = flagnames;
lib/libc/tests/gen/fnmatch_test.c
53
len = strlen(fp);
lib/libc/tests/gen/fnmatch_test.c
57
memcpy(p, fp, len);
lib/libc/tests/gen/fnmatch_test.c
61
fp += len + 1;
lib/libc/tests/gen/popen_test.c
100
fp = popen("exit 9", mode);
lib/libc/tests/gen/popen_test.c
101
ATF_CHECK_MSG(fp != NULL, "popen(, \"%s\") failed", mode);
lib/libc/tests/gen/popen_test.c
102
if (fp == NULL)
lib/libc/tests/gen/popen_test.c
104
check_cloexec(fp, mode);
lib/libc/tests/gen/popen_test.c
105
bool input_error_1 = !(fgetc(fp) != EOF || !feof(fp) || !ferror(fp));
lib/libc/tests/gen/popen_test.c
109
status = pclose(fp);
lib/libc/tests/gen/popen_test.c
117
fp = popen("echo hi there", mode);
lib/libc/tests/gen/popen_test.c
118
ATF_CHECK_MSG(fp != NULL, "popen(, \"%s\") failed", mode);
lib/libc/tests/gen/popen_test.c
119
if (fp == NULL)
lib/libc/tests/gen/popen_test.c
121
check_cloexec(fp, mode);
lib/libc/tests/gen/popen_test.c
122
ATF_CHECK_MSG((sres = fgets(buf, sizeof(buf), fp)) != NULL,
lib/libc/tests/gen/popen_test.c
127
status = pclose(fp);
lib/libc/tests/gen/popen_test.c
136
FILE *fp, *fp2;
lib/libc/tests/gen/popen_test.c
144
fp = popen("read x && [ \"$x\" = abcd ]", mode);
lib/libc/tests/gen/popen_test.c
145
ATF_CHECK_MSG(fp != NULL, "popen(, \"%s\") failed", mode);
lib/libc/tests/gen/popen_test.c
146
if (fp == NULL)
lib/libc/tests/gen/popen_test.c
148
check_cloexec(fp, mode);
lib/libc/tests/gen/popen_test.c
149
ATF_CHECK_MSG(fputs("abcd\n", fp) != EOF,
lib/libc/tests/gen/popen_test.c
151
status = pclose(fp);
lib/libc/tests/gen/popen_test.c
163
fp = popen("exit 88", mode);
lib/libc/tests/gen/popen_test.c
164
ATF_CHECK_MSG(fp != NULL, "popen(, \"%s\") failed", mode);
lib/libc/tests/gen/popen_test.c
165
if (fp == NULL)
lib/libc/tests/gen/popen_test.c
167
check_cloexec(fp, mode);
lib/libc/tests/gen/popen_test.c
169
while (fputs("abcd\n", fp) != EOF)
lib/libc/tests/gen/popen_test.c
171
ATF_CHECK_MSG(ferror(fp) && errno == EPIPE, "Expected EPIPE");
lib/libc/tests/gen/popen_test.c
173
status = pclose(fp);
lib/libc/tests/gen/popen_test.c
183
fp = popen("read x", mode);
lib/libc/tests/gen/popen_test.c
184
ATF_CHECK_MSG(fp != NULL,
lib/libc/tests/gen/popen_test.c
186
if (fp == NULL)
lib/libc/tests/gen/popen_test.c
193
pclose(fp);
lib/libc/tests/gen/popen_test.c
197
status = pclose(fp);
lib/libc/tests/gen/popen_test.c
211
FILE *fp;
lib/libc/tests/gen/popen_test.c
219
fp = popen("read x && printf '%s\\n' \"Q${x#a}\"", mode);
lib/libc/tests/gen/popen_test.c
220
ATF_CHECK_MSG(fp != NULL, "popen(, \"%s\") failed", mode);
lib/libc/tests/gen/popen_test.c
221
if (fp == NULL)
lib/libc/tests/gen/popen_test.c
223
check_cloexec(fp, mode);
lib/libc/tests/gen/popen_test.c
224
ATF_CHECK_MSG((ires = fputs("abcd\n", fp)) != EOF,
lib/libc/tests/gen/popen_test.c
227
sres = fgets(buf, sizeof(buf), fp);
lib/libc/tests/gen/popen_test.c
233
status = pclose(fp);
lib/libc/tests/gen/popen_test.c
52
check_cloexec(FILE *fp, const char *mode)
lib/libc/tests/gen/popen_test.c
56
flags = fcntl(fileno(fp), F_GETFD);
lib/libc/tests/gen/popen_test.c
71
FILE *fp;
lib/libc/tests/gen/popen_test.c
78
fp = popen("exit 7", mode);
lib/libc/tests/gen/popen_test.c
79
ATF_CHECK_MSG(fp != NULL, "popen(, \"%s\") failed", mode);
lib/libc/tests/gen/popen_test.c
80
if (fp == NULL)
lib/libc/tests/gen/popen_test.c
82
check_cloexec(fp, mode);
lib/libc/tests/gen/popen_test.c
83
status = pclose(fp);
lib/libc/tests/gen/popen_test.c
92
FILE *fp;
lib/libc/tests/nss/testutil.h
197
FILE *fp; \
lib/libc/tests/nss/testutil.h
223
fputs(buffer, param->fp); \
lib/libc/tests/nss/testutil.h
224
fputc('\n', param->fp); \
lib/libc/tests/nss/testutil.h
238
param.fp = fopen(fname, "w"); \
lib/libc/tests/nss/testutil.h
239
if (param.fp == NULL) \
lib/libc/tests/nss/testutil.h
244
fclose(param.fp); \
lib/libc/tests/resolv/resolv_test.c
77
FILE *fp;
lib/libc/tests/resolv/resolv_test.c
81
fp = fopen(fname, "r");
lib/libc/tests/resolv/resolv_test.c
82
ATF_REQUIRE(fp != NULL);
lib/libc/tests/resolv/resolv_test.c
85
while (getline(&line, &linecap, fp) >= 0) {
lib/libc/tests/resolv/resolv_test.c
96
(void)fclose(fp);
lib/libc/tests/secure/fortify_poll_test.c
34
FILE *fp;
lib/libc/tests/secure/fortify_poll_test.c
41
fp = fmemopen(fpbuf, sizeof(fpbuf), "rb");
lib/libc/tests/secure/fortify_poll_test.c
42
ATF_REQUIRE(fp != NULL);
lib/libc/tests/secure/fortify_poll_test.c
44
return (fp);
lib/libc/tests/secure/fortify_random_test.c
34
FILE *fp;
lib/libc/tests/secure/fortify_random_test.c
41
fp = fmemopen(fpbuf, sizeof(fpbuf), "rb");
lib/libc/tests/secure/fortify_random_test.c
42
ATF_REQUIRE(fp != NULL);
lib/libc/tests/secure/fortify_random_test.c
44
return (fp);
lib/libc/tests/secure/fortify_select_test.c
34
FILE *fp;
lib/libc/tests/secure/fortify_select_test.c
41
fp = fmemopen(fpbuf, sizeof(fpbuf), "rb");
lib/libc/tests/secure/fortify_select_test.c
42
ATF_REQUIRE(fp != NULL);
lib/libc/tests/secure/fortify_select_test.c
44
return (fp);
lib/libc/tests/secure/fortify_signal_test.c
34
FILE *fp;
lib/libc/tests/secure/fortify_signal_test.c
41
fp = fmemopen(fpbuf, sizeof(fpbuf), "rb");
lib/libc/tests/secure/fortify_signal_test.c
42
ATF_REQUIRE(fp != NULL);
lib/libc/tests/secure/fortify_signal_test.c
44
return (fp);
lib/libc/tests/secure/fortify_socket_test.c
34
FILE *fp;
lib/libc/tests/secure/fortify_socket_test.c
41
fp = fmemopen(fpbuf, sizeof(fpbuf), "rb");
lib/libc/tests/secure/fortify_socket_test.c
42
ATF_REQUIRE(fp != NULL);
lib/libc/tests/secure/fortify_socket_test.c
44
return (fp);
lib/libc/tests/secure/fortify_stdio_test.c
1372
FILE *fp;
lib/libc/tests/secure/fortify_stdio_test.c
1374
fp = new_fp(__len);
lib/libc/tests/secure/fortify_stdio_test.c
1376
fgets(__stack.__buf, __len, fp);
lib/libc/tests/secure/fortify_stdio_test.c
1396
FILE *fp;
lib/libc/tests/secure/fortify_stdio_test.c
1398
fp = new_fp(__len);
lib/libc/tests/secure/fortify_stdio_test.c
1400
fgets(__stack.__buf, __len, fp);
lib/libc/tests/secure/fortify_stdio_test.c
1420
FILE *fp;
lib/libc/tests/secure/fortify_stdio_test.c
1423
fp = new_fp(__len);
lib/libc/tests/secure/fortify_stdio_test.c
1425
fgets(__stack.__buf, __len, fp);
lib/libc/tests/secure/fortify_stdio_test.c
1445
FILE *fp;
lib/libc/tests/secure/fortify_stdio_test.c
1448
fp = new_fp(__len);
lib/libc/tests/secure/fortify_stdio_test.c
1450
fgets(__stack.__buf, __len, fp);
lib/libc/tests/secure/fortify_stdio_test.c
1472
FILE *fp;
lib/libc/tests/secure/fortify_stdio_test.c
1482
fp = new_fp(__len);
lib/libc/tests/secure/fortify_stdio_test.c
1484
fgets(__stack.__buf, __len, fp);
lib/libc/tests/secure/fortify_stdio_test.c
34
FILE *fp;
lib/libc/tests/secure/fortify_stdio_test.c
41
fp = fmemopen(fpbuf, sizeof(fpbuf), "rb");
lib/libc/tests/secure/fortify_stdio_test.c
42
ATF_REQUIRE(fp != NULL);
lib/libc/tests/secure/fortify_stdio_test.c
44
return (fp);
lib/libc/tests/secure/fortify_stdlib_test.c
34
FILE *fp;
lib/libc/tests/secure/fortify_stdlib_test.c
41
fp = fmemopen(fpbuf, sizeof(fpbuf), "rb");
lib/libc/tests/secure/fortify_stdlib_test.c
42
ATF_REQUIRE(fp != NULL);
lib/libc/tests/secure/fortify_stdlib_test.c
44
return (fp);
lib/libc/tests/secure/fortify_string_test.c
34
FILE *fp;
lib/libc/tests/secure/fortify_string_test.c
41
fp = fmemopen(fpbuf, sizeof(fpbuf), "rb");
lib/libc/tests/secure/fortify_string_test.c
42
ATF_REQUIRE(fp != NULL);
lib/libc/tests/secure/fortify_string_test.c
44
return (fp);
lib/libc/tests/secure/fortify_strings_test.c
34
FILE *fp;
lib/libc/tests/secure/fortify_strings_test.c
41
fp = fmemopen(fpbuf, sizeof(fpbuf), "rb");
lib/libc/tests/secure/fortify_strings_test.c
42
ATF_REQUIRE(fp != NULL);
lib/libc/tests/secure/fortify_strings_test.c
44
return (fp);
lib/libc/tests/secure/fortify_uio_test.c
34
FILE *fp;
lib/libc/tests/secure/fortify_uio_test.c
41
fp = fmemopen(fpbuf, sizeof(fpbuf), "rb");
lib/libc/tests/secure/fortify_uio_test.c
42
ATF_REQUIRE(fp != NULL);
lib/libc/tests/secure/fortify_uio_test.c
44
return (fp);
lib/libc/tests/secure/fortify_unistd_test.c
34
FILE *fp;
lib/libc/tests/secure/fortify_unistd_test.c
41
fp = fmemopen(fpbuf, sizeof(fpbuf), "rb");
lib/libc/tests/secure/fortify_unistd_test.c
42
ATF_REQUIRE(fp != NULL);
lib/libc/tests/secure/fortify_unistd_test.c
44
return (fp);
lib/libc/tests/secure/fortify_wchar_test.c
34
FILE *fp;
lib/libc/tests/secure/fortify_wchar_test.c
41
fp = fmemopen(fpbuf, sizeof(fpbuf), "rb");
lib/libc/tests/secure/fortify_wchar_test.c
42
ATF_REQUIRE(fp != NULL);
lib/libc/tests/secure/fortify_wchar_test.c
44
return (fp);
lib/libc/tests/stdio/eintr_test.c
101
fclose(fp);
lib/libc/tests/stdio/eintr_test.c
106
ATF_REQUIRE((fp = fdopen(s[1], "r")) != NULL);
lib/libc/tests/stdio/eintr_test.c
112
i = fgetc(fp);
lib/libc/tests/stdio/eintr_test.c
115
clearerr(fp);
lib/libc/tests/stdio/eintr_test.c
129
fclose(fp);
lib/libc/tests/stdio/eintr_test.c
59
FILE *fp;
lib/libc/tests/stdio/eintr_test.c
84
ATF_REQUIRE((fp = fdopen(s[0], "w")) != NULL);
lib/libc/tests/stdio/eintr_test.c
89
if (fputc(*p, fp) == EOF) {
lib/libc/tests/stdio/eintr_test.c
91
clearerr(fp);
lib/libc/tests/stdio/fdopen_test.c
40
FILE *fp;
lib/libc/tests/stdio/fdopen_test.c
47
fp = fdopen(fd, strmode);
lib/libc/tests/stdio/fdopen_test.c
48
if (fp == NULL) {
lib/libc/tests/stdio/fdopen_test.c
58
fclose(fp);
lib/libc/tests/stdio/fmemopen2_test.c
105
FILE *fp;
lib/libc/tests/stdio/fmemopen2_test.c
111
fp = fmemopen(NULL, 512, "w+");
lib/libc/tests/stdio/fmemopen2_test.c
112
ATF_REQUIRE(fp != NULL);
lib/libc/tests/stdio/fmemopen2_test.c
116
nofw = fwrite("a", 1, 1, fp);
lib/libc/tests/stdio/fmemopen2_test.c
121
pos = ftell(fp);
lib/libc/tests/stdio/fmemopen2_test.c
125
nofw = fwrite("a", 1, 1, fp);
lib/libc/tests/stdio/fmemopen2_test.c
129
rc = fclose(fp);
lib/libc/tests/stdio/fmemopen2_test.c
133
fp = fmemopen(NULL, 512, "r");
lib/libc/tests/stdio/fmemopen2_test.c
134
ATF_REQUIRE(fp == NULL);
lib/libc/tests/stdio/fmemopen2_test.c
137
fp = fmemopen(NULL, 512, "w");
lib/libc/tests/stdio/fmemopen2_test.c
138
ATF_REQUIRE(fp == NULL);
lib/libc/tests/stdio/fmemopen2_test.c
150
FILE *fp;
lib/libc/tests/stdio/fmemopen2_test.c
160
fp = fmemopen(buf, sizeof(buf), "w+");
lib/libc/tests/stdio/fmemopen2_test.c
161
ATF_REQUIRE(fp != NULL);
lib/libc/tests/stdio/fmemopen2_test.c
164
nofw = fwrite(str, 1, sizeof(str), fp);
lib/libc/tests/stdio/fmemopen2_test.c
168
rc = fseek(fp, 0, SEEK_END);
lib/libc/tests/stdio/fmemopen2_test.c
170
pos = ftell(fp);
lib/libc/tests/stdio/fmemopen2_test.c
174
rc = fclose(fp);
lib/libc/tests/stdio/fmemopen2_test.c
178
fp = fmemopen(buf, sizeof(buf), "a+");
lib/libc/tests/stdio/fmemopen2_test.c
179
ATF_REQUIRE(fp != NULL);
lib/libc/tests/stdio/fmemopen2_test.c
182
nofw = fwrite(str2, 1, sizeof(str2), fp);
lib/libc/tests/stdio/fmemopen2_test.c
186
rc = fseek(fp, 0, SEEK_SET);
lib/libc/tests/stdio/fmemopen2_test.c
190
pos = ftell(fp);
lib/libc/tests/stdio/fmemopen2_test.c
194
nofr = fread(str3, 1, sizeof(buf), fp);
lib/libc/tests/stdio/fmemopen2_test.c
202
rc = fclose(fp);
lib/libc/tests/stdio/fmemopen2_test.c
214
FILE *fp;
lib/libc/tests/stdio/fmemopen2_test.c
224
fp = fmemopen(buf, sizeof(buf), "w+b");
lib/libc/tests/stdio/fmemopen2_test.c
225
ATF_REQUIRE(fp != NULL);
lib/libc/tests/stdio/fmemopen2_test.c
228
nofw = fwrite(str, 1, strlen(str), fp);
lib/libc/tests/stdio/fmemopen2_test.c
236
rc = fclose(fp);
lib/libc/tests/stdio/fmemopen2_test.c
249
FILE *fp;
lib/libc/tests/stdio/fmemopen2_test.c
251
fp = fmemopen(NULL, 16, "ab+");
lib/libc/tests/stdio/fmemopen2_test.c
252
ATF_REQUIRE(fp != NULL);
lib/libc/tests/stdio/fmemopen2_test.c
253
ATF_REQUIRE(ftell(fp) == 0L);
lib/libc/tests/stdio/fmemopen2_test.c
254
fclose(fp);
lib/libc/tests/stdio/fmemopen2_test.c
258
fp = fmemopen(buf, sizeof(buf), "ab+");
lib/libc/tests/stdio/fmemopen2_test.c
259
ATF_REQUIRE(fp != NULL);
lib/libc/tests/stdio/fmemopen2_test.c
260
ATF_REQUIRE(ftell(fp) == strlen(buf));
lib/libc/tests/stdio/fmemopen2_test.c
261
fclose(fp);
lib/libc/tests/stdio/fmemopen2_test.c
269
FILE *fp;
lib/libc/tests/stdio/fmemopen2_test.c
271
fp = fmemopen(NULL, 0, "r+");
lib/libc/tests/stdio/fmemopen2_test.c
272
ATF_REQUIRE(fp == NULL);
lib/libc/tests/stdio/fmemopen2_test.c
283
FILE *fp;
lib/libc/tests/stdio/fmemopen2_test.c
290
fp = fmemopen(buf, sizeof(buf), "r");
lib/libc/tests/stdio/fmemopen2_test.c
291
ATF_REQUIRE(fp != NULL);
lib/libc/tests/stdio/fmemopen2_test.c
292
sz = fwrite(buf_write, 1, strlen(buf_write), fp);
lib/libc/tests/stdio/fmemopen2_test.c
296
fclose(fp);
lib/libc/tests/stdio/fmemopen2_test.c
298
fp = fmemopen(buf_orig, sizeof(buf), "w");
lib/libc/tests/stdio/fmemopen2_test.c
299
ATF_REQUIRE(fp != NULL);
lib/libc/tests/stdio/fmemopen2_test.c
300
sz = fread(buf, sizeof(buf), 1, fp);
lib/libc/tests/stdio/fmemopen2_test.c
303
fclose(fp);
lib/libc/tests/stdio/fmemopen2_test.c
47
FILE *fp;
lib/libc/tests/stdio/fmemopen2_test.c
52
fp = fmemopen(buf, sizeof(buf), "w");
lib/libc/tests/stdio/fmemopen2_test.c
53
ATF_REQUIRE(fp != NULL);
lib/libc/tests/stdio/fmemopen2_test.c
56
nofw = fwrite(str, 1, sizeof(str), fp);
lib/libc/tests/stdio/fmemopen2_test.c
60
rc = fclose(fp);
lib/libc/tests/stdio/fmemopen2_test.c
64
fp = fmemopen(buf, sizeof(buf), "r");
lib/libc/tests/stdio/fmemopen2_test.c
65
ATF_REQUIRE(fp != NULL);
lib/libc/tests/stdio/fmemopen2_test.c
69
nofr = fread(buf2, 1, sizeof(buf2), fp);
lib/libc/tests/stdio/fmemopen2_test.c
80
rc = fclose(fp);
lib/libc/tests/stdio/fmemopen2_test.c
84
fp = fmemopen(str, 4, "w");
lib/libc/tests/stdio/fmemopen2_test.c
85
ATF_REQUIRE(fp != NULL);
lib/libc/tests/stdio/fmemopen2_test.c
90
nofw = fwrite(str2, 1, sizeof(str2), fp);
lib/libc/tests/stdio/fmemopen2_test.c
94
rc = fclose(fp);
lib/libc/tests/stdio/fopen_test.c
43
FILE *fp;
lib/libc/tests/stdio/fopen_test.c
46
fp = fopen(fname, mode);
lib/libc/tests/stdio/fopen_test.c
47
ATF_REQUIRE_MSG(fp != NULL,
lib/libc/tests/stdio/fopen_test.c
49
fd = fileno(fp);
lib/libc/tests/stdio/fopen_test.c
66
fclose(fp);
lib/libc/tests/stdio/getdelim_test.c
101
ATF_REQUIRE(getline(&line, &linecap, fp) == 1);
lib/libc/tests/stdio/getdelim_test.c
105
ATF_REQUIRE(getline(&line, &linecap, fp) == -1);
lib/libc/tests/stdio/getdelim_test.c
109
ATF_REQUIRE(feof(fp));
lib/libc/tests/stdio/getdelim_test.c
110
ATF_REQUIRE(!ferror(fp));
lib/libc/tests/stdio/getdelim_test.c
111
fclose(fp);
lib/libc/tests/stdio/getdelim_test.c
137
FILE *fp;
lib/libc/tests/stdio/getdelim_test.c
142
fp = mkfilebuf();
lib/libc/tests/stdio/getdelim_test.c
143
ATF_REQUIRE(getline(NULL, &linecap, fp) == -1);
lib/libc/tests/stdio/getdelim_test.c
145
ATF_REQUIRE(getline(&line, NULL, fp) == -1);
lib/libc/tests/stdio/getdelim_test.c
147
ATF_REQUIRE(ferror(fp));
lib/libc/tests/stdio/getdelim_test.c
148
fclose(fp);
lib/libc/tests/stdio/getdelim_test.c
154
FILE *fp;
lib/libc/tests/stdio/getdelim_test.c
160
fp = mkfilebuf();
lib/libc/tests/stdio/getdelim_test.c
161
while (!feof(fp)) /* advance to EOF; can't fseek this stream */
lib/libc/tests/stdio/getdelim_test.c
162
getc(fp);
lib/libc/tests/stdio/getdelim_test.c
166
ATF_REQUIRE(getline(&line, &linecap, fp) == -1);
lib/libc/tests/stdio/getdelim_test.c
171
ATF_REQUIRE(feof(fp));
lib/libc/tests/stdio/getdelim_test.c
172
ATF_REQUIRE(!ferror(fp));
lib/libc/tests/stdio/getdelim_test.c
173
fclose(fp);
lib/libc/tests/stdio/getdelim_test.c
179
FILE *fp;
lib/libc/tests/stdio/getdelim_test.c
187
fp = mkfilebuf();
lib/libc/tests/stdio/getdelim_test.c
190
ATF_REQUIRE(getdelim(&line, &linecap, '\0', fp) == n + 1);
lib/libc/tests/stdio/getdelim_test.c
196
ATF_REQUIRE(getdelim(&line, &linecap, '\0', fp) == n + 1);
lib/libc/tests/stdio/getdelim_test.c
200
ATF_REQUIRE(!ferror(fp));
lib/libc/tests/stdio/getdelim_test.c
201
fclose(fp);
lib/libc/tests/stdio/getdelim_test.c
207
FILE *fp;
lib/libc/tests/stdio/getdelim_test.c
212
fp = mkfilebuf();
lib/libc/tests/stdio/getdelim_test.c
215
ATF_REQUIRE(getline(&line, &linecap, fp) == sizeof(apothegm) - 1);
lib/libc/tests/stdio/getdelim_test.c
217
fp = mkfilebuf();
lib/libc/tests/stdio/getdelim_test.c
221
ATF_REQUIRE(getline(&line, &linecap, fp) == sizeof(apothegm) - 1);
lib/libc/tests/stdio/getdelim_test.c
224
ATF_REQUIRE(!ferror(fp));
lib/libc/tests/stdio/getdelim_test.c
225
fclose(fp);
lib/libc/tests/stdio/getdelim_test.c
275
FILE *fp;
lib/libc/tests/stdio/getdelim_test.c
342
ATF_REQUIRE((fp = fopen("fifo", "r")) != NULL);
lib/libc/tests/stdio/getdelim_test.c
343
setvbuf(fp, (char *)NULL, buf_mode, 0);
lib/libc/tests/stdio/getdelim_test.c
344
ATF_REQUIRE((flags = fcntl(fileno(fp), F_GETFL, 0)) != -1);
lib/libc/tests/stdio/getdelim_test.c
345
ATF_REQUIRE(fcntl(fileno(fp), F_SETFL, flags | O_NONBLOCK) >= 0);
lib/libc/tests/stdio/getdelim_test.c
350
(linelen = getdelim(&line, &linecap, delim, fp)) == -1);
lib/libc/tests/stdio/getdelim_test.c
352
ATF_REQUIRE(ferror(fp));
lib/libc/tests/stdio/getdelim_test.c
353
ATF_REQUIRE(!feof(fp));
lib/libc/tests/stdio/getdelim_test.c
354
clearerr(fp);
lib/libc/tests/stdio/getdelim_test.c
362
ATF_CHECK(getdelim(&line, &linecap, delim, fp) == strslen[0]);
lib/libc/tests/stdio/getdelim_test.c
364
ATF_REQUIRE(getdelim(&line, &linecap, delim, fp) == strslen[1]);
lib/libc/tests/stdio/getdelim_test.c
368
(linelen = getdelim(&line, &linecap, delim, fp)) == -1);
lib/libc/tests/stdio/getdelim_test.c
370
ATF_REQUIRE(ferror(fp));
lib/libc/tests/stdio/getdelim_test.c
371
ATF_REQUIRE(!feof(fp));
lib/libc/tests/stdio/getdelim_test.c
372
clearerr(fp);
lib/libc/tests/stdio/getdelim_test.c
377
ATF_REQUIRE((linelen = getdelim(&line, &linecap, delim, fp)) != -1);
lib/libc/tests/stdio/getdelim_test.c
378
ATF_REQUIRE(!ferror(fp));
lib/libc/tests/stdio/getdelim_test.c
379
ATF_REQUIRE(!feof(fp));
lib/libc/tests/stdio/getdelim_test.c
384
(linelen = getdelim(&line, &linecap, delim, fp)) == -1);
lib/libc/tests/stdio/getdelim_test.c
386
ATF_REQUIRE(ferror(fp));
lib/libc/tests/stdio/getdelim_test.c
387
ATF_REQUIRE(!feof(fp));
lib/libc/tests/stdio/getdelim_test.c
388
clearerr(fp);
lib/libc/tests/stdio/getdelim_test.c
392
ATF_REQUIRE((linelen = getdelim(&line, &linecap, delim, fp)) != -1);
lib/libc/tests/stdio/getdelim_test.c
393
ATF_REQUIRE(!ferror(fp));
lib/libc/tests/stdio/getdelim_test.c
394
ATF_REQUIRE(!feof(fp));
lib/libc/tests/stdio/getdelim_test.c
80
FILE *fp;
lib/libc/tests/stdio/getdelim_test.c
93
fp = mkfilebuf();
lib/libc/tests/stdio/getdelim_test.c
97
ATF_REQUIRE(getline(&line, &linecap, fp) == sizeof(apothegm) - 1);
lib/libc/tests/stdio/open_memstream2_test.c
101
rewind(fp);
lib/libc/tests/stdio/open_memstream2_test.c
102
fflush(fp);
lib/libc/tests/stdio/open_memstream2_test.c
104
fseek(fp, 0, SEEK_END);
lib/libc/tests/stdio/open_memstream2_test.c
105
fflush(fp);
lib/libc/tests/stdio/open_memstream2_test.c
112
fseek(fp, 4, SEEK_END);
lib/libc/tests/stdio/open_memstream2_test.c
113
fprintf(fp, "bar");
lib/libc/tests/stdio/open_memstream2_test.c
114
fflush(fp);
lib/libc/tests/stdio/open_memstream2_test.c
125
fseek(fp, 3, SEEK_SET);
lib/libc/tests/stdio/open_memstream2_test.c
126
fprintf(fp, " in ");
lib/libc/tests/stdio/open_memstream2_test.c
127
fflush(fp);
lib/libc/tests/stdio/open_memstream2_test.c
129
fseek(fp, 0, SEEK_END);
lib/libc/tests/stdio/open_memstream2_test.c
130
fflush(fp);
lib/libc/tests/stdio/open_memstream2_test.c
133
rewind(fp);
lib/libc/tests/stdio/open_memstream2_test.c
134
if (fread(&c, sizeof(c), 1, fp) != 0)
lib/libc/tests/stdio/open_memstream2_test.c
136
else if (!ferror(fp))
lib/libc/tests/stdio/open_memstream2_test.c
139
clearerr(fp);
lib/libc/tests/stdio/open_memstream2_test.c
141
fseek(fp, 4, SEEK_SET);
lib/libc/tests/stdio/open_memstream2_test.c
142
fprintf(fp, "bar baz");
lib/libc/tests/stdio/open_memstream2_test.c
143
fclose(fp);
lib/libc/tests/stdio/open_memstream2_test.c
151
FILE *fp;
lib/libc/tests/stdio/open_memstream2_test.c
153
fp = open_memstream(&buf, &len);
lib/libc/tests/stdio/open_memstream2_test.c
154
ATF_REQUIRE_MSG(fp != NULL, "open_memstream failed: %d", errno);
lib/libc/tests/stdio/open_memstream2_test.c
158
ATF_REQUIRE_MSG(fseeko(fp, (offset), (whence)) != 0, \
lib/libc/tests/stdio/open_memstream2_test.c
161
(intmax_t)ftello(fp)); \
lib/libc/tests/stdio/open_memstream2_test.c
169
ATF_REQUIRE_MSG(fseeko(fp, (offset), (whence)) == 0, \
lib/libc/tests/stdio/open_memstream2_test.c
172
ATF_REQUIRE_MSG(ftello(fp) == (result), \
lib/libc/tests/stdio/open_memstream2_test.c
175
(intmax_t)ftello(fp), __STRING(result)); \
lib/libc/tests/stdio/open_memstream2_test.c
181
fprintf(fp, "foo");
lib/libc/tests/stdio/open_memstream2_test.c
187
fclose(fp);
lib/libc/tests/stdio/open_memstream2_test.c
54
FILE *fp;
lib/libc/tests/stdio/open_memstream2_test.c
57
fp = open_memstream(&buf, &len);
lib/libc/tests/stdio/open_memstream2_test.c
58
ATF_REQUIRE_MSG(fp != NULL, "open_memstream failed");
lib/libc/tests/stdio/open_memstream2_test.c
60
fprintf(fp, "hello my world");
lib/libc/tests/stdio/open_memstream2_test.c
61
fflush(fp);
lib/libc/tests/stdio/open_memstream2_test.c
63
eob = ftello(fp);
lib/libc/tests/stdio/open_memstream2_test.c
64
rewind(fp);
lib/libc/tests/stdio/open_memstream2_test.c
65
fprintf(fp, "good-bye");
lib/libc/tests/stdio/open_memstream2_test.c
66
fseeko(fp, eob, SEEK_SET);
lib/libc/tests/stdio/open_memstream2_test.c
67
fclose(fp);
lib/libc/tests/stdio/open_memstream2_test.c
78
FILE *fp;
lib/libc/tests/stdio/open_memstream2_test.c
80
fp = open_memstream(&buf, NULL);
lib/libc/tests/stdio/open_memstream2_test.c
81
ATF_REQUIRE_MSG(fp == NULL, "open_memstream did not fail");
lib/libc/tests/stdio/open_memstream2_test.c
84
fp = open_memstream(NULL, &len);
lib/libc/tests/stdio/open_memstream2_test.c
85
ATF_REQUIRE_MSG(fp == NULL, "open_memstream did not fail");
lib/libc/tests/stdio/open_memstream2_test.c
88
fp = open_memstream(&buf, &len);
lib/libc/tests/stdio/open_memstream2_test.c
89
ATF_REQUIRE_MSG(fp != NULL, "open_memstream failed; errno=%d", errno);
lib/libc/tests/stdio/open_memstream2_test.c
90
fflush(fp);
lib/libc/tests/stdio/open_memstream2_test.c
92
if (fwide(fp, 0) >= 0)
lib/libc/tests/stdio/open_memstream2_test.c
95
fprintf(fp, "fo");
lib/libc/tests/stdio/open_memstream2_test.c
96
fflush(fp);
lib/libc/tests/stdio/open_memstream2_test.c
98
fputc('o', fp);
lib/libc/tests/stdio/open_memstream2_test.c
99
fflush(fp);
lib/libc/tests/stdio/open_wmemstream_test.c
101
rewind(fp);
lib/libc/tests/stdio/open_wmemstream_test.c
102
fflush(fp);
lib/libc/tests/stdio/open_wmemstream_test.c
104
fseek(fp, 0, SEEK_END);
lib/libc/tests/stdio/open_wmemstream_test.c
105
fflush(fp);
lib/libc/tests/stdio/open_wmemstream_test.c
112
fseek(fp, 4, SEEK_END);
lib/libc/tests/stdio/open_wmemstream_test.c
113
fwprintf(fp, L"bar");
lib/libc/tests/stdio/open_wmemstream_test.c
114
fflush(fp);
lib/libc/tests/stdio/open_wmemstream_test.c
125
fseek(fp, 3, SEEK_SET);
lib/libc/tests/stdio/open_wmemstream_test.c
126
fwprintf(fp, L" in ");
lib/libc/tests/stdio/open_wmemstream_test.c
127
fflush(fp);
lib/libc/tests/stdio/open_wmemstream_test.c
129
fseek(fp, 0, SEEK_END);
lib/libc/tests/stdio/open_wmemstream_test.c
130
fflush(fp);
lib/libc/tests/stdio/open_wmemstream_test.c
133
rewind(fp);
lib/libc/tests/stdio/open_wmemstream_test.c
134
if (fread(&c, sizeof(c), 1, fp) != 0)
lib/libc/tests/stdio/open_wmemstream_test.c
136
else if (!ferror(fp))
lib/libc/tests/stdio/open_wmemstream_test.c
139
clearerr(fp);
lib/libc/tests/stdio/open_wmemstream_test.c
141
fseek(fp, 4, SEEK_SET);
lib/libc/tests/stdio/open_wmemstream_test.c
142
fwprintf(fp, L"bar baz");
lib/libc/tests/stdio/open_wmemstream_test.c
143
fclose(fp);
lib/libc/tests/stdio/open_wmemstream_test.c
151
FILE *fp;
lib/libc/tests/stdio/open_wmemstream_test.c
153
fp = open_wmemstream(&buf, &len);
lib/libc/tests/stdio/open_wmemstream_test.c
154
ATF_REQUIRE_MSG(fp != NULL, "open_wmemstream failed; errno=%d", errno);
lib/libc/tests/stdio/open_wmemstream_test.c
158
ATF_REQUIRE_MSG(fseeko(fp, (offset), (whence)) != 0, \
lib/libc/tests/stdio/open_wmemstream_test.c
161
(intmax_t)ftello(fp)); \
lib/libc/tests/stdio/open_wmemstream_test.c
169
ATF_REQUIRE_MSG(fseeko(fp, (offset), (whence)) == 0, \
lib/libc/tests/stdio/open_wmemstream_test.c
172
ATF_REQUIRE_MSG(ftello(fp) == (result), \
lib/libc/tests/stdio/open_wmemstream_test.c
175
(intmax_t)ftello(fp), __STRING(result)); \
lib/libc/tests/stdio/open_wmemstream_test.c
181
fwprintf(fp, L"foo");
lib/libc/tests/stdio/open_wmemstream_test.c
187
fclose(fp);
lib/libc/tests/stdio/open_wmemstream_test.c
54
FILE *fp;
lib/libc/tests/stdio/open_wmemstream_test.c
57
fp = open_wmemstream(&buf, &len);
lib/libc/tests/stdio/open_wmemstream_test.c
58
ATF_REQUIRE_MSG(fp != NULL, "open_wmemstream failed");
lib/libc/tests/stdio/open_wmemstream_test.c
60
fwprintf(fp, L"hello my world");
lib/libc/tests/stdio/open_wmemstream_test.c
61
fflush(fp);
lib/libc/tests/stdio/open_wmemstream_test.c
63
eob = ftello(fp);
lib/libc/tests/stdio/open_wmemstream_test.c
64
rewind(fp);
lib/libc/tests/stdio/open_wmemstream_test.c
65
fwprintf(fp, L"good-bye");
lib/libc/tests/stdio/open_wmemstream_test.c
66
fseeko(fp, eob, SEEK_SET);
lib/libc/tests/stdio/open_wmemstream_test.c
67
fclose(fp);
lib/libc/tests/stdio/open_wmemstream_test.c
78
FILE *fp;
lib/libc/tests/stdio/open_wmemstream_test.c
80
fp = open_wmemstream(&buf, NULL);
lib/libc/tests/stdio/open_wmemstream_test.c
81
ATF_REQUIRE_MSG(fp == NULL, "open_wmemstream did not fail");
lib/libc/tests/stdio/open_wmemstream_test.c
84
fp = open_wmemstream(NULL, &len);
lib/libc/tests/stdio/open_wmemstream_test.c
85
ATF_REQUIRE_MSG(fp == NULL, "open_wmemstream did not fail");
lib/libc/tests/stdio/open_wmemstream_test.c
88
fp = open_wmemstream(&buf, &len);
lib/libc/tests/stdio/open_wmemstream_test.c
89
ATF_REQUIRE_MSG(fp != NULL, "open_memstream failed; errno=%d", errno);
lib/libc/tests/stdio/open_wmemstream_test.c
90
fflush(fp);
lib/libc/tests/stdio/open_wmemstream_test.c
92
if (fwide(fp, 0) <= 0)
lib/libc/tests/stdio/open_wmemstream_test.c
95
fwprintf(fp, L"fo");
lib/libc/tests/stdio/open_wmemstream_test.c
96
fflush(fp);
lib/libc/tests/stdio/open_wmemstream_test.c
98
fputwc(L'o', fp);
lib/libc/tests/stdio/open_wmemstream_test.c
99
fflush(fp);
lib/libc/tests/sys/mlock_helper.c
100
fclose(fp);
lib/libc/tests/sys/mlock_helper.c
104
fclose(fp);
lib/libc/tests/sys/mlock_helper.c
66
FILE *fp;
lib/libc/tests/sys/mlock_helper.c
69
fp = fopen(VM_MAX_WIRED, "w");
lib/libc/tests/sys/mlock_helper.c
70
if (fp == NULL) {
lib/libc/tests/sys/mlock_helper.c
78
ATF_REQUIRE_MSG(fprintf(fp, "%lu", old_value) > 0,
lib/libc/tests/sys/mlock_helper.c
81
fclose(fp);
lib/libc/tests/sys/mlock_helper.c
89
FILE *fp;
lib/libc/tests/sys/mlock_helper.c
92
fp = fopen(VM_MAX_WIRED, "r");
lib/libc/tests/sys/mlock_helper.c
93
if (fp == NULL) {
lib/libc/tests/sys/mlock_helper.c
98
if (fscanf(fp, "%lu", &saved_max_wired) != 1) {
lib/libc/xdr/xdr_float.c
105
return (XDR_PUTINT32(xdrs, (int32_t *)fp));
lib/libc/xdr/xdr_float.c
107
vs = *((struct vax_single *)fp);
lib/libc/xdr/xdr_float.c
126
return (XDR_GETINT32(xdrs, (int32_t *)fp));
lib/libc/xdr/xdr_float.c
128
vsp = (struct vax_single *)fp;
lib/libc/xdr/xdr_float.c
93
xdr_float(XDR *xdrs, float *fp)
lib/libdpv/dprompt.c
398
struct dpv_file_node *fp;
lib/libdpv/dprompt.c
446
for (fp = file_list; fp != NULL; fp = fp->next) {
lib/libdpv/dprompt.c
448
name = fp->name;
lib/libdpv/dprompt.c
495
if (fp == curfile && pct < 100) {
lib/libdpv/dprompt.c
518
if (fp->msg != NULL)
lib/libdpv/dprompt.c
526
else if (fp == curfile) {
lib/libdpv/dprompt.c
528
if (fp->length < 0)
lib/libdpv/dprompt.c
530
else if (fp->status == DPV_STATUS_RUNNING)
lib/libdpv/dprompt.c
538
else if (fp->status == DPV_STATUS_RUNNING)
lib/libdpv/dprompt.c
539
dstate = fp->length < 0 ?
lib/libdpv/dprompt.c
542
dstate = fp->length < 0 ?
lib/libdpv/dprompt.c
548
dstate = fp->length < 0 ?
lib/libdpv/dprompt.c
554
if (fp->status == DPV_STATUS_FAILED) {
lib/libdpv/dprompt.c
584
humanize_number(human, pbar_size + 2, fp->read, "",
lib/libdpv/dprompt.c
602
snprintf(msg, PROMPT_MAX + 1, "%s", fp->msg);
lib/libdpv/dprompt.c
644
if (fp == curfile)
lib/libefivar/efivar-dp-format.c
2627
const FILEPATH_DEVICE_PATH *fp;
lib/libefivar/efivar-dp-format.c
2630
fp = (const void *)dp;
lib/libefivar/efivar-dp-format.c
2631
ucs2_to_utf8(fp->PathName, &name);
lib/libefivar/efivar-dp-xlate.c
571
char *fp = NULL, *dptxt = NULL, *cp, *rp = NULL;
lib/libefivar/efivar-dp-xlate.c
581
fp = path_to_file_dp(rp);
lib/libefivar/efivar-dp-xlate.c
583
if (fp == NULL) {
lib/libefivar/efivar-dp-xlate.c
589
asprintf(&dptxt, "%s/%s", efimedia, fp == NULL ? "" : fp);
lib/libefivar/efivar-dp-xlate.c
607
free(fp);
lib/libgssapi/gss_mech_switch.c
186
FILE *fp;
lib/libgssapi/gss_mech_switch.c
202
fp = fopen(_PATH_GSS_MECH, "r");
lib/libgssapi/gss_mech_switch.c
203
if (!fp) {
lib/libgssapi/gss_mech_switch.c
208
while (fgets(buf, sizeof(buf), fp)) {
lib/libgssapi/gss_mech_switch.c
297
fclose(fp);
lib/libiscsiutil/keys.c
109
FILE *fp;
lib/libiscsiutil/keys.c
114
fp = open_memstream(&data, &len);
lib/libiscsiutil/keys.c
115
if (fp == NULL)
lib/libiscsiutil/keys.c
121
fprintf(fp, "%s=%s", keys->keys_names[i], keys->keys_values[i]);
lib/libiscsiutil/keys.c
124
fputc('\0', fp);
lib/libiscsiutil/keys.c
126
if (fclose(fp) != 0)
lib/libnetbsd/efun.c
134
FILE *fp = fopen(p, m);
lib/libnetbsd/efun.c
135
if (fp == NULL)
lib/libnetbsd/efun.c
137
return fp;
lib/libpam/modules/pam_login_access/login_access.c
101
(void) fclose(fp);
lib/libpam/modules/pam_login_access/login_access.c
52
FILE *fp;
lib/libpam/modules/pam_login_access/login_access.c
70
if ((fp = fopen(login_access_opts->accessfile, "r")) != NULL) {
lib/libpam/modules/pam_login_access/login_access.c
71
while (!match && fgets(line, sizeof(line), fp)) {
lib/libpmc/pmu-events/jevents.c
347
static void print_events_table_prefix(FILE *fp, const char *tblname)
lib/libpmc/pmu-events/jevents.c
349
fprintf(fp, "static const struct pmu_event %s[] = {\n", tblname);
lib/libradius/radlib.c
502
FILE *fp;
lib/libradius/radlib.c
509
if ((fp = fopen(path, "r")) == NULL) {
lib/libradius/radlib.c
515
while (fgets(buf, sizeof buf, fp) != NULL) {
lib/libradius/radlib.c
666
fclose(fp);
lib/librpcsec_gss/rpcsec_gss_conf.c
179
FILE *fp;
lib/librpcsec_gss/rpcsec_gss_conf.c
190
fp = fopen(_PATH_GSS_MECH, "r");
lib/librpcsec_gss/rpcsec_gss_conf.c
191
if (!fp)
lib/librpcsec_gss/rpcsec_gss_conf.c
195
while (fgets(buf, sizeof(buf), fp)) {
lib/librpcsec_gss/rpcsec_gss_conf.c
223
fclose(fp);
lib/librpcsec_gss/rpcsec_gss_conf.c
236
FILE *fp;
lib/librpcsec_gss/rpcsec_gss_conf.c
249
fp = fopen(_PATH_GSS_QOP, "r");
lib/librpcsec_gss/rpcsec_gss_conf.c
250
if (!fp)
lib/librpcsec_gss/rpcsec_gss_conf.c
253
while (fgets(buf, sizeof(buf), fp)) {
lib/librpcsec_gss/rpcsec_gss_conf.c
273
fclose(fp);
lib/libsecureboot/veopen.c
170
maybe_skip(char *fp, struct fingerprint_info *fip, size_t *nplenp)
lib/libsecureboot/veopen.c
174
tp = fp - sizeof(MANIFEST_SKIP_MAYBE);
lib/libsecureboot/veopen.c
181
fp = tp;
lib/libsecureboot/veopen.c
185
return (fp);
lib/libsecureboot/veopen.c
196
char *cp, *ep, *fp, *np;
lib/libsecureboot/veopen.c
293
if (!(fp = strstr(fip->fi_data, np)))
lib/libsecureboot/veopen.c
297
fp > fip->fi_data && fp[-1] == '/') {
lib/libsecureboot/veopen.c
298
fp = maybe_skip(fp, fip, &nplen);
lib/libsecureboot/veopen.c
307
if (!((fp == fip->fi_data || fp[-1] == '\n') &&
lib/libsecureboot/veopen.c
308
fp[nplen] == ' ')) {
lib/libsecureboot/veopen.c
310
fp++;
lib/libsecureboot/veopen.c
311
fp = strstr(fp, np);
lib/libsecureboot/veopen.c
312
if (fp) {
lib/libsecureboot/veopen.c
315
fp > fip->fi_data &&
lib/libsecureboot/veopen.c
316
fp[-1] == '/') {
lib/libsecureboot/veopen.c
317
fp = maybe_skip(fp, fip, &nplen);
lib/libsecureboot/veopen.c
322
fp[-1], nplen,
lib/libsecureboot/veopen.c
323
fp[nplen],
lib/libsecureboot/veopen.c
324
fp));
lib/libsecureboot/veopen.c
326
} while (fp != NULL &&
lib/libsecureboot/veopen.c
327
!(fp[-1] == '\n' &&
lib/libsecureboot/veopen.c
328
fp[nplen] == ' '));
lib/libsecureboot/veopen.c
329
if (!fp)
lib/libsecureboot/veopen.c
332
DEBUG_PRINTF(2, ("found %.78s\n", fp));
lib/libsecureboot/veopen.c
334
for (cp = &fp[nplen]; *cp == ' '; cp++)
lib/libsysdecode/flags.c
1006
sysdecode_umtx_cvwait_flags(FILE *fp, u_long flags, u_long *rem)
lib/libsysdecode/flags.c
1009
return (print_mask_0ul(fp, umtxcvwaitflags, flags, rem));
lib/libsysdecode/flags.c
101
return (print_mask_int(fp, atflags, flag, rem));
lib/libsysdecode/flags.c
1013
sysdecode_umtx_rwlock_flags(FILE *fp, u_long flags, u_long *rem)
lib/libsysdecode/flags.c
1016
return (print_mask_0ul(fp, umtxrwlockflags, flags, rem));
lib/libsysdecode/flags.c
1020
sysdecode_cap_rights(FILE *fp, cap_rights_t *rightsp)
lib/libsysdecode/flags.c
1029
fprintf(fp, "invalid cap_rights_t");
lib/libsysdecode/flags.c
1044
fprintf(fp, "%s%s", comma ? "," : "", t->str);
lib/libsysdecode/flags.c
1049
fprintf(fp, "CAP_NONE");
lib/libsysdecode/flags.c
1057
fprintf(fp, ",unknown rights");
lib/libsysdecode/flags.c
1141
sysdecode_sctp_snd_flags(FILE *fp, int flags, int *rem)
lib/libsysdecode/flags.c
1144
return (print_mask_int(fp, sctpsndflags, flags, rem));
lib/libsysdecode/flags.c
1152
sysdecode_sctp_rcv_flags(FILE *fp, int flags, int *rem)
lib/libsysdecode/flags.c
1155
return (print_mask_int(fp, sctprcvflags, flags, rem));
lib/libsysdecode/flags.c
1163
sysdecode_sctp_nxt_flags(FILE *fp, int flags, int *rem)
lib/libsysdecode/flags.c
1166
return (print_mask_int(fp, sctpnxtflags, flags, rem));
lib/libsysdecode/flags.c
1175
sysdecode_sctp_sinfo_flags(FILE *fp, int sinfo_flags)
lib/libsysdecode/flags.c
1181
printed = print_mask_0(fp, sctpsinfoflags, sinfo_flags, &rem);
lib/libsysdecode/flags.c
1183
fprintf(fp, "%s%#x", printed ? "|" : "", rem & ~SCTP_PR_SCTP_ALL);
lib/libsysdecode/flags.c
1190
fprintf(fp, "%s%s", printed ? "|" : "", temp);
lib/libsysdecode/flags.c
1192
fprintf(fp, "%s%#x", printed ? "|" : "", rem);
lib/libsysdecode/flags.c
1198
sysdecode_shmflags(FILE *fp, int flags, int *rem)
lib/libsysdecode/flags.c
1201
return (print_mask_0(fp, shmflags, flags, rem));
lib/libsysdecode/flags.c
140
sysdecode_semget_flags(FILE *fp, int flag, int *rem)
lib/libsysdecode/flags.c
143
return (print_mask_int(fp, semgetflags, flag, rem));
lib/libsysdecode/flags.c
192
sysdecode_vmprot(FILE *fp, int type, int *rem)
lib/libsysdecode/flags.c
195
return (print_mask_int(fp, vmprot, type, rem));
lib/libsysdecode/flags.c
203
sysdecode_socket_type(FILE *fp, int type, int *rem)
lib/libsysdecode/flags.c
212
fputs(str, fp);
lib/libsysdecode/flags.c
220
print_mask_part(fp, sockflags, &val, &printed);
lib/libsysdecode/flags.c
225
sysdecode_access_mode(FILE *fp, int mode, int *rem)
lib/libsysdecode/flags.c
228
return (print_mask_int(fp, accessmode, mode, rem));
lib/libsysdecode/flags.c
240
sysdecode_cap_fcntlrights(FILE *fp, uint32_t rights, uint32_t *rem)
lib/libsysdecode/flags.c
243
return (print_mask_int(fp, capfcntl, rights, rem));
lib/libsysdecode/flags.c
247
sysdecode_close_range_flags(FILE *fp, int flags, int *rem)
lib/libsysdecode/flags.c
250
return (print_mask_int(fp, closerangeflags, flags, rem));
lib/libsysdecode/flags.c
268
sysdecode_open_flags(FILE *fp, int flags, int *rem)
lib/libsysdecode/flags.c
280
fputs("O_EXEC", fp);
lib/libsysdecode/flags.c
282
fputs("O_RDONLY", fp);
lib/libsysdecode/flags.c
287
fputs("O_WRONLY", fp);
lib/libsysdecode/flags.c
292
fputs("O_RDWR", fp);
lib/libsysdecode/flags.c
300
print_mask_part(fp, openflags, &val, &printed);
lib/libsysdecode/flags.c
307
sysdecode_fcntl_fileflags(FILE *fp, int flags, int *rem)
lib/libsysdecode/flags.c
318
printed = sysdecode_open_flags(fp, oflags, rem);
lib/libsysdecode/flags.c
320
fprintf(fp, "%sFPOIXSHM", printed ? "|" : "");
lib/libsysdecode/flags.c
324
fprintf(fp, "%sFRDAHEAD", printed ? "|" : "");
lib/libsysdecode/flags.c
331
sysdecode_flock_operation(FILE *fp, int operation, int *rem)
lib/libsysdecode/flags.c
334
return (print_mask_int(fp, flockops, operation, rem));
lib/libsysdecode/flags.c
356
sysdecode_inotifyflags(FILE *fp, int flag, int *rem)
lib/libsysdecode/flags.c
359
return (print_mask_int(fp, inotifyflags, flag, rem));
lib/libsysdecode/flags.c
388
sysdecode_kevent_fflags(FILE *fp, short filter, int fflags, int base)
lib/libsysdecode/flags.c
393
fputs("0", fp);
lib/libsysdecode/flags.c
400
if (!print_mask_int(fp, kevent_rdwr_fflags, fflags, &rem))
lib/libsysdecode/flags.c
401
fprintf(fp, "%#x", rem);
lib/libsysdecode/flags.c
403
fprintf(fp, "|%#x", rem);
lib/libsysdecode/flags.c
406
if (!print_mask_int(fp, kevent_vnode_fflags, fflags, &rem))
lib/libsysdecode/flags.c
407
fprintf(fp, "%#x", rem);
lib/libsysdecode/flags.c
409
fprintf(fp, "|%#x", rem);
lib/libsysdecode/flags.c
413
if (!print_mask_int(fp, kevent_proc_fflags, fflags, &rem))
lib/libsysdecode/flags.c
414
fprintf(fp, "%#x", rem);
lib/libsysdecode/flags.c
416
fprintf(fp, "|%#x", rem);
lib/libsysdecode/flags.c
419
if (!print_mask_int(fp, kevent_timer_fflags, fflags, &rem))
lib/libsysdecode/flags.c
420
fprintf(fp, "%#x", rem);
lib/libsysdecode/flags.c
422
fprintf(fp, "|%#x", rem);
lib/libsysdecode/flags.c
431
fputs("NOTE_TRIGGER", fp);
lib/libsysdecode/flags.c
434
fputc('|', fp);
lib/libsysdecode/flags.c
445
fprintf(fp, "%s|%#x",
lib/libsysdecode/flags.c
448
print_integer(fp, data, base);
lib/libsysdecode/flags.c
453
print_integer(fp, fflags, base);
lib/libsysdecode/flags.c
459
sysdecode_kevent_flags(FILE *fp, int flags, int *rem)
lib/libsysdecode/flags.c
462
return (print_mask_int(fp, keventflags, flags, rem));
lib/libsysdecode/flags.c
508
sysdecode_mlockall_flags(FILE *fp, int flags, int *rem)
lib/libsysdecode/flags.c
511
return (print_mask_int(fp, mlockallflags, flags, rem));
lib/libsysdecode/flags.c
515
sysdecode_mmap_prot(FILE *fp, int prot, int *rem)
lib/libsysdecode/flags.c
524
fputs("PROT_MAX(", fp);
lib/libsysdecode/flags.c
525
printed = print_mask_int(fp, mmapprot, protm, rem);
lib/libsysdecode/flags.c
526
fputs(")|", fp);
lib/libsysdecode/flags.c
528
return (print_mask_int(fp, mmapprot, prot, rem) || printed);
lib/libsysdecode/flags.c
532
sysdecode_fileflags(FILE *fp, fflags_t flags, fflags_t *rem)
lib/libsysdecode/flags.c
535
return (print_mask_0(fp, fileflags, flags, rem));
lib/libsysdecode/flags.c
539
sysdecode_filemode(FILE *fp, int mode, int *rem)
lib/libsysdecode/flags.c
542
return (print_mask_0(fp, filemode, mode, rem));
lib/libsysdecode/flags.c
546
sysdecode_mount_flags(FILE *fp, int flags, int *rem)
lib/libsysdecode/flags.c
549
return (print_mask_int(fp, mountflags, flags, rem));
lib/libsysdecode/flags.c
553
sysdecode_msync_flags(FILE *fp, int flags, int *rem)
lib/libsysdecode/flags.c
556
return (print_mask_int(fp, msyncflags, flags, rem));
lib/libsysdecode/flags.c
571
sysdecode_pipe2_flags(FILE *fp, int flags, int *rem)
lib/libsysdecode/flags.c
574
return (print_mask_0(fp, pipe2flags, flags, rem));
lib/libsysdecode/flags.c
578
sysdecode_pollfd_events(FILE *fp, int flags, int *rem)
lib/libsysdecode/flags.c
581
return (print_mask_int(fp, pollfdevents, flags, rem));
lib/libsysdecode/flags.c
610
sysdecode_quotactl_cmd(FILE *fp, int cmd)
lib/libsysdecode/flags.c
617
fprintf(fp, "QCMD(%s,", primary);
lib/libsysdecode/flags.c
620
fprintf(fp, "%s", type);
lib/libsysdecode/flags.c
622
fprintf(fp, "%#x", cmd & SUBCMDMASK);
lib/libsysdecode/flags.c
623
fprintf(fp, ")");
lib/libsysdecode/flags.c
628
sysdecode_reboot_howto(FILE *fp, int howto, int *rem)
lib/libsysdecode/flags.c
640
fputs("RB_AUTOBOOT|", fp);
lib/libsysdecode/flags.c
644
return (print_mask_int(fp, rebootopt, howto, rem) || printed);
lib/libsysdecode/flags.c
648
sysdecode_rfork_flags(FILE *fp, int flags, int *rem)
lib/libsysdecode/flags.c
651
return (print_mask_int(fp, rforkflags, flags, rem));
lib/libsysdecode/flags.c
669
sysdecode_sendfile_flags(FILE *fp, int flags, int *rem)
lib/libsysdecode/flags.c
672
return (print_mask_int(fp, sendfileflags, flags, rem));
lib/libsysdecode/flags.c
676
sysdecode_shmat_flags(FILE *fp, int flags, int *rem)
lib/libsysdecode/flags.c
679
return (print_mask_int(fp, shmatflags, flags, rem));
lib/libsysdecode/flags.c
795
sysdecode_thr_create_flags(FILE *fp, int flags, int *rem)
lib/libsysdecode/flags.c
798
return (print_mask_int(fp, thrcreateflags, flags, rem));
lib/libsysdecode/flags.c
809
sysdecode_umtx_op_flags(FILE *fp, int op, int *rem)
lib/libsysdecode/flags.c
816
print_mask_part(fp, umtxopflags, &val, &printed);
lib/libsysdecode/flags.c
830
sysdecode_wait4_options(FILE *fp, int options, int *rem)
lib/libsysdecode/flags.c
837
fputs("0", fp);
lib/libsysdecode/flags.c
849
printed = print_mask_int(fp, wait6opt, options, rem);
lib/libsysdecode/flags.c
856
sysdecode_wait6_options(FILE *fp, int options, int *rem)
lib/libsysdecode/flags.c
859
return (print_mask_int(fp, wait6opt, options, rem));
lib/libsysdecode/flags.c
895
sysdecode_fcntl_arg(FILE *fp, int cmd, uintptr_t arg, int base)
lib/libsysdecode/flags.c
901
if (!print_value(fp, fcntl_fd_arg, arg))
lib/libsysdecode/flags.c
902
print_integer(fp, arg, base);
lib/libsysdecode/flags.c
905
if (!sysdecode_fcntl_fileflags(fp, arg, &rem))
lib/libsysdecode/flags.c
906
fprintf(fp, "%#x", rem);
lib/libsysdecode/flags.c
908
fprintf(fp, "|%#x", rem);
lib/libsysdecode/flags.c
913
fprintf(fp, "%p", (void *)arg);
lib/libsysdecode/flags.c
916
print_integer(fp, arg, base);
lib/libsysdecode/flags.c
922
sysdecode_mmap_flags(FILE *fp, int flags, int *rem)
lib/libsysdecode/flags.c
934
print_mask_part(fp, mmapflags, &val, &printed);
lib/libsysdecode/flags.c
937
fputc('|', fp);
lib/libsysdecode/flags.c
939
fputs("MAP_ALIGNED_SUPER", fp);
lib/libsysdecode/flags.c
941
fprintf(fp, "MAP_ALIGNED(%d)",
lib/libsysdecode/flags.c
965
sysdecode_msg_flags(FILE *fp, int flags, int *rem)
lib/libsysdecode/flags.c
968
return (print_mask_0(fp, msgflags, flags, rem));
lib/libsysdecode/flags.c
98
sysdecode_atflags(FILE *fp, int flag, int *rem)
lib/libsysdecode/linux.c
135
sysdecode_linux_clockid(FILE *fp, clockid_t which)
lib/libsysdecode/linux.c
144
fprintf(fp, "UNKNOWN(%d)", which);
lib/libsysdecode/linux.c
146
fputs(str, fp);
lib/libsysdecode/linux.c
150
fputs("INVALID PERTHREAD|CLOCKFD", fp);
lib/libsysdecode/linux.c
155
fputs("THREAD|", fp);
lib/libsysdecode/linux.c
157
fputs("PROCESS|", fp);
lib/libsysdecode/linux.c
160
fputs(str, fp);
lib/libsysdecode/linux.c
163
fputs("CLOCKFD", fp);
lib/libsysdecode/linux.c
165
fprintf(fp, "UNKNOWN(%d)", which);
lib/libsysdecode/linux.c
170
fprintf(fp, "(%d)", pid);
lib/libsysdecode/linux.c
190
sysdecode_linux_clock_flags(FILE *fp, int flags, int *rem)
lib/libsysdecode/linux.c
193
return (print_mask_int(fp, clockflags, flags, rem));
lib/libsysdecode/linux.c
197
sysdecode_linux_atflags(FILE *fp, int flag, int *rem)
lib/libsysdecode/linux.c
200
return (print_mask_int(fp, atflags, flag, rem));
lib/libsysdecode/linux.c
204
sysdecode_linux_open_flags(FILE *fp, int flags, int *rem)
lib/libsysdecode/linux.c
214
fputs("O_RDONLY", fp);
lib/libsysdecode/linux.c
219
fputs("O_WRONLY", fp);
lib/libsysdecode/linux.c
224
fputs("O_RDWR", fp);
lib/libsysdecode/linux.c
232
print_mask_part(fp, openflags, &val, &printed);
lib/libsysdecode/linux.c
239
sysdecode_linux_clone_flags(FILE *fp, int flags, int *rem)
lib/libsysdecode/linux.c
247
fprintf(fp, "(%s)", sysdecode_linux_signal(sig));
lib/libsysdecode/linux.c
249
print_mask_part(fp, cloneflags, &val, &printed);
lib/libsysdecode/netlink.c
24
sysdecode_netlink(FILE *fp, const void *buf, size_t len)
lib/libsysdecode/netlink.c
41
fprintf(fp, "netlink{");
lib/libsysdecode/netlink.c
45
fprintf(fp, ",");
lib/libsysdecode/netlink.c
50
fprintf(fp, "<truncated>");
lib/libsysdecode/netlink.c
54
fprintf(fp, "len=%u,type=", nl->nlmsg_len);
lib/libsysdecode/netlink.c
59
fprintf(fp, "NLMSG_NOOP");
lib/libsysdecode/netlink.c
62
fprintf(fp, "NLMSG_ERROR");
lib/libsysdecode/netlink.c
65
fprintf(fp, "NLMSG_DONE");
lib/libsysdecode/netlink.c
68
fprintf(fp, "NLMSG_OVERRUN");
lib/libsysdecode/netlink.c
71
fprintf(fp, "%u", nl->nlmsg_type);
lib/libsysdecode/netlink.c
75
fprintf(fp, ",flags=");
lib/libsysdecode/netlink.c
77
fprintf(fp, "0x%x", nl->nlmsg_flags);
lib/libsysdecode/netlink.c
79
fprintf(fp, ",seq=%u,pid=%u", nl->nlmsg_seq, nl->nlmsg_pid);
lib/libsysdecode/netlink.c
92
fprintf(fp, "}");
lib/libsysdecode/support.c
102
fputs("0", fp);
lib/libsysdecode/support.c
107
return (print_mask_int(fp, table, val, rem));
lib/libsysdecode/support.c
114
print_mask_0ul(FILE *fp, struct name_table *table, u_long lval, u_long *rem)
lib/libsysdecode/support.c
120
fputs("0", fp);
lib/libsysdecode/support.c
128
print_mask_part(fp, table, &val, &printed);
lib/libsysdecode/support.c
135
print_integer(FILE *fp, int val, int base)
lib/libsysdecode/support.c
140
fprintf(fp, "0%o", val);
lib/libsysdecode/support.c
143
fprintf(fp, "%d", val);
lib/libsysdecode/support.c
146
fprintf(fp, "0x%x", val);
lib/libsysdecode/support.c
155
print_value(FILE *fp, struct name_table *table, uintmax_t val)
lib/libsysdecode/support.c
161
fputs(str, fp);
lib/libsysdecode/support.c
50
print_mask_part(FILE *fp, struct name_table *table, uintmax_t *valp,
lib/libsysdecode/support.c
64
fprintf(fp, "%s%s", *printed ? "|" : "", table->str);
lib/libsysdecode/support.c
81
print_mask_int(FILE *fp, struct name_table *table, int ival, int *rem)
lib/libsysdecode/support.c
88
print_mask_part(fp, table, &val, &printed);
lib/libsysdecode/support.c
98
print_mask_0(FILE *fp, struct name_table *table, int val, int *rem)
lib/libsysdecode/support.h
45
#define print_or(fp,str,orflag) do { \
lib/libsysdecode/support.h
46
if (orflag) fputc(fp, '|'); else orflag = true; \
lib/libsysdecode/support.h
47
fprintf(fp, str); } \
lib/libsysdecode/support.h
49
#define if_print_or(fp,i,flag,orflag) do { \
lib/libsysdecode/support.h
51
print_or(fp,#flag,orflag); } \
lib/libsysdecode/sysdecode.h
87
bool sysdecode_pollfd_events(FILE *fp, int flags, int *rem);
lib/libsysdecode/tests/sysdecode_test.c
100
check_sysdecode_cap_rights(fp, &buf, &sz,
lib/libsysdecode/tests/sysdecode_test.c
104
check_sysdecode_cap_rights(fp, &buf, &sz,
lib/libsysdecode/tests/sysdecode_test.c
108
check_sysdecode_cap_rights(fp, &buf, &sz,
lib/libsysdecode/tests/sysdecode_test.c
112
check_sysdecode_cap_rights(fp, &buf, &sz,
lib/libsysdecode/tests/sysdecode_test.c
116
check_sysdecode_cap_rights(fp, &buf, &sz,
lib/libsysdecode/tests/sysdecode_test.c
121
check_sysdecode_cap_rights(fp, &buf, &sz,
lib/libsysdecode/tests/sysdecode_test.c
126
check_sysdecode_cap_rights(fp, &buf, &sz,
lib/libsysdecode/tests/sysdecode_test.c
133
check_sysdecode_cap_rights(fp, &buf, &sz,
lib/libsysdecode/tests/sysdecode_test.c
139
check_sysdecode_cap_rights(fp, &buf, &sz,
lib/libsysdecode/tests/sysdecode_test.c
143
ATF_REQUIRE(fclose(fp) == 0);
lib/libsysdecode/tests/sysdecode_test.c
44
check_sysdecode_cap_rights(FILE *fp, char **bufp, size_t *szp,
lib/libsysdecode/tests/sysdecode_test.c
51
sysdecode_cap_rights(fp, rightsp);
lib/libsysdecode/tests/sysdecode_test.c
53
ATF_REQUIRE(fflush(fp) == 0);
lib/libsysdecode/tests/sysdecode_test.c
79
ATF_REQUIRE(fseek(fp, 0, SEEK_SET) == 0);
lib/libsysdecode/tests/sysdecode_test.c
89
FILE *fp;
lib/libsysdecode/tests/sysdecode_test.c
93
fp = open_memstream(&buf, &sz);
lib/libsysdecode/tests/sysdecode_test.c
94
ATF_REQUIRE(fp != NULL);
lib/libsysdecode/utrace.c
103
fprintf(fp, "RTLD: %p now depends on %p (%s, %d)", parent,
lib/libsysdecode/utrace.c
107
fprintf(fp, "RTLD: LD_PRELOAD finished");
lib/libsysdecode/utrace.c
110
fprintf(fp, "RTLD: init %p for %p (%s)", ut->mapbase, ut->handle,
lib/libsysdecode/utrace.c
114
fprintf(fp, "RTLD: fini %p for %p (%s)", ut->mapbase, ut->handle,
lib/libsysdecode/utrace.c
118
fprintf(fp, "RTLD: dlsym(%p, %s)", ut->handle, ut->name);
lib/libsysdecode/utrace.c
121
fprintf(fp, "RTLD: %p = dlsym(%p, %s)", ut->mapbase, ut->handle,
lib/libsysdecode/utrace.c
125
fprintf(fp, "RTLD: error: %s\n", ut->name);
lib/libsysdecode/utrace.c
149
print_utrace_malloc(FILE *fp, void *p)
lib/libsysdecode/utrace.c
154
fprintf(fp, "malloc_init()");
lib/libsysdecode/utrace.c
156
fprintf(fp, "free(%p)", ut->p);
lib/libsysdecode/utrace.c
158
fprintf(fp, "%p = malloc(%zu)", ut->r, ut->s);
lib/libsysdecode/utrace.c
160
fprintf(fp, "%p = realloc(%p, %zu)", ut->r, ut->p, ut->s);
lib/libsysdecode/utrace.c
164
sysdecode_utrace(FILE *fp, void *p, size_t len)
lib/libsysdecode/utrace.c
177
return (print_utrace_rtld(fp, p));
lib/libsysdecode/utrace.c
180
print_utrace_malloc(fp, p);
lib/libsysdecode/utrace.c
196
return (print_utrace_rtld(fp, &ur));
lib/libsysdecode/utrace.c
206
print_utrace_malloc(fp, &um);
lib/libsysdecode/utrace.c
51
print_utrace_rtld(FILE *fp, void *p)
lib/libsysdecode/utrace.c
60
fprintf(fp, "dlopen(%s, ", ut->name);
lib/libsysdecode/utrace.c
63
fprintf(fp, "RTLD_NOW");
lib/libsysdecode/utrace.c
66
fprintf(fp, "RTLD_LAZY");
lib/libsysdecode/utrace.c
69
fprintf(fp, "%#x", mode & RTLD_MODEMASK);
lib/libsysdecode/utrace.c
72
fprintf(fp, " | RTLD_GLOBAL");
lib/libsysdecode/utrace.c
74
fprintf(fp, " | RTLD_TRACE");
lib/libsysdecode/utrace.c
76
fprintf(fp, " | %#x", mode &
lib/libsysdecode/utrace.c
78
fprintf(fp, ")");
lib/libsysdecode/utrace.c
81
fprintf(fp, "%p = dlopen(%s) ref %d", ut->handle, ut->name,
lib/libsysdecode/utrace.c
85
fprintf(fp, "dlclose(%p) (%s, %d)", ut->handle, ut->name,
lib/libsysdecode/utrace.c
89
fprintf(fp, "dlclose(%p) finished", ut->handle);
lib/libsysdecode/utrace.c
92
fprintf(fp, "RTLD: loaded %p @ %p - %p (%s)", ut->handle,
lib/libsysdecode/utrace.c
97
fprintf(fp, "RTLD: unloaded %p @ %p - %p (%s)", ut->handle,
lib/libtacplus/taclib.c
798
FILE *fp;
lib/libtacplus/taclib.c
805
if ((fp = fopen(path, "r")) == NULL) {
lib/libtacplus/taclib.c
812
while ((fields = openpam_readlinev(fp, &linenum, &nfields)) != NULL) {
lib/libtacplus/taclib.c
883
fclose(fp);
lib/libutil++/libutil++.hh
27
void operator() (std::FILE *fp) const
lib/libutil++/libutil++.hh
29
std::fclose(fp);
lib/libutil++/stringf.cc
34
freebsd::FILE_up fp(fwopen(reinterpret_cast<void *>(&str),
lib/libutil++/stringf.cc
37
vfprintf(fp.get(), fmt, ap);
lib/libutil++/stringf.cc
39
if (ferror(fp.get()))
lib/libutil++/stringf.cc
41
fp.reset(nullptr);
lib/libutil++/tests/up_test.cc
16
FILE *fp = fopen("/dev/null", "r");
lib/libutil++/tests/up_test.cc
17
ATF_REQUIRE(fp != NULL);
lib/libutil++/tests/up_test.cc
18
ATF_REQUIRE(fileno(fp) != -1);
lib/libutil++/tests/up_test.cc
20
freebsd::FILE_up f(fp);
lib/libutil++/tests/up_test.cc
21
ATF_REQUIRE_EQ(fileno(fp), fileno(f.get()));
lib/libutil++/tests/up_test.cc
26
ATF_REQUIRE_EQ(-1, fileno(fp));
lib/libutil/fparseln.c
109
if ((ptr = fgetln(fp, &s)) == NULL)
lib/libutil/fparseln.c
73
fparseln(FILE *fp, size_t *size, size_t *lineno, const char str[3], int flags)
lib/libutil/fparseln.c
84
_DIAGASSERT(fp != NULL);
libexec/atrun/gloadavg.c
54
FILE *fp;
libexec/atrun/gloadavg.c
56
if((fp=fopen(PROC_DIR "loadavg","r")) == NULL)
libexec/atrun/gloadavg.c
60
if(fscanf(fp,"%lf",&result) != 1)
libexec/atrun/gloadavg.c
62
fclose(fp);
libexec/bootpd/dumptab.c
100
fwrite(legend, 1, sizeof(legend) - 1, fp);
libexec/bootpd/dumptab.c
105
dump_host(fp, hp);
libexec/bootpd/dumptab.c
106
fprintf(fp, "\n");
libexec/bootpd/dumptab.c
109
fclose(fp);
libexec/bootpd/dumptab.c
122
dump_host(FILE *fp, struct host *hp)
libexec/bootpd/dumptab.c
126
fprintf(fp, "%s:", (hp->hostname ?
libexec/bootpd/dumptab.c
129
fprintf(fp, "\\\n\t:bf=%s:", hp->bootfile->string);
libexec/bootpd/dumptab.c
132
fprintf(fp, "\\\n\t:bs=");
libexec/bootpd/dumptab.c
134
fprintf(fp, "auto:");
libexec/bootpd/dumptab.c
136
fprintf(fp, "%lu:", (u_long)hp->bootsize);
libexec/bootpd/dumptab.c
140
fprintf(fp, "\\\n\t:cs=");
libexec/bootpd/dumptab.c
141
list_ipaddresses(fp, hp->cookie_server);
libexec/bootpd/dumptab.c
142
fprintf(fp, ":");
libexec/bootpd/dumptab.c
145
fprintf(fp, "\\\n\t:df=%s:", hp->dump_file->string);
libexec/bootpd/dumptab.c
148
fprintf(fp, "\\\n\t:dn=%s:", hp->domain_name->string);
libexec/bootpd/dumptab.c
151
fprintf(fp, "\\\n\t:ds=");
libexec/bootpd/dumptab.c
152
list_ipaddresses(fp, hp->domain_server);
libexec/bootpd/dumptab.c
153
fprintf(fp, ":");
libexec/bootpd/dumptab.c
156
fprintf(fp, "\\\n\t:ef=%s:", hp->exten_file->string);
libexec/bootpd/dumptab.c
159
fprintf(fp, "\\\n\t:ex=%s:", hp->exec_file->string);
libexec/bootpd/dumptab.c
162
fprintf(fp, "\\\n\t:gw=");
libexec/bootpd/dumptab.c
163
list_ipaddresses(fp, hp->gateway);
libexec/bootpd/dumptab.c
164
fprintf(fp, ":");
libexec/bootpd/dumptab.c
168
fprintf(fp, "\\\n\t:hd=%s:", hp->homedir->string);
libexec/bootpd/dumptab.c
174
fprintf(fp, "\\\n\t:hn:");
libexec/bootpd/dumptab.c
178
fprintf(fp, "\\\n\t:ht=%u:", (unsigned) hp->htype);
libexec/bootpd/dumptab.c
180
fprintf(fp, "ha=\"%s\":",
libexec/bootpd/dumptab.c
185
fprintf(fp, "\\\n\t:im=");
libexec/bootpd/dumptab.c
186
list_ipaddresses(fp, hp->impress_server);
libexec/bootpd/dumptab.c
187
fprintf(fp, ":");
libexec/bootpd/dumptab.c
191
fprintf(fp, "\\\n\t:ip=%s:", inet_ntoa(hp->iaddr));
libexec/bootpd/dumptab.c
194
fprintf(fp, "\\\n\t:lg=");
libexec/bootpd/dumptab.c
195
list_ipaddresses(fp, hp->log_server);
libexec/bootpd/dumptab.c
196
fprintf(fp, ":");
libexec/bootpd/dumptab.c
199
fprintf(fp, "\\\n\t:lp=");
libexec/bootpd/dumptab.c
200
list_ipaddresses(fp, hp->lpr_server);
libexec/bootpd/dumptab.c
201
fprintf(fp, ":");
libexec/bootpd/dumptab.c
204
fprintf(fp, "\\\n\t:ms=%lu:", (u_long)hp->msg_size);
libexec/bootpd/dumptab.c
207
fprintf(fp, "\\\n\t:mw=%lu:", (u_long)hp->min_wait);
libexec/bootpd/dumptab.c
210
fprintf(fp, "\\\n\t:ns=");
libexec/bootpd/dumptab.c
211
list_ipaddresses(fp, hp->name_server);
libexec/bootpd/dumptab.c
212
fprintf(fp, ":");
libexec/bootpd/dumptab.c
215
fprintf(fp, "\\\n\t:nt=");
libexec/bootpd/dumptab.c
216
list_ipaddresses(fp, hp->ntp_server);
libexec/bootpd/dumptab.c
217
fprintf(fp, ":");
libexec/bootpd/dumptab.c
220
fprintf(fp, "\\\n\t:ra=%s:", inet_ntoa(hp->reply_addr));
libexec/bootpd/dumptab.c
223
fprintf(fp, "\\\n\t:rl=");
libexec/bootpd/dumptab.c
224
list_ipaddresses(fp, hp->rlp_server);
libexec/bootpd/dumptab.c
225
fprintf(fp, ":");
libexec/bootpd/dumptab.c
228
fprintf(fp, "\\\n\t:rp=%s:", hp->root_path->string);
libexec/bootpd/dumptab.c
231
fprintf(fp, "\\\n\t:sa=%s:", inet_ntoa(hp->bootserver));
libexec/bootpd/dumptab.c
234
fprintf(fp, "\\\n\t:sm=%s:", inet_ntoa(hp->subnet_mask));
libexec/bootpd/dumptab.c
237
fprintf(fp, "\\\n\t:sw=%s:", inet_ntoa(hp->subnet_mask));
libexec/bootpd/dumptab.c
240
fprintf(fp, "\\\n\t:td=%s:", hp->tftpdir->string);
libexec/bootpd/dumptab.c
246
fprintf(fp, "\\\n\t:to=%ld:", (long)hp->time_offset);
libexec/bootpd/dumptab.c
249
fprintf(fp, "\\\n\t:ts=");
libexec/bootpd/dumptab.c
250
list_ipaddresses(fp, hp->time_server);
libexec/bootpd/dumptab.c
251
fprintf(fp, ":");
libexec/bootpd/dumptab.c
254
fprintf(fp, "\\\n\t:vm=");
libexec/bootpd/dumptab.c
256
fprintf(fp, "rfc1048:");
libexec/bootpd/dumptab.c
258
fprintf(fp, "cmu:");
libexec/bootpd/dumptab.c
260
fprintf(fp, "%d.%d.%d.%d:",
libexec/bootpd/dumptab.c
268
fprintf(fp, "\\\n\t:yd=%s:",
libexec/bootpd/dumptab.c
272
fprintf(fp, "\\\n\t:ys=");
libexec/bootpd/dumptab.c
273
list_ipaddresses(fp, hp->nis_server);
libexec/bootpd/dumptab.c
274
fprintf(fp, ":");
libexec/bootpd/dumptab.c
282
dump_generic(fp, hp->generic);
libexec/bootpd/dumptab.c
289
dump_generic(FILE *fp, struct shared_bindata *generic)
libexec/bootpd/dumptab.c
304
fprintf(fp, " #junk in generic! :");
libexec/bootpd/dumptab.c
307
fprintf(fp, "\\\n\t:T%d=", tag);
libexec/bootpd/dumptab.c
309
fprintf(fp, "%02X", *bp);
libexec/bootpd/dumptab.c
313
fprintf(fp, ".");
libexec/bootpd/dumptab.c
315
fprintf(fp, ":");
libexec/bootpd/dumptab.c
332
list_ipaddresses(FILE *fp, struct in_addr_list *ipptr)
libexec/bootpd/dumptab.c
341
fprintf(fp, "%s", inet_ntoa(*addrptr++));
libexec/bootpd/dumptab.c
344
fprintf(fp, ", ");
libexec/bootpd/dumptab.c
46
FILE *fp;
libexec/bootpd/dumptab.c
91
if ((fp = fopen(filename, "w")) == NULL) {
libexec/bootpd/dumptab.c
97
fprintf(fp, "\n# %s %s.%d\n", progname, VERSION, PATCHLEVEL);
libexec/bootpd/dumptab.c
98
fprintf(fp, "# %s: dump of bootp server database.\n", filename);
libexec/bootpd/dumptab.c
99
fprintf(fp, "# Dump taken %s", ctime(&t));
libexec/bootpd/readfile.c
309
FILE *fp;
libexec/bootpd/readfile.c
348
if ((fp = fopen(bootptab, "r")) == NULL) {
libexec/bootpd/readfile.c
355
if (fstat(fileno(fp), &st) < 0) {
libexec/bootpd/readfile.c
357
fclose(fp);
libexec/bootpd/readfile.c
373
read_entry(fp, buffer, &buflen);
libexec/bootpd/readfile.c
459
fclose(fp);
libexec/bootpd/readfile.c
488
read_entry(FILE *fp, char *buffer, unsigned *bufsiz)
libexec/bootpd/readfile.c
498
c = fgetc(fp);
libexec/bootpd/readfile.c
507
c = fgetc(fp);
libexec/bootpd/readfile.c
516
ungetc(c, fp); /* Other character, push it back to reprocess it */
libexec/bootpd/readfile.c
526
c = fgetc(fp);
libexec/bootpd/readfile.c
532
c = fgetc(fp); /* Backslash, read a new character */
libexec/bootpd/readfile.c
550
c = fgetc(fp);
libexec/bootpd/readfile.c
563
if ((c = fgetc(fp)) < 0) { /* Backslash */
libexec/bootpd/readfile.c
582
c = fgetc(fp);
libexec/bootpd/readfile.c
589
c = fgetc(fp);
libexec/bootpd/tools/bootpef/bootpef.c
263
FILE *fp;
libexec/bootpd/tools/bootpef/bootpef.c
294
if ((fp = fopen(hp->exten_file->string, "w")) == NULL) {
libexec/bootpd/tools/bootpef/bootpef.c
300
if (len != fwrite(buffer, 1, len, fp)) {
libexec/bootpd/tools/bootpef/bootpef.c
304
fclose(fp);
libexec/fingerd/fingerd.c
210
if (!(fp = fdopen(p[0], "r")))
libexec/fingerd/fingerd.c
212
while ((ch = getc(fp)) != EOF) {
libexec/fingerd/fingerd.c
57
FILE *fp;
libexec/flua/lfbsd/lfbsd.c
207
FILE *fp;
libexec/flua/lfbsd/lfbsd.c
216
fp = fdopen(fd, mode);
libexec/flua/lfbsd/lfbsd.c
217
if (fp == NULL) {
libexec/flua/lfbsd/lfbsd.c
228
p->f = fp;
libexec/getty/subr.c
143
for (fp = gettyflags; fp->field; fp++) {
libexec/getty/subr.c
144
if (cgetcap(buf, fp->field, ':') == NULL)
libexec/getty/subr.c
145
fp->set = 0;
libexec/getty/subr.c
147
fp->set = 1;
libexec/getty/subr.c
148
fp->value = 1 ^ fp->invrt;
libexec/getty/subr.c
159
struct gettyflags *fp;
libexec/getty/subr.c
167
for (fp = gettyflags; fp->field; fp++)
libexec/getty/subr.c
168
if (fp->set)
libexec/getty/subr.c
169
fp->defalt = fp->value;
libexec/getty/subr.c
171
fp->defalt = fp->invrt;
libexec/getty/subr.c
179
struct gettyflags *fp;
libexec/getty/subr.c
188
for (fp = gettyflags; fp->field; fp++)
libexec/getty/subr.c
189
if (!fp->set)
libexec/getty/subr.c
190
fp->value = fp->defalt;
libexec/getty/subr.c
60
struct gettyflags *fp;
libexec/pppoed/pppoed.c
620
FILE *fp;
libexec/pppoed/pppoed.c
622
if ((fp = fopen(pidfile, "w")) == NULL) {
libexec/pppoed/pppoed.c
628
fprintf(fp, "%d\n", (int)getpid());
libexec/pppoed/pppoed.c
629
fclose(fp);
libexec/rbootd/parseconf.c
117
while (fgets(line, C_LINELEN, fp) != NULL) {
libexec/rbootd/parseconf.c
202
(void) fclose(fp); /* close config file */
libexec/rbootd/parseconf.c
76
FILE *fp;
libexec/rbootd/parseconf.c
89
if ((fp = fopen(ConfigFile, "r")) == NULL) {
libexec/rbootd/rbootd.c
165
FILE *fp;
libexec/rbootd/rbootd.c
167
if ((fp = fopen(PidFile, "w")) != NULL) {
libexec/rbootd/rbootd.c
168
(void) fprintf(fp, "%d\n", (int) MyPid);
libexec/rbootd/rbootd.c
169
(void) fclose(fp);
libexec/revnetgroup/revnetgroup.c
111
if ((fp = fopen(netgroup, "r")) == NULL) {
libexec/revnetgroup/revnetgroup.c
115
fp = stdin;
libexec/revnetgroup/revnetgroup.c
119
while (fgets(readbuf, LINSIZ, fp)) {
libexec/revnetgroup/revnetgroup.c
125
sizeof(readbuf) - strlen(readbuf), fp);
libexec/revnetgroup/revnetgroup.c
135
fclose(fp);
libexec/revnetgroup/revnetgroup.c
70
FILE *fp;
libexec/tftpd/tftp-io.c
319
send_ack(int fp, uint16_t block)
libexec/tftpd/tftp-io.c
335
if (sendto(fp, buf, size, 0,
libexec/ypxfr/ypxfrd_getmap.c
126
if ((fp = open(tmpname, O_RDWR|O_CREAT, PERM_SECURE)) == -1) {
libexec/ypxfr/ypxfrd_getmap.c
142
close(fp);
libexec/ypxfr/ypxfrd_getmap.c
50
static int fp = 0;
libexec/ypxfr/ypxfrd_getmap.c
59
if (write(fp, objp->xfr_u.xfrblock_buf.xfrblock_buf_val,
sbin/bectl/bectl.c
43
FILE *fp;
sbin/bectl/bectl.c
45
fp = explicit ? stdout : stderr;
sbin/bectl/bectl.c
46
fprintf(fp, "%s",
sbin/bsdlabel/bsdlabel.c
610
FILE *fp;
sbin/bsdlabel/bsdlabel.c
613
(fp = fdopen(fd, "w")) == NULL) {
sbin/bsdlabel/bsdlabel.c
617
display(fp, NULL);
sbin/bsdlabel/bsdlabel.c
618
fclose(fp);
sbin/bsdlabel/bsdlabel.c
622
fp = fopen(tmpfil, "r");
sbin/bsdlabel/bsdlabel.c
623
if (fp == NULL) {
sbin/bsdlabel/bsdlabel.c
628
c = getasciilabel(fp, &label);
sbin/bsdlabel/bsdlabel.c
629
fclose(fp);
sbin/decryptcore/decryptcore.c
125
FILE *fp;
sbin/decryptcore/decryptcore.c
166
fp = fopen(privkeyfile, "r");
sbin/decryptcore/decryptcore.c
167
if (fp == NULL) {
sbin/decryptcore/decryptcore.c
208
privkey = PEM_read_RSAPrivateKey(fp, &privkey, NULL, NULL);
sbin/decryptcore/decryptcore.c
209
fclose(fp);
sbin/devfs/devfs.c
144
efgetln(FILE *fp, char **line)
sbin/devfs/devfs.c
149
cp = fgetln(fp, &rv);
sbin/devfs/rule.c
270
rulespec_infp(FILE *fp, unsigned long request, devfs_rsnum rsnum)
sbin/devfs/rule.c
276
assert(fp == stdin); /* XXX: De-hardcode "stdin" from error msg. */
sbin/devfs/rule.c
277
while (efgetln(fp, &line)) {
sbin/devfs/rule.c
420
rulespec_outfp(FILE *fp, struct devfs_rule *dr)
sbin/devfs/rule.c
426
fprintf(fp, "%d", rid2rn(dr->dr_id));
sbin/devfs/rule.c
431
fprintf(fp, " type %s", is->s);
sbin/devfs/rule.c
433
fprintf(fp, " path %s", dr->dr_pathptrn);
sbin/devfs/rule.c
437
fprintf(fp, " hide");
sbin/devfs/rule.c
439
fprintf(fp, " unhide");
sbin/devfs/rule.c
444
fprintf(fp, " user %d", dr->dr_uid);
sbin/devfs/rule.c
446
fprintf(fp, " user %s", pw->pw_name);
sbin/devfs/rule.c
451
fprintf(fp, " group %d", dr->dr_gid);
sbin/devfs/rule.c
453
fprintf(fp, " group %s", gr->gr_name);
sbin/devfs/rule.c
456
fprintf(fp, " mode %o", dr->dr_mode);
sbin/devfs/rule.c
458
fprintf(fp, " include %d", dr->dr_incset);
sbin/devfs/rule.c
460
fprintf(fp, "\n");
sbin/devfs/rule.c
49
static void rulespec_infp(FILE *fp, unsigned long request, devfs_rsnum rsnum);
sbin/devfs/rule.c
54
static void rulespec_outfp(FILE *fp, struct devfs_rule *dr);
sbin/dump/optr.c
157
FILE *fp;
sbin/dump/optr.c
164
if ((fp = popen(buf, "w")) == NULL)
sbin/dump/optr.c
167
(void) fputs("\a\a\aMessage from the dump program to all operators\n\nDUMP: NEEDS ATTENTION: ", fp);
sbin/dump/optr.c
169
(void) fputs(lastmsg, fp);
sbin/dump/optr.c
171
(void) fputs(message, fp);
sbin/dump/optr.c
173
(void) pclose(fp);
sbin/dumpon/dumpon.c
221
FILE *fp;
sbin/dumpon/dumpon.c
227
fp = NULL;
sbin/dumpon/dumpon.c
230
fp = fopen(pubkeyfile, "r");
sbin/dumpon/dumpon.c
231
if (fp == NULL)
sbin/dumpon/dumpon.c
255
pubkey = PEM_read_RSA_PUBKEY(fp, &pubkey, NULL, NULL);
sbin/dumpon/dumpon.c
256
fclose(fp);
sbin/dumpon/dumpon.c
257
fp = NULL;
sbin/fdisk/fdisk.c
1343
FILE *fp = NULL;
sbin/fdisk/fdisk.c
1352
if ((fp = fopen(config_file, "r")) == NULL) {
sbin/fdisk/fdisk.c
1357
fp = stdin;
sbin/fdisk/fdisk.c
1360
while (!feof(fp)) {
sbin/fdisk/fdisk.c
1361
if (fgets(buf, sizeof(buf), fp) == NULL)
sbin/fdisk/fdisk.c
1370
if (fp) {
sbin/fdisk/fdisk.c
1374
fclose(fp);
sbin/fsck_msdosfs/fat.c
1009
*fp = NULL;
sbin/fsck_msdosfs/fat.c
1011
*fp = fat;
sbin/fsck_msdosfs/fat.c
806
readfat(int fs, struct bootblock *boot, struct fat_descriptor **fp)
sbin/ipf/common/ipf_y.y
1988
FILE *fp = NULL;
sbin/ipf/common/ipf_y.y
2001
fp = fopen(filename, "r");
sbin/ipf/common/ipf_y.y
2002
if (fp == NULL) {
sbin/ipf/common/ipf_y.y
2008
fp = stdin;
sbin/ipf/common/ipf_y.y
2010
while (ipf_parsesome(fd, addfunc, iocfuncs, fp) == 1)
sbin/ipf/common/ipf_y.y
2012
if (fp != NULL)
sbin/ipf/common/ipf_y.y
2013
fclose(fp);
sbin/ipf/common/ipf_y.y
2019
ipf_parsesome(int fd, addfunc_t addfunc, ioctlfunc_t *iocfuncs, FILE *fp)
sbin/ipf/common/ipf_y.y
2029
if (feof(fp))
sbin/ipf/common/ipf_y.y
2031
i = fgetc(fp);
sbin/ipf/common/ipf_y.y
2034
if (ungetc(i, fp) == 0)
sbin/ipf/common/ipf_y.y
2036
if (feof(fp))
sbin/ipf/common/ipf_y.y
2044
yyin = fp;
sbin/ipf/common/ipf_y.y
2684
build_dstaddr_af(frentry_t *fp, void *ptr)
sbin/ipf/common/ipf_y.y
2687
frentry_t *f = fp;
sbin/ipf/common/ipf_y.y
2713
build_srcaddr_af(frentry_t *fp, void *ptr)
sbin/ipf/common/ipf_y.y
2716
frentry_t *f = fp;
sbin/ipf/ipf/ipf.c
487
showstats(friostat_t *fp)
sbin/ipf/ipf/ipf.c
490
fp->f_st[0].fr_bad, fp->f_st[1].fr_bad);
sbin/ipf/ipf/ipf.c
492
fp->f_st[0].fr_block, fp->f_st[0].fr_pass,
sbin/ipf/ipf/ipf.c
493
fp->f_st[0].fr_nom);
sbin/ipf/ipf/ipf.c
494
printf(" counted %lu\n", fp->f_st[0].fr_acct);
sbin/ipf/ipf/ipf.c
496
fp->f_st[1].fr_block, fp->f_st[1].fr_pass,
sbin/ipf/ipf/ipf.c
497
fp->f_st[1].fr_nom);
sbin/ipf/ipf/ipf.c
498
printf(" counted %lu\n", fp->f_st[0].fr_acct);
sbin/ipf/ipf/ipf.c
500
fp->f_st[0].fr_bpkl, fp->f_st[0].fr_ppkl);
sbin/ipf/ipf/ipf.c
502
fp->f_st[1].fr_bpkl, fp->f_st[1].fr_ppkl);
sbin/ipf/ipf/ipfcomp.c
100
fprintf(fp, "#endif\n");
sbin/ipf/ipf/ipfcomp.c
101
fprintf(fp, "#if (__NetBSD_Version__ >= 399000000)\n");
sbin/ipf/ipf/ipfcomp.c
102
fprintf(fp, "#else\n");
sbin/ipf/ipf/ipfcomp.c
103
fprintf(fp, "# if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__sgi)\n");
sbin/ipf/ipf/ipfcomp.c
104
fprintf(fp, "# include <sys/systm.h>\n");
sbin/ipf/ipf/ipfcomp.c
105
fprintf(fp, "# endif\n");
sbin/ipf/ipf/ipfcomp.c
106
fprintf(fp, "#endif\n");
sbin/ipf/ipf/ipfcomp.c
107
fprintf(fp, "#include <sys/errno.h>\n");
sbin/ipf/ipf/ipfcomp.c
108
fprintf(fp, "#include <sys/param.h>\n");
sbin/ipf/ipf/ipfcomp.c
109
fprintf(fp,
sbin/ipf/ipf/ipfcomp.c
111
fprintf(fp, "# include <sys/mbuf.h>\n");
sbin/ipf/ipf/ipfcomp.c
112
fprintf(fp, "#endif\n");
sbin/ipf/ipf/ipfcomp.c
113
fprintf(fp,
sbin/ipf/ipf/ipfcomp.c
115
fprintf(fp, "# include <sys/sockio.h>\n");
sbin/ipf/ipf/ipfcomp.c
116
fprintf(fp, "#else\n");
sbin/ipf/ipf/ipfcomp.c
117
fprintf(fp, "# include <sys/ioctl.h>\n");
sbin/ipf/ipf/ipfcomp.c
118
fprintf(fp, "#endif /* FreeBSD */\n");
sbin/ipf/ipf/ipfcomp.c
119
fprintf(fp, "#include <net/if.h>\n");
sbin/ipf/ipf/ipfcomp.c
120
fprintf(fp, "#include <netinet/in.h>\n");
sbin/ipf/ipf/ipfcomp.c
121
fprintf(fp, "#include <netinet/in_systm.h>\n");
sbin/ipf/ipf/ipfcomp.c
1214
printhooks(FILE *fp, int in, int out, frgroup_t *grp)
sbin/ipf/ipf/ipfcomp.c
122
fprintf(fp, "#include <netinet/ip.h>\n");
sbin/ipf/ipf/ipfcomp.c
123
fprintf(fp, "#include <netinet/tcp.h>\n");
sbin/ipf/ipf/ipfcomp.c
1237
fprintf(fp, "static frentry_t ipfrule_%s_%s;\n", instr, group);
sbin/ipf/ipf/ipfcomp.c
1239
fprintf(fp, "\
sbin/ipf/ipf/ipfcomp.c
124
fprintf(fp, "#include \"netinet/ip_compat.h\"\n");
sbin/ipf/ipf/ipfcomp.c
1242
fprintf(fp, "\
sbin/ipf/ipf/ipfcomp.c
1248
fprintf(fp, "\
sbin/ipf/ipf/ipfcomp.c
125
fprintf(fp, "#include \"netinet/ip_fil.h\"\n\n");
sbin/ipf/ipf/ipfcomp.c
1251
fprintf(fp, "\n");
sbin/ipf/ipf/ipfcomp.c
1255
fprintf(fp, "\
sbin/ipf/ipf/ipfcomp.c
126
fprintf(fp, "#include \"netinet/ip_rules.h\"\n\n");
sbin/ipf/ipf/ipfcomp.c
1260
fprintf(fp, "\
sbin/ipf/ipf/ipfcomp.c
1266
fprintf(fp, "\
sbin/ipf/ipf/ipfcomp.c
127
fprintf(fp, "#ifndef _KERNEL\n");
sbin/ipf/ipf/ipfcomp.c
128
fprintf(fp, "# include <string.h>\n");
sbin/ipf/ipf/ipfcomp.c
1281
fprintf(fp, "\
sbin/ipf/ipf/ipfcomp.c
1289
fprintf(fp, "\
sbin/ipf/ipf/ipfcomp.c
129
fprintf(fp, "#endif /* _KERNEL */\n");
sbin/ipf/ipf/ipfcomp.c
1293
fprintf(fp, "\
sbin/ipf/ipf/ipfcomp.c
1299
fprintf(fp, "\
sbin/ipf/ipf/ipfcomp.c
130
fprintf(fp, "\n");
sbin/ipf/ipf/ipfcomp.c
1303
fprintf(fp, "\
sbin/ipf/ipf/ipfcomp.c
1309
fprintf(fp, "\treturn (err);\n}\n");
sbin/ipf/ipf/ipfcomp.c
131
fprintf(fp, "#ifdef IPFILTER_COMPILED\n");
sbin/ipf/ipf/ipfcomp.c
1311
fprintf(fp, "\n\n\
sbin/ipf/ipf/ipfcomp.c
1313
fprintf(fp, "\
sbin/ipf/ipf/ipfcomp.c
132
fprintf(fp, "\n");
sbin/ipf/ipf/ipfcomp.c
1321
fprintf(fp, "\
sbin/ipf/ipf/ipfcomp.c
1325
fprintf(fp, "\
sbin/ipf/ipf/ipfcomp.c
1329
fprintf(fp, "\
sbin/ipf/ipf/ipfcomp.c
133
fprintf(fp, "extern ipf_main_softc_t ipfmain;\n");
sbin/ipf/ipf/ipfcomp.c
134
fprintf(fp, "\n");
sbin/ipf/ipf/ipfcomp.c
1344
fprintf(fp, "\
sbin/ipf/ipf/ipfcomp.c
1349
fprintf(fp, "\treturn (err);\n}\n");
sbin/ipf/ipf/ipfcomp.c
137
addrule(fp, fr);
sbin/ipf/ipf/ipfcomp.c
145
fprintf(fp, "%s%#lx", and, *ulp++);
sbin/ipf/ipf/ipfcomp.c
148
fprintf(fp, "\n};\n");
sbin/ipf/ipf/ipfcomp.c
153
fflush(fp);
sbin/ipf/ipf/ipfcomp.c
161
addrule(FILE *fp, frentry_t *fr)
sbin/ipf/ipf/ipfcomp.c
202
fprintf(fp, "\
sbin/ipf/ipf/ipfcomp.c
210
fprintf(fp, "%s%#lx", and, *ulp++);
sbin/ipf/ipf/ipfcomp.c
213
fprintf(fp, "\n};\n");
sbin/ipf/ipf/ipfcomp.c
216
fprintf(fp, "\nstatic u_long %s_rule_%s_%d[] = {\n",
sbin/ipf/ipf/ipfcomp.c
253
indent(FILE *fp, int in)
sbin/ipf/ipf/ipfcomp.c
256
fputc('\t', fp);
sbin/ipf/ipf/ipfcomp.c
260
printeq(FILE *fp, char *var, int m, int max, int v)
sbin/ipf/ipf/ipfcomp.c
263
fprintf(fp, "%s == %#x) {\n", var, v);
sbin/ipf/ipf/ipfcomp.c
265
fprintf(fp, "(%s & %#x) == %#x) {\n", var, m, v);
sbin/ipf/ipf/ipfcomp.c
275
printipeq(FILE *fp, char *var, int fl, int m, int v)
sbin/ipf/ipf/ipfcomp.c
278
fprintf(fp, "%s ", var);
sbin/ipf/ipf/ipfcomp.c
280
fprintf(fp, "(%s & %#x) ", var, m);
sbin/ipf/ipf/ipfcomp.c
281
fprintf(fp, "%c", fl ? '!' : '=');
sbin/ipf/ipf/ipfcomp.c
282
fprintf(fp, "= %#x) {\n", v);
sbin/ipf/ipf/ipfcomp.c
432
static FILE *fp = NULL;
sbin/ipf/ipf/ipfcomp.c
444
if (fp == NULL)
sbin/ipf/ipf/ipfcomp.c
445
fp = cfile;
sbin/ipf/ipf/ipfcomp.c
446
if (fp == NULL)
sbin/ipf/ipf/ipfcomp.c
450
indent(fp, sin);
sbin/ipf/ipf/ipfcomp.c
451
fprintf(fp, "}\n");
sbin/ipf/ipf/ipfcomp.c
454
fprintf(fp, "\treturn (fr);\n}\n");
sbin/ipf/ipf/ipfcomp.c
471
indent(fp, sin);
sbin/ipf/ipf/ipfcomp.c
472
fprintf(fp, "}\n");
sbin/ipf/ipf/ipfcomp.c
475
fprintf(fp, "\treturn (fr);\n}\n");
sbin/ipf/ipf/ipfcomp.c
498
fprintf(fp, "\nfrentry_t *ipf_rules_in_%s[%d] = {",
sbin/ipf/ipf/ipfcomp.c
504
fprintf(fp, "\n\t");
sbin/ipf/ipf/ipfcomp.c
506
fprintf(fp, "(frentry_t *)&in_rule_%s_%d",
sbin/ipf/ipf/ipfcomp.c
509
fprintf(fp, ", ");
sbin/ipf/ipf/ipfcomp.c
512
fprintf(fp, "\n};\n");
sbin/ipf/ipf/ipfcomp.c
517
fprintf(fp, "\nfrentry_t *ipf_rules_out_%s[%d] = {",
sbin/ipf/ipf/ipfcomp.c
523
fprintf(fp, "\n\t");
sbin/ipf/ipf/ipfcomp.c
525
fprintf(fp, "(frentry_t *)&out_rule_%s_%d",
sbin/ipf/ipf/ipfcomp.c
528
fprintf(fp, ", ");
sbin/ipf/ipf/ipfcomp.c
531
fprintf(fp, "\n};\n");
sbin/ipf/ipf/ipfcomp.c
532
fp = NULL;
sbin/ipf/ipf/ipfcomp.c
548
fprintf(fp, "\nfrentry_t *ipfrule_match_%s_%s(fin, passp)\n",
sbin/ipf/ipf/ipfcomp.c
550
fprintf(fp, "fr_info_t *fin;\n");
sbin/ipf/ipf/ipfcomp.c
551
fprintf(fp, "u_32_t *passp;\n");
sbin/ipf/ipf/ipfcomp.c
552
fprintf(fp, "{\n");
sbin/ipf/ipf/ipfcomp.c
553
fprintf(fp, "\tfrentry_t *fr = NULL;\n");
sbin/ipf/ipf/ipfcomp.c
565
fprintf(fp, "\tu_32_t src = ntohl(%s);\n",
sbin/ipf/ipf/ipfcomp.c
568
fprintf(fp, "\tu_32_t dst = ntohl(%s);\n",
sbin/ipf/ipf/ipfcomp.c
65
FILE *fp;
sbin/ipf/ipf/ipfcomp.c
678
fprintf(fp, "\n");
sbin/ipf/ipf/ipfcomp.c
709
indent(fp, j);
sbin/ipf/ipf/ipfcomp.c
710
fprintf(fp, "}\n");
sbin/ipf/ipf/ipfcomp.c
726
indent(fp, in);
sbin/ipf/ipf/ipfcomp.c
727
fprintf(fp, "if (fin->fin_ifp == ");
sbin/ipf/ipf/ipfcomp.c
728
fprintf(fp, "ipf_rules_%s_%s[%d]->fr_ifa) {\n",
sbin/ipf/ipf/ipfcomp.c
735
indent(fp, in);
sbin/ipf/ipf/ipfcomp.c
736
fprintf(fp, "if (fin->fin_v == %d) {\n",
sbin/ipf/ipf/ipfcomp.c
743
indent(fp, in);
sbin/ipf/ipf/ipfcomp.c
744
fprintf(fp, "if (");
sbin/ipf/ipf/ipfcomp.c
745
printeq(fp, "fin->fin_flx",
sbin/ipf/ipf/ipfcomp.c
753
indent(fp, in);
sbin/ipf/ipf/ipfcomp.c
754
fprintf(fp, "if (fin->fin_p == %d) {\n",
sbin/ipf/ipf/ipfcomp.c
761
indent(fp, in);
sbin/ipf/ipf/ipfcomp.c
762
fprintf(fp, "if (");
sbin/ipf/ipf/ipfcomp.c
763
printeq(fp, "fin->fin_ttl",
sbin/ipf/ipf/ipfcomp.c
771
indent(fp, in);
sbin/ipf/ipf/ipfcomp.c
772
fprintf(fp, "if (fin->fin_tos");
sbin/ipf/ipf/ipfcomp.c
773
printeq(fp, "fin->fin_tos",
sbin/ipf/ipf/ipfcomp.c
781
indent(fp, in);
sbin/ipf/ipf/ipfcomp.c
782
fprintf(fp, "if (");
sbin/ipf/ipf/ipfcomp.c
783
printeq(fp, "fin->fin_tcpf", fr->fr_tcpfm,
sbin/ipf/ipf/ipfcomp.c
792
indent(fp, in);
sbin/ipf/ipf/ipfcomp.c
793
fprintf(fp, "if ((fin->fin_data[0] > %d) && ",
sbin/ipf/ipf/ipfcomp.c
795
fprintf(fp, "(fin->fin_data[0] < %d)",
sbin/ipf/ipf/ipfcomp.c
797
fprintf(fp, ") {\n");
sbin/ipf/ipf/ipfcomp.c
80
fp = cfile;
sbin/ipf/ipf/ipfcomp.c
800
indent(fp, in);
sbin/ipf/ipf/ipfcomp.c
801
fprintf(fp, "if ((fin->fin_data[0] < %d) || ",
sbin/ipf/ipf/ipfcomp.c
803
fprintf(fp, "(fin->fin_data[0] > %d)",
sbin/ipf/ipf/ipfcomp.c
805
fprintf(fp, ") {\n");
sbin/ipf/ipf/ipfcomp.c
808
indent(fp, in);
sbin/ipf/ipf/ipfcomp.c
809
fprintf(fp, "if (fin->fin_data[0] %s %d)",
sbin/ipf/ipf/ipfcomp.c
811
fprintf(fp, " {\n");
sbin/ipf/ipf/ipfcomp.c
819
indent(fp, in);
sbin/ipf/ipf/ipfcomp.c
82
fprintf(fp, "/*\n");
sbin/ipf/ipf/ipfcomp.c
820
fprintf(fp, "if ((fin->fin_data[1] > %d) && ",
sbin/ipf/ipf/ipfcomp.c
822
fprintf(fp, "(fin->fin_data[1] < %d)",
sbin/ipf/ipf/ipfcomp.c
824
fprintf(fp, ") {\n");
sbin/ipf/ipf/ipfcomp.c
827
indent(fp, in);
sbin/ipf/ipf/ipfcomp.c
828
fprintf(fp, "if ((fin->fin_data[1] < %d) || ",
sbin/ipf/ipf/ipfcomp.c
83
fprintf(fp, "* Copyright (C) 2012 by Darren Reed.\n");
sbin/ipf/ipf/ipfcomp.c
830
fprintf(fp, "(fin->fin_data[1] > %d)",
sbin/ipf/ipf/ipfcomp.c
832
fprintf(fp, ") {\n");
sbin/ipf/ipf/ipfcomp.c
835
indent(fp, in);
sbin/ipf/ipf/ipfcomp.c
836
fprintf(fp, "if (fin->fin_data[1] %s %d)",
sbin/ipf/ipf/ipfcomp.c
838
fprintf(fp, " {\n");
sbin/ipf/ipf/ipfcomp.c
84
fprintf(fp, "*\n");
sbin/ipf/ipf/ipfcomp.c
849
indent(fp, in);
sbin/ipf/ipf/ipfcomp.c
85
fprintf(fp, "* Redistribution and use in source and binary forms are permitted\n");
sbin/ipf/ipf/ipfcomp.c
850
fprintf(fp, "if (");
sbin/ipf/ipf/ipfcomp.c
851
printipeq(fp, "src",
sbin/ipf/ipf/ipfcomp.c
86
fprintf(fp, "* provided that this notice is preserved and due credit is given\n");
sbin/ipf/ipf/ipfcomp.c
864
indent(fp, in);
sbin/ipf/ipf/ipfcomp.c
865
fprintf(fp, "if (");
sbin/ipf/ipf/ipfcomp.c
866
printipeq(fp, "dst",
sbin/ipf/ipf/ipfcomp.c
87
fprintf(fp, "* to the original author and the contributors.\n");
sbin/ipf/ipf/ipfcomp.c
874
indent(fp, in);
sbin/ipf/ipf/ipfcomp.c
875
fprintf(fp, "if (");
sbin/ipf/ipf/ipfcomp.c
876
printeq(fp, "fin->fin_fi.fi_optmsk",
sbin/ipf/ipf/ipfcomp.c
88
fprintf(fp, "*/\n\n");
sbin/ipf/ipf/ipfcomp.c
884
indent(fp, in);
sbin/ipf/ipf/ipfcomp.c
885
fprintf(fp, "if (");
sbin/ipf/ipf/ipfcomp.c
886
printeq(fp, "fin->fin_fi.fi_secmsk",
sbin/ipf/ipf/ipfcomp.c
894
indent(fp, in);
sbin/ipf/ipf/ipfcomp.c
895
fprintf(fp, "if (");
sbin/ipf/ipf/ipfcomp.c
896
printeq(fp, "fin->fin_fi.fi_authmsk",
sbin/ipf/ipf/ipfcomp.c
90
fprintf(fp, "#include <sys/param.h>\n");
sbin/ipf/ipf/ipfcomp.c
904
indent(fp, in);
sbin/ipf/ipf/ipfcomp.c
905
fprintf(fp, "if (");
sbin/ipf/ipf/ipfcomp.c
906
printeq(fp, "fin->fin_data[0]",
sbin/ipf/ipf/ipfcomp.c
91
fprintf(fp, "#include <sys/types.h>\n");
sbin/ipf/ipf/ipfcomp.c
914
indent(fp, in);
sbin/ipf/ipf/ipfcomp.c
915
fprintf(fp, "if (");
sbin/ipf/ipf/ipfcomp.c
916
printeq(fp, "fin->fin_data[0]",
sbin/ipf/ipf/ipfcomp.c
92
fprintf(fp, "#include <sys/time.h>\n");
sbin/ipf/ipf/ipfcomp.c
926
indent(fp, in);
sbin/ipf/ipf/ipfcomp.c
928
fprintf(fp, "return ((frentry_t *)&%s_rule_%s_%d);\n",
sbin/ipf/ipf/ipfcomp.c
93
fprintf(fp, "#include <sys/socket.h>\n");
sbin/ipf/ipf/ipfcomp.c
932
fprintf(fp, "fr = (frentry_t *)&%s_rule_%s_%d;\n",
sbin/ipf/ipf/ipfcomp.c
94
fprintf(fp, "#if (__FreeBSD_version >= 40000)\n");
sbin/ipf/ipf/ipfcomp.c
95
fprintf(fp, "# if defined(_KERNEL)\n");
sbin/ipf/ipf/ipfcomp.c
96
fprintf(fp, "# include <sys/libkern.h>\n");
sbin/ipf/ipf/ipfcomp.c
97
fprintf(fp, "# else\n");
sbin/ipf/ipf/ipfcomp.c
98
fprintf(fp, "# include <sys/unistd.h>\n");
sbin/ipf/ipf/ipfcomp.c
99
fprintf(fp, "# endif\n");
sbin/ipf/ipfstat/ipfstat.c
1001
struct frentry *fp = NULL;
sbin/ipf/ipfstat/ipfstat.c
1010
fp = (struct frentry *)fiop->f_acctout[set];
sbin/ipf/ipfstat/ipfstat.c
1013
fp = (struct frentry *)fiop->f_acctin[set];
sbin/ipf/ipfstat/ipfstat.c
1021
fp = (struct frentry *)fiop->f_fout[set];
sbin/ipf/ipfstat/ipfstat.c
1024
fp = (struct frentry *)fiop->f_fin[set];
sbin/ipf/ipfstat/ipfstat.c
1032
PRINTF("fp %p set %d\n", fp, set);
sbin/ipf/ipfstat/ipfstat.c
1037
printed = printlivelist(fiop, i, set, fp, NULL, NULL);
sbin/ipf/ipfstat/ipfstat.c
1044
if (!fp) {
sbin/ipf/ipfstat/ipfstat.c
1049
printdeadlist(fiop, i, set, fp, NULL, NULL);
sbin/ipf/ipfstat/ipfstat.c
1845
frgroup_t *fp, grp;
sbin/ipf/ipfstat/ipfstat.c
1853
for (fp = fiop->f_groups[gnums[i]][on]; fp != NULL;
sbin/ipf/ipfstat/ipfstat.c
1854
fp = grp.fg_next)
sbin/ipf/ipfstat/ipfstat.c
1855
if (kmemcpy((char *)&grp, (u_long)fp, sizeof(grp)))
sbin/ipf/ipfstat/ipfstat.c
1860
for (fp = fiop->f_groups[gnums[i]][off]; fp != NULL;
sbin/ipf/ipfstat/ipfstat.c
1861
fp = grp.fg_next)
sbin/ipf/ipfstat/ipfstat.c
1862
if (kmemcpy((char *)&grp, (u_long)fp, sizeof(grp)))
sbin/ipf/ipfstat/ipfstat.c
733
static void showstats( struct friostat *fp, u_32_t frf)
sbin/ipf/ipfstat/ipfstat.c
735
printside("input", &fp->f_st[0]);
sbin/ipf/ipfstat/ipfstat.c
736
printside("output", &fp->f_st[1]);
sbin/ipf/ipfstat/ipfstat.c
738
PRINTF("%lu\tpackets logged\n", fp->f_log_ok);
sbin/ipf/ipfstat/ipfstat.c
739
PRINTF("%lu\tlog failures\n", fp->f_log_fail);
sbin/ipf/ipfstat/ipfstat.c
740
PRINTF("%lu\tred-black no memory\n", fp->f_rb_no_mem);
sbin/ipf/ipfstat/ipfstat.c
741
PRINTF("%lu\tred-black node maximum\n", fp->f_rb_node_max);
sbin/ipf/ipfstat/ipfstat.c
742
PRINTF("%lu\tICMP replies sent\n", fp->f_st[0].fr_ret);
sbin/ipf/ipfstat/ipfstat.c
743
PRINTF("%lu\tTCP RSTs sent\n", fp->f_st[1].fr_ret);
sbin/ipf/ipfstat/ipfstat.c
744
PRINTF("%lu\tfastroute successes\n", fp->f_froute[0]);
sbin/ipf/ipfstat/ipfstat.c
745
PRINTF("%lu\tfastroute failures\n", fp->f_froute[1]);
sbin/ipf/ipfstat/ipfstat.c
746
PRINTF("%u\tIPF Ticks\n", fp->f_ticks);
sbin/ipf/ipfstat/ipfstat.c
764
printlivelist( struct friostat *fiop, int out, int set, frentry_t *fp,
sbin/ipf/ipfstat/ipfstat.c
798
fp = (frentry_t *)array;
sbin/ipf/ipfstat/ipfstat.c
799
rule.iri_rule = fp;
sbin/ipf/ipfstat/ipfstat.c
806
if (bcmp(fp, &zero, sizeof(zero)) == 0)
sbin/ipf/ipfstat/ipfstat.c
812
if (fp->fr_family != 0 && fp->fr_family != AF_INET6)
sbin/ipf/ipfstat/ipfstat.c
816
if (fp->fr_family != 0 && fp->fr_family != AF_INET)
sbin/ipf/ipfstat/ipfstat.c
820
if (fp->fr_family != 0 &&
sbin/ipf/ipfstat/ipfstat.c
821
fp->fr_family != AF_INET && fp->fr_family != AF_INET6)
sbin/ipf/ipfstat/ipfstat.c
826
if (fp->fr_data != NULL)
sbin/ipf/ipfstat/ipfstat.c
827
fp->fr_data = (char *)fp + fp->fr_size;
sbin/ipf/ipfstat/ipfstat.c
833
PRINTF("%"PRIu64" ", (unsigned long long) fp->fr_hits);
sbin/ipf/ipfstat/ipfstat.c
835
PRINTF("%lu ", fp->fr_hits);
sbin/ipf/ipfstat/ipfstat.c
839
PRINTF("%"PRIu64" ", (unsigned long long) fp->fr_bytes);
sbin/ipf/ipfstat/ipfstat.c
841
PRINTF("%lu ", fp->fr_bytes);
sbin/ipf/ipfstat/ipfstat.c
846
if (fp->fr_die != 0)
sbin/ipf/ipfstat/ipfstat.c
847
fp->fr_die -= fiop->f_ticks;
sbin/ipf/ipfstat/ipfstat.c
849
printfr(fp, ioctl);
sbin/ipf/ipfstat/ipfstat.c
851
binprint(fp, fp->fr_size);
sbin/ipf/ipfstat/ipfstat.c
852
if (fp->fr_data != NULL && fp->fr_dsize > 0)
sbin/ipf/ipfstat/ipfstat.c
853
binprint(fp->fr_data, fp->fr_dsize);
sbin/ipf/ipfstat/ipfstat.c
855
if (fp->fr_grhead != -1) {
sbin/ipf/ipfstat/ipfstat.c
857
if (!strncmp(fp->fr_names + fp->fr_grhead,
sbin/ipf/ipfstat/ipfstat.c
867
fp->fr_names + fp->fr_grhead,
sbin/ipf/ipfstat/ipfstat.c
879
if (fp->fr_type == FR_T_CALLFUNC) {
sbin/ipf/ipfstat/ipfstat.c
880
rules += printlivelist(fiop, out, set, fp->fr_data,
sbin/ipf/ipfstat/ipfstat.c
892
static void printdeadlist(friostat_t *fiop, int out, int set, frentry_t *fp,
sbin/ipf/ipfstat/ipfstat.c
901
fb.fr_next = fp;
sbin/ipf/ipfstat/ipfstat.c
906
for (n = 1; fp; fp = fb.fr_next, n++) {
sbin/ipf/ipfstat/ipfstat.c
912
fp = &fb;
sbin/ipf/ipfstat/ipfstat.c
915
if (fp->fr_family != 0 && fp->fr_family != AF_INET6)
sbin/ipf/ipfstat/ipfstat.c
919
if (fp->fr_family != 0 && fp->fr_family != AF_INET)
sbin/ipf/ipfstat/ipfstat.c
923
if (fp->fr_family != 0 &&
sbin/ipf/ipfstat/ipfstat.c
924
fp->fr_family != AF_INET && fp->fr_family != AF_INET6)
sbin/ipf/ipfstat/ipfstat.c
959
printfr(fp, ioctl);
sbin/ipf/ipfstat/ipfstat.c
961
binprint(fp, fp->fr_size);
sbin/ipf/iplang/iplang_y.y
1724
void iplang(FILE *fp)
sbin/ipf/iplang/iplang_y.y
1726
yyin = fp;
sbin/ipf/iplang/iplang_y.y
1730
while (!feof(fp))
sbin/ipf/ipmon/ipmon.c
1424
FILE *fp = NULL;
sbin/ipf/ipmon/ipmon.c
1428
fp = fdopen(fd, "w");
sbin/ipf/ipmon/ipmon.c
1429
if (fp == NULL) {
sbin/ipf/ipmon/ipmon.c
1435
fprintf(fp, "%d", getpid());
sbin/ipf/ipmon/ipmon.c
1436
fclose(fp);
sbin/ipf/ipmon/ipmon_y.y
649
FILE *fp;
sbin/ipf/ipmon/ipmon_y.y
664
fp = fopen(file, "r");
sbin/ipf/ipmon/ipmon_y.y
665
if (!fp) {
sbin/ipf/ipmon/ipmon_y.y
669
yyin = fp;
sbin/ipf/ipmon/ipmon_y.y
670
while (!feof(fp))
sbin/ipf/ipmon/ipmon_y.y
672
fclose(fp);
sbin/ipf/ipnat/ipnat_y.y
1299
FILE *fp = NULL;
sbin/ipf/ipnat/ipnat_y.y
1314
fp = fopen(filename, "r");
sbin/ipf/ipnat/ipnat_y.y
1315
if (!fp) {
sbin/ipf/ipnat/ipnat_y.y
1321
fp = stdin;
sbin/ipf/ipnat/ipnat_y.y
1323
while ((rval = ipnat_parsesome(fd, addfunc, ioctlfunc, fp)) == 0)
sbin/ipf/ipnat/ipnat_y.y
1325
if (fp != NULL)
sbin/ipf/ipnat/ipnat_y.y
1326
fclose(fp);
sbin/ipf/ipnat/ipnat_y.y
1337
FILE *fp)
sbin/ipf/ipnat/ipnat_y.y
1347
if (feof(fp))
sbin/ipf/ipnat/ipnat_y.y
1349
i = fgetc(fp);
sbin/ipf/ipnat/ipnat_y.y
1352
if (ungetc(i, fp) == EOF)
sbin/ipf/ipnat/ipnat_y.y
1354
if (feof(fp))
sbin/ipf/ipnat/ipnat_y.y
1362
yyin = fp;
sbin/ipf/ippool/ippool_y.y
614
FILE *fp = NULL;
sbin/ipf/ippool/ippool_y.y
627
fp = fopen(filename, "r");
sbin/ipf/ippool/ippool_y.y
628
if (!fp) {
sbin/ipf/ippool/ippool_y.y
634
fp = stdin;
sbin/ipf/ippool/ippool_y.y
636
while (ippool_parsesome(fd, fp, iocfunc) == 1)
sbin/ipf/ippool/ippool_y.y
638
if (fp != NULL)
sbin/ipf/ippool/ippool_y.y
639
fclose(fp);
sbin/ipf/ippool/ippool_y.y
645
ippool_parsesome(int fd, FILE *fp, ioctlfunc_t iocfunc)
sbin/ipf/ippool/ippool_y.y
652
if (feof(fp))
sbin/ipf/ippool/ippool_y.y
654
i = fgetc(fp);
sbin/ipf/ippool/ippool_y.y
657
if (ungetc(i, fp) == EOF)
sbin/ipf/ippool/ippool_y.y
659
if (feof(fp))
sbin/ipf/ippool/ippool_y.y
667
yyin = fp;
sbin/ipf/ippool/ippool_y.y
777
FILE *fp;
sbin/ipf/ippool/ippool_y.y
779
fp = fopen(file, "r");
sbin/ipf/ippool/ippool_y.y
780
if (fp == NULL)
sbin/ipf/ippool/ippool_y.y
785
while (fgets(line, sizeof(line) - 1, fp) != NULL) {
sbin/ipf/ippool/ippool_y.y
801
fclose(fp);
sbin/ipf/ipscan/ipscan_y.y
502
FILE *fp = NULL;
sbin/ipf/ipscan/ipscan_y.y
519
fp = stdin;
sbin/ipf/ipscan/ipscan_y.y
521
fp = fopen(optarg, "r");
sbin/ipf/ipscan/ipscan_y.y
522
if (!fp) {
sbin/ipf/ipscan/ipscan_y.y
527
yyin = fp;
sbin/ipf/ipscan/ipscan_y.y
554
if (fp != NULL) {
sbin/ipf/ipscan/ipscan_y.y
557
while (!feof(fp))
sbin/ipf/ipscan/ipscan_y.y
559
fclose(fp);
sbin/ipf/libipf/load_file.c
18
FILE *fp;
sbin/ipf/libipf/load_file.c
20
fp = fopen(filename + 7, "r");
sbin/ipf/libipf/load_file.c
21
if (fp == NULL) {
sbin/ipf/libipf/load_file.c
31
while (fgets(line, sizeof(line) - 1, fp)) {
sbin/ipf/libipf/load_file.c
41
fclose(fp);
sbin/ipf/libipf/load_file.c
93
fclose(fp);
sbin/ipf/libipf/mb_hexdump.c
12
mb_hexdump(mb_t *m, FILE *fp)
sbin/ipf/libipf/mb_hexdump.c
21
fprintf(fp, "%02x", *s++ & 0xff);
sbin/ipf/libipf/mb_hexdump.c
24
fprintf(fp, "%02x", *s++ & 0xff);
sbin/ipf/libipf/mb_hexdump.c
26
fputc(' ', fp);
sbin/ipf/libipf/mb_hexdump.c
29
fputc('\n', fp);
sbin/ipf/libipf/printfr.c
103
if (fp->fr_tif.fd_name != -1)
sbin/ipf/libipf/printfr.c
104
print_toif(fp->fr_family, "to", fp->fr_names, &fp->fr_tif);
sbin/ipf/libipf/printfr.c
105
if (fp->fr_dif.fd_name != -1)
sbin/ipf/libipf/printfr.c
106
print_toif(fp->fr_family, "dup-to", fp->fr_names,
sbin/ipf/libipf/printfr.c
107
&fp->fr_dif);
sbin/ipf/libipf/printfr.c
108
if (fp->fr_rif.fd_name != -1)
sbin/ipf/libipf/printfr.c
109
print_toif(fp->fr_family, "reply-to", fp->fr_names,
sbin/ipf/libipf/printfr.c
110
&fp->fr_rif);
sbin/ipf/libipf/printfr.c
111
if (fp->fr_flags & FR_FASTROUTE)
sbin/ipf/libipf/printfr.c
114
if ((fp->fr_ifnames[2] != -1 &&
sbin/ipf/libipf/printfr.c
115
strcmp(fp->fr_names + fp->fr_ifnames[2], "*")) ||
sbin/ipf/libipf/printfr.c
116
(fp->fr_ifnames[3] != -1 &&
sbin/ipf/libipf/printfr.c
117
strcmp(fp->fr_names + fp->fr_ifnames[3], "*"))) {
sbin/ipf/libipf/printfr.c
118
if (fp->fr_flags & FR_OUTQUE)
sbin/ipf/libipf/printfr.c
123
if (fp->fr_ifnames[2] != -1) {
sbin/ipf/libipf/printfr.c
124
printifname("", fp->fr_names + fp->fr_ifnames[2],
sbin/ipf/libipf/printfr.c
125
fp->fr_ifas[2]);
sbin/ipf/libipf/printfr.c
126
if (fp->fr_ifnames[3] != -1) {
sbin/ipf/libipf/printfr.c
128
fp->fr_names + fp->fr_ifnames[3],
sbin/ipf/libipf/printfr.c
129
fp->fr_ifas[3]);
sbin/ipf/libipf/printfr.c
135
if (fp->fr_family == AF_INET) {
sbin/ipf/libipf/printfr.c
139
} else if (fp->fr_family == AF_INET6) {
sbin/ipf/libipf/printfr.c
148
if (fp->fr_mip.fi_tos)
sbin/ipf/libipf/printfr.c
149
PRINTF("tos %#x ", fp->fr_tos);
sbin/ipf/libipf/printfr.c
150
if (fp->fr_mip.fi_ttl)
sbin/ipf/libipf/printfr.c
151
PRINTF("ttl %d ", fp->fr_ttl);
sbin/ipf/libipf/printfr.c
152
if (fp->fr_flx & FI_TCPUDP) {
sbin/ipf/libipf/printfr.c
155
} else if (fp->fr_mip.fi_p) {
sbin/ipf/libipf/printfr.c
156
pr = fp->fr_ip.fi_p;
sbin/ipf/libipf/printfr.c
17
printfr( struct frentry *fp, ioctlfunc_t iocfunc)
sbin/ipf/libipf/printfr.c
171
PRINTF("from %s", fp->fr_flags & FR_NOTSRCIP ? "!" : "");
sbin/ipf/libipf/printfr.c
172
printaddr(af, fp->fr_satype, fp->fr_names, fp->fr_ifnames[0],
sbin/ipf/libipf/printfr.c
173
&fp->fr_src.s_addr, &fp->fr_smsk.s_addr);
sbin/ipf/libipf/printfr.c
174
if (fp->fr_scmp)
sbin/ipf/libipf/printfr.c
175
printportcmp(pr, &fp->fr_tuc.ftu_src);
sbin/ipf/libipf/printfr.c
177
PRINTF(" to %s", fp->fr_flags & FR_NOTDSTIP ? "!" : "");
sbin/ipf/libipf/printfr.c
178
printaddr(af, fp->fr_datype, fp->fr_names, fp->fr_ifnames[0],
sbin/ipf/libipf/printfr.c
179
&fp->fr_dst.s_addr, &fp->fr_dmsk.s_addr);
sbin/ipf/libipf/printfr.c
180
if (fp->fr_dcmp)
sbin/ipf/libipf/printfr.c
181
printportcmp(pr, &fp->fr_tuc.ftu_dst);
sbin/ipf/libipf/printfr.c
183
if (((fp->fr_proto == IPPROTO_ICMP) ||
sbin/ipf/libipf/printfr.c
184
(fp->fr_proto == IPPROTO_ICMPV6)) && fp->fr_icmpm) {
sbin/ipf/libipf/printfr.c
185
int type = fp->fr_icmp, code;
sbin/ipf/libipf/printfr.c
188
type = ntohs(fp->fr_icmp);
sbin/ipf/libipf/printfr.c
191
name = icmptypename(fp->fr_family, type);
sbin/ipf/libipf/printfr.c
196
if (ntohs(fp->fr_icmpm) & 0xff)
sbin/ipf/libipf/printfr.c
199
if ((fp->fr_proto == IPPROTO_TCP) &&
sbin/ipf/libipf/printfr.c
200
(fp->fr_tcpf || fp->fr_tcpfm)) {
sbin/ipf/libipf/printfr.c
202
printtcpflags(fp->fr_tcpf, fp->fr_tcpfm);
sbin/ipf/libipf/printfr.c
211
PRINTF("bpf-v%d { \"", fp->fr_family);
sbin/ipf/libipf/printfr.c
212
i = fp->fr_dsize / sizeof(*fb);
sbin/ipf/libipf/printfr.c
214
for (fb = fp->fr_data, s = ""; i; i--, fb++, s = " ")
sbin/ipf/libipf/printfr.c
226
PRINTF("call function at %p", fp->fr_data);
sbin/ipf/libipf/printfr.c
231
printipfexpr(fp->fr_data);
sbin/ipf/libipf/printfr.c
236
PRINTF("[unknown filter type %#x]", fp->fr_type);
sbin/ipf/libipf/printfr.c
241
((fp->fr_flx & FI_WITH) || (fp->fr_mflx & FI_WITH) ||
sbin/ipf/libipf/printfr.c
242
fp->fr_optbits || fp->fr_optmask ||
sbin/ipf/libipf/printfr.c
243
fp->fr_secbits || fp->fr_secmask)) {
sbin/ipf/libipf/printfr.c
247
if (fp->fr_optbits || fp->fr_optmask ||
sbin/ipf/libipf/printfr.c
248
fp->fr_secbits || fp->fr_secmask) {
sbin/ipf/libipf/printfr.c
249
sec[0] = fp->fr_secmask;
sbin/ipf/libipf/printfr.c
250
sec[1] = fp->fr_secbits;
sbin/ipf/libipf/printfr.c
251
if (fp->fr_family == AF_INET)
sbin/ipf/libipf/printfr.c
252
optprint(sec, fp->fr_optmask, fp->fr_optbits);
sbin/ipf/libipf/printfr.c
255
optprintv6(sec, fp->fr_optmask,
sbin/ipf/libipf/printfr.c
256
fp->fr_optbits);
sbin/ipf/libipf/printfr.c
258
} else if (fp->fr_mflx & FI_OPTIONS) {
sbin/ipf/libipf/printfr.c
260
if (!(fp->fr_flx & FI_OPTIONS))
sbin/ipf/libipf/printfr.c
265
if (fp->fr_mflx & FI_SHORT) {
sbin/ipf/libipf/printfr.c
267
if (!(fp->fr_flx & FI_SHORT))
sbin/ipf/libipf/printfr.c
27
type = fp->fr_type & ~FR_T_BUILTIN;
sbin/ipf/libipf/printfr.c
272
if (fp->fr_mflx & FI_FRAG) {
sbin/ipf/libipf/printfr.c
274
if (!(fp->fr_flx & FI_FRAG))
sbin/ipf/libipf/printfr.c
279
if (fp->fr_mflx & FI_FRAGBODY) {
sbin/ipf/libipf/printfr.c
281
if (!(fp->fr_flx & FI_FRAGBODY))
sbin/ipf/libipf/printfr.c
286
if (fp->fr_mflx & FI_NATED) {
sbin/ipf/libipf/printfr.c
288
if (!(fp->fr_flx & FI_NATED))
sbin/ipf/libipf/printfr.c
29
if ((fp->fr_type & FR_T_BUILTIN) != 0)
sbin/ipf/libipf/printfr.c
293
if (fp->fr_mflx & FI_LOWTTL) {
sbin/ipf/libipf/printfr.c
295
if (!(fp->fr_flx & FI_LOWTTL))
sbin/ipf/libipf/printfr.c
300
if (fp->fr_mflx & FI_BAD) {
sbin/ipf/libipf/printfr.c
302
if (!(fp->fr_flx & FI_BAD))
sbin/ipf/libipf/printfr.c
307
if (fp->fr_mflx & FI_BADSRC) {
sbin/ipf/libipf/printfr.c
309
if (!(fp->fr_flx & FI_BADSRC))
sbin/ipf/libipf/printfr.c
314
if (fp->fr_mflx & FI_BADNAT) {
sbin/ipf/libipf/printfr.c
316
if (!(fp->fr_flx & FI_BADNAT))
sbin/ipf/libipf/printfr.c
32
if (fp->fr_collect != 0)
sbin/ipf/libipf/printfr.c
321
if (fp->fr_mflx & FI_OOW) {
sbin/ipf/libipf/printfr.c
323
if (!(fp->fr_flx & FI_OOW))
sbin/ipf/libipf/printfr.c
328
if (fp->fr_mflx & FI_MBCAST) {
sbin/ipf/libipf/printfr.c
33
PRINTF("%u ", fp->fr_collect);
sbin/ipf/libipf/printfr.c
330
if (!(fp->fr_flx & FI_MBCAST))
sbin/ipf/libipf/printfr.c
335
if (fp->fr_mflx & FI_BROADCAST) {
sbin/ipf/libipf/printfr.c
337
if (!(fp->fr_flx & FI_BROADCAST))
sbin/ipf/libipf/printfr.c
342
if (fp->fr_mflx & FI_MULTICAST) {
sbin/ipf/libipf/printfr.c
344
if (!(fp->fr_flx & FI_MULTICAST))
sbin/ipf/libipf/printfr.c
349
if (fp->fr_mflx & FI_STATE) {
sbin/ipf/libipf/printfr.c
35
if (fp->fr_type == FR_T_CALLFUNC) {
sbin/ipf/libipf/printfr.c
351
if (!(fp->fr_flx & FI_STATE))
sbin/ipf/libipf/printfr.c
356
if (fp->fr_mflx & FI_V6EXTHDR) {
sbin/ipf/libipf/printfr.c
358
if (!(fp->fr_flx & FI_V6EXTHDR))
sbin/ipf/libipf/printfr.c
365
if (fp->fr_flags & FR_KEEPSTATE) {
sbin/ipf/libipf/printfr.c
366
host_track_t *src = &fp->fr_srctrack;
sbin/ipf/libipf/printfr.c
368
if ((fp->fr_flags & (FR_STSTRICT|FR_NEWISN|
sbin/ipf/libipf/printfr.c
37
} else if (fp->fr_func != NULL) {
sbin/ipf/libipf/printfr.c
370
(fp->fr_statemax != 0) || (fp->fr_age[0] != 0) ||
sbin/ipf/libipf/printfr.c
374
if (fp->fr_statemax != 0) {
sbin/ipf/libipf/printfr.c
375
PRINTF("limit %u", fp->fr_statemax);
sbin/ipf/libipf/printfr.c
387
if (fp->fr_flags & FR_STSTRICT) {
sbin/ipf/libipf/printfr.c
39
if ((fp->fr_flags & FR_CALLNOW) != 0)
sbin/ipf/libipf/printfr.c
391
if (fp->fr_flags & FR_STLOOSE) {
sbin/ipf/libipf/printfr.c
395
if (fp->fr_flags & FR_NEWISN) {
sbin/ipf/libipf/printfr.c
399
if (fp->fr_flags & FR_NOICMPERR) {
sbin/ipf/libipf/printfr.c
403
if (fp->fr_flags & FR_STATESYNC) {
sbin/ipf/libipf/printfr.c
407
if (fp->fr_age[0] || fp->fr_age[1])
sbin/ipf/libipf/printfr.c
408
PRINTF("%sage %d/%d", comma, fp->fr_age[0],
sbin/ipf/libipf/printfr.c
409
fp->fr_age[1]);
sbin/ipf/libipf/printfr.c
41
s = kvatoname(fp->fr_func, iocfunc);
sbin/ipf/libipf/printfr.c
413
if (fp->fr_flags & FR_KEEPFRAG) {
sbin/ipf/libipf/printfr.c
415
if (fp->fr_flags & (FR_FRSTRICT)) {
sbin/ipf/libipf/printfr.c
417
if (fp->fr_flags & FR_FRSTRICT)
sbin/ipf/libipf/printfr.c
42
PRINTF(" %s/%u", s ? s : "?", fp->fr_arg);
sbin/ipf/libipf/printfr.c
423
if (fp->fr_isc != (struct ipscan *)-1) {
sbin/ipf/libipf/printfr.c
424
if (fp->fr_isctag != -1)
sbin/ipf/libipf/printfr.c
425
PRINTF(" scan %s", fp->fr_isctag + fp->fr_names);
sbin/ipf/libipf/printfr.c
429
if (fp->fr_grhead != -1)
sbin/ipf/libipf/printfr.c
43
} else if (FR_ISPASS(fp->fr_flags))
sbin/ipf/libipf/printfr.c
430
PRINTF(" head %s", fp->fr_names + fp->fr_grhead);
sbin/ipf/libipf/printfr.c
431
if (fp->fr_group != -1)
sbin/ipf/libipf/printfr.c
432
PRINTF(" group %s", fp->fr_names + fp->fr_group);
sbin/ipf/libipf/printfr.c
433
if (fp->fr_logtag != FR_NOLOGTAG || *fp->fr_nattag.ipt_tag) {
sbin/ipf/libipf/printfr.c
437
if (fp->fr_logtag != FR_NOLOGTAG) {
sbin/ipf/libipf/printfr.c
438
PRINTF("log=%u", fp->fr_logtag);
sbin/ipf/libipf/printfr.c
441
if (*fp->fr_nattag.ipt_tag) {
sbin/ipf/libipf/printfr.c
443
fp->fr_nattag.ipt_tag);
sbin/ipf/libipf/printfr.c
448
if (fp->fr_pps)
sbin/ipf/libipf/printfr.c
449
PRINTF(" pps %d", fp->fr_pps);
sbin/ipf/libipf/printfr.c
45
else if (FR_ISBLOCK(fp->fr_flags)) {
sbin/ipf/libipf/printfr.c
451
if (fp->fr_comment != -1)
sbin/ipf/libipf/printfr.c
452
PRINTF(" comment \"%s\"", fp->fr_names + fp->fr_comment);
sbin/ipf/libipf/printfr.c
455
if ((fp->fr_flags & FR_KEEPSTATE) && (opts & OPT_VERBOSE)) {
sbin/ipf/libipf/printfr.c
456
PRINTF(" # count %d", fp->fr_statecnt);
sbin/ipf/libipf/printfr.c
457
if (fp->fr_die != 0)
sbin/ipf/libipf/printfr.c
458
PRINTF(" rule-ttl %u", fp->fr_die);
sbin/ipf/libipf/printfr.c
460
} else if (fp->fr_die != 0) {
sbin/ipf/libipf/printfr.c
461
PRINTF(" # rule-ttl %u", fp->fr_die);
sbin/ipf/libipf/printfr.c
467
PRINTF(" ref %d", fp->fr_ref);
sbin/ipf/libipf/printfr.c
47
} else if ((fp->fr_flags & FR_LOGMASK) == FR_LOG) {
sbin/ipf/libipf/printfr.c
48
printlog(fp);
sbin/ipf/libipf/printfr.c
49
} else if (FR_ISACCOUNT(fp->fr_flags))
sbin/ipf/libipf/printfr.c
51
else if (FR_ISAUTH(fp->fr_flags))
sbin/ipf/libipf/printfr.c
53
else if (FR_ISPREAUTH(fp->fr_flags))
sbin/ipf/libipf/printfr.c
55
else if (FR_ISNOMATCH(fp->fr_flags))
sbin/ipf/libipf/printfr.c
57
else if (FR_ISDECAPS(fp->fr_flags))
sbin/ipf/libipf/printfr.c
59
else if (FR_ISSKIP(fp->fr_flags))
sbin/ipf/libipf/printfr.c
60
PRINTF("skip %u", fp->fr_arg);
sbin/ipf/libipf/printfr.c
62
PRINTF("%x", fp->fr_flags);
sbin/ipf/libipf/printfr.c
64
if (fp->fr_flags & FR_RETICMP) {
sbin/ipf/libipf/printfr.c
65
if ((fp->fr_flags & FR_RETMASK) == FR_FAKEICMP)
sbin/ipf/libipf/printfr.c
67
else if ((fp->fr_flags & FR_RETMASK) == FR_RETICMP)
sbin/ipf/libipf/printfr.c
69
if (fp->fr_icode) {
sbin/ipf/libipf/printfr.c
70
if (fp->fr_icode <= MAX_ICMPCODE)
sbin/ipf/libipf/printfr.c
72
icmpcodes[(int)fp->fr_icode]);
sbin/ipf/libipf/printfr.c
74
PRINTF("(%d)", fp->fr_icode);
sbin/ipf/libipf/printfr.c
76
} else if ((fp->fr_flags & FR_RETMASK) == FR_RETRST)
sbin/ipf/libipf/printfr.c
79
if (fp->fr_flags & FR_OUTQUE)
sbin/ipf/libipf/printfr.c
81
else if (fp->fr_flags & FR_INQUE)
sbin/ipf/libipf/printfr.c
84
if (((fp->fr_flags & FR_LOGB) == FR_LOGB) ||
sbin/ipf/libipf/printfr.c
85
((fp->fr_flags & FR_LOGP) == FR_LOGP)) {
sbin/ipf/libipf/printfr.c
86
printlog(fp);
sbin/ipf/libipf/printfr.c
90
if (fp->fr_flags & FR_QUICK)
sbin/ipf/libipf/printfr.c
93
if (fp->fr_ifnames[0] != -1) {
sbin/ipf/libipf/printfr.c
94
printifname("on ", fp->fr_names + fp->fr_ifnames[0],
sbin/ipf/libipf/printfr.c
95
fp->fr_ifa);
sbin/ipf/libipf/printfr.c
96
if (fp->fr_ifnames[1] != -1 &&
sbin/ipf/libipf/printfr.c
97
strcmp(fp->fr_names + fp->fr_ifnames[1], "*"))
sbin/ipf/libipf/printfr.c
98
printifname(",", fp->fr_names + fp->fr_ifnames[1],
sbin/ipf/libipf/printfr.c
99
fp->fr_ifas[1]);
sbin/ipf/libipf/printlog.c
16
printlog(frentry_t *fp)
sbin/ipf/libipf/printlog.c
21
if (fp->fr_flags & FR_LOGBODY)
sbin/ipf/libipf/printlog.c
23
if (fp->fr_flags & FR_LOGFIRST)
sbin/ipf/libipf/printlog.c
25
if (fp->fr_flags & FR_LOGORBLOCK)
sbin/ipf/libipf/printlog.c
27
if (fp->fr_loglevel != 0xffff) {
sbin/ipf/libipf/printlog.c
29
s = fac_toname(fp->fr_loglevel);
sbin/ipf/libipf/printlog.c
32
u = pri_toname(fp->fr_loglevel);
sbin/ipf/libipf/save_execute.c
67
FILE *fp;
sbin/ipf/libipf/save_execute.c
69
fp = popen(exe->path, "w");
sbin/ipf/libipf/save_execute.c
70
if (fp != NULL) {
sbin/ipf/libipf/save_execute.c
71
fwrite(msg->imm_msg, msg->imm_msglen, 1, fp);
sbin/ipf/libipf/save_execute.c
72
pclose(fp);
sbin/ipf/libipf/save_file.c
117
fwrite(msg->imm_data, msg->imm_dsize, 1, file->fp);
sbin/ipf/libipf/save_file.c
119
fprintf(file->fp, "%s", msg->imm_msg);
sbin/ipf/libipf/save_file.c
12
FILE *fp;
sbin/ipf/libipf/save_file.c
43
ctx->fp = fopen(ctx->path, "ab");
sbin/ipf/libipf/save_file.c
46
ctx->fp = fopen(ctx->path, "a");
sbin/ipf/libipf/save_nothing.c
9
FILE *fp;
sbin/ldconfig/elfhints.c
147
FILE *fp;
sbin/ldconfig/elfhints.c
151
if ((fp = fopen(listfile, "r")) == NULL)
sbin/ldconfig/elfhints.c
155
while (fgets(buf, sizeof buf, fp) != NULL) {
sbin/ldconfig/elfhints.c
185
fclose(fp);
sbin/ldconfig/elfhints.c
272
FILE *fp;
sbin/ldconfig/elfhints.c
281
if ((fp = fdopen(fd, "wb")) == NULL)
sbin/ldconfig/elfhints.c
303
if (fwrite(&hdr, 1, sizeof hdr, fp) != sizeof hdr)
sbin/ldconfig/elfhints.c
307
if (fputs(dirs[0], fp) == EOF)
sbin/ldconfig/elfhints.c
310
if (fprintf(fp, ":%s", dirs[i]) < 0)
sbin/ldconfig/elfhints.c
313
if (putc('\0', fp) == EOF || fclose(fp) == EOF)
sbin/pfctl/pfctl.c
2837
FILE *fp;
sbin/pfctl/pfctl.c
2839
fp = fopen(name, mode);
sbin/pfctl/pfctl.c
2840
if (fp == NULL)
sbin/pfctl/pfctl.c
2842
if (fstat(fileno(fp), &st)) {
sbin/pfctl/pfctl.c
2843
fclose(fp);
sbin/pfctl/pfctl.c
2847
fclose(fp);
sbin/pfctl/pfctl.c
2851
return (fp);
sbin/pfctl/pfctl_osfp.c
100
struct pf_osfp_ioctl fp;
sbin/pfctl/pfctl_osfp.c
1006
if (fp->fp_flags & PF_OSFP_WSIZE_DC)
sbin/pfctl/pfctl_osfp.c
1008
else if (fp->fp_flags & PF_OSFP_WSIZE_MSS)
sbin/pfctl/pfctl_osfp.c
1010
else if (fp->fp_flags & PF_OSFP_WSIZE_MTU)
sbin/pfctl/pfctl_osfp.c
1013
if (fp->fp_flags & PF_OSFP_WSIZE_MOD)
sbin/pfctl/pfctl_osfp.c
1015
snprintf(tmp, sizeof(tmp), "%d", fp->fp_wsize);
sbin/pfctl/pfctl_osfp.c
1020
snprintf(tmp, sizeof(tmp), "%d", fp->fp_ttl);
sbin/pfctl/pfctl_osfp.c
1024
if (fp->fp_flags & PF_OSFP_DF)
sbin/pfctl/pfctl_osfp.c
1030
if (fp->fp_flags & PF_OSFP_PSIZE_DC)
sbin/pfctl/pfctl_osfp.c
1033
if (fp->fp_flags & PF_OSFP_PSIZE_MOD)
sbin/pfctl/pfctl_osfp.c
1035
snprintf(tmp, sizeof(tmp), "%d", fp->fp_psize);
sbin/pfctl/pfctl_osfp.c
1040
if (fp->fp_optcnt == 0)
sbin/pfctl/pfctl_osfp.c
1042
for (i = fp->fp_optcnt - 1; i >= 0; i--) {
sbin/pfctl/pfctl_osfp.c
1043
opt = fp->fp_tcpopts >> (i * PF_OSFP_TCPOPT_BITS);
sbin/pfctl/pfctl_osfp.c
1054
if (fp->fp_flags & PF_OSFP_TS0)
sbin/pfctl/pfctl_osfp.c
1059
if (fp->fp_flags & PF_OSFP_MSS_DC)
sbin/pfctl/pfctl_osfp.c
1062
if (fp->fp_flags & PF_OSFP_MSS_MOD)
sbin/pfctl/pfctl_osfp.c
1064
snprintf(tmp, sizeof(tmp), "%d", fp->fp_mss);
sbin/pfctl/pfctl_osfp.c
1070
if (fp->fp_flags & PF_OSFP_WSCALE_DC)
sbin/pfctl/pfctl_osfp.c
1073
if (fp->fp_flags & PF_OSFP_WSCALE_MOD)
sbin/pfctl/pfctl_osfp.c
1075
snprintf(tmp, sizeof(tmp), "%d", fp->fp_wscale);
sbin/pfctl/pfctl_osfp.c
1086
strlcat(buf, fp->fp_os.fp_class_nm, sizeof(buf));
sbin/pfctl/pfctl_osfp.c
1088
strlcat(buf, fp->fp_os.fp_version_nm, sizeof(buf));
sbin/pfctl/pfctl_osfp.c
1090
strlcat(buf, fp->fp_os.fp_subtype_nm, sizeof(buf));
sbin/pfctl/pfctl_osfp.c
1093
snprintf(tmp, sizeof(tmp), "TcpOpts %d 0x%llx", fp->fp_optcnt,
sbin/pfctl/pfctl_osfp.c
1094
(long long int)fp->fp_tcpopts);
sbin/pfctl/pfctl_osfp.c
121
memset(&fp, 0, sizeof(fp));
sbin/pfctl/pfctl_osfp.c
170
fp.fp_ttl = ttl;
sbin/pfctl/pfctl_osfp.c
172
fp.fp_flags |= PF_OSFP_DF;
sbin/pfctl/pfctl_osfp.c
177
fp.fp_flags |= PF_OSFP_WSIZE_DC;
sbin/pfctl/pfctl_osfp.c
180
fp.fp_flags |= PF_OSFP_WSIZE_MSS;
sbin/pfctl/pfctl_osfp.c
183
fp.fp_flags |= PF_OSFP_WSIZE_MTU;
sbin/pfctl/pfctl_osfp.c
186
fp.fp_flags |= PF_OSFP_WSIZE_MOD;
sbin/pfctl/pfctl_osfp.c
189
fp.fp_wsize = window;
sbin/pfctl/pfctl_osfp.c
193
fp.fp_flags |= PF_OSFP_PSIZE_DC;
sbin/pfctl/pfctl_osfp.c
196
fp.fp_flags |= PF_OSFP_PSIZE_MOD;
sbin/pfctl/pfctl_osfp.c
198
fp.fp_psize = psize;
sbin/pfctl/pfctl_osfp.c
203
fp.fp_flags |= PF_OSFP_WSCALE_DC;
sbin/pfctl/pfctl_osfp.c
206
fp.fp_flags |= PF_OSFP_WSCALE_MOD;
sbin/pfctl/pfctl_osfp.c
208
fp.fp_wscale = wscale;
sbin/pfctl/pfctl_osfp.c
212
fp.fp_flags |= PF_OSFP_MSS_DC;
sbin/pfctl/pfctl_osfp.c
215
fp.fp_flags |= PF_OSFP_MSS_MOD;
sbin/pfctl/pfctl_osfp.c
218
fp.fp_mss = mss;
sbin/pfctl/pfctl_osfp.c
220
fp.fp_tcpopts = packed_tcpopts;
sbin/pfctl/pfctl_osfp.c
221
fp.fp_optcnt = optcnt;
sbin/pfctl/pfctl_osfp.c
223
fp.fp_flags |= PF_OSFP_TS0;
sbin/pfctl/pfctl_osfp.c
226
fp.fp_os.fp_enflags |= PF_OSFP_GENERIC;
sbin/pfctl/pfctl_osfp.c
228
fp.fp_os.fp_enflags |= PF_OSFP_NODETAIL;
sbin/pfctl/pfctl_osfp.c
231
strlcpy(fp.fp_os.fp_class_nm, class + 1,
sbin/pfctl/pfctl_osfp.c
232
sizeof(fp.fp_os.fp_class_nm));
sbin/pfctl/pfctl_osfp.c
234
strlcpy(fp.fp_os.fp_class_nm, class,
sbin/pfctl/pfctl_osfp.c
235
sizeof(fp.fp_os.fp_class_nm));
sbin/pfctl/pfctl_osfp.c
236
strlcpy(fp.fp_os.fp_version_nm, version,
sbin/pfctl/pfctl_osfp.c
237
sizeof(fp.fp_os.fp_version_nm));
sbin/pfctl/pfctl_osfp.c
238
strlcpy(fp.fp_os.fp_subtype_nm, subtype,
sbin/pfctl/pfctl_osfp.c
239
sizeof(fp.fp_os.fp_subtype_nm));
sbin/pfctl/pfctl_osfp.c
241
add_fingerprint(dev, opts, &fp);
sbin/pfctl/pfctl_osfp.c
243
fp.fp_flags |= (PF_OSFP_DF | PF_OSFP_INET6);
sbin/pfctl/pfctl_osfp.c
244
fp.fp_psize += sizeof(struct ip6_hdr) - sizeof(struct ip);
sbin/pfctl/pfctl_osfp.c
245
add_fingerprint(dev, opts, &fp);
sbin/pfctl/pfctl_osfp.c
447
pfctl_lookup_fingerprint(pf_osfp_t fp, char *buf, size_t len)
sbin/pfctl/pfctl_osfp.c
456
if (fp == PF_OSFP_UNKNOWN) {
sbin/pfctl/pfctl_osfp.c
460
if (fp == PF_OSFP_ANY) {
sbin/pfctl/pfctl_osfp.c
465
PF_OSFP_UNPACK(fp, class, version, subtype);
sbin/pfctl/pfctl_osfp.c
469
warnx("PF_OSFP_UNPACK(0x%x) failed!!", fp);
sbin/pfctl/pfctl_osfp.c
49
# define DEBUG(fp, str, v...) \
sbin/pfctl/pfctl_osfp.c
50
fprintf(stderr, "%s:%s:%s " str "\n", (fp)->fp_os.fp_class_nm, \
sbin/pfctl/pfctl_osfp.c
51
(fp)->fp_os.fp_version_nm, (fp)->fp_os.fp_subtype_nm , ## v);
sbin/pfctl/pfctl_osfp.c
53
# define DEBUG(fp, str, v...) ((void)0)
sbin/pfctl/pfctl_osfp.c
538
add_fingerprint(int dev, int opts, struct pf_osfp_ioctl *fp)
sbin/pfctl/pfctl_osfp.c
548
if (isdigit(fp->field[_i]) && fp->field[_i+1] == '.') { \
sbin/pfctl/pfctl_osfp.c
549
_dot = fp->field[_i] - '0'; \
sbin/pfctl/pfctl_osfp.c
552
if (isdigit(fp->field[_i])) \
sbin/pfctl/pfctl_osfp.c
553
_start = fp->field[_i++] - '0'; \
sbin/pfctl/pfctl_osfp.c
556
if (isdigit(fp->field[_i])) \
sbin/pfctl/pfctl_osfp.c
557
_start = (_start * 10) + fp->field[_i++] - '0'; \
sbin/pfctl/pfctl_osfp.c
558
if (fp->field[_i++] != '-') \
sbin/pfctl/pfctl_osfp.c
560
if (isdigit(fp->field[_i]) && fp->field[_i+1] == '.' && \
sbin/pfctl/pfctl_osfp.c
561
fp->field[_i] - '0' == _dot) \
sbin/pfctl/pfctl_osfp.c
565
if (isdigit(fp->field[_i])) \
sbin/pfctl/pfctl_osfp.c
566
_end = fp->field[_i++] - '0'; \
sbin/pfctl/pfctl_osfp.c
569
if (isdigit(fp->field[_i])) \
sbin/pfctl/pfctl_osfp.c
570
_end = (_end * 10) + fp->field[_i++] - '0'; \
sbin/pfctl/pfctl_osfp.c
571
if (isdigit(fp->field[_i])) \
sbin/pfctl/pfctl_osfp.c
572
_end = (_end * 10) + fp->field[_i++] - '0'; \
sbin/pfctl/pfctl_osfp.c
573
if (fp->field[_i] != '\0') \
sbin/pfctl/pfctl_osfp.c
575
memcpy(&fptmp, fp, sizeof(fptmp)); \
sbin/pfctl/pfctl_osfp.c
593
if (strcasecmp(fp->fp_os.fp_class_nm, "nomatch") == 0)
sbin/pfctl/pfctl_osfp.c
599
nm_class = fingerprint_name_entry(&classes, fp->fp_os.fp_class_nm);
sbin/pfctl/pfctl_osfp.c
605
fp->fp_os.fp_version_nm);
sbin/pfctl/pfctl_osfp.c
611
fp->fp_os.fp_subtype_nm);
sbin/pfctl/pfctl_osfp.c
621
DEBUG(fp, "\tsignature %d:%d:%d %s", class, version, subtype,
sbin/pfctl/pfctl_osfp.c
622
print_ioctl(fp));
sbin/pfctl/pfctl_osfp.c
624
PF_OSFP_PACK(fp->fp_os.fp_os, class, version, subtype);
sbin/pfctl/pfctl_osfp.c
629
if ((errno = pf_osfp_add(fp)))
sbin/pfctl/pfctl_osfp.c
631
if ((opts & PF_OPT_NOACTION) == 0 && ioctl(dev, DIOCOSFPADD, fp))
sbin/pfctl/pfctl_osfp.c
636
fp->fp_os.fp_class_nm,
sbin/pfctl/pfctl_osfp.c
637
fp->fp_os.fp_version_nm,
sbin/pfctl/pfctl_osfp.c
638
fp->fp_os.fp_subtype_nm);
sbin/pfctl/pfctl_osfp.c
648
import_fingerprint(struct pf_osfp_ioctl *fp)
sbin/pfctl/pfctl_osfp.c
653
PF_OSFP_UNPACK(fp->fp_os.fp_os, class, version, subtype);
sbin/pfctl/pfctl_osfp.c
655
nm_class = fingerprint_name_entry(&classes, fp->fp_os.fp_class_nm);
sbin/pfctl/pfctl_osfp.c
662
fp->fp_os.fp_version_nm);
sbin/pfctl/pfctl_osfp.c
670
fp->fp_os.fp_subtype_nm);
sbin/pfctl/pfctl_osfp.c
682
DEBUG(fp, "import signature %d:%d:%d", class, version, subtype);
sbin/pfctl/pfctl_osfp.c
999
print_ioctl(struct pf_osfp_ioctl *fp)
sbin/pfctl/pfctl_radix.c
388
FILE *fp;
sbin/pfctl/pfctl_radix.c
395
fp = stdin;
sbin/pfctl/pfctl_radix.c
397
fp = pfctl_fopen(file, "r");
sbin/pfctl/pfctl_radix.c
398
if (fp == NULL)
sbin/pfctl/pfctl_radix.c
401
while ((rv = pfr_next_token(buf, fp)) == 1)
sbin/pfctl/pfctl_radix.c
406
if (fp != stdin)
sbin/pfctl/pfctl_radix.c
407
fclose(fp);
sbin/pfctl/pfctl_radix.c
412
pfr_next_token(char buf[BUF_SIZE], FILE *fp)
sbin/pfctl/pfctl_radix.c
419
while (isspace(next_ch) && !feof(fp))
sbin/pfctl/pfctl_radix.c
420
next_ch = fgetc(fp);
sbin/pfctl/pfctl_radix.c
423
while (!feof(fp)) {
sbin/pfctl/pfctl_radix.c
424
next_ch = fgetc(fp);
sbin/pfctl/pfctl_radix.c
431
if (feof(fp)) {
sbin/pfctl/pfctl_radix.c
438
next_ch = fgetc(fp);
sbin/pfctl/pfctl_radix.c
439
} while (!feof(fp) && !isspace(next_ch));
sbin/rcorder/rcorder.c
474
FILE *fp;
sbin/rcorder/rcorder.c
482
if ((fp = fopen(filename, "r")) == NULL) {
sbin/rcorder/rcorder.c
487
if (fstat(fileno(fp), &st) == -1) {
sbin/rcorder/rcorder.c
489
fclose(fp);
sbin/rcorder/rcorder.c
497
fclose(fp);
sbin/rcorder/rcorder.c
508
(buf = fparseln(fp, NULL, NULL, delims, 0)) != NULL; free(buf)) {
sbin/rcorder/rcorder.c
540
fclose(fp);
sbin/reboot/reboot.c
119
FILE *fp;
sbin/reboot/reboot.c
155
fp = fdopen(tmpfd, "w");
sbin/reboot/reboot.c
156
if (fp == NULL)
sbin/reboot/reboot.c
174
if (fprintf(fp, "%s%s",
sbin/reboot/reboot.c
185
if (fsync(fileno(fp)) != 0)
sbin/reboot/reboot.c
196
fclose(fp);
sbin/recoverdisk/recoverdisk.c
197
uint64_t j, bucket, fp, fe, k, now;
sbin/recoverdisk/recoverdisk.c
207
fp = lp2->start;
sbin/recoverdisk/recoverdisk.c
209
for (j = fp / bucket; fp < fe; j++) {
sbin/recoverdisk/recoverdisk.c
213
k -= fp;
sbin/recoverdisk/recoverdisk.c
215
fp += k;
sbin/restore/interactive.c
492
struct afile *fp, *list, *listp;
sbin/restore/interactive.c
560
for (fp = listp - 1; fp >= list; fp--)
sbin/restore/interactive.c
561
freename(fp->fname);
sbin/restore/interactive.c
571
mkentry(char *name, struct direct *dp, struct afile *fp)
sbin/restore/interactive.c
576
fp->fnum = dp->d_ino;
sbin/restore/interactive.c
577
fp->fname = savename(dp->d_name);
sbin/restore/interactive.c
578
for (cp = fp->fname; *cp; cp++)
sbin/restore/interactive.c
581
fp->len = cp - fp->fname;
sbin/restore/interactive.c
582
if (dflag && TSTINO(fp->fnum, dumpmap) == 0)
sbin/restore/interactive.c
583
fp->prefix = '^';
sbin/restore/interactive.c
585
fp->prefix = '*';
sbin/restore/interactive.c
587
fp->prefix = ' ';
sbin/restore/interactive.c
595
fp->postfix = ' ';
sbin/restore/interactive.c
599
fp->postfix = '@';
sbin/restore/interactive.c
604
fp->postfix = '=';
sbin/restore/interactive.c
609
fp->postfix = '#';
sbin/restore/interactive.c
613
fp->postfix = '%';
sbin/restore/interactive.c
619
fp->postfix = '/';
sbin/restore/interactive.c
621
fp->postfix = ' ';
sbin/restore/interactive.c
633
struct afile *fp, *endlist;
sbin/restore/interactive.c
642
for (fp = &list[0]; fp < endlist; fp++) {
sbin/restore/interactive.c
643
if (bigino < fp->fnum)
sbin/restore/interactive.c
644
bigino = fp->fnum;
sbin/restore/interactive.c
645
if (width < fp->len)
sbin/restore/interactive.c
646
width = fp->len;
sbin/restore/interactive.c
647
if (fp->prefix != ' ')
sbin/restore/interactive.c
649
if (fp->postfix != ' ')
sbin/restore/interactive.c
668
fp = &list[j * lines + i];
sbin/restore/interactive.c
671
precision, (uintmax_t)fp->fnum);
sbin/restore/interactive.c
672
fp->len += precision + 1;
sbin/restore/interactive.c
675
putc(fp->prefix, stderr);
sbin/restore/interactive.c
676
fp->len++;
sbin/restore/interactive.c
678
fprintf(stderr, "%s", fp->fname);
sbin/restore/interactive.c
680
putc(fp->postfix, stderr);
sbin/restore/interactive.c
681
fp->len++;
sbin/restore/interactive.c
683
if (fp + lines >= endlist) {
sbin/restore/interactive.c
687
for (w = fp->len; w < width; w++)
sbin/routed/parms.c
157
FILE *fp;
sbin/routed/parms.c
170
fp = fopen(_PATH_GATEWAYS, "r");
sbin/routed/parms.c
171
if (fp == NULL)
sbin/routed/parms.c
174
if (0 > fstat(fileno(fp), &sb)) {
sbin/routed/parms.c
176
(void)fclose(fp);
sbin/routed/parms.c
181
if (fgets(lbuf, sizeof(lbuf), fp) == NULL)
sbin/routed/parms.c
353
(void)fclose(fp);
sbin/savecore/savecore.c
138
FILE *fp;
sbin/savecore/savecore.c
152
fp = fdopen(fd, modestr);
sbin/savecore/savecore.c
153
if (fp == NULL) {
sbin/savecore/savecore.c
158
return (fp);
sbin/savecore/savecore.c
232
FILE *fp;
sbin/savecore/savecore.c
245
if ((fp = xfopenat(savedirfd, "bounds", O_RDONLY, "r")) == NULL) {
sbin/savecore/savecore.c
250
if (fgets(buf, sizeof(buf), fp) == NULL) {
sbin/savecore/savecore.c
251
if (feof(fp))
sbin/savecore/savecore.c
255
fclose(fp);
sbin/savecore/savecore.c
265
fclose(fp);
sbin/savecore/savecore.c
272
FILE *fp;
sbin/savecore/savecore.c
274
if ((fp = xfopenat(savedirfd, "bounds", O_WRONLY | O_CREAT | O_TRUNC,
sbin/savecore/savecore.c
283
fprintf(fp, "%d\n", bounds);
sbin/savecore/savecore.c
284
fclose(fp);
sbin/savecore/savecore.c
435
FILE *fp;
sbin/savecore/savecore.c
445
if ((fp = xfopenat(savedirfd, "minfree", O_RDONLY, "r")) == NULL)
sbin/savecore/savecore.c
448
if (fgets(buf, sizeof(buf), fp) == NULL)
sbin/savecore/savecore.c
468
(void)fclose(fp);
sbin/savecore/savecore.c
500
sparsefwrite(const char *buf, size_t nr, FILE *fp)
sbin/savecore/savecore.c
533
if (fwrite(buf + nw, hs - nw, 1, fp) != 1)
sbin/savecore/savecore.c
536
if (fseeko(fp, he - hs, SEEK_CUR) == -1)
sbin/savecore/savecore.c
547
GunzipWrite(z_stream *z, char *in, size_t insize, FILE *fp)
sbin/savecore/savecore.c
575
w = sparsefwrite(zbuf, zbufsize - z->avail_out, fp);
sbin/savecore/savecore.c
585
ZstdWrite(ZSTD_DCtx *Zctx, char *in, size_t insize, FILE *fp)
sbin/savecore/savecore.c
605
w = sparsefwrite(zbuf, Zout.pos, fp);
sbin/savecore/savecore.c
617
const char *filename, FILE *fp)
sbin/savecore/savecore.c
664
nw = GunzipWrite(&z, buf, nr, fp);
sbin/savecore/savecore.c
666
nw = ZstdWrite(Zctx, buf, nr, fp);
sbin/savecore/savecore.c
668
nw = fwrite(buf, 1, wl, fp);
sbin/savecore/savecore.c
670
nw = sparsefwrite(buf, wl, fp);
sbin/savecore/savecore.c
703
const char *device, const char *filename, FILE *fp)
sbin/savecore/savecore.c
728
nw = fwrite(buf, 1, wl, fp);
sbin/setkey/setkey.c
123
FILE *fp = stdin;
sbin/setkey/setkey.c
137
fp = stdin;
sbin/setkey/setkey.c
140
if (fp != stdin) {
sbin/setkey/setkey.c
144
fp = fmemopen(optarg, strlen(optarg), "r");
sbin/setkey/setkey.c
145
if (fp == NULL) {
sbin/setkey/setkey.c
151
if (fp != stdin) {
sbin/setkey/setkey.c
155
if ((fp = fopen(optarg, "r")) == NULL) {
sbin/setkey/setkey.c
221
if (parse(&fp))
sbin/umbctl/umbctl.c
271
FILE * fp;
sbin/umbctl/umbctl.c
279
if((fp = fopen(filename, "r")) == NULL)
sbin/umbctl/umbctl.c
281
while(fgets(buf, sizeof(buf), fp) != NULL)
sbin/umbctl/umbctl.c
292
while((i = fgetc(fp)) != EOF && i != '\n');
sbin/umbctl/umbctl.c
306
eof = feof(fp);
sbin/umbctl/umbctl.c
307
if(fclose(fp) != 0 || !eof)
sbin/veriexec/manifest_parser.y
228
convert(char *fp, unsigned int count, unsigned char *out)
sbin/veriexec/manifest_parser.y
235
if (isdigit(fp[i * 2]))
sbin/veriexec/manifest_parser.y
236
value += fp[i * 2] - '0';
sbin/veriexec/manifest_parser.y
237
else if (isxdigit(fp[i * 2]))
sbin/veriexec/manifest_parser.y
238
value += 10 + tolower(fp[i * 2]) - 'a';
sbin/veriexec/manifest_parser.y
242
if (isdigit(fp[i * 2 + 1]))
sbin/veriexec/manifest_parser.y
243
value += fp[i * 2 + 1] - '0';
sbin/veriexec/manifest_parser.y
244
else if (isxdigit(fp[i * 2 + 1]))
sbin/veriexec/manifest_parser.y
245
value += 10 + tolower(fp[i * 2 + 1]) - 'a';
sbin/veriexec/manifest_parser.y
40
static int convert(char *fp, unsigned int count, unsigned char *out);
share/examples/ipfilter/l4check/l4check.c
488
FILE *fp;
share/examples/ipfilter/l4check/l4check.c
490
fp = fopen(filename, "r");
share/examples/ipfilter/l4check/l4check.c
491
if (!fp) {
share/examples/ipfilter/l4check/l4check.c
504
for (num = 1; fgets(buf, sizeof(buf), fp); num++) {
share/examples/ipfilter/l4check/l4check.c
508
fclose(fp);
share/examples/ipfilter/l4check/l4check.c
744
fclose(fp);
share/examples/kld/firmware/fwconsumer/fw_consumer.c
38
static const struct firmware *fp;
share/examples/kld/firmware/fwconsumer/fw_consumer.c
45
fp = firmware_get("beastie");
share/examples/kld/firmware/fwconsumer/fw_consumer.c
47
if (fp == NULL)
share/examples/kld/firmware/fwconsumer/fw_consumer.c
50
if (((const char *)fp->data)[fp->datasize - 1] != '\0') {
share/examples/kld/firmware/fwconsumer/fw_consumer.c
51
firmware_put(fp, FIRMWARE_UNLOAD);
share/examples/kld/firmware/fwconsumer/fw_consumer.c
54
printf("%s", (const char *)fp->data);
share/examples/kld/firmware/fwconsumer/fw_consumer.c
60
if (fp != NULL) {
share/examples/kld/firmware/fwconsumer/fw_consumer.c
61
printf("%s", (const char *)fp->data);
share/examples/kld/firmware/fwconsumer/fw_consumer.c
62
firmware_put(fp, FIRMWARE_UNLOAD);
stand/common/boot.c
100
fp->f_args = unargv(argc - 1, argv + 1);
stand/common/boot.c
118
file_formats[fp->f_loader]->l_exec(fp);
stand/common/boot.c
56
struct preloaded_file *fp;
stand/common/boot.c
88
if ((fp = file_findfile(NULL, NULL)) == NULL) {
stand/common/boot.c
98
if (fp->f_args != NULL)
stand/common/boot.c
99
free(fp->f_args);
stand/common/bootstrap.h
273
struct file_metadata *file_findmetadata(struct preloaded_file *fp, int type);
stand/common/bootstrap.h
275
void file_discard(struct preloaded_file *fp);
stand/common/bootstrap.h
279
void file_removemetadata(struct preloaded_file *fp);
stand/common/gfx_fb.c
2368
load_mapping(int fd, struct vt_font *fp, int n)
stand/common/gfx_fb.c
2374
if (fp->vf_map_count[n] == 0)
stand/common/gfx_fb.c
2377
size = fp->vf_map_count[n] * sizeof(*mp);
stand/common/gfx_fb.c
2381
fp->vf_map[n] = mp;
stand/common/gfx_fb.c
2385
free(fp->vf_map[n]);
stand/common/gfx_fb.c
2386
fp->vf_map[n] = NULL;
stand/common/gfx_fb.c
2390
for (i = 0; i < fp->vf_map_count[n]; i++) {
stand/common/gfx_fb.c
2399
builtin_mapping(struct vt_font *fp, int n)
stand/common/gfx_fb.c
2407
if (fp->vf_map_count[n] == 0)
stand/common/gfx_fb.c
2410
size = fp->vf_map_count[n] * sizeof(*mp);
stand/common/gfx_fb.c
2414
fp->vf_map[n] = mp;
stand/common/gfx_fb.c
2435
struct vt_font *fp;
stand/common/gfx_fb.c
2458
if ((fp = calloc(1, sizeof(struct vt_font))) == NULL)
stand/common/gfx_fb.c
2461
fp->vf_width = DEFAULT_FONT_DATA.vfbd_width;
stand/common/gfx_fb.c
2462
fp->vf_height = DEFAULT_FONT_DATA.vfbd_height;
stand/common/gfx_fb.c
2464
fp->vf_bytes = malloc(DEFAULT_FONT_DATA.vfbd_uncompressed_size);
stand/common/gfx_fb.c
2465
if (fp->vf_bytes == NULL) {
stand/common/gfx_fb.c
2466
free(fp);
stand/common/gfx_fb.c
2476
fp->vf_bytes,
stand/common/gfx_fb.c
2479
free(fp->vf_bytes);
stand/common/gfx_fb.c
2480
free(fp);
stand/common/gfx_fb.c
2485
fp->vf_map_count[i] =
stand/common/gfx_fb.c
2487
if (builtin_mapping(fp, i) != 0)
stand/common/gfx_fb.c
2491
bp->vfbd_font = fp;
stand/common/gfx_fb.c
2509
if ((fp = calloc(1, sizeof(struct vt_font))) == NULL) {
stand/common/gfx_fb.c
2514
fp->vf_map_count[i] = be32toh(fh.fh_map_count[i]);
stand/common/gfx_fb.c
2517
fp->vf_width = fh.fh_width;
stand/common/gfx_fb.c
2518
fp->vf_height = fh.fh_height;
stand/common/gfx_fb.c
2520
size = howmany(fp->vf_width, 8) * fp->vf_height * glyphs;
stand/common/gfx_fb.c
2522
if ((fp->vf_bytes = malloc(size)) == NULL)
stand/common/gfx_fb.c
2525
rv = read(fd, fp->vf_bytes, size);
stand/common/gfx_fb.c
2529
if (load_mapping(fd, fp, i) != 0)
stand/common/gfx_fb.c
2556
bp->vfbd_font = fp;
stand/common/gfx_fb.c
2566
free(fp->vf_map[i]);
stand/common/gfx_fb.c
2567
free(fp->vf_bytes);
stand/common/gfx_fb.c
2568
free(fp);
stand/common/gfx_fb.c
2651
struct fontlist *fp, *previous, *entry, *next;
stand/common/gfx_fb.c
2710
fp = calloc(sizeof(*fp), 1);
stand/common/gfx_fb.c
2711
if (fp == NULL) {
stand/common/gfx_fb.c
2715
fp->font_data = calloc(sizeof(*fp->font_data), 1);
stand/common/gfx_fb.c
2716
if (fp->font_data == NULL) {
stand/common/gfx_fb.c
2718
free(fp);
stand/common/gfx_fb.c
2721
fp->font_name = font_name;
stand/common/gfx_fb.c
2722
fp->font_flags = flags;
stand/common/gfx_fb.c
2723
fp->font_load = load_font;
stand/common/gfx_fb.c
2724
fp->font_data->vfbd_width = fh.fh_width;
stand/common/gfx_fb.c
2725
fp->font_data->vfbd_height = fh.fh_height;
stand/common/gfx_fb.c
2728
STAILQ_INSERT_HEAD(&fonts, fp, font_next);
stand/common/gfx_fb.c
2734
size = fp->font_data->vfbd_width * fp->font_data->vfbd_height;
stand/common/gfx_fb.c
2743
STAILQ_INSERT_HEAD(&fonts, fp, font_next);
stand/common/gfx_fb.c
2745
STAILQ_INSERT_AFTER(&fonts, previous, fp,
stand/common/gfx_fb.c
2755
STAILQ_INSERT_AFTER(&fonts, entry, fp, font_next);
stand/common/gfx_fb.c
3020
struct preloaded_file *fp;
stand/common/gfx_fb.c
3075
fp = file_findfile(NULL, md_kerntype);
stand/common/gfx_fb.c
3076
if (fp == NULL)
stand/common/gfx_fb.c
3096
file_addmetadata(fp, MODINFOMD_FONT, sizeof(fontp), &fontp);
stand/common/gfx_fb.c
3103
struct preloaded_file *fp;
stand/common/gfx_fb.c
3117
fp = file_findfile(NULL, md_kerntype);
stand/common/gfx_fb.c
3118
if (fp == NULL)
stand/common/gfx_fb.c
3146
file_addmetadata(fp, MODINFOMD_SPLASH,
stand/common/gfx_fb.c
3151
file_addmetadata(fp, MODINFOMD_SHTDWNSPLASH,
stand/common/install.c
194
struct preloaded_file *fp;
stand/common/install.c
363
fp = file_findfile(NULL, NULL);
stand/common/install.c
364
if (fp != NULL)
stand/common/install.c
365
file_formats[fp->f_loader]->l_exec(fp);
stand/common/load_elf.c
1079
err = __elfN(parse_modmetadata)(fp, &ef, p_start, p_end);
stand/common/load_elf.c
1101
file_discard(fp);
stand/common/load_elf.c
1111
__elfN(parse_modmetadata)(struct preloaded_file *fp, elf_file_t ef,
stand/common/load_elf.c
1130
error = __elfN(reloc_ptr)(fp, ef, p, &v, sizeof(v));
stand/common/load_elf.c
1137
error = __elfN(reloc_ptr)(fp, ef, v, &md64, sizeof(md64));
stand/common/load_elf.c
1149
error = __elfN(reloc_ptr)(fp, ef, v, &md32, sizeof(md32));
stand/common/load_elf.c
1161
error = __elfN(reloc_ptr)(fp, ef, v, &md, sizeof(md));
stand/common/load_elf.c
1183
file_addmetadata(fp, MODINFOMD_DEPLIST, minfolen,
stand/common/load_elf.c
1190
file_addmodule(fp, s, mver.mv_version, NULL);
stand/common/load_elf.c
1197
s = fake_modname(fp->f_name);
stand/common/load_elf.c
1198
file_addmodule(fp, s, 1, NULL);
stand/common/load_elf.c
227
is_tg_kernel_support(struct preloaded_file *fp, elf_file_t ef)
stand/common/load_elf.c
248
error = __elfN(reloc_ptr)(fp, ef, p, &v, sizeof(v));
stand/common/load_elf.c
364
struct preloaded_file *fp, *kfp;
stand/common/load_elf.c
369
fp = NULL;
stand/common/load_elf.c
454
fp = file_alloc();
stand/common/load_elf.c
455
if (fp == NULL) {
stand/common/load_elf.c
463
fp->f_name = strdup(filename);
stand/common/load_elf.c
465
fp->f_type = strdup(ef.kernel ?
stand/common/load_elf.c
468
fp->f_type = strdup(md_kerntype_mb);
stand/common/load_elf.c
477
fp->f_size = __elfN(loadimage)(fp, &ef, dest);
stand/common/load_elf.c
478
if (fp->f_size == 0 || fp->f_addr == 0)
stand/common/load_elf.c
482
file_addmetadata(fp, MODINFOMD_ELFHDR, sizeof(*ehdr), ehdr);
stand/common/load_elf.c
485
*result = (struct preloaded_file *)fp;
stand/common/load_elf.c
488
fp->f_kernphys_relocatable = multiboot || is_kernphys_relocatable(&ef);
stand/common/load_elf.c
491
fp->f_tg_kernel_support = is_tg_kernel_support(fp, &ef);
stand/common/load_elf.c
498
file_discard(fp);
stand/common/load_elf.c
510
file_discard(fp);
stand/common/load_elf.c
524
__elfN(loadimage)(struct preloaded_file *fp, elf_file_t ef, uint64_t off)
stand/common/load_elf.c
714
file_addmetadata(fp, MODINFOMD_SHDR, chunk, shdr);
stand/common/load_elf.c
731
file_addmetadata(fp, MODINFOMD_CTORS_ADDR,
stand/common/load_elf.c
734
file_addmetadata(fp, MODINFOMD_CTORS_SIZE,
stand/common/load_elf.c
832
file_addmetadata(fp, MODINFOMD_SSYM, sizeof(ssym), &ssym);
stand/common/load_elf.c
833
file_addmetadata(fp, MODINFOMD_ESYM, sizeof(esym), &esym);
stand/common/load_elf.c
840
fp->f_addr = firstaddr;
stand/common/load_elf.c
847
file_addmetadata(fp, MODINFOMD_DYNAMIC, sizeof(adp),
stand/common/load_elf.c
919
if (__elfN(parse_modmetadata)(fp, ef, p_start, p_end) == 0)
stand/common/load_elf.c
939
char *fp;
stand/common/load_elf.c
958
fp = malloc(len + 1);
stand/common/load_elf.c
959
if (fp == NULL)
stand/common/load_elf.c
961
memcpy(fp, sp, len);
stand/common/load_elf.c
962
fp[len] = '\0';
stand/common/load_elf.c
963
return fp;
stand/common/load_elf.c
984
__elfN(load_modmetadata)(struct preloaded_file *fp, uint64_t dest)
stand/common/load_elf.c
997
err = __elfN(load_elf_header)(fp->f_name, &ef);
stand/common/load_elf_obj.c
165
fp = file_alloc();
stand/common/load_elf_obj.c
166
if (fp == NULL) {
stand/common/load_elf_obj.c
172
fp->f_name = strdup(filename);
stand/common/load_elf_obj.c
173
fp->f_type = strdup(md_modtype_obj);
stand/common/load_elf_obj.c
178
fp->f_size = __elfN(obj_loadimage)(fp, &ef, dest);
stand/common/load_elf_obj.c
179
if (fp->f_size == 0 || fp->f_addr == 0)
stand/common/load_elf_obj.c
183
file_addmetadata(fp, MODINFOMD_ELFHDR, sizeof(*hdr), hdr);
stand/common/load_elf_obj.c
186
*result = (struct preloaded_file *)fp;
stand/common/load_elf_obj.c
193
file_discard(fp);
stand/common/load_elf_obj.c
202
file_discard(fp);
stand/common/load_elf_obj.c
218
__elfN(obj_loadimage)(struct preloaded_file *fp, elf_file_t ef, uint64_t off)
stand/common/load_elf_obj.c
361
file_addmetadata(fp, MODINFOMD_SHDR, shdrbytes, shdr);
stand/common/load_elf_obj.c
363
res = __elfN(obj_parse_modmetadata)(fp, ef);
stand/common/load_elf_obj.c
368
fp->f_addr = firstaddr;
stand/common/load_elf_obj.c
389
__elfN(obj_parse_modmetadata)(struct preloaded_file *fp, elf_file_t ef)
stand/common/load_elf_obj.c
401
if (__elfN(obj_lookup_set)(fp, ef, "modmetadata_set", &p, &p_stop,
stand/common/load_elf_obj.c
408
error = __elfN(obj_reloc_ptr)(fp, ef, p, &v, sizeof(v));
stand/common/load_elf_obj.c
413
error = __elfN(obj_reloc_ptr)(fp, ef, v, &md64, sizeof(md64));
stand/common/load_elf_obj.c
422
error = __elfN(obj_reloc_ptr)(fp, ef, v, &md, sizeof(md));
stand/common/load_elf_obj.c
438
file_addmetadata(fp, MODINFOMD_DEPLIST, minfolen,
stand/common/load_elf_obj.c
445
file_addmodule(fp, s, mver.mv_version, NULL);
stand/common/load_elf_obj.c
461
__elfN(obj_lookup_set)(struct preloaded_file *fp, elf_file_t ef,
stand/common/load_elf_obj.c
87
struct preloaded_file *fp, *kfp;
stand/common/load_elf_obj.c
93
fp = NULL;
stand/common/modinfo.c
120
struct preloaded_file *fp;
stand/common/modinfo.c
130
for (fp = file_findfile(NULL, NULL); fp != NULL; fp = fp->f_next) {
stand/common/modinfo.c
132
MOD_NAME(addr, fp->f_name, c); /* this field must come first */
stand/common/modinfo.c
133
MOD_TYPE(addr, fp->f_type, c);
stand/common/modinfo.c
134
if (fp->f_args)
stand/common/modinfo.c
135
MOD_ARGS(addr, fp->f_args, c);
stand/common/modinfo.c
137
scratch64 = fp->f_addr;
stand/common/modinfo.c
139
scratch64 = fp->f_size;
stand/common/modinfo.c
142
scratch32 = fp->f_addr;
stand/common/modinfo.c
147
MOD_SIZE(addr, fp->f_size, c);
stand/common/modinfo.c
149
for (md = fp->f_metadata; md != NULL; md = md->md_next) {
stand/common/module.c
1007
struct preloaded_file *fp;
stand/common/module.c
1020
fp = file_alloc();
stand/common/module.c
1021
if (fp == NULL) {
stand/common/module.c
1026
fp->f_name = strdup(name);
stand/common/module.c
1027
fp->f_type = strdup(type);
stand/common/module.c
1028
fp->f_args = NULL;
stand/common/module.c
1029
fp->f_metadata = NULL;
stand/common/module.c
1030
fp->f_loader = -1;
stand/common/module.c
1031
fp->f_addr = dest;
stand/common/module.c
1032
fp->f_size = len;
stand/common/module.c
1033
if ((fp->f_name == NULL) || (fp->f_type == NULL)) {
stand/common/module.c
1036
free(fp->f_name);
stand/common/module.c
1037
free(fp->f_type);
stand/common/module.c
1042
archsw.arch_copyin(buf, fp->f_addr, len);
stand/common/module.c
1043
loadaddr = fp->f_addr + len;
stand/common/module.c
1046
file_insert_tail(fp);
stand/common/module.c
112
struct preloaded_file *fp;
stand/common/module.c
1548
file_addmodule(struct preloaded_file *fp, char *modname, int version,
stand/common/module.c
1556
mp = file_findmodule(fp, modname, &mdepend);
stand/common/module.c
1568
mp->m_fp = fp;
stand/common/module.c
1569
mp->m_next = fp->f_modules;
stand/common/module.c
1570
fp->f_modules = mp;
stand/common/module.c
1580
file_discard(struct preloaded_file *fp)
stand/common/module.c
1584
if (fp == NULL)
stand/common/module.c
1586
md = fp->f_metadata;
stand/common/module.c
1592
mp = fp->f_modules;
stand/common/module.c
1599
free(fp->f_name);
stand/common/module.c
1600
free(fp->f_type);
stand/common/module.c
1601
free(fp->f_args);
stand/common/module.c
1602
free(fp);
stand/common/module.c
1620
file_insert_tail(struct preloaded_file *fp)
stand/common/module.c
1625
fp->f_next = NULL;
stand/common/module.c
1627
preloaded_files = fp;
stand/common/module.c
1631
cm->f_next = fp;
stand/common/module.c
1639
file_remove_impl(struct preloaded_file *fp, bool keep_tail)
stand/common/module.c
1647
next = fp->f_next;
stand/common/module.c
1651
if (preloaded_files == fp) {
stand/common/module.c
1657
if (cm->f_next == fp) {
stand/common/module.c
1665
file_remove(struct preloaded_file *fp)
stand/common/module.c
1668
file_remove_impl(fp, true);
stand/common/module.c
1672
file_remove_tail(struct preloaded_file *fp)
stand/common/module.c
1675
file_remove_impl(fp, false);
stand/common/module.c
190
fp = file_findfile(argv[1], typestr);
stand/common/module.c
191
if (fp) {
stand/common/module.c
276
struct preloaded_file *fp;
stand/common/module.c
279
fp = preloaded_files;
stand/common/module.c
281
file_discard(fp);
stand/common/module.c
301
struct preloaded_file *fp;
stand/common/module.c
323
for (fp = preloaded_files; fp; fp = fp->f_next) {
stand/common/module.c
324
snprintf(lbuf, sizeof(lbuf), " %p: ", (void *) fp->f_addr);
stand/common/module.c
326
pager_output(fp->f_name);
stand/common/module.c
327
snprintf(lbuf, sizeof(lbuf), " (%s, 0x%lx)\n", fp->f_type,
stand/common/module.c
328
(long)fp->f_size);
stand/common/module.c
331
if (fp->f_args != NULL) {
stand/common/module.c
333
pager_output(fp->f_args);
stand/common/module.c
337
if (fp->f_modules) {
stand/common/module.c
339
for (mp = fp->f_modules; mp; mp = mp->m_next) {
stand/common/module.c
349
for (md = fp->f_metadata; md != NULL; md = md->md_next) {
stand/common/module.c
561
struct preloaded_file *fp;
stand/common/module.c
569
for (i = last_file_format, fp = NULL;
stand/common/module.c
570
file_formats[i] && fp == NULL; i++) {
stand/common/module.c
571
error = (file_formats[i]->l_load)(filename, dest, &fp);
stand/common/module.c
573
fp->f_loader = last_file_format = i; /* remember the loader */
stand/common/module.c
574
*result = fp;
stand/common/module.c
580
fp = NULL;
stand/common/module.c
599
struct preloaded_file *fp;
stand/common/module.c
62
static struct kernel_module * file_findmodule(struct preloaded_file *fp, char *modname, struct mod_depend *verinfo);
stand/common/module.c
637
fp = base_file;
stand/common/module.c
639
file_discard(fp);
stand/common/module.c
658
struct preloaded_file *fp;
stand/common/module.c
67
static void file_remove(struct preloaded_file *fp);
stand/common/module.c
68
static void file_remove_tail(struct preloaded_file *fp);
stand/common/module.c
755
fp = file_alloc();
stand/common/module.c
756
if (fp == NULL) {
stand/common/module.c
764
fp->f_name = name;
stand/common/module.c
765
fp->f_type = strdup(type);
stand/common/module.c
766
fp->f_args = NULL;
stand/common/module.c
767
fp->f_metadata = NULL;
stand/common/module.c
768
fp->f_loader = -1;
stand/common/module.c
769
fp->f_addr = loadaddr;
stand/common/module.c
770
fp->f_size = laddr - loadaddr;
stand/common/module.c
772
if (fp->f_type == NULL) {
stand/common/module.c
785
file_insert_tail(fp);
stand/common/module.c
788
return(fp);
stand/common/module.c
842
struct preloaded_file *fp;
stand/common/module.c
861
fp = file_findfile(filename, NULL);
stand/common/module.c
862
if (fp) {
stand/common/module.c
871
err = file_load(filename, loadaddr, &fp);
stand/common/module.c
874
fp->f_args = unargv(argc, argv);
stand/common/module.c
876
loadaddr = fp->f_addr + fp->f_size;
stand/common/module.c
877
file_insert_tail(fp); /* Add to the list of loaded files */
stand/common/module.c
878
if (file_load_dependencies(fp) != 0) {
stand/common/module.c
880
file_remove_tail(fp);
stand/common/module.c
882
fp = NULL;
stand/common/module.c
891
file_discard(fp);
stand/common/module.c
904
struct preloaded_file *fp;
stand/common/module.c
906
for (fp = preloaded_files; fp != NULL; fp = fp->f_next) {
stand/common/module.c
907
if (((name == NULL) || !strcmp(name, fp->f_name)) &&
stand/common/module.c
908
((type == NULL) || !strcmp(type, fp->f_type)))
stand/common/module.c
911
return (fp);
stand/common/module.c
919
file_findmodule(struct preloaded_file *fp, char *modname,
stand/common/module.c
925
if (fp == NULL) {
stand/common/module.c
926
for (fp = preloaded_files; fp; fp = fp->f_next) {
stand/common/module.c
927
mp = file_findmodule(fp, modname, verinfo);
stand/common/module.c
935
for (mp = fp->f_modules; mp; mp = mp->m_next) {
stand/common/module.c
957
file_addmetadata(struct preloaded_file *fp, int type, size_t size, void *p)
stand/common/module.c
966
md->md_next = fp->f_metadata;
stand/common/module.c
968
fp->f_metadata = md;
stand/common/module.c
975
file_findmetadata(struct preloaded_file *fp, int type)
stand/common/module.c
979
for (md = fp->f_metadata; md != NULL; md = md->md_next)
stand/common/module.c
989
file_removemetadata(struct preloaded_file *fp)
stand/common/module.c
993
for (md = fp->f_metadata; md != NULL; md = next)
stand/common/module.c
998
fp->f_metadata = NULL;
stand/efi/loader/arch/amd64/elf64_freebsd.c
219
err = bi_load(fp->f_args, &modulep, &kernend, true);
stand/efi/loader/arch/amd64/elf64_freebsd.c
235
elf64_obj_exec(struct preloaded_file *fp)
stand/efi/loader/arch/amd64/elf64_freebsd.c
86
elf64_exec(struct preloaded_file *fp)
stand/efi/loader/arch/amd64/elf64_freebsd.c
96
copy_staging = fp->f_kernphys_relocatable ?
stand/efi/loader/arch/amd64/elf64_freebsd.c
99
if ((md = file_findmetadata(fp, MODINFOMD_ELFHDR)) == NULL)
stand/efi/loader/arch/amd64/multiboot2.c
316
exec(struct preloaded_file *fp)
stand/efi/loader/arch/amd64/multiboot2.c
335
if ((md = file_findmetadata(fp,
stand/efi/loader/arch/amd64/multiboot2.c
373
if (fp->f_args == NULL) {
stand/efi/loader/arch/amd64/multiboot2.c
377
fp->f_args = strdup(cmdline);
stand/efi/loader/arch/amd64/multiboot2.c
378
if (fp->f_args == NULL) {
stand/efi/loader/arch/amd64/multiboot2.c
384
if (fp->f_args != NULL) {
stand/efi/loader/arch/amd64/multiboot2.c
385
len = strlen(fp->f_name) + 1 + strlen(fp->f_args) + 1;
stand/efi/loader/arch/amd64/multiboot2.c
391
snprintf(cmdline, len, "%s %s", fp->f_name, fp->f_args);
stand/efi/loader/arch/amd64/multiboot2.c
439
fp = file_findfile(NULL, md_kerntype);
stand/efi/loader/arch/amd64/multiboot2.c
440
if (fp == NULL) {
stand/efi/loader/arch/amd64/multiboot2.c
446
error = bi_load(fp->f_args, &modulep, &kernend, false);
stand/efi/loader/arch/amd64/multiboot2.c
459
kern_base = (uintptr_t)efi_translate(fp->f_addr);
stand/efi/loader/arch/amd64/multiboot2.c
460
payload_base = kern_base + fp->f_size - PAGE_SIZE;
stand/efi/loader/arch/amd64/multiboot2.c
467
header.modulep_offset = modulep - (fp->f_addr + fp->f_size - PAGE_SIZE);
stand/efi/loader/arch/amd64/multiboot2.c
468
archsw.arch_copyin(&header, fp->f_addr + fp->f_size - PAGE_SIZE,
stand/efi/loader/arch/amd64/multiboot2.c
555
obj_exec(struct preloaded_file *fp)
stand/efi/loader/arch/amd64/multiboot2.c
58
extern int elf64_load_modmetadata(struct preloaded_file *fp, uint64_t dest);
stand/efi/loader/arch/amd64/trap.c
105
(uintptr_t)fp, source, pc);
stand/efi/loader/arch/amd64/trap.c
109
if (fp == NULL)
stand/efi/loader/arch/amd64/trap.c
112
nfp = fp->fr_savfp;
stand/efi/loader/arch/amd64/trap.c
113
if (nfp != NULL && nfp <= fp) {
stand/efi/loader/arch/amd64/trap.c
118
fp = nfp;
stand/efi/loader/arch/amd64/trap.c
120
if (fp != NULL)
stand/efi/loader/arch/amd64/trap.c
121
pc = fp->fr_savpc;
stand/efi/loader/arch/amd64/trap.c
131
struct frame *fp;
stand/efi/loader/arch/amd64/trap.c
134
__asm __volatile("movq %%rbp,%0" : "=r" (fp));
stand/efi/loader/arch/amd64/trap.c
135
rip = fp->fr_savpc;
stand/efi/loader/arch/amd64/trap.c
137
stack_trace(fp, rip);
stand/efi/loader/arch/amd64/trap.c
87
stack_trace(struct frame *fp, uintptr_t pc)
stand/efi/loader/arch/amd64/trap.c
96
while (fp != NULL || pc != 0) {
stand/efi/loader/arch/arm/exec.c
57
__elfN(arm_exec)(struct preloaded_file *fp)
stand/efi/loader/arch/arm/exec.c
65
if ((fmp = file_findmetadata(fp, MODINFOMD_ELFHDR)) == NULL)
stand/efi/loader/arch/arm/exec.c
75
printf("Kernel args: %s\n", fp->f_args);
stand/efi/loader/arch/arm/exec.c
83
if ((error = bi_load(fp->f_args, &modulep, &kernend, true)) != 0) {
stand/efi/loader/arch/arm64/exec.c
100
printf("%s called for preloaded file %p (=%s):\n", __func__, fp,
stand/efi/loader/arch/arm64/exec.c
101
fp->f_name);
stand/efi/loader/arch/arm64/exec.c
56
elf64_exec(struct preloaded_file *fp)
stand/efi/loader/arch/arm64/exec.c
66
if ((md = file_findmetadata(fp, MODINFOMD_ELFHDR)) == NULL)
stand/efi/loader/arch/arm64/exec.c
79
err = bi_load(fp->f_args, &modulep, &kernendp, true);
stand/efi/loader/arch/arm64/exec.c
86
clean_addr = (vm_offset_t)efi_translate(fp->f_addr);
stand/efi/loader/arch/arm64/exec.c
97
elf64_obj_exec(struct preloaded_file *fp)
stand/efi/loader/arch/i386/elf64_freebsd.c
111
type = fp->f_kernphys_relocatable ?
stand/efi/loader/arch/i386/elf64_freebsd.c
116
if ((md = file_findmetadata(fp, MODINFOMD_ELFHDR)) == NULL)
stand/efi/loader/arch/i386/elf64_freebsd.c
263
err = bi_load(fp->f_args, &modulep, &kernend, true);
stand/efi/loader/arch/i386/elf64_freebsd.c
276
elf64_obj_exec(struct preloaded_file *fp)
stand/efi/loader/arch/i386/elf64_freebsd.c
81
elf64_exec(struct preloaded_file *fp)
stand/efi/loader/arch/riscv/exec.c
48
riscv_set_boot_hart(struct preloaded_file *fp)
stand/efi/loader/arch/riscv/exec.c
66
file_addmetadata(fp, MODINFOMD_BOOT_HARTID, sizeof(boot_hartid),
stand/efi/loader/arch/riscv/exec.c
71
__elfN(exec)(struct preloaded_file *fp)
stand/efi/loader/arch/riscv/exec.c
79
if ((fmp = file_findmetadata(fp, MODINFOMD_ELFHDR)) == NULL)
stand/efi/loader/arch/riscv/exec.c
82
riscv_set_boot_hart(fp);
stand/efi/loader/arch/riscv/exec.c
91
printf("Kernel args: %s\n", fp->f_args);
stand/efi/loader/arch/riscv/exec.c
99
if ((error = bi_load(fp->f_args, &modulep, &kernend, true)) != 0) {
stand/efi/loader/main.c
398
FILEPATH_DEVICE_PATH *fp;
stand/efi/loader/main.c
492
fp = (FILEPATH_DEVICE_PATH *)dp;
stand/efi/loader/main.c
493
ucs2_to_utf8(fp->PathName, &kernel);
stand/fdt/fdt_loader_cmd.c
1061
struct preloaded_file *fp;
stand/fdt/fdt_loader_cmd.c
1082
while ((fp = file_findfile(NULL, "dtb")) != NULL) {
stand/fdt/fdt_loader_cmd.c
1083
file_discard(fp);
stand/fdt/fdt_loader_cmd.c
432
struct preloaded_file *fp;
stand/fdt/fdt_loader_cmd.c
447
for (fp = file_findfile(NULL, "dtbo"); fp != NULL; fp = fp->f_next) {
stand/fdt/fdt_loader_cmd.c
448
if (max_overlay_size < fp->f_size)
stand/fdt/fdt_loader_cmd.c
449
max_overlay_size = fp->f_size;
stand/fdt/fdt_loader_cmd.c
464
for (fp = file_findfile(NULL, "dtbo"); fp != NULL; fp = fp->f_next) {
stand/fdt/fdt_loader_cmd.c
465
if (strcmp(fp->f_type, "dtbo") != 0)
stand/fdt/fdt_loader_cmd.c
467
COPYOUT(fp->f_addr, overlay, fp->f_size);
stand/fdt/fdt_loader_cmd.c
471
printf("DTB overlay '%s' not compatible\n", fp->f_name);
stand/fdt/fdt_loader_cmd.c
474
printf("applying DTB overlay '%s'\n", fp->f_name);
stand/fdt/fdt_loader_cmd.c
475
next_fdtp_size = current_fdtp_size + fp->f_size;
stand/ficl/loader.c
256
struct preloaded_file* fp;
stand/ficl/loader.c
279
fp = file_findfile(name, type);
stand/ficl/loader.c
281
fp = NULL;
stand/ficl/loader.c
283
stackPushPtr(pVM->pStack, fp);
stand/ficl/testmain.c
137
FILE *fp;
stand/ficl/testmain.c
163
fp = fopen(pFilename->text, "r");
stand/ficl/testmain.c
164
if (!fp)
stand/ficl/testmain.c
172
pVM->sourceID.p = (void *)fp;
stand/ficl/testmain.c
175
while (fgets(cp, nLINEBUF, fp))
stand/ficl/testmain.c
187
fclose(fp);
stand/ficl/testmain.c
200
fclose(fp);
stand/i386/libi386/elf32_freebsd.c
57
elf32_exec(struct preloaded_file *fp)
stand/i386/libi386/elf32_freebsd.c
64
if ((md = file_findmetadata(fp, MODINFOMD_ELFHDR)) == NULL)
stand/i386/libi386/elf32_freebsd.c
68
err = bi_load32(fp->f_args, &boothowto, &bootdev, &bootinfop, &modulep, &kernend);
stand/i386/libi386/elf32_freebsd.c
84
elf32_obj_exec(struct preloaded_file *fp)
stand/i386/libi386/elf64_freebsd.c
127
elf64_obj_exec(struct preloaded_file *fp)
stand/i386/libi386/elf64_freebsd.c
76
elf64_exec(struct preloaded_file *fp)
stand/i386/libi386/elf64_freebsd.c
84
if ((md = file_findmetadata(fp, MODINFOMD_ELFHDR)) == NULL)
stand/i386/libi386/elf64_freebsd.c
88
err = bi_load64(fp->f_args, &modulep, &kernend, 1);
stand/i386/libi386/multiboot.c
162
multiboot_exec(struct preloaded_file *fp)
stand/i386/libi386/multiboot.c
195
if (fp->f_args == NULL) {
stand/i386/libi386/multiboot.c
199
fp->f_args = strdup(cmdline);
stand/i386/libi386/multiboot.c
200
if (fp->f_args == NULL) {
stand/i386/libi386/multiboot.c
206
if (fp->f_args != NULL) {
stand/i386/libi386/multiboot.c
207
len = strlen(fp->f_name) + 1 + strlen(fp->f_args) + 1;
stand/i386/libi386/multiboot.c
213
snprintf(cmdline, len, "%s %s", fp->f_name, fp->f_args);
stand/i386/libi386/multiboot.c
219
if ((md = file_findmetadata(fp, MODINFOMD_ELFHDR)) == NULL) {
stand/i386/libi386/multiboot.c
220
printf("Unable to find %s entry point\n", fp->f_name);
stand/i386/libi386/multiboot.c
265
fp = file_findfile(NULL, md_kerntype);
stand/i386/libi386/multiboot.c
266
if (fp == NULL) {
stand/i386/libi386/multiboot.c
280
error = bi_load64(fp->f_args, &modulep, &kernend, 0);
stand/i386/libi386/multiboot.c
286
mb_mod[0].mod_start = fp->f_addr;
stand/i386/libi386/multiboot.c
287
mb_mod[0].mod_end = fp->f_addr + fp->f_size - PAGE_SIZE;
stand/i386/libi386/multiboot.c
388
multiboot_obj_exec(struct preloaded_file *fp)
stand/i386/libi386/multiboot.c
60
extern int elf64_load_modmetadata(struct preloaded_file *fp, uint64_t dest);
stand/i386/libi386/multiboot.c
68
static int multiboot_obj_exec(struct preloaded_file *fp);
stand/kboot/kboot/arch/aarch64/exec.c
100
elf64_exec(struct preloaded_file *fp)
stand/kboot/kboot/arch/aarch64/exec.c
207
if ((md = file_findmetadata(fp, MODINFOMD_ELFHDR)) == NULL)
stand/kboot/kboot/arch/aarch64/exec.c
216
error = bi_load(fp->f_args, &modulep, &kernendp, true);
stand/kboot/kboot/arch/aarch64/exec.c
228
clean_addr = (vm_offset_t)efi_translate(fp->f_addr);
stand/kboot/kboot/arch/aarch64/exec.c
240
trampoline_data->entry = ehdr->e_entry - fp->f_addr + staging;
stand/kboot/kboot/arch/aarch64/exec.c
244
md = file_findmetadata(fp, MODINFOMD_EFI_MAP);
stand/kboot/kboot/arch/aarch64/exec.c
250
roundup2(sizeof(struct efi_map_header), 16) - fp->f_addr;
stand/kboot/kboot/arch/aarch64/exec.c
267
trampolinebase = staging + (kernendp - fp->f_addr);
stand/kboot/kboot/arch/aarch64/exec.c
283
elf64_obj_exec(struct preloaded_file *fp)
stand/kboot/kboot/arch/aarch64/exec.c
286
printf("%s called for preloaded file %p (=%s):\n", __func__, fp,
stand/kboot/kboot/arch/aarch64/exec.c
287
fp->f_name);
stand/kboot/kboot/arch/amd64/elf64_freebsd.c
148
elf64_exec(struct preloaded_file *fp)
stand/kboot/kboot/arch/amd64/elf64_freebsd.c
175
copy_staging = fp->f_kernphys_relocatable ?
stand/kboot/kboot/arch/amd64/elf64_freebsd.c
213
if ((md = file_findmetadata(fp, MODINFOMD_ELFHDR)) == NULL)
stand/kboot/kboot/arch/amd64/elf64_freebsd.c
412
err = bi_load(fp->f_args, &modulep, &kernend, true);
stand/kboot/kboot/arch/amd64/elf64_freebsd.c
432
md = file_findmetadata(fp, MODINFOMD_EFI_MAP);
stand/kboot/kboot/arch/amd64/elf64_freebsd.c
477
elf64_obj_exec(struct preloaded_file *fp)
stand/kboot/kboot/arch/powerpc64/ppc64_elf_freebsd.c
129
if ((error = md_load64(fp->f_args, &mdp, &dtb)) != 0)
stand/kboot/kboot/arch/powerpc64/ppc64_elf_freebsd.c
71
ppc64_elf_exec(struct preloaded_file *fp)
stand/kboot/kboot/arch/powerpc64/ppc64_elf_freebsd.c
84
if ((fmp = file_findmetadata(fp, MODINFOMD_ELFHDR)) == NULL) {
stand/libsa/cd9660.c
339
struct file *fp = NULL;
stand/libsa/cd9660.c
458
fp = malloc(sizeof(struct file));
stand/libsa/cd9660.c
459
bzero(fp, sizeof(struct file));
stand/libsa/cd9660.c
460
f->f_fsdata = (void *)fp;
stand/libsa/cd9660.c
463
fp->f_flags = F_ISDIR;
stand/libsa/cd9660.c
466
fp->f_flags |= F_ROOTDIR;
stand/libsa/cd9660.c
483
fp->f_flags |= F_RR;
stand/libsa/cd9660.c
484
fp->f_susp_skip = lenskip;
stand/libsa/cd9660.c
486
fp->f_off = 0;
stand/libsa/cd9660.c
487
fp->f_bno = isonum_733(rec.extent) + isonum_711(rec.ext_attr_length);
stand/libsa/cd9660.c
488
fp->f_size = isonum_733(rec.size);
stand/libsa/cd9660.c
494
free(fp);
stand/libsa/cd9660.c
503
struct file *fp = (struct file *)f->f_fsdata;
stand/libsa/cd9660.c
506
free(fp);
stand/libsa/cd9660.c
514
struct file *fp = (struct file *)f->f_fsdata;
stand/libsa/cd9660.c
519
blkno = fp->f_off / ISO_DEFAULT_BLOCK_SIZE + fp->f_bno;
stand/libsa/cd9660.c
520
blkoff = fp->f_off % ISO_DEFAULT_BLOCK_SIZE;
stand/libsa/cd9660.c
522
if (blkno != fp->f_buf_blkno) {
stand/libsa/cd9660.c
523
if (fp->f_buf == (char *)0)
stand/libsa/cd9660.c
524
fp->f_buf = malloc(ISO_DEFAULT_BLOCK_SIZE);
stand/libsa/cd9660.c
529
fp->f_buf, &read);
stand/libsa/cd9660.c
535
fp->f_buf_blkno = blkno;
stand/libsa/cd9660.c
538
*buf_p = fp->f_buf + blkoff;
stand/libsa/cd9660.c
541
if (*size_p > fp->f_size - fp->f_off)
stand/libsa/cd9660.c
542
*size_p = fp->f_size - fp->f_off;
stand/libsa/cd9660.c
549
struct file *fp = (struct file *)f->f_fsdata;
stand/libsa/cd9660.c
556
if (fp->f_off < 0 || fp->f_off >= fp->f_size)
stand/libsa/cd9660.c
566
fp->f_off += csize;
stand/libsa/cd9660.c
578
struct file *fp = (struct file *)f->f_fsdata;
stand/libsa/cd9660.c
586
if (fp->f_off >= fp->f_size)
stand/libsa/cd9660.c
597
blkno = fp->f_off / ISO_DEFAULT_BLOCK_SIZE;
stand/libsa/cd9660.c
598
fp->f_off = (blkno + 1) * ISO_DEFAULT_BLOCK_SIZE;
stand/libsa/cd9660.c
602
if (fp->f_flags & F_RR) {
stand/libsa/cd9660.c
603
if (fp->f_flags & F_ROOTDIR && fp->f_off == 0)
stand/libsa/cd9660.c
606
lenskip = fp->f_susp_skip;
stand/libsa/cd9660.c
636
fp->f_off += isonum_711(ep->length);
stand/libsa/cd9660.c
643
struct file *fp = (struct file *)f->f_fsdata;
stand/libsa/cd9660.c
647
fp->f_off = offset;
stand/libsa/cd9660.c
650
fp->f_off += offset;
stand/libsa/cd9660.c
653
fp->f_off = fp->f_size - offset;
stand/libsa/cd9660.c
658
return fp->f_off;
stand/libsa/cd9660.c
664
struct file *fp = (struct file *)f->f_fsdata;
stand/libsa/cd9660.c
668
if (fp->f_flags & F_ISDIR)
stand/libsa/cd9660.c
673
sb->st_size = fp->f_size;
stand/libsa/ext2fs.c
333
struct file *fp;
stand/libsa/ext2fs.c
345
fp = malloc(sizeof(struct file));
stand/libsa/ext2fs.c
346
if (fp == NULL)
stand/libsa/ext2fs.c
348
bzero(fp, sizeof(struct file));
stand/libsa/ext2fs.c
349
f->f_fsdata = (void *)fp;
stand/libsa/ext2fs.c
353
fp->f_fs = fs;
stand/libsa/ext2fs.c
395
fp->f_bg = malloc(len);
stand/libsa/ext2fs.c
399
(char *)fp->f_bg, &buf_size);
stand/libsa/ext2fs.c
414
fp->f_nindir[i] = mult;
stand/libsa/ext2fs.c
439
if (! S_ISDIR(fp->f_di.di_mode)) {
stand/libsa/ext2fs.c
479
if (S_ISLNK(fp->f_di.di_mode)) {
stand/libsa/ext2fs.c
480
int link_len = fp->f_di.di_size;
stand/libsa/ext2fs.c
491
if (fp->f_di.di_nblk == 0) {
stand/libsa/ext2fs.c
492
bcopy(fp->f_di.di_shortlink,
stand/libsa/ext2fs.c
498
struct ext2fs *fs = fp->f_fs;
stand/libsa/ext2fs.c
537
fp->f_seekp = 0;
stand/libsa/ext2fs.c
544
if (fp->f_buf)
stand/libsa/ext2fs.c
545
free(fp->f_buf);
stand/libsa/ext2fs.c
546
free(fp->f_fs);
stand/libsa/ext2fs.c
547
free(fp);
stand/libsa/ext2fs.c
558
struct file *fp = (struct file *)f->f_fsdata;
stand/libsa/ext2fs.c
559
struct ext2fs *fs = fp->f_fs;
stand/libsa/ext2fs.c
571
ino_to_db(fs, fp->f_bg, inumber), fs->fs_bsize, buf, &rsize);
stand/libsa/ext2fs.c
580
fp->f_di = dp[ino_to_bo(fs, inumber)];
stand/libsa/ext2fs.c
584
fp->f_blkno[level] = -1;
stand/libsa/ext2fs.c
585
fp->f_buf_blkno = -1;
stand/libsa/ext2fs.c
586
fp->f_seekp = 0;
stand/libsa/ext2fs.c
600
struct file *fp = (struct file *)f->f_fsdata;
stand/libsa/ext2fs.c
601
struct ext2fs *fs = fp->f_fs;
stand/libsa/ext2fs.c
632
*disk_block_p = fp->f_di.di_db[file_block];
stand/libsa/ext2fs.c
645
if (file_block < fp->f_nindir[level])
stand/libsa/ext2fs.c
647
file_block -= fp->f_nindir[level];
stand/libsa/ext2fs.c
654
ind_block_num = fp->f_di.di_ib[level];
stand/libsa/ext2fs.c
662
if (fp->f_blkno[level] != ind_block_num) {
stand/libsa/ext2fs.c
663
if (fp->f_blk[level] == (char *)0)
stand/libsa/ext2fs.c
664
fp->f_blk[level] =
stand/libsa/ext2fs.c
668
fsb_to_db(fp->f_fs, ind_block_num), fs->fs_bsize,
stand/libsa/ext2fs.c
669
fp->f_blk[level], &fp->f_blksize[level]);
stand/libsa/ext2fs.c
672
if (fp->f_blksize[level] != fs->fs_bsize)
stand/libsa/ext2fs.c
674
fp->f_blkno[level] = ind_block_num;
stand/libsa/ext2fs.c
677
ind_p = (int32_t *)fp->f_blk[level];
stand/libsa/ext2fs.c
680
idx = file_block / fp->f_nindir[level - 1];
stand/libsa/ext2fs.c
681
file_block %= fp->f_nindir[level - 1];
stand/libsa/ext2fs.c
700
struct file *fp = (struct file *)f->f_fsdata;
stand/libsa/ext2fs.c
701
struct ext2fs *fs = fp->f_fs;
stand/libsa/ext2fs.c
708
off = blkoff(fs, fp->f_seekp);
stand/libsa/ext2fs.c
709
file_block = lblkno(fs, fp->f_seekp);
stand/libsa/ext2fs.c
710
block_size = dblksize(fs, &fp->f_di, file_block);
stand/libsa/ext2fs.c
712
if (file_block != fp->f_buf_blkno) {
stand/libsa/ext2fs.c
717
if (fp->f_buf == (char *)0)
stand/libsa/ext2fs.c
718
fp->f_buf = malloc(fs->fs_bsize);
stand/libsa/ext2fs.c
721
bzero(fp->f_buf, block_size);
stand/libsa/ext2fs.c
722
fp->f_buf_size = block_size;
stand/libsa/ext2fs.c
727
fp->f_buf, &fp->f_buf_size);
stand/libsa/ext2fs.c
731
fp->f_buf_blkno = file_block;
stand/libsa/ext2fs.c
739
*buf_p = fp->f_buf + off;
stand/libsa/ext2fs.c
745
if (*size_p > fp->f_di.di_size - fp->f_seekp)
stand/libsa/ext2fs.c
746
*size_p = fp->f_di.di_size - fp->f_seekp;
stand/libsa/ext2fs.c
758
struct file *fp = (struct file *)f->f_fsdata;
stand/libsa/ext2fs.c
766
fp->f_seekp = 0;
stand/libsa/ext2fs.c
767
while (fp->f_seekp < fp->f_di.di_size) {
stand/libsa/ext2fs.c
786
fp->f_seekp += buf_size;
stand/libsa/ext2fs.c
794
struct file *fp = (struct file *)f->f_fsdata;
stand/libsa/ext2fs.c
797
if (fp == NULL)
stand/libsa/ext2fs.c
803
if (fp->f_blk[level])
stand/libsa/ext2fs.c
804
free(fp->f_blk[level]);
stand/libsa/ext2fs.c
806
if (fp->f_buf)
stand/libsa/ext2fs.c
807
free(fp->f_buf);
stand/libsa/ext2fs.c
808
if (fp->f_bg)
stand/libsa/ext2fs.c
809
free(fp->f_bg);
stand/libsa/ext2fs.c
810
free(fp->f_fs);
stand/libsa/ext2fs.c
811
free(fp);
stand/libsa/ext2fs.c
818
struct file *fp = (struct file *)f->f_fsdata;
stand/libsa/ext2fs.c
824
if (fp->f_seekp >= fp->f_di.di_size)
stand/libsa/ext2fs.c
837
fp->f_seekp += csize;
stand/libsa/ext2fs.c
849
struct file *fp = (struct file *)f->f_fsdata;
stand/libsa/ext2fs.c
853
fp->f_seekp = offset;
stand/libsa/ext2fs.c
856
fp->f_seekp += offset;
stand/libsa/ext2fs.c
859
fp->f_seekp = fp->f_di.di_size - offset;
stand/libsa/ext2fs.c
865
return (fp->f_seekp);
stand/libsa/ext2fs.c
871
struct file *fp = (struct file *)f->f_fsdata;
stand/libsa/ext2fs.c
874
sb->st_mode = fp->f_di.di_mode;
stand/libsa/ext2fs.c
875
sb->st_uid = fp->f_di.di_uid;
stand/libsa/ext2fs.c
876
sb->st_gid = fp->f_di.di_gid;
stand/libsa/ext2fs.c
877
sb->st_size = fp->f_di.di_size;
stand/libsa/ext2fs.c
884
struct file *fp = (struct file *)f->f_fsdata;
stand/libsa/ext2fs.c
895
if (fp->f_seekp >= fp->f_di.di_size)
stand/libsa/ext2fs.c
901
fp->f_seekp += ed->d_reclen;
stand/libsa/nfs.c
660
struct nfs_iodesc *fp = (struct nfs_iodesc *)f->f_fsdata;
stand/libsa/nfs.c
664
printf("nfs_close: fp=0x%lx\n", (u_long)fp);
stand/libsa/nfs.c
667
free(fp);
stand/libsa/nfs.c
679
struct nfs_iodesc *fp = (struct nfs_iodesc *)f->f_fsdata;
stand/libsa/nfs.c
686
(int)fp->off);
stand/libsa/nfs.c
690
cc = nfs_readdata(fp, fp->off, (void *)addr, size);
stand/libsa/nfs.c
706
fp->off += cc;
stand/libsa/nfs.c
748
struct nfs_iodesc *fp = (struct nfs_iodesc *)f->f_fsdata;
stand/libsa/nfs.c
751
ftype = ntohl(fp->fa.fa_type);
stand/libsa/nfs.c
752
mode = ntohl(fp->fa.fa_mode);
stand/libsa/nfs.c
756
sb->st_nlink = ntohl(fp->fa.fa_nlink);
stand/libsa/nfs.c
757
sb->st_uid = ntohl(fp->fa.fa_uid);
stand/libsa/nfs.c
758
sb->st_gid = ntohl(fp->fa.fa_gid);
stand/libsa/nfs.c
759
sb->st_size = ntohl(fp->fa.fa_size.val[1]);
stand/libsa/nfs.c
767
struct nfs_iodesc *fp = (struct nfs_iodesc *)f->f_fsdata;
stand/libsa/nfs.c
786
if (fp != pfp || fp->off != cookie) {
stand/libsa/nfs.c
794
args->fhsize = htonl(fp->fhsize);
stand/libsa/nfs.c
795
bcopy(fp->fh, args->fhpluscookie, fp->fhsize);
stand/libsa/nfs.c
796
pos = roundup(fp->fhsize, sizeof(uint32_t)) / sizeof(uint32_t);
stand/libsa/nfs.c
797
args->fhpluscookie[pos++] = htonl(fp->off >> 32);
stand/libsa/nfs.c
798
args->fhpluscookie[pos++] = htonl(fp->off);
stand/libsa/nfs.c
799
args->fhpluscookie[pos++] = htonl(fp->cookie >> 32);
stand/libsa/nfs.c
800
args->fhpluscookie[pos++] = htonl(fp->cookie);
stand/libsa/nfs.c
803
cc = rpc_call(fp->iodesc, NFS_PROG, NFS_VER3, NFSPROCV3_READDIR,
stand/libsa/nfs.c
805
roundup(fp->fhsize, sizeof(uint32_t)),
stand/libsa/nfs.c
816
pfp = fp;
stand/libsa/nfs.c
817
cookie = fp->off;
stand/libsa/nfs.c
818
fp->cookie = ((uint64_t)ntohl(repl->cookiev0) << 32) |
stand/libsa/nfs.c
838
fp->off = cookie = ((uint64_t)ntohl(rent->nameplus[pos]) << 32) |
stand/libsa/pkgfs.c
289
off_t fp;
stand/libsa/pkgfs.c
304
fp = tf->tf_fp;
stand/libsa/pkgfs.c
308
sz = tf->tf_size - fp;
stand/libsa/pkgfs.c
309
if (fp < tf->tf_cachesz && tf->tf_cachesz < tf->tf_size)
stand/libsa/pkgfs.c
310
sz = tf->tf_cachesz - fp;
stand/libsa/pkgfs.c
316
if (fp < tf->tf_cachesz) {
stand/libsa/pkgfs.c
318
memcpy(p, tf->tf_cache + fp, sz);
stand/libsa/pkgfs.c
319
fp += sz;
stand/libsa/pkgfs.c
330
fp += sz;
stand/libsa/pkgfs.c
335
tf->tf_fp = fp;
stand/libsa/ufs.c
128
#define DIP(fp, field) \
stand/libsa/ufs.c
129
((fp)->f_fs->fs_magic == FS_UFS1_MAGIC ? \
stand/libsa/ufs.c
130
(fp)->f_dp.dp1.field : (fp)->f_dp.dp2.field)
stand/libsa/ufs.c
161
struct file *fp = (struct file *)f->f_fsdata;
stand/libsa/ufs.c
162
struct fs *fs = fp->f_fs;
stand/libsa/ufs.c
185
if (fp->f_fs->fs_magic == FS_UFS1_MAGIC)
stand/libsa/ufs.c
186
fp->f_dp.dp1 = ((struct ufs1_dinode *)buf)
stand/libsa/ufs.c
189
fp->f_dp.dp2 = ((struct ufs2_dinode *)buf)
stand/libsa/ufs.c
199
fp->f_blkno[level] = -1;
stand/libsa/ufs.c
200
fp->f_buf_blkno = -1;
stand/libsa/ufs.c
202
fp->f_seekp = 0;
stand/libsa/ufs.c
203
fp->f_inumber = inumber;
stand/libsa/ufs.c
217
struct file *fp = (struct file *)f->f_fsdata;
stand/libsa/ufs.c
218
struct fs *fs = fp->f_fs;
stand/libsa/ufs.c
249
*disk_block_p = DIP(fp, di_db[file_block]);
stand/libsa/ufs.c
262
if (file_block < fp->f_nindir[level])
stand/libsa/ufs.c
264
file_block -= fp->f_nindir[level];
stand/libsa/ufs.c
271
ind_block_num = DIP(fp, di_ib[level]);
stand/libsa/ufs.c
279
if (fp->f_blkno[level] != ind_block_num) {
stand/libsa/ufs.c
280
if (fp->f_blk[level] == (char *)0)
stand/libsa/ufs.c
281
fp->f_blk[level] =
stand/libsa/ufs.c
285
fsbtodb(fp->f_fs, ind_block_num),
stand/libsa/ufs.c
287
fp->f_blk[level],
stand/libsa/ufs.c
288
&fp->f_blksize[level]);
stand/libsa/ufs.c
291
if (fp->f_blksize[level] != fs->fs_bsize)
stand/libsa/ufs.c
293
fp->f_blkno[level] = ind_block_num;
stand/libsa/ufs.c
297
idx = file_block / fp->f_nindir[level - 1];
stand/libsa/ufs.c
298
file_block %= fp->f_nindir[level - 1];
stand/libsa/ufs.c
302
if (fp->f_fs->fs_magic == FS_UFS1_MAGIC)
stand/libsa/ufs.c
303
ind_block_num = ((ufs1_daddr_t *)fp->f_blk[level])[idx];
stand/libsa/ufs.c
305
ind_block_num = ((ufs2_daddr_t *)fp->f_blk[level])[idx];
stand/libsa/ufs.c
319
struct file *fp = (struct file *)f->f_fsdata;
stand/libsa/ufs.c
320
struct fs *fs = fp->f_fs;
stand/libsa/ufs.c
330
off = blkoff(fs, fp->f_seekp);
stand/libsa/ufs.c
331
file_block = lblkno(fs, fp->f_seekp);
stand/libsa/ufs.c
332
block_size = sblksize(fs, DIP(fp, di_size), file_block);
stand/libsa/ufs.c
346
if (*size_p > DIP(fp, di_size) - fp->f_seekp)
stand/libsa/ufs.c
347
*size_p = DIP(fp, di_size) - fp->f_seekp;
stand/libsa/ufs.c
356
(file_block != fp->f_buf_blkno)) {
stand/libsa/ufs.c
358
if (fp->f_buf == (char *)0)
stand/libsa/ufs.c
359
fp->f_buf = malloc(fs->fs_bsize);
stand/libsa/ufs.c
364
block_size, fp->f_buf, &fp->f_buf_size);
stand/libsa/ufs.c
368
fp->f_buf_blkno = file_block;
stand/libsa/ufs.c
374
bcopy(buf_p, fp->f_buf + off, *size_p);
stand/libsa/ufs.c
383
block_size, fp->f_buf, &fp->f_buf_size);
stand/libsa/ufs.c
394
struct file *fp = (struct file *)f->f_fsdata;
stand/libsa/ufs.c
395
struct fs *fs = fp->f_fs;
stand/libsa/ufs.c
402
off = blkoff(fs, fp->f_seekp);
stand/libsa/ufs.c
403
file_block = lblkno(fs, fp->f_seekp);
stand/libsa/ufs.c
404
block_size = sblksize(fs, DIP(fp, di_size), file_block);
stand/libsa/ufs.c
406
if (file_block != fp->f_buf_blkno) {
stand/libsa/ufs.c
407
if (fp->f_buf == NULL)
stand/libsa/ufs.c
408
fp->f_buf = malloc(fs->fs_bsize);
stand/libsa/ufs.c
415
bzero(fp->f_buf, block_size);
stand/libsa/ufs.c
416
fp->f_buf_size = block_size;
stand/libsa/ufs.c
421
block_size, fp->f_buf, &fp->f_buf_size);
stand/libsa/ufs.c
426
fp->f_buf_blkno = file_block;
stand/libsa/ufs.c
434
*buf_p = fp->f_buf + off;
stand/libsa/ufs.c
440
if (*size_p > DIP(fp, di_size) - fp->f_seekp)
stand/libsa/ufs.c
441
*size_p = DIP(fp, di_size) - fp->f_seekp;
stand/libsa/ufs.c
453
struct file *fp = (struct file *)f->f_fsdata;
stand/libsa/ufs.c
463
fp->f_seekp = 0;
stand/libsa/ufs.c
464
while (fp->f_seekp < DIP(fp, di_size)) {
stand/libsa/ufs.c
475
if (fp->f_fs->fs_maxsymlinklen <= 0)
stand/libsa/ufs.c
489
fp->f_seekp += buf_size;
stand/libsa/ufs.c
503
struct file *fp;
stand/libsa/ufs.c
515
fp = calloc(1, sizeof(struct file));
stand/libsa/ufs.c
516
if (fp == NULL)
stand/libsa/ufs.c
518
f->f_fsdata = (void *)fp;
stand/libsa/ufs.c
543
fp->f_fs = fs;
stand/libsa/ufs.c
555
fp->f_nindir[level] = mult;
stand/libsa/ufs.c
581
if ((DIP(fp, di_mode) & IFMT) != IFDIR) {
stand/libsa/ufs.c
623
if ((DIP(fp, di_mode) & IFMT) == IFLNK) {
stand/libsa/ufs.c
624
int link_len = DIP(fp, di_size);
stand/libsa/ufs.c
638
bcopy(DIP(fp, di_shortlink), namebuf,
stand/libsa/ufs.c
646
struct fs *fs = fp->f_fs;
stand/libsa/ufs.c
683
fp->f_seekp = 0;
stand/libsa/ufs.c
688
free(fp->f_buf);
stand/libsa/ufs.c
690
if (mnt == NULL && fp->f_fs != NULL) {
stand/libsa/ufs.c
691
free(fp->f_fs->fs_csp);
stand/libsa/ufs.c
692
free(fp->f_fs->fs_si);
stand/libsa/ufs.c
693
free(fp->f_fs);
stand/libsa/ufs.c
695
free(fp);
stand/libsa/ufs.c
726
struct file *fp = (struct file *)f->f_fsdata;
stand/libsa/ufs.c
731
if (fp == NULL)
stand/libsa/ufs.c
735
free(fp->f_blk[level]);
stand/libsa/ufs.c
737
free(fp->f_buf);
stand/libsa/ufs.c
745
if (mnt == NULL && fp->f_fs != NULL) {
stand/libsa/ufs.c
746
free(fp->f_fs->fs_csp);
stand/libsa/ufs.c
747
free(fp->f_fs->fs_si);
stand/libsa/ufs.c
748
free(fp->f_fs);
stand/libsa/ufs.c
751
free(fp);
stand/libsa/ufs.c
762
struct file *fp = (struct file *)f->f_fsdata;
stand/libsa/ufs.c
770
if (fp->f_seekp >= DIP(fp, di_size))
stand/libsa/ufs.c
783
fp->f_seekp += csize;
stand/libsa/ufs.c
800
struct file *fp = (struct file *)f->f_fsdata;
stand/libsa/ufs.c
807
if (fp->f_seekp >= DIP(fp, di_size))
stand/libsa/ufs.c
816
fp->f_seekp += csize;
stand/libsa/ufs.c
828
struct file *fp = (struct file *)f->f_fsdata;
stand/libsa/ufs.c
832
fp->f_seekp = offset;
stand/libsa/ufs.c
835
fp->f_seekp += offset;
stand/libsa/ufs.c
838
fp->f_seekp = DIP(fp, di_size) - offset;
stand/libsa/ufs.c
844
return (fp->f_seekp);
stand/libsa/ufs.c
850
struct file *fp = (struct file *)f->f_fsdata;
stand/libsa/ufs.c
853
sb->st_mode = DIP(fp, di_mode);
stand/libsa/ufs.c
854
sb->st_uid = DIP(fp, di_uid);
stand/libsa/ufs.c
855
sb->st_gid = DIP(fp, di_gid);
stand/libsa/ufs.c
856
sb->st_size = DIP(fp, di_size);
stand/libsa/ufs.c
857
sb->st_mtime = DIP(fp, di_mtime);
stand/libsa/ufs.c
863
sb->st_ino = fp->f_inumber;
stand/libsa/ufs.c
869
sb->st_dev = (dev_t)(fp->f_fs->fs_id[0] ^ fp->f_fs->fs_id[1]);
stand/libsa/ufs.c
877
struct file *fp = (struct file *)f->f_fsdata;
stand/libsa/ufs.c
888
if (fp->f_seekp >= DIP(fp, di_size))
stand/libsa/ufs.c
900
fp->f_seekp += dp->d_reclen;
stand/libsa/zfs/zfs.c
111
struct file *fp;
stand/libsa/zfs/zfs.c
118
fp = calloc(1, sizeof(struct file));
stand/libsa/zfs/zfs.c
119
if (fp == NULL)
stand/libsa/zfs/zfs.c
121
f->f_fsdata = fp;
stand/libsa/zfs/zfs.c
123
rc = zfs_lookup(mount, upath, &fp->f_dnode);
stand/libsa/zfs/zfs.c
124
fp->f_seekp = 0;
stand/libsa/zfs/zfs.c
127
free(fp);
stand/libsa/zfs/zfs.c
135
struct file *fp = (struct file *)f->f_fsdata;
stand/libsa/zfs/zfs.c
140
free(fp);
stand/libsa/zfs/zfs.c
153
struct file *fp = (struct file *)f->f_fsdata;
stand/libsa/zfs/zfs.c
162
if (fp->f_seekp + n > sb.st_size)
stand/libsa/zfs/zfs.c
163
n = sb.st_size - fp->f_seekp;
stand/libsa/zfs/zfs.c
165
rc = dnode_read(spa, &fp->f_dnode, fp->f_seekp, start, n);
stand/libsa/zfs/zfs.c
174
fp->f_seekp += n;
stand/libsa/zfs/zfs.c
184
struct file *fp = (struct file *)f->f_fsdata;
stand/libsa/zfs/zfs.c
188
fp->f_seekp = offset;
stand/libsa/zfs/zfs.c
191
fp->f_seekp += offset;
stand/libsa/zfs/zfs.c
203
fp->f_seekp = sb.st_size - offset;
stand/libsa/zfs/zfs.c
210
return (fp->f_seekp);
stand/libsa/zfs/zfs.c
218
struct file *fp = (struct file *)f->f_fsdata;
stand/libsa/zfs/zfs.c
220
return (zfs_dnode_stat(spa, &fp->f_dnode, sb));
stand/libsa/zfs/zfs.c
228
struct file *fp = (struct file *)f->f_fsdata;
stand/libsa/zfs/zfs.c
231
size_t bsize = fp->f_dnode.dn_datablkszsec << SPA_MINBLOCKSHIFT;
stand/libsa/zfs/zfs.c
243
if (fp->f_seekp == 0) {
stand/libsa/zfs/zfs.c
244
rc = dnode_read(spa, &fp->f_dnode,
stand/libsa/zfs/zfs.c
245
0, &fp->f_zap_type, sizeof(fp->f_zap_type));
stand/libsa/zfs/zfs.c
249
if (fp->f_zap_type == ZBT_MICRO) {
stand/libsa/zfs/zfs.c
250
fp->f_seekp = offsetof(mzap_phys_t, mz_chunk);
stand/libsa/zfs/zfs.c
252
rc = dnode_read(spa, &fp->f_dnode,
stand/libsa/zfs/zfs.c
254
&fp->f_num_leafs,
stand/libsa/zfs/zfs.c
255
sizeof(fp->f_num_leafs));
stand/libsa/zfs/zfs.c
259
fp->f_seekp = bsize;
stand/libsa/zfs/zfs.c
260
fp->f_zap_leaf = malloc(bsize);
stand/libsa/zfs/zfs.c
261
if (fp->f_zap_leaf == NULL)
stand/libsa/zfs/zfs.c
263
rc = dnode_read(spa, &fp->f_dnode,
stand/libsa/zfs/zfs.c
264
fp->f_seekp,
stand/libsa/zfs/zfs.c
265
fp->f_zap_leaf,
stand/libsa/zfs/zfs.c
272
if (fp->f_zap_type == ZBT_MICRO) {
stand/libsa/zfs/zfs.c
274
if (fp->f_seekp >= bsize)
stand/libsa/zfs/zfs.c
277
rc = dnode_read(spa, &fp->f_dnode,
stand/libsa/zfs/zfs.c
278
fp->f_seekp, &mze, sizeof(mze));
stand/libsa/zfs/zfs.c
281
fp->f_seekp += sizeof(mze);
stand/libsa/zfs/zfs.c
304
zl.l_phys = fp->f_zap_leaf;
stand/libsa/zfs/zfs.c
312
chunk = fp->f_seekp & (bsize - 1);
stand/libsa/zfs/zfs.c
314
fp->f_seekp = rounddown2(fp->f_seekp, bsize) + bsize;
stand/libsa/zfs/zfs.c
320
if (fp->f_seekp >= bsize * fp->f_num_leafs)
stand/libsa/zfs/zfs.c
323
rc = dnode_read(spa, &fp->f_dnode,
stand/libsa/zfs/zfs.c
324
fp->f_seekp,
stand/libsa/zfs/zfs.c
325
fp->f_zap_leaf,
stand/libsa/zfs/zfs.c
332
fp->f_seekp++;
stand/powerpc/ofw/elf_freebsd.c
68
__elfN(ofw_exec)(struct preloaded_file *fp)
stand/powerpc/ofw/elf_freebsd.c
76
if ((fmp = file_findmetadata(fp, MODINFOMD_ELFHDR)) == NULL) {
stand/powerpc/ofw/elf_freebsd.c
82
if ((error = md_load(fp->f_args, &mdp, &dtbp)) != 0)
stand/powerpc/ofw/ppc64_elf_freebsd.c
66
ppc64_ofw_elf_exec(struct preloaded_file *fp)
stand/powerpc/ofw/ppc64_elf_freebsd.c
74
if ((fmp = file_findmetadata(fp, MODINFOMD_ELFHDR)) == NULL) {
stand/powerpc/ofw/ppc64_elf_freebsd.c
85
if ((error = md_load64(fp->f_args, &mdp, &dtbp)) != 0)
stand/uboot/arch/powerpc/ppc64_elf_freebsd.c
62
ppc64_uboot_elf_exec(struct preloaded_file *fp)
stand/uboot/arch/powerpc/ppc64_elf_freebsd.c
70
if ((fmp = file_findmetadata(fp, MODINFOMD_ELFHDR)) == NULL) {
stand/uboot/arch/powerpc/ppc64_elf_freebsd.c
81
if ((error = md_load64(fp->f_args, &mdp, &dtbp)) != 0)
stand/uboot/arch/powerpc/ppc64_elf_freebsd.c
85
printf("Kernel args: %s\n", fp->f_args);
stand/uboot/elf_freebsd.c
63
__elfN(uboot_exec)(struct preloaded_file *fp)
stand/uboot/elf_freebsd.c
71
if ((fmp = file_findmetadata(fp, MODINFOMD_ELFHDR)) == NULL)
stand/uboot/elf_freebsd.c
76
if ((error = md_load(fp->f_args, &mdp, NULL)) != 0)
stand/uboot/elf_freebsd.c
83
printf("Kernel args: %s\n", fp->f_args);
stand/userboot/userboot/elf32_freebsd.c
114
elf32_obj_exec(struct preloaded_file *fp)
stand/userboot/userboot/elf32_freebsd.c
60
elf32_exec(struct preloaded_file *fp)
stand/userboot/userboot/elf32_freebsd.c
69
if ((md = file_findmetadata(fp, MODINFOMD_ELFHDR)) == NULL)
stand/userboot/userboot/elf32_freebsd.c
73
err = bi_load32(fp->f_args, &boothowto, &bootdev, &bootinfop, &modulep, &kernend);
stand/userboot/userboot/elf64_freebsd.c
160
elf64_obj_exec(struct preloaded_file *fp)
stand/userboot/userboot/elf64_freebsd.c
78
elf64_exec(struct preloaded_file *fp)
stand/userboot/userboot/elf64_freebsd.c
91
if ((md = file_findmetadata(fp, MODINFOMD_ELFHDR)) == NULL)
stand/userboot/userboot/elf64_freebsd.c
95
err = bi_load64(fp->f_args, &modulep, &kernend);
sys/amd64/amd64/db_disasm.c
1142
const struct finst * fp;
sys/amd64/amd64/db_disasm.c
1148
fp = &db_Esc_inst[inst - 0xd8][f_reg(rex, regmodrm)];
sys/amd64/amd64/db_disasm.c
1151
if (*fp->f_name == '\0') {
sys/amd64/amd64/db_disasm.c
1159
db_printf("%s", fp->f_name);
sys/amd64/amd64/db_disasm.c
1160
switch(fp->f_size) {
sys/amd64/amd64/db_disasm.c
1189
switch (fp->f_rrmode) {
sys/amd64/amd64/db_disasm.c
1191
name = (fp->f_rrname) ? fp->f_rrname : fp->f_name;
sys/amd64/amd64/db_disasm.c
1195
name = (fp->f_rrname) ? fp->f_rrname : fp->f_name;
sys/amd64/amd64/db_disasm.c
1199
name = (fp->f_rrname) ? fp->f_rrname : fp->f_name;
sys/amd64/amd64/db_disasm.c
1203
name = ((const char * const *)fp->f_rrname)[f_rm(rex, regmodrm)];
sys/amd64/amd64/db_disasm.c
1209
name = ((const char * const *)fp->f_rrname)[f_rm(rex, regmodrm)];
sys/amd64/amd64/db_trace.c
138
db_nextframe(db_addr_t *fp, db_addr_t *ip, struct thread *td)
sys/amd64/amd64/db_trace.c
148
rip = db_get_value(*fp + offsetof(struct amd64_frame, f_retaddr), 8,
sys/amd64/amd64/db_trace.c
150
rbp = db_get_value(*fp + offsetof(struct amd64_frame, f_frame), 8,
sys/amd64/amd64/db_trace.c
196
*fp = rbp;
sys/amd64/amd64/db_trace.c
200
db_print_stack_entry(name, rip, *fp);
sys/amd64/amd64/db_trace.c
206
tf_addr = *fp + 16;
sys/amd64/amd64/db_trace.c
212
*fp = 0;
sys/amd64/amd64/db_trace.c
237
*fp = rbp;
sys/amd64/ia32/ia32_signal.c
350
struct ia32_osigframe sf, *fp;
sys/amd64/ia32/ia32_signal.c
370
fp = (struct ia32_osigframe *)((uintptr_t)td->td_sigstk.ss_sp +
sys/amd64/ia32/ia32_signal.c
374
fp = (struct ia32_osigframe *)regs->tf_rsp - 1;
sys/amd64/ia32/ia32_signal.c
378
sf.sf_scp = (register_t)&fp->sf_siginfo.si_sc;
sys/amd64/ia32/ia32_signal.c
382
sf.sf_arg2 = (register_t)&fp->sf_siginfo;
sys/amd64/ia32/ia32_signal.c
424
if (copyout(&sf, fp, sizeof(*fp)) != 0) {
sys/amd64/ia32/ia32_signal.c
432
regs->tf_rsp = (uintptr_t)fp;
sys/amd64/linux/linux_sysvec.c
279
struct savefpu *fp = (struct savefpu *)&mcp->mc_fpstate[0];
sys/amd64/linux/linux_sysvec.c
282
error = copyin(PTRIN(sc->sc_fpstate), fp, sizeof(mcp->mc_fpstate));
sys/amd64/linux/linux_sysvec.c
285
bzero(&fp->sv_pad[0], sizeof(fp->sv_pad));
sys/amd64/linux/linux_sysvec.c
292
struct savefpu *fp = (struct savefpu *)&mcp->mc_fpstate[0];
sys/amd64/linux/linux_sysvec.c
302
error = copyin(PTRIN(sc->sc_fpstate), fp, sizeof(mcp->mc_fpstate));
sys/amd64/linux/linux_sysvec.c
305
bzero(&fp->sv_pad[0], sizeof(fp->sv_pad));
sys/amd64/linux32/linux32_sysvec.c
152
struct l_rt_sigframe *fp, frame;
sys/amd64/linux32/linux32_sysvec.c
168
fp = (struct l_rt_sigframe *)((uintptr_t)td->td_sigstk.ss_sp +
sys/amd64/linux32/linux32_sysvec.c
171
fp = (struct l_rt_sigframe *)regs->tf_rsp - 1;
sys/amd64/linux32/linux32_sysvec.c
180
frame.sf_siginfo = PTROUT(&fp->sf_si);
sys/amd64/linux32/linux32_sysvec.c
181
frame.sf_ucontext = PTROUT(&fp->sf_uc);
sys/amd64/linux32/linux32_sysvec.c
219
if (copyout(&frame, fp, sizeof(frame)) != 0) {
sys/amd64/linux32/linux32_sysvec.c
229
regs->tf_rsp = PTROUT(fp);
sys/amd64/linux32/linux32_sysvec.c
262
struct l_sigframe *fp, frame;
sys/amd64/linux32/linux32_sysvec.c
284
fp = (struct l_sigframe *)((uintptr_t)td->td_sigstk.ss_sp +
sys/amd64/linux32/linux32_sysvec.c
287
fp = (struct l_sigframe *)regs->tf_rsp - 1;
sys/amd64/linux32/linux32_sysvec.c
323
if (copyout(&frame, fp, sizeof(frame)) != 0) {
sys/amd64/linux32/linux32_sysvec.c
333
regs->tf_rsp = PTROUT(fp);
sys/amd64/sgx/sgx_linux.c
59
struct file *fp;
sys/amd64/sgx/sgx_linux.c
65
&fp);
sys/amd64/sgx/sgx_linux.c
89
error = fo_ioctl(fp, args->cmd, (caddr_t)data, td->td_ucred, td);
sys/amd64/sgx/sgx_linux.c
91
fdrop(fp, td);
sys/arm/arm/exec_machdep.c
277
struct sigframe *fp, frame;
sys/arm/arm/exec_machdep.c
298
fp = (struct sigframe *)((uintptr_t)td->td_sigstk.ss_sp +
sys/arm/arm/exec_machdep.c
304
fp = (struct sigframe *)td->td_frame->tf_usr_sp;
sys/arm/arm/exec_machdep.c
307
fp--;
sys/arm/arm/exec_machdep.c
310
fp = STACKALIGN(fp);
sys/arm/arm/exec_machdep.c
317
frame.sf_uc.uc_mcontext.mc_vfp_size = sizeof(fp->sf_vfp);
sys/arm/arm/exec_machdep.c
318
frame.sf_uc.uc_mcontext.mc_vfp_ptr = &fp->sf_vfp;
sys/arm/arm/exec_machdep.c
333
if (copyout(&frame, fp, sizeof(*fp)) != 0) {
sys/arm/arm/exec_machdep.c
335
CTR2(KTR_SIG, "sendsig: sigexit td=%p fp=%p", td, fp);
sys/arm/arm/exec_machdep.c
348
tf->tf_r1 = (register_t)&fp->sf_si;
sys/arm/arm/exec_machdep.c
349
tf->tf_r2 = (register_t)&fp->sf_uc;
sys/arm/arm/exec_machdep.c
352
tf->tf_r5 = (register_t)&fp->sf_uc;
sys/arm/arm/exec_machdep.c
354
tf->tf_usr_sp = (register_t)fp;
sys/arm/freescale/imx/imx6_sdma.c
356
const struct firmware *fp;
sys/arm/freescale/imx/imx6_sdma.c
358
fp = firmware_get("sdma-imx6q");
sys/arm/freescale/imx/imx6_sdma.c
359
if (fp == NULL) {
sys/arm/freescale/imx/imx6_sdma.c
364
header = fp->data;
sys/arm64/arm64/db_trace.c
101
tf = (struct trapframe *)(uintptr_t)frame->fp - 1;
sys/arm64/arm64/db_trace.c
130
frame->fp = tf->tf_x[29];
sys/arm64/arm64/db_trace.c
132
if (!INKERNEL(frame->fp))
sys/arm64/arm64/db_trace.c
153
frame.fp = (uintptr_t)ctx->pcb_x[PCB_FP];
sys/arm64/arm64/db_trace.c
166
frame.fp = (uintptr_t)__builtin_frame_address(0);
sys/arm64/arm64/exec_machdep.c
781
struct sigframe *fp, frame;
sys/arm64/arm64/exec_machdep.c
839
fp = (struct sigframe *)addr;
sys/arm64/arm64/exec_machdep.c
840
fp--;
sys/arm64/arm64/exec_machdep.c
841
fp = STACKALIGN(fp);
sys/arm64/arm64/exec_machdep.c
844
if (copyout(&frame, fp, sizeof(*fp)) != 0) {
sys/arm64/arm64/exec_machdep.c
846
CTR2(KTR_SIG, "sendsig: sigexit td=%p fp=%p", td, fp);
sys/arm64/arm64/exec_machdep.c
852
tf->tf_x[1] = (register_t)&fp->sf_si;
sys/arm64/arm64/exec_machdep.c
853
tf->tf_x[2] = (register_t)&fp->sf_uc;
sys/arm64/arm64/exec_machdep.c
855
tf->tf_sp = (register_t)fp;
sys/arm64/arm64/freebsd32_machdep.c
353
struct sigframe32 *fp, frame;
sys/arm64/arm64/freebsd32_machdep.c
376
fp = (struct sigframe32 *)((uintptr_t)td->td_sigstk.ss_sp +
sys/arm64/arm64/freebsd32_machdep.c
382
fp = (struct sigframe32 *)td->td_frame->tf_x[13];
sys/arm64/arm64/freebsd32_machdep.c
385
fp--;
sys/arm64/arm64/freebsd32_machdep.c
388
fp = (struct sigframe32 *)((unsigned long)(fp) &~ (8 - 1));
sys/arm64/arm64/freebsd32_machdep.c
393
frame.sf_uc.uc_mcontext.mc_vfp_size = sizeof(fp->sf_vfp);
sys/arm64/arm64/freebsd32_machdep.c
394
frame.sf_uc.uc_mcontext.mc_vfp_ptr = (uint32_t)(uintptr_t)&fp->sf_vfp;
sys/arm64/arm64/freebsd32_machdep.c
410
if (copyout(&frame, fp, sizeof(*fp)) != 0) {
sys/arm64/arm64/freebsd32_machdep.c
412
CTR2(KTR_SIG, "sendsig: sigexit td=%p fp=%p", td, fp);
sys/arm64/arm64/freebsd32_machdep.c
425
tf->tf_x[1] = (register_t)&fp->sf_si;
sys/arm64/arm64/freebsd32_machdep.c
426
tf->tf_x[2] = (register_t)&fp->sf_uc;
sys/arm64/arm64/freebsd32_machdep.c
429
tf->tf_x[5] = (register_t)&fp->sf_uc;
sys/arm64/arm64/freebsd32_machdep.c
431
tf->tf_x[13] = (register_t)fp;
sys/arm64/arm64/stack_machdep.c
66
frame.fp = td->td_pcb->pcb_x[PCB_FP];
sys/arm64/arm64/stack_machdep.c
78
frame.fp = (uintptr_t)__builtin_frame_address(0);
sys/arm64/arm64/unwind.c
38
uintptr_t fp;
sys/arm64/arm64/unwind.c
40
fp = frame->fp;
sys/arm64/arm64/unwind.c
42
if (!__is_aligned(fp, sizeof(fp)) ||
sys/arm64/arm64/unwind.c
43
!kstack_contains(td, fp, sizeof(fp) * 2))
sys/arm64/arm64/unwind.c
47
frame->fp = ((uintptr_t *)fp)[0];
sys/arm64/arm64/unwind.c
49
frame->pc = ADDR_MAKE_CANONICAL(((uintptr_t *)fp)[1] - 4);
sys/arm64/include/csan.h
79
frame.fp = (uintptr_t)__builtin_frame_address(0);
sys/arm64/include/stack.h
34
uintptr_t fp;
sys/arm64/linux/linux_sigframe.h
77
uint64_t fp;
sys/arm64/linux/linux_sysvec.c
303
struct l_sigframe *fp, *frame;
sys/arm64/linux/linux_sysvec.c
330
fp = (struct l_sigframe *)((uintptr_t)td->td_sigstk.ss_sp +
sys/arm64/linux/linux_sysvec.c
336
fp = (struct l_sigframe *)td->td_frame->tf_sp;
sys/arm64/linux/linux_sysvec.c
340
fp--;
sys/arm64/linux/linux_sysvec.c
341
fp = STACKALIGN(fp);
sys/arm64/linux/linux_sysvec.c
364
frame->fp = tf->tf_x[29];
sys/arm64/linux/linux_sysvec.c
398
if (copyout(frame, fp, sizeof(*fp)) != 0) {
sys/arm64/linux/linux_sysvec.c
401
CTR2(KTR_SIG, "sendsig: sigexit td=%p fp=%p", td, fp);
sys/arm64/linux/linux_sysvec.c
409
tf->tf_x[1] = (register_t)&fp->sf.sf_si;
sys/arm64/linux/linux_sysvec.c
410
tf->tf_x[2] = (register_t)&fp->sf.sf_uc;
sys/arm64/linux/linux_sysvec.c
415
tf->tf_x[29] = (register_t)&fp->fp;
sys/arm64/linux/linux_sysvec.c
417
tf->tf_sp = (register_t)fp;
sys/cddl/dev/dtrace/aarch64/dtrace_isa.c
106
uintptr_t fp)
sys/cddl/dev/dtrace/aarch64/dtrace_isa.c
111
uintptr_t oldfp = fp;
sys/cddl/dev/dtrace/aarch64/dtrace_isa.c
122
cpu_core[curcpu].cpuc_dtrace_illval = fp;
sys/cddl/dev/dtrace/aarch64/dtrace_isa.c
133
if (fp == 0)
sys/cddl/dev/dtrace/aarch64/dtrace_isa.c
136
pc = dtrace_fuword64((void *)(fp +
sys/cddl/dev/dtrace/aarch64/dtrace_isa.c
138
fp = dtrace_fuword64((void *)fp);
sys/cddl/dev/dtrace/aarch64/dtrace_isa.c
140
if (fp == oldfp) {
sys/cddl/dev/dtrace/aarch64/dtrace_isa.c
142
cpu_core[curcpu].cpuc_dtrace_illval = fp;
sys/cddl/dev/dtrace/aarch64/dtrace_isa.c
161
oldfp = fp;
sys/cddl/dev/dtrace/aarch64/dtrace_isa.c
172
uintptr_t pc, fp;
sys/cddl/dev/dtrace/aarch64/dtrace_isa.c
196
fp = tf->tf_x[29];
sys/cddl/dev/dtrace/aarch64/dtrace_isa.c
216
n = dtrace_getustack_common(pcstack, pcstack_limit, pc, fp);
sys/cddl/dev/dtrace/aarch64/dtrace_isa.c
233
uintptr_t pc, fp;
sys/cddl/dev/dtrace/aarch64/dtrace_isa.c
243
fp = tf->tf_x[29];
sys/cddl/dev/dtrace/aarch64/dtrace_isa.c
244
n += dtrace_getustack_common(NULL, 0, pc, fp);
sys/cddl/dev/dtrace/aarch64/dtrace_isa.c
300
state.fp = (uintptr_t)__builtin_frame_address(0);
sys/cddl/dev/dtrace/aarch64/dtrace_isa.c
305
if (!INKERNEL(state.pc) || !INKERNEL(state.fp))
sys/cddl/dev/dtrace/aarch64/dtrace_isa.c
77
state.fp = (uintptr_t)__builtin_frame_address(0);
sys/cddl/dev/dtrace/amd64/dtrace_isa.c
172
uintptr_t pc, sp, fp;
sys/cddl/dev/dtrace/amd64/dtrace_isa.c
196
fp = tf->tf_rbp;
sys/cddl/dev/dtrace/amd64/dtrace_isa.c
217
n = dtrace_getustack_common(pcstack, pcstack_limit, pc, fp);
sys/cddl/dev/dtrace/amd64/dtrace_isa.c
234
uintptr_t pc, fp, sp;
sys/cddl/dev/dtrace/amd64/dtrace_isa.c
244
fp = tf->tf_rbp;
sys/cddl/dev/dtrace/amd64/dtrace_isa.c
261
n += dtrace_getustack_common(NULL, 0, pc, fp);
sys/cddl/dev/dtrace/amd64/dtrace_isa.c
271
uintptr_t pc, sp, fp;
sys/cddl/dev/dtrace/amd64/dtrace_isa.c
299
fp = tf->tf_rbp;
sys/cddl/dev/dtrace/amd64/dtrace_isa.c
319
*fpstack++ = fp;
sys/cddl/dev/dtrace/amd64/dtrace_isa.c
324
if (fp == 0)
sys/cddl/dev/dtrace/amd64/dtrace_isa.c
339
pc = dtrace_fuword64((void *)(fp +
sys/cddl/dev/dtrace/amd64/dtrace_isa.c
341
fp = dtrace_fuword64((void *)fp);
sys/cddl/dev/dtrace/amd64/dtrace_isa.c
366
struct amd64_frame *fp = (struct amd64_frame *)dtrace_getfp();
sys/cddl/dev/dtrace/amd64/dtrace_isa.c
407
kmsan_mark(fp, sizeof(*fp), KMSAN_STATE_INITED);
sys/cddl/dev/dtrace/amd64/dtrace_isa.c
408
fp = fp->f_frame;
sys/cddl/dev/dtrace/amd64/dtrace_isa.c
432
stack = (uintptr_t *)&fp[1];
sys/cddl/dev/dtrace/i386/dtrace_isa.c
217
uintptr_t pc, sp, fp;
sys/cddl/dev/dtrace/i386/dtrace_isa.c
241
fp = tf->tf_ebp;
sys/cddl/dev/dtrace/i386/dtrace_isa.c
279
uintptr_t pc, fp, sp;
sys/cddl/dev/dtrace/i386/dtrace_isa.c
289
fp = tf->tf_ebp;
sys/cddl/dev/dtrace/i386/dtrace_isa.c
306
n += dtrace_getustack_common(NULL, 0, pc, fp);
sys/cddl/dev/dtrace/i386/dtrace_isa.c
316
uintptr_t pc, sp, fp;
sys/cddl/dev/dtrace/i386/dtrace_isa.c
343
fp = tf->tf_ebp;
sys/cddl/dev/dtrace/i386/dtrace_isa.c
370
*fpstack++ = fp;
sys/cddl/dev/dtrace/i386/dtrace_isa.c
375
if (fp == 0)
sys/cddl/dev/dtrace/i386/dtrace_isa.c
400
pc = dtrace_fuword32((void *)(fp +
sys/cddl/dev/dtrace/i386/dtrace_isa.c
402
fp = dtrace_fuword32((void *)fp);
sys/cddl/dev/dtrace/i386/dtrace_isa.c
425
struct i386_frame *fp = (struct i386_frame *)dtrace_getfp();
sys/cddl/dev/dtrace/i386/dtrace_isa.c
430
fp = fp->f_frame;
sys/cddl/dev/dtrace/i386/dtrace_isa.c
432
if (roundup2(fp->f_retaddr, 4) ==
sys/cddl/dev/dtrace/i386/dtrace_isa.c
442
frame = (struct trapframe *)(((uintptr_t **)&fp[1])[0]);
sys/cddl/dev/dtrace/i386/dtrace_isa.c
463
stack = (uintptr_t *)fp + 2;
sys/cddl/dev/dtrace/powerpc/dtrace_isa.c
426
uintptr_t *fp = (uintptr_t *)__builtin_frame_address(0);
sys/cddl/dev/dtrace/powerpc/dtrace_isa.c
437
fp = (uintptr_t *)*fp;
sys/cddl/dev/dtrace/powerpc/dtrace_isa.c
444
if ((long)(fp[2]) + 4 == (long)trapexit) {
sys/cddl/dev/dtrace/powerpc/dtrace_isa.c
446
if ((long)(fp[1]) == (long)trapexit) {
sys/cddl/dev/dtrace/powerpc/dtrace_isa.c
459
struct reg *rp = (struct reg *)((uintptr_t)fp[0] + 48);
sys/cddl/dev/dtrace/powerpc/dtrace_isa.c
461
struct reg *rp = (struct reg *)((uintptr_t)fp[0] + 8);
sys/cddl/dev/dtrace/powerpc/dtrace_isa.c
496
stack = fp + 2;
sys/cddl/dev/dtrace/riscv/dtrace_isa.c
101
(vm_offset_t)state.fp, sizeof(uintptr_t)))
sys/cddl/dev/dtrace/riscv/dtrace_isa.c
127
uintptr_t fp)
sys/cddl/dev/dtrace/riscv/dtrace_isa.c
133
oldfp = fp;
sys/cddl/dev/dtrace/riscv/dtrace_isa.c
146
cpu_core[curcpu].cpuc_dtrace_illval = fp;
sys/cddl/dev/dtrace/riscv/dtrace_isa.c
157
if (fp == 0)
sys/cddl/dev/dtrace/riscv/dtrace_isa.c
160
pc = dtrace_fuword64((void *)(fp - 1 * sizeof(uint64_t)));
sys/cddl/dev/dtrace/riscv/dtrace_isa.c
161
fp = dtrace_fuword64((void *)(fp - 2 * sizeof(uint64_t)));
sys/cddl/dev/dtrace/riscv/dtrace_isa.c
163
if (fp == oldfp) {
sys/cddl/dev/dtrace/riscv/dtrace_isa.c
165
cpu_core[curcpu].cpuc_dtrace_illval = fp;
sys/cddl/dev/dtrace/riscv/dtrace_isa.c
168
oldfp = fp;
sys/cddl/dev/dtrace/riscv/dtrace_isa.c
179
uintptr_t pc, fp;
sys/cddl/dev/dtrace/riscv/dtrace_isa.c
205
fp = tf->tf_s[0];
sys/cddl/dev/dtrace/riscv/dtrace_isa.c
224
n = dtrace_getustack_common(pcstack, pcstack_limit, pc, fp);
sys/cddl/dev/dtrace/riscv/dtrace_isa.c
240
uintptr_t pc, fp;
sys/cddl/dev/dtrace/riscv/dtrace_isa.c
250
fp = tf->tf_s[0];
sys/cddl/dev/dtrace/riscv/dtrace_isa.c
265
n += dtrace_getustack_common(NULL, 0, pc, fp);
sys/cddl/dev/dtrace/riscv/dtrace_isa.c
301
state.fp = (uintptr_t)__builtin_frame_address(0);
sys/cddl/dev/dtrace/riscv/dtrace_isa.c
307
if (!INKERNEL(state.pc) || !INKERNEL(state.fp))
sys/cddl/dev/dtrace/riscv/dtrace_isa.c
92
state.fp = (uintptr_t)__builtin_frame_address(0);
sys/compat/freebsd32/freebsd32_ioctl.c
105
error = fo_ioctl(fp, PCIOCBARMMAP, (caddr_t)&pbm, td->td_ucred, td);
sys/compat/freebsd32/freebsd32_ioctl.c
124
struct freebsd32_ioctl_args *uap, struct file *fp)
sys/compat/freebsd32/freebsd32_ioctl.c
156
if ((error = fo_ioctl(fp, SG_IO, (caddr_t)&io, td->td_ucred, td)) != 0)
sys/compat/freebsd32/freebsd32_ioctl.c
195
struct file *fp;
sys/compat/freebsd32/freebsd32_ioctl.c
199
error = fget(td, uap->fd, cap_rights_init_one(&rights, CAP_IOCTL), &fp);
sys/compat/freebsd32/freebsd32_ioctl.c
202
if ((fp->f_flag & (FREAD | FWRITE)) == 0) {
sys/compat/freebsd32/freebsd32_ioctl.c
203
fdrop(fp, td);
sys/compat/freebsd32/freebsd32_ioctl.c
210
error = freebsd32_ioctl_memrange(td, uap, fp);
sys/compat/freebsd32/freebsd32_ioctl.c
214
error = freebsd32_ioctl_sg(td, uap, fp);
sys/compat/freebsd32/freebsd32_ioctl.c
218
error = freebsd32_ioctl_barmmap(td, uap, fp);
sys/compat/freebsd32/freebsd32_ioctl.c
222
fdrop(fp, td);
sys/compat/freebsd32/freebsd32_ioctl.c
229
fdrop(fp, td);
sys/compat/freebsd32/freebsd32_ioctl.c
59
struct freebsd32_ioctl_args *uap, struct file *fp)
sys/compat/freebsd32/freebsd32_ioctl.c
75
if ((error = fo_ioctl(fp, com, (caddr_t)&mro, td->td_ucred, td)) != 0)
sys/compat/freebsd32/freebsd32_ioctl.c
90
struct freebsd32_ioctl_args *uap, struct file *fp)
sys/compat/freebsd32/freebsd32_misc.c
2176
struct file *fp;
sys/compat/freebsd32/freebsd32_misc.c
2229
cap_rights_init_one(&rights, CAP_PREAD), &fp)) != 0)
sys/compat/freebsd32/freebsd32_misc.c
2232
error = fo_sendfile(fp, uap->s, hdr_uio, trl_uio, offset,
sys/compat/freebsd32/freebsd32_misc.c
2234
fdrop(fp, td);
sys/compat/linux/linux.c
539
struct file *fp;
sys/compat/linux/linux.c
570
error = fget_unlocked(td, fd, &cap_no_rights, &fp);
sys/compat/linux/linux.c
576
if (fp->f_type == DTYPE_SOCKET)
sys/compat/linux/linux.c
578
fdrop(fp, td);
sys/compat/linux/linux_event.c
285
struct file *epfp, *fp;
sys/compat/linux/linux_event.c
313
cap_rights_init_one(&rights, CAP_POLL_EVENT), &fp);
sys/compat/linux/linux_event.c
318
if (epfp == fp) {
sys/compat/linux/linux_event.c
358
fdrop(fp, td);
sys/compat/linux/linux_file.c
1367
struct file *fp;
sys/compat/linux/linux_file.c
1470
&cap_fcntl_rights, &fp);
sys/compat/linux/linux_file.c
1473
if (fp->f_type == DTYPE_PIPE) {
sys/compat/linux/linux_file.c
1474
fdrop(fp, td);
sys/compat/linux/linux_file.c
1477
fdrop(fp, td);
sys/compat/linux/linux_file.c
1501
&cap_fcntl_rights, &fp);
sys/compat/linux/linux_file.c
1504
if (fp->f_type != DTYPE_PIPE) {
sys/compat/linux/linux_file.c
1505
fdrop(fp, td);
sys/compat/linux/linux_file.c
1508
fpipe = fp->f_data;
sys/compat/linux/linux_file.c
1510
fdrop(fp, td);
sys/compat/linux/linux_file.c
162
struct file *fp;
sys/compat/linux/linux_file.c
184
if (fget(td, fd, &cap_ioctl_rights, &fp) == 0) {
sys/compat/linux/linux_file.c
185
if (fp->f_type != DTYPE_VNODE) {
sys/compat/linux/linux_file.c
186
fdrop(fp, td);
sys/compat/linux/linux_file.c
1902
struct file *fp;
sys/compat/linux/linux_file.c
1906
if (fget(td, fd, &cap_no_rights, &fp) != 0)
sys/compat/linux/linux_file.c
1908
if (fp->f_type == DTYPE_SOCKET && (fp->f_flag & FNONBLOCK) != 0)
sys/compat/linux/linux_file.c
1910
fdrop(fp, td);
sys/compat/linux/linux_file.c
195
(void) fo_ioctl(fp, TIOCSCTTY, (caddr_t) 0,
sys/compat/linux/linux_file.c
201
fdrop(fp, td);
sys/compat/linux/linux_file.c
359
struct file *fp;
sys/compat/linux/linux_file.c
363
error = getvnode(td, fd, &cap_read_rights, &fp);
sys/compat/linux/linux_file.c
366
vp = fp->f_vnode;
sys/compat/linux/linux_file.c
368
fdrop(fp, td);
sys/compat/linux/linux_file.c
371
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
1038
error = fo_ioctl(fp, TIOCGETA, (caddr_t)&bios, td->td_ucred,
sys/compat/linux/linux_ioctl.c
1051
error = (fo_ioctl(fp, TIOCSETA, (caddr_t)&bios, td->td_ucred,
sys/compat/linux/linux_ioctl.c
1060
error = (fo_ioctl(fp, TIOCSETAW, (caddr_t)&bios, td->td_ucred,
sys/compat/linux/linux_ioctl.c
1069
error = (fo_ioctl(fp, TIOCSETAF, (caddr_t)&bios, td->td_ucred,
sys/compat/linux/linux_ioctl.c
1076
error = fo_ioctl(fp, TIOCGPTN, (caddr_t)&nb, td->td_ucred, td);
sys/compat/linux/linux_ioctl.c
1099
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
1495
struct file *fp;
sys/compat/linux/linux_ioctl.c
1498
error = fget(td, args->fd, &cap_ioctl_rights, &fp);
sys/compat/linux/linux_ioctl.c
1525
error = fo_ioctl(fp, CDIOREADTOCHEADER, (caddr_t)&th,
sys/compat/linux/linux_ioctl.c
1544
error = fo_ioctl(fp, CDIOREADTOCENTRY, (caddr_t)&irtse,
sys/compat/linux/linux_ioctl.c
1593
error = fo_ioctl(fp, CDIOCREADSUBCHANNEL, (caddr_t)&bsdsc,
sys/compat/linux/linux_ioctl.c
166
struct file *fp;
sys/compat/linux/linux_ioctl.c
1660
error = fo_ioctl(fp, DVDIOCREADSTRUCTURE, (caddr_t)bds,
sys/compat/linux/linux_ioctl.c
1687
error = fo_ioctl(fp, bcode, (caddr_t)&bda, td->td_ucred,
sys/compat/linux/linux_ioctl.c
1708
error = fo_ioctl(fp, SG_GET_SCSI_ID, (caddr_t)&id,
sys/compat/linux/linux_ioctl.c
171
error = fget(td, args->fd, &cap_ioctl_rights, &fp);
sys/compat/linux/linux_ioctl.c
1721
error = fo_ioctl(fp, SG_GET_SCSI_ID, (caddr_t)&id,
sys/compat/linux/linux_ioctl.c
1741
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
177
error = fo_ioctl(fp, DIOCGMEDIASIZE,
sys/compat/linux/linux_ioctl.c
180
error = fo_ioctl(fp, DIOCGSECTORSIZE,
sys/compat/linux/linux_ioctl.c
183
error = fo_ioctl(fp, DIOCGFWHEADS,
sys/compat/linux/linux_ioctl.c
186
error = fo_ioctl(fp, DIOCGFWSECTORS,
sys/compat/linux/linux_ioctl.c
194
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
2044
struct file *fp;
sys/compat/linux/linux_ioctl.c
2047
error = fget(td, args->fd, &cap_ioctl_rights, &fp);
sys/compat/linux/linux_ioctl.c
2099
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
2102
error = (fo_ioctl(fp, KDSKBMODE, (caddr_t)&kbdmode,
sys/compat/linux/linux_ioctl.c
2163
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
237
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
244
struct file *fp;
sys/compat/linux/linux_ioctl.c
2451
struct file *fp;
sys/compat/linux/linux_ioctl.c
2454
error = fget(td, args->fd, &cap_ioctl_rights, &fp);
sys/compat/linux/linux_ioctl.c
2457
type = fp->f_type;
sys/compat/linux/linux_ioctl.c
2458
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
250
error = fget(td, args->fd, &cap_ioctl_rights, &fp);
sys/compat/linux/linux_ioctl.c
2544
struct file *fp;
sys/compat/linux/linux_ioctl.c
2547
error = fget(td, args->fd, &cap_ioctl_rights, &fp);
sys/compat/linux/linux_ioctl.c
255
error = fo_ioctl(fp, DIOCGSECTORSIZE,
sys/compat/linux/linux_ioctl.c
2550
type = fp->f_type;
sys/compat/linux/linux_ioctl.c
2551
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
2573
struct file *fp;
sys/compat/linux/linux_ioctl.c
2576
error = fget(td, args->fd, &cap_ioctl_rights, &fp);
sys/compat/linux/linux_ioctl.c
258
error = fo_ioctl(fp, DIOCGMEDIASIZE,
sys/compat/linux/linux_ioctl.c
260
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
2608
if ((error = fo_ioctl(fp, SG_IO, (caddr_t)&io, td->td_ucred, td)) != 0)
sys/compat/linux/linux_ioctl.c
2637
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
271
error = fo_ioctl(fp, DIOCGMEDIASIZE,
sys/compat/linux/linux_ioctl.c
273
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
280
error = fo_ioctl(fp, DIOCGSECTORSIZE,
sys/compat/linux/linux_ioctl.c
282
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
2886
struct file *fp;
sys/compat/linux/linux_ioctl.c
289
error = fo_ioctl(fp, DIOCGSTRIPESIZE,
sys/compat/linux/linux_ioctl.c
2904
&cap_ioctl_rights, &fp);
sys/compat/linux/linux_ioctl.c
2909
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
2913
error = fo_ioctl(fp, VIDIOCGTUNER, &vtun, td->td_ucred, td);
sys/compat/linux/linux_ioctl.c
2919
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
292
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
2924
&cap_ioctl_rights, &fp);
sys/compat/linux/linux_ioctl.c
2929
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
2933
error = fo_ioctl(fp, VIDIOCSTUNER, &vtun, td->td_ucred, td);
sys/compat/linux/linux_ioctl.c
2934
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
2943
&cap_ioctl_rights, &fp);
sys/compat/linux/linux_ioctl.c
2946
error = fo_ioctl(fp, VIDIOCGWIN, &vwin, td->td_ucred, td);
sys/compat/linux/linux_ioctl.c
2952
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
2957
&cap_ioctl_rights, &fp);
sys/compat/linux/linux_ioctl.c
2962
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
2969
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
2973
error = fo_ioctl(fp, VIDIOCSWIN, &vwin, td->td_ucred, td);
sys/compat/linux/linux_ioctl.c
2974
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
298
error = fo_ioctl(fp, DIOCGSECTORSIZE,
sys/compat/linux/linux_ioctl.c
2982
&cap_ioctl_rights, &fp);
sys/compat/linux/linux_ioctl.c
2985
error = fo_ioctl(fp, VIDIOCGFBUF, &vbuf, td->td_ucred, td);
sys/compat/linux/linux_ioctl.c
2991
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
2996
&cap_ioctl_rights, &fp);
sys/compat/linux/linux_ioctl.c
3001
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
3005
error = fo_ioctl(fp, VIDIOCSFBUF, &vbuf, td->td_ucred, td);
sys/compat/linux/linux_ioctl.c
3006
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
301
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
3026
&cap_ioctl_rights, &fp);
sys/compat/linux/linux_ioctl.c
3031
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
3035
error = fo_ioctl(fp, VIDIOCSMICROCODE, &vcode, td->td_ucred, td);
sys/compat/linux/linux_ioctl.c
3036
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
306
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
310
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
3190
struct file *fp;
sys/compat/linux/linux_ioctl.c
3282
&cap_ioctl_rights, &fp);
sys/compat/linux/linux_ioctl.c
3288
error = fo_ioctl(fp, VIDIOC_G_FMT, &vformat,
sys/compat/linux/linux_ioctl.c
3291
error = fo_ioctl(fp, VIDIOC_S_FMT, &vformat,
sys/compat/linux/linux_ioctl.c
3294
error = fo_ioctl(fp, VIDIOC_TRY_FMT, &vformat,
sys/compat/linux/linux_ioctl.c
3300
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
3309
&cap_ioctl_rights, &fp);
sys/compat/linux/linux_ioctl.c
3312
error = fo_ioctl(fp, VIDIOC_ENUMSTD, (caddr_t)&vstd,
sys/compat/linux/linux_ioctl.c
3315
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
3320
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
3333
&cap_ioctl_rights, &fp);
sys/compat/linux/linux_ioctl.c
3336
error = fo_ioctl(fp, VIDIOC_ENUMINPUT, (caddr_t)&vinp,
sys/compat/linux/linux_ioctl.c
3339
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
3344
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
3354
&cap_ioctl_rights, &fp);
sys/compat/linux/linux_ioctl.c
3359
error = fo_ioctl(fp, VIDIOC_QUERYBUF, &vbuf,
sys/compat/linux/linux_ioctl.c
3362
error = fo_ioctl(fp, VIDIOC_QBUF, &vbuf,
sys/compat/linux/linux_ioctl.c
3365
error = fo_ioctl(fp, VIDIOC_DQBUF, &vbuf,
sys/compat/linux/linux_ioctl.c
3371
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
3534
struct file *fp;
sys/compat/linux/linux_ioctl.c
3561
&cap_ioctl_rights, &fp);
sys/compat/linux/linux_ioctl.c
3565
error = fo_ioctl(fp, EVIOCSCLOCKID, &clock, td->td_ucred, td);
sys/compat/linux/linux_ioctl.c
3566
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
3698
struct file *fp;
sys/compat/linux/linux_ioctl.c
3702
error = fget(td, args->fd, &cap_ioctl_rights, &fp);
sys/compat/linux/linux_ioctl.c
3705
if ((fp->f_flag & (FREAD|FWRITE)) == 0) {
sys/compat/linux/linux_ioctl.c
3706
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
3721
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
3733
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
3740
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
700
struct file *fp;
sys/compat/linux/linux_ioctl.c
703
error = fget(td, args->fd, &cap_ioctl_rights, &fp);
sys/compat/linux/linux_ioctl.c
709
error = fo_ioctl(fp, TIOCGETA, (caddr_t)&bios, td->td_ucred,
sys/compat/linux/linux_ioctl.c
722
error = (fo_ioctl(fp, TIOCSETA, (caddr_t)&bios, td->td_ucred,
sys/compat/linux/linux_ioctl.c
731
error = (fo_ioctl(fp, TIOCSETAW, (caddr_t)&bios, td->td_ucred,
sys/compat/linux/linux_ioctl.c
740
error = (fo_ioctl(fp, TIOCSETAF, (caddr_t)&bios, td->td_ucred,
sys/compat/linux/linux_ioctl.c
745
error = fo_ioctl(fp, TIOCGETA, (caddr_t)&bios, td->td_ucred,
sys/compat/linux/linux_ioctl.c
758
error = (fo_ioctl(fp, TIOCSETA, (caddr_t)&bios, td->td_ucred,
sys/compat/linux/linux_ioctl.c
767
error = (fo_ioctl(fp, TIOCSETAW, (caddr_t)&bios, td->td_ucred,
sys/compat/linux/linux_ioctl.c
776
error = (fo_ioctl(fp, TIOCSETAF, (caddr_t)&bios, td->td_ucred,
sys/compat/linux/linux_ioctl.c
782
error = (fo_ioctl(fp, TIOCDRAIN, (caddr_t)&bios, td->td_ucred,
sys/compat/linux/linux_ioctl.c
802
error = fo_ioctl(fp, TIOCGETA, (caddr_t)&bios,
sys/compat/linux/linux_ioctl.c
806
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
818
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
839
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
842
error = (fo_ioctl(fp,TIOCFLUSH,(caddr_t)&val,td->td_ucred,td));
sys/compat/linux/linux_ioctl.c
970
fdrop(fp, td);
sys/compat/linux/linux_ioctl.c
973
error = (fo_ioctl(fp, TIOCSETD, (caddr_t)&line, td->td_ucred,
sys/compat/linux/linux_ioctl.c
981
error = fo_ioctl(fp, TIOCGETD, (caddr_t)&bsd_line,
sys/compat/linux/linux_ioctl.c
996
fdrop(fp, td);
sys/compat/linux/linux_mmap.c
63
linux_mmap_check_fp(struct file *fp, int flags, int prot, int maxprot)
sys/compat/linux/linux_mmap.c
67
if ((fp->f_flag & FREAD) == 0)
sys/compat/linux/linux_socket.c
1004
struct file *fp;
sys/compat/linux/linux_socket.c
1022
error = getsock(td, args->s, &cap_connect_rights, &fp);
sys/compat/linux/linux_socket.c
1027
so = fp->f_data;
sys/compat/linux/linux_socket.c
1028
if (atomic_load_int(&fp->f_flag) & FNONBLOCK) {
sys/compat/linux/linux_socket.c
1035
fdrop(fp, td);
sys/compat/linux/linux_socket.c
1052
struct file *fp, *fp1;
sys/compat/linux/linux_socket.c
1058
fp = NULL;
sys/compat/linux/linux_socket.c
1073
error = kern_accept4(td, s, (struct sockaddr *)&ss, bflags, &fp);
sys/compat/linux/linux_socket.c
1112
fdclose(td, fp, td->td_retval[0]);
sys/compat/linux/linux_socket.c
1116
if (fp != NULL)
sys/compat/linux/linux_socket.c
1117
fdrop(fp, td);
sys/compat/linux/linux_socket.c
1241
struct file *fp;
sys/compat/linux/linux_socket.c
1256
error = getsock(td, args->s, &cap_send_rights, &fp);
sys/compat/linux/linux_socket.c
1258
if (atomic_load_int(&fp->f_flag) & FNONBLOCK)
sys/compat/linux/linux_socket.c
1260
fdrop(fp, td);
sys/compat/linux/linux_socket.c
1301
struct file *fp;
sys/compat/linux/linux_socket.c
1309
error = getsock(td, args->s, &cap_send_connect_rights, &fp);
sys/compat/linux/linux_socket.c
1312
so = fp->f_data;
sys/compat/linux/linux_socket.c
1321
fdrop(fp, td);
sys/compat/linux/linux_socket.c
1395
struct file *fp;
sys/compat/linux/linux_socket.c
1441
error = getsock(td, s, &cap_send_rights, &fp);
sys/compat/linux/linux_socket.c
1444
so = fp->f_data;
sys/compat/linux/linux_socket.c
1447
fdrop(fp, td);
sys/compat/linux/linux_socket.c
1966
struct file *fp;
sys/compat/linux/linux_socket.c
1969
error = getsock(td, args->s, &cap_recv_rights, &fp);
sys/compat/linux/linux_socket.c
1972
fdrop(fp, td);
sys/compat/linux/linux_socket.c
1983
struct file *fp;
sys/compat/linux/linux_socket.c
1987
error = getsock(td, s, &cap_recv_rights, &fp);
sys/compat/linux/linux_socket.c
2025
fdrop(fp, td);
sys/compat/linux/linux_socket.c
2489
is_sendfile(struct file *fp, struct file *ofp)
sys/compat/linux/linux_socket.c
2497
if ((fp->f_type != DTYPE_SHM && fp->f_type != DTYPE_VNODE) ||
sys/compat/linux/linux_socket.c
2498
(fp->f_type == DTYPE_VNODE &&
sys/compat/linux/linux_socket.c
2499
(fp->f_vnode == NULL || fp->f_vnode->v_type != VREG)))
sys/compat/linux/linux_socket.c
2519
is_regular_file(struct file *fp)
sys/compat/linux/linux_socket.c
2522
return (fp->f_type == DTYPE_VNODE && fp->f_vnode != NULL &&
sys/compat/linux/linux_socket.c
2523
fp->f_vnode->v_type == VREG);
sys/compat/linux/linux_socket.c
2527
sendfile_fallback(struct thread *td, struct file *fp, l_int out,
sys/compat/linux/linux_socket.c
2541
if ((error = fo_seek(fp, 0, SEEK_CUR, td)) != 0)
sys/compat/linux/linux_socket.c
2545
if ((fp->f_ops->fo_flags & DFLAG_SEEKABLE) == 0)
sys/compat/linux/linux_socket.c
2575
error = fo_read(fp, &auio, fp->f_cred, flags, td);
sys/compat/linux/linux_socket.c
2604
error = fo_seek(fp, current_offset, SEEK_SET, td);
sys/compat/linux/linux_socket.c
2615
sendfile_sendfile(struct thread *td, struct file *fp, l_int out,
sys/compat/linux/linux_socket.c
2622
if ((fp->f_ops->fo_flags & DFLAG_SEEKABLE) == 0)
sys/compat/linux/linux_socket.c
2624
if ((error = fo_seek(fp, 0, SEEK_CUR, td)) != 0)
sys/compat/linux/linux_socket.c
2629
error = fo_sendfile(fp, out, NULL, NULL, current_offset, count,
sys/compat/linux/linux_socket.c
2643
error = fo_seek(fp, current_offset, SEEK_SET, td);
sys/compat/linux/linux_socket.c
2652
struct file *fp, *ofp;
sys/compat/linux/linux_socket.c
2661
error = fget_read(td, in, &cap_pread_rights, &fp);
sys/compat/linux/linux_socket.c
2664
if ((fp->f_type != DTYPE_SHM && fp->f_type != DTYPE_VNODE) ||
sys/compat/linux/linux_socket.c
2665
(fp->f_type == DTYPE_VNODE &&
sys/compat/linux/linux_socket.c
2666
(fp->f_vnode == NULL || fp->f_vnode->v_type != VREG))) {
sys/compat/linux/linux_socket.c
2674
if (is_regular_file(fp) && is_regular_file(ofp)) {
sys/compat/linux/linux_socket.c
2679
if (is_sendfile(fp, ofp))
sys/compat/linux/linux_socket.c
2680
error = sendfile_sendfile(td, fp, out, offset, count,
sys/compat/linux/linux_socket.c
2683
error = sendfile_fallback(td, fp, out, offset, count,
sys/compat/linux/linux_socket.c
2693
fdrop(fp, td);
sys/compat/linux/linux_stats.c
66
struct file *fp;
sys/compat/linux/linux_stats.c
71
error = fget(td, fd, &cap_fstat_rights, &fp);
sys/compat/linux/linux_stats.c
75
AUDIT_ARG_FILE(td->td_proc, fp);
sys/compat/linux/linux_stats.c
77
error = fo_stat(fp, sbp, td->td_ucred);
sys/compat/linux/linux_stats.c
78
if (error == 0 && (vp = fp->f_vnode) != NULL)
sys/compat/linux/linux_stats.c
80
fdrop(fp, td);
sys/compat/linuxkpi/common/src/linux_compat.c
1265
linux_file_mmap_single(struct file *fp, const struct file_operations *fop,
sys/compat/linuxkpi/common/src/linux_compat.c
1276
filp = (struct linux_file *)fp->f_data;
sys/compat/linuxkpi/common/src/linux_compat.c
1277
filp->f_flags = fp->f_flag;
sys/compat/linuxkpi/common/src/linux_compat.c
1311
error = -OPW(fp, td, fop->mmap(filp, vmap));
sys/compat/linuxkpi/common/src/linux_compat.c
1576
linux_file_ioctl(struct file *fp, u_long cmd, void *data, struct ucred *cred,
sys/compat/linuxkpi/common/src/linux_compat.c
1587
filp = (struct linux_file *)fp->f_data;
sys/compat/linuxkpi/common/src/linux_compat.c
1588
filp->f_flags = fp->f_flag;
sys/compat/linuxkpi/common/src/linux_compat.c
1598
error = -OPW(fp, td, fop->fasync(0, filp, fp->f_flag & FASYNC));
sys/compat/linuxkpi/common/src/linux_compat.c
1605
error = -OPW(fp, td, fop->fasync(0, filp,
sys/compat/linuxkpi/common/src/linux_compat.c
1606
fp->f_flag & FASYNC));
sys/compat/linuxkpi/common/src/linux_compat.c
1630
error = linux_file_ioctl_sub(fp, filp, fop, cmd, data, td);
sys/compat/linuxkpi/common/src/linux_compat.c
1639
vm_prot_t maxprot, int flags, struct file *fp,
sys/compat/linuxkpi/common/src/linux_compat.c
1652
return (linux_file_mmap_single(fp, fop, foff, objsize, objp,
sys/compat/linuxkpi/common/src/linux_compat.c
1657
linux_file_mmap(struct file *fp, vm_map_t map, vm_offset_t *addr, vm_size_t size,
sys/compat/linuxkpi/common/src/linux_compat.c
1670
filp = (struct linux_file *)fp->f_data;
sys/compat/linuxkpi/common/src/linux_compat.c
1687
if ((fp->f_flag & FREAD) != 0)
sys/compat/linuxkpi/common/src/linux_compat.c
1703
if ((fp->f_flag & FWRITE) != 0)
sys/compat/linuxkpi/common/src/linux_compat.c
1711
error = linux_file_mmap_sub(td, size, prot, maxprot, flags, fp,
sys/compat/linuxkpi/common/src/linux_compat.c
1726
linux_file_stat(struct file *fp, struct stat *sb, struct ucred *active_cred)
sys/compat/linuxkpi/common/src/linux_compat.c
1732
filp = (struct linux_file *)fp->f_data;
sys/compat/linuxkpi/common/src/linux_compat.c
1746
linux_file_fill_kinfo(struct file *fp, struct kinfo_file *kif,
sys/compat/linuxkpi/common/src/linux_compat.c
1753
filp = fp->f_data;
sys/compat/linuxkpi/common/src/linux_compat.c
732
#define OPW(fp,td,code) ({ \
sys/compat/linuxkpi/common/src/linux_compat.c
737
(td)->td_fpop = (fp); \
sys/compat/linuxkpi/common/src/linux_compat.c
917
linux_file_ioctl_sub(struct file *fp, struct linux_file *filp,
sys/compat/linuxkpi/common/src/linux_compat.c
945
error = -OPW(fp, td, fop->compat_ioctl(filp,
sys/compat/linuxkpi/common/src/linux_compat.c
953
error = -OPW(fp, td, fop->unlocked_ioctl(filp,
sys/compat/linuxkpi/common/src/linux_compat.c
960
error = -OPW(fp, td, fop->unlocked_ioctl(filp,
sys/compat/linuxkpi/common/src/linux_eventfd.c
39
struct file *fp;
sys/compat/linuxkpi/common/src/linux_eventfd.c
43
if (fget_unlocked(curthread, fd, &cap_no_rights, &fp) != 0)
sys/compat/linuxkpi/common/src/linux_eventfd.c
50
ctx = eventfd_get(fp);
sys/compat/linuxkpi/common/src/linux_eventfd.c
51
fdrop(fp, curthread);
sys/ddb/db_examine.c
72
char * fp;
sys/ddb/db_examine.c
75
fp = fmt;
sys/ddb/db_examine.c
77
while ((c = *fp++) != 0) {
sys/dev/aac/aac_linux.c
71
struct file *fp;
sys/dev/aac/aac_linux.c
76
&fp);
sys/dev/aac/aac_linux.c
84
error = (fo_ioctl(fp, cmd, (caddr_t)args->arg, td->td_ucred, td));
sys/dev/aac/aac_linux.c
85
fdrop(fp, td);
sys/dev/aacraid/aacraid_linux.c
72
struct file *fp;
sys/dev/aacraid/aacraid_linux.c
79
&fp)) != 0) {
sys/dev/aacraid/aacraid_linux.c
87
error = (fo_ioctl(fp, cmd, (caddr_t)args->arg, td->td_ucred, td));
sys/dev/aacraid/aacraid_linux.c
88
fdrop(fp, td);
sys/dev/bxe/bxe.c
10498
sc->fp[0].cl_id,
sys/dev/bxe/bxe.c
10499
sc->fp[0].index,
sys/dev/bxe/bxe.c
10524
sc->fp[0].cl_id,
sys/dev/bxe/bxe.c
10525
sc->fp[0].index,
sys/dev/bxe/bxe.c
11163
struct bxe_fastpath *fp,
sys/dev/bxe/bxe.c
11182
init_params->rx.fw_sb_id = init_params->tx.fw_sb_id = fp->fw_sb_id;
sys/dev/bxe/bxe.c
11192
fp->index, init_params->max_cos);
sys/dev/bxe/bxe.c
11198
cxt_index = fp->index / ILT_PAGE_CIDS;
sys/dev/bxe/bxe.c
11199
cxt_offset = fp->index - (cxt_index * ILT_PAGE_CIDS);
sys/dev/bxe/bxe.c
11207
struct bxe_fastpath *fp,
sys/dev/bxe/bxe.c
11241
struct bxe_fastpath *fp,
sys/dev/bxe/bxe.c
11263
return (flags | bxe_get_common_flags(sc, fp, TRUE));
sys/dev/bxe/bxe.c
11268
struct bxe_fastpath *fp,
sys/dev/bxe/bxe.c
11272
gen_init->stat_id = bxe_stats_id(fp);
sys/dev/bxe/bxe.c
11273
gen_init->spcl_id = fp->cl_id;
sys/dev/bxe/bxe.c
11280
struct bxe_fastpath *fp,
sys/dev/bxe/bxe.c
11334
rxq_init->dscr_map = fp->rx_dma.paddr;
sys/dev/bxe/bxe.c
11335
rxq_init->sge_map = fp->rx_sge_dma.paddr;
sys/dev/bxe/bxe.c
11336
rxq_init->rcq_map = fp->rcq_dma.paddr;
sys/dev/bxe/bxe.c
11337
rxq_init->rcq_np_map = (fp->rcq_dma.paddr + BCM_PAGE_SIZE);
sys/dev/bxe/bxe.c
11343
rxq_init->buf_sz = (fp->rx_buf_size -
sys/dev/bxe/bxe.c
11346
rxq_init->cl_qzone_id = fp->cl_qzone_id;
sys/dev/bxe/bxe.c
11361
rxq_init->fw_sb_id = fp->fw_sb_id;
sys/dev/bxe/bxe.c
11378
struct bxe_fastpath *fp,
sys/dev/bxe/bxe.c
11387
txq_init->dscr_map = fp->tx_dma.paddr;
sys/dev/bxe/bxe.c
11390
txq_init->fw_sb_id = fp->fw_sb_id;
sys/dev/bxe/bxe.c
11406
struct bxe_fastpath *fp,
sys/dev/bxe/bxe.c
11414
BLOGD(sc, DBG_LOAD, "setting up queue %d\n", fp->index);
sys/dev/bxe/bxe.c
11416
bxe_ack_sb(sc, fp->igu_sb_id, USTORM_ID, 0, IGU_INT_ENABLE, 0);
sys/dev/bxe/bxe.c
11418
q_params.q_obj = &BXE_SP_OBJ(sc, fp).q_obj;
sys/dev/bxe/bxe.c
11424
bxe_pf_q_prep_init(sc, fp, &q_params.params.init);
sys/dev/bxe/bxe.c
11432
BLOGE(sc, "Queue(%d) INIT failed rc = %d\n", fp->index, rc);
sys/dev/bxe/bxe.c
11442
setup_params->flags = bxe_get_q_flags(sc, fp, leading);
sys/dev/bxe/bxe.c
11445
bxe_pf_q_prep_general(sc, fp, &setup_params->gen_params,
sys/dev/bxe/bxe.c
11448
bxe_pf_rx_q_prep(sc, fp,
sys/dev/bxe/bxe.c
11452
bxe_pf_tx_q_prep(sc, fp,
sys/dev/bxe/bxe.c
11462
BLOGE(sc, "Queue(%d) SETUP failed (rc = %d)\n", fp->index, rc);
sys/dev/bxe/bxe.c
11472
return (bxe_setup_queue(sc, &sc->fp[0], TRUE));
sys/dev/bxe/bxe.c
11542
(sc->fp->cl_id + (i % num_eth_queues));
sys/dev/bxe/bxe.c
12263
if (bxe_watchdog(sc, &sc->fp[i]) != 0) {
sys/dev/bxe/bxe.c
12723
rc = bxe_setup_queue(sc, &sc->fp[i], FALSE);
sys/dev/bxe/bxe.c
14620
struct bxe_fastpath *fp;
sys/dev/bxe/bxe.c
14760
fp = &sc->fp[i];
sys/dev/bxe/bxe.c
14761
fp->sc = sc;
sys/dev/bxe/bxe.c
14762
fp->index = i;
sys/dev/bxe/bxe.c
14770
&fp->sb_dma, buf) != 0) {
sys/dev/bxe/bxe.c
14776
fp->status_block.e2_sb =
sys/dev/bxe/bxe.c
14777
(struct host_hc_status_block_e2 *)fp->sb_dma.vaddr;
sys/dev/bxe/bxe.c
14779
fp->status_block.e1x_sb =
sys/dev/bxe/bxe.c
14780
(struct host_hc_status_block_e1x *)fp->sb_dma.vaddr;
sys/dev/bxe/bxe.c
14790
&fp->tx_dma, buf) != 0) {
sys/dev/bxe/bxe.c
14795
fp->tx_chain = (union eth_tx_bd_types *)fp->tx_dma.vaddr;
sys/dev/bxe/bxe.c
14802
&fp->tx_chain[TX_BD_TOTAL_PER_PAGE * j - 1].next_bd;
sys/dev/bxe/bxe.c
14804
busaddr = (fp->tx_dma.paddr +
sys/dev/bxe/bxe.c
14816
&fp->rx_dma, buf) != 0) {
sys/dev/bxe/bxe.c
14821
fp->rx_chain = (struct eth_rx_bd *)fp->rx_dma.vaddr;
sys/dev/bxe/bxe.c
14828
&fp->rx_chain[RX_BD_TOTAL_PER_PAGE * j - 2];
sys/dev/bxe/bxe.c
14830
busaddr = (fp->rx_dma.paddr +
sys/dev/bxe/bxe.c
14842
&fp->rcq_dma, buf) != 0) {
sys/dev/bxe/bxe.c
14847
fp->rcq_chain = (union eth_rx_cqe *)fp->rcq_dma.vaddr;
sys/dev/bxe/bxe.c
14855
&fp->rcq_chain[RCQ_TOTAL_PER_PAGE * j - 1];
sys/dev/bxe/bxe.c
14857
busaddr = (fp->rcq_dma.paddr +
sys/dev/bxe/bxe.c
14869
&fp->rx_sge_dma, buf) != 0) {
sys/dev/bxe/bxe.c
14874
fp->rx_sge_chain = (struct eth_rx_sge *)fp->rx_sge_dma.vaddr;
sys/dev/bxe/bxe.c
14881
&fp->rx_sge_chain[RX_SGE_TOTAL_PER_PAGE * j - 2];
sys/dev/bxe/bxe.c
14883
busaddr = (fp->rx_sge_dma.paddr +
sys/dev/bxe/bxe.c
14918
&fp->tx_mbuf_tag); /* returned dma tag */
sys/dev/bxe/bxe.c
14928
if (bus_dmamap_create(fp->tx_mbuf_tag,
sys/dev/bxe/bxe.c
14930
&fp->tx_mbuf_chain[j].m_map)) {
sys/dev/bxe/bxe.c
14956
&fp->rx_mbuf_tag); /* returned dma tag */
sys/dev/bxe/bxe.c
14966
if (bus_dmamap_create(fp->rx_mbuf_tag,
sys/dev/bxe/bxe.c
14968
&fp->rx_mbuf_chain[j].m_map)) {
sys/dev/bxe/bxe.c
14977
if (bus_dmamap_create(fp->rx_mbuf_tag,
sys/dev/bxe/bxe.c
14979
&fp->rx_mbuf_spare_map)) {
sys/dev/bxe/bxe.c
15004
&fp->rx_sge_mbuf_tag); /* returned dma tag */
sys/dev/bxe/bxe.c
15014
if (bus_dmamap_create(fp->rx_sge_mbuf_tag,
sys/dev/bxe/bxe.c
15016
&fp->rx_sge_mbuf_chain[j].m_map)) {
sys/dev/bxe/bxe.c
15025
if (bus_dmamap_create(fp->rx_sge_mbuf_tag,
sys/dev/bxe/bxe.c
15027
&fp->rx_sge_mbuf_spare_map)) {
sys/dev/bxe/bxe.c
15042
if (bus_dmamap_create(fp->rx_mbuf_tag,
sys/dev/bxe/bxe.c
15044
&fp->rx_tpa_info[j].bd.m_map)) {
sys/dev/bxe/bxe.c
15053
if (bus_dmamap_create(fp->rx_mbuf_tag,
sys/dev/bxe/bxe.c
15055
&fp->rx_tpa_info_mbuf_spare_map)) {
sys/dev/bxe/bxe.c
15062
bxe_init_sge_ring_bit_mask(fp);
sys/dev/bxe/bxe.c
15071
struct bxe_fastpath *fp;
sys/dev/bxe/bxe.c
15080
fp = &sc->fp[i];
sys/dev/bxe/bxe.c
15086
bxe_dma_free(sc, &fp->sb_dma);
sys/dev/bxe/bxe.c
15087
memset(&fp->status_block, 0, sizeof(fp->status_block));
sys/dev/bxe/bxe.c
15093
bxe_dma_free(sc, &fp->tx_dma);
sys/dev/bxe/bxe.c
15094
fp->tx_chain = NULL;
sys/dev/bxe/bxe.c
15100
bxe_dma_free(sc, &fp->rx_dma);
sys/dev/bxe/bxe.c
15101
fp->rx_chain = NULL;
sys/dev/bxe/bxe.c
15107
bxe_dma_free(sc, &fp->rcq_dma);
sys/dev/bxe/bxe.c
15108
fp->rcq_chain = NULL;
sys/dev/bxe/bxe.c
15114
bxe_dma_free(sc, &fp->rx_sge_dma);
sys/dev/bxe/bxe.c
15115
fp->rx_sge_chain = NULL;
sys/dev/bxe/bxe.c
15121
if (fp->tx_mbuf_tag != NULL) {
sys/dev/bxe/bxe.c
15123
if (fp->tx_mbuf_chain[j].m_map != NULL) {
sys/dev/bxe/bxe.c
15124
bus_dmamap_unload(fp->tx_mbuf_tag,
sys/dev/bxe/bxe.c
15125
fp->tx_mbuf_chain[j].m_map);
sys/dev/bxe/bxe.c
15126
bus_dmamap_destroy(fp->tx_mbuf_tag,
sys/dev/bxe/bxe.c
15127
fp->tx_mbuf_chain[j].m_map);
sys/dev/bxe/bxe.c
15131
bus_dma_tag_destroy(fp->tx_mbuf_tag);
sys/dev/bxe/bxe.c
15132
fp->tx_mbuf_tag = NULL;
sys/dev/bxe/bxe.c
15139
if (fp->rx_mbuf_tag != NULL) {
sys/dev/bxe/bxe.c
15141
if (fp->rx_mbuf_chain[j].m_map != NULL) {
sys/dev/bxe/bxe.c
15142
bus_dmamap_unload(fp->rx_mbuf_tag,
sys/dev/bxe/bxe.c
15143
fp->rx_mbuf_chain[j].m_map);
sys/dev/bxe/bxe.c
15144
bus_dmamap_destroy(fp->rx_mbuf_tag,
sys/dev/bxe/bxe.c
15145
fp->rx_mbuf_chain[j].m_map);
sys/dev/bxe/bxe.c
15149
if (fp->rx_mbuf_spare_map != NULL) {
sys/dev/bxe/bxe.c
15150
bus_dmamap_unload(fp->rx_mbuf_tag, fp->rx_mbuf_spare_map);
sys/dev/bxe/bxe.c
15151
bus_dmamap_destroy(fp->rx_mbuf_tag, fp->rx_mbuf_spare_map);
sys/dev/bxe/bxe.c
15161
if (fp->rx_tpa_info[j].bd.m_map != NULL) {
sys/dev/bxe/bxe.c
15162
bus_dmamap_unload(fp->rx_mbuf_tag,
sys/dev/bxe/bxe.c
15163
fp->rx_tpa_info[j].bd.m_map);
sys/dev/bxe/bxe.c
15164
bus_dmamap_destroy(fp->rx_mbuf_tag,
sys/dev/bxe/bxe.c
15165
fp->rx_tpa_info[j].bd.m_map);
sys/dev/bxe/bxe.c
15169
if (fp->rx_tpa_info_mbuf_spare_map != NULL) {
sys/dev/bxe/bxe.c
15170
bus_dmamap_unload(fp->rx_mbuf_tag,
sys/dev/bxe/bxe.c
15171
fp->rx_tpa_info_mbuf_spare_map);
sys/dev/bxe/bxe.c
15172
bus_dmamap_destroy(fp->rx_mbuf_tag,
sys/dev/bxe/bxe.c
15173
fp->rx_tpa_info_mbuf_spare_map);
sys/dev/bxe/bxe.c
15176
bus_dma_tag_destroy(fp->rx_mbuf_tag);
sys/dev/bxe/bxe.c
15177
fp->rx_mbuf_tag = NULL;
sys/dev/bxe/bxe.c
15184
if (fp->rx_sge_mbuf_tag != NULL) {
sys/dev/bxe/bxe.c
15186
if (fp->rx_sge_mbuf_chain[j].m_map != NULL) {
sys/dev/bxe/bxe.c
15187
bus_dmamap_unload(fp->rx_sge_mbuf_tag,
sys/dev/bxe/bxe.c
15188
fp->rx_sge_mbuf_chain[j].m_map);
sys/dev/bxe/bxe.c
15189
bus_dmamap_destroy(fp->rx_sge_mbuf_tag,
sys/dev/bxe/bxe.c
15190
fp->rx_sge_mbuf_chain[j].m_map);
sys/dev/bxe/bxe.c
15194
if (fp->rx_sge_mbuf_spare_map != NULL) {
sys/dev/bxe/bxe.c
15195
bus_dmamap_unload(fp->rx_sge_mbuf_tag,
sys/dev/bxe/bxe.c
15196
fp->rx_sge_mbuf_spare_map);
sys/dev/bxe/bxe.c
15197
bus_dmamap_destroy(fp->rx_sge_mbuf_tag,
sys/dev/bxe/bxe.c
15198
fp->rx_sge_mbuf_spare_map);
sys/dev/bxe/bxe.c
15201
bus_dma_tag_destroy(fp->rx_sge_mbuf_tag);
sys/dev/bxe/bxe.c
15202
fp->rx_sge_mbuf_tag = NULL;
sys/dev/bxe/bxe.c
15875
eth_stats = (uint32_t *)&sc->fp[fp_index].eth_q_stats;
sys/dev/bxe/bxe.c
16102
struct bxe_fastpath *fp;
sys/dev/bxe/bxe.c
16106
fp = &sc->fp[i];
sys/dev/bxe/bxe.c
16108
fp->tx_br = buf_ring_alloc(BXE_BR_SIZE, M_DEVBUF,
sys/dev/bxe/bxe.c
16109
M_NOWAIT, &fp->tx_mtx);
sys/dev/bxe/bxe.c
16110
if (fp->tx_br == NULL)
sys/dev/bxe/bxe.c
16121
struct bxe_fastpath *fp;
sys/dev/bxe/bxe.c
16125
fp = &sc->fp[i];
sys/dev/bxe/bxe.c
16127
if (fp->tx_br) {
sys/dev/bxe/bxe.c
16128
buf_ring_free(fp->tx_br, M_DEVBUF);
sys/dev/bxe/bxe.c
16129
fp->tx_br = NULL;
sys/dev/bxe/bxe.c
16138
struct bxe_fastpath *fp;
sys/dev/bxe/bxe.c
16142
fp = &sc->fp[i];
sys/dev/bxe/bxe.c
16144
snprintf(fp->tx_mtx_name, sizeof(fp->tx_mtx_name),
sys/dev/bxe/bxe.c
16146
mtx_init(&fp->tx_mtx, fp->tx_mtx_name, NULL, MTX_DEF);
sys/dev/bxe/bxe.c
16148
snprintf(fp->rx_mtx_name, sizeof(fp->rx_mtx_name),
sys/dev/bxe/bxe.c
16150
mtx_init(&fp->rx_mtx, fp->rx_mtx_name, NULL, MTX_DEF);
sys/dev/bxe/bxe.c
16158
struct bxe_fastpath *fp;
sys/dev/bxe/bxe.c
16162
fp = &sc->fp[i];
sys/dev/bxe/bxe.c
16164
if (mtx_initialized(&fp->tx_mtx)) {
sys/dev/bxe/bxe.c
16165
mtx_destroy(&fp->tx_mtx);
sys/dev/bxe/bxe.c
16168
if (mtx_initialized(&fp->rx_mtx)) {
sys/dev/bxe/bxe.c
16169
mtx_destroy(&fp->rx_mtx);
sys/dev/bxe/bxe.c
18452
struct bxe_fastpath *fp;
sys/dev/bxe/bxe.c
18465
fp = &sc->fp[i];
sys/dev/bxe/bxe.c
18467
CSTORM_STATUS_BLOCK_DATA_STATE_OFFSET(fp->fw_sb_id),
sys/dev/bxe/bxe.c
18897
struct bxe_fastpath *fp;
sys/dev/bxe/bxe.c
19022
fp = &sc->fp[i];
sys/dev/bxe/bxe.c
19023
if(fp->sb_dma.vaddr != NULL && fp->tx_dma.vaddr != NULL &&
sys/dev/bxe/bxe.c
19024
fp->rx_dma.vaddr != NULL && fp->rcq_dma.vaddr != NULL &&
sys/dev/bxe/bxe.c
19025
fp->rx_sge_dma.vaddr != NULL) {
sys/dev/bxe/bxe.c
19028
(uintmax_t)fp->sb_dma.paddr, fp->sb_dma.vaddr,
sys/dev/bxe/bxe.c
19031
(uintmax_t)fp->tx_dma.paddr, fp->tx_dma.vaddr,
sys/dev/bxe/bxe.c
19034
(uintmax_t)fp->rx_dma.paddr, fp->rx_dma.vaddr,
sys/dev/bxe/bxe.c
19037
(uintmax_t)fp->rcq_dma.paddr, fp->rcq_dma.vaddr,
sys/dev/bxe/bxe.c
19040
(uintmax_t)fp->rx_sge_dma.paddr, fp->rx_sge_dma.vaddr,
sys/dev/bxe/bxe.c
19411
*clsize = sc->fp[0].mbuf_alloc_size;
sys/dev/bxe/bxe.c
19431
error = bxe_tx_encap(&sc->fp[0], &m);
sys/dev/bxe/bxe.c
19449
(void)bxe_rxeof(sc, &sc->fp[i]);
sys/dev/bxe/bxe.c
19450
(void)bxe_txeof(sc, &sc->fp[0]);
sys/dev/bxe/bxe.c
2624
struct bxe_fastpath *fp)
sys/dev/bxe/bxe.c
2630
prod = fp->tx_bd_prod;
sys/dev/bxe/bxe.c
2631
cons = fp->tx_bd_cons;
sys/dev/bxe/bxe.c
2639
bxe_tx_queue_has_work(struct bxe_fastpath *fp)
sys/dev/bxe/bxe.c
2644
hw_cons = le16toh(*fp->tx_cons_sb);
sys/dev/bxe/bxe.c
2645
return (hw_cons != fp->tx_pkt_cons);
sys/dev/bxe/bxe.c
2649
bxe_has_tx_work(struct bxe_fastpath *fp)
sys/dev/bxe/bxe.c
2652
return (bxe_tx_queue_has_work(fp)) ? TRUE : FALSE;
sys/dev/bxe/bxe.c
2656
bxe_has_rx_work(struct bxe_fastpath *fp)
sys/dev/bxe/bxe.c
2661
rx_cq_cons_sb = le16toh(*fp->rx_cq_cons_sb);
sys/dev/bxe/bxe.c
2664
return (fp->rx_cq_cons != rx_cq_cons_sb);
sys/dev/bxe/bxe.c
2669
struct bxe_fastpath *fp,
sys/dev/bxe/bxe.c
2675
struct ecore_queue_sp_obj *q_obj = &BXE_SP_OBJ(sc, fp).q_obj;
sys/dev/bxe/bxe.c
2678
fp->index, cid, command, sc->state, rr_cqe->ramrod_cqe.ramrod_type);
sys/dev/bxe/bxe.c
2713
command, fp->index);
sys/dev/bxe/bxe.c
2744
struct bxe_fastpath *fp,
sys/dev/bxe/bxe.c
2754
struct bxe_sw_tpa_info *tpa_info = &fp->rx_tpa_info[queue];
sys/dev/bxe/bxe.c
2759
fp->index, queue, cons, prod);
sys/dev/bxe/bxe.c
2765
fp->index, queue, max_agg_queues));
sys/dev/bxe/bxe.c
2769
fp->index, queue));
sys/dev/bxe/bxe.c
2780
fp->index, queue, cons, prod);
sys/dev/bxe/bxe.c
2795
fp->rx_tpa_queue_used |= (1 << queue);
sys/dev/bxe/bxe.c
2806
tpa_info->bd = fp->rx_mbuf_chain[cons];
sys/dev/bxe/bxe.c
2810
rx_buf = &fp->rx_mbuf_chain[cons];
sys/dev/bxe/bxe.c
2813
bus_dmamap_sync(fp->rx_mbuf_tag, rx_buf->m_map,
sys/dev/bxe/bxe.c
2815
bus_dmamap_unload(fp->rx_mbuf_tag, rx_buf->m_map);
sys/dev/bxe/bxe.c
2823
fp->rx_mbuf_chain[cons].m = NULL;
sys/dev/bxe/bxe.c
2827
fp->rx_mbuf_chain[index] = tmp_bd;
sys/dev/bxe/bxe.c
2830
rx_bd = &fp->rx_chain[index];
sys/dev/bxe/bxe.c
2842
struct bxe_fastpath *fp,
sys/dev/bxe/bxe.c
2860
fp->index, queue, tpa_info->len_on_bd, frag_size, pages);
sys/dev/bxe/bxe.c
2869
fp->index, cqe_idx, pages, le16toh(cqe->pkt_len),
sys/dev/bxe/bxe.c
2894
fp->index, queue, i, j, sge_idx, frag_size, frag_len);
sys/dev/bxe/bxe.c
2896
m_frag = fp->rx_sge_mbuf_chain[sge_idx].m;
sys/dev/bxe/bxe.c
2899
rc = bxe_alloc_rx_sge_mbuf(fp, sge_idx);
sys/dev/bxe/bxe.c
2910
fp->eth_q_stats.mbuf_alloc_sge--;
sys/dev/bxe/bxe.c
2919
fp->index, queue, frag_size);
sys/dev/bxe/bxe.c
2925
bxe_clear_sge_mask_next_elems(struct bxe_fastpath *fp)
sys/dev/bxe/bxe.c
2933
BIT_VEC64_CLEAR_BIT(fp->sge_mask, idx);
sys/dev/bxe/bxe.c
2940
bxe_init_sge_ring_bit_mask(struct bxe_fastpath *fp)
sys/dev/bxe/bxe.c
2943
memset(fp->sge_mask, 0xff, sizeof(fp->sge_mask));
sys/dev/bxe/bxe.c
2950
bxe_clear_sge_mask_next_elems(fp);
sys/dev/bxe/bxe.c
2954
bxe_update_last_max_sge(struct bxe_fastpath *fp,
sys/dev/bxe/bxe.c
2957
uint16_t last_max = fp->last_max_sge;
sys/dev/bxe/bxe.c
2960
fp->last_max_sge = idx;
sys/dev/bxe/bxe.c
2966
struct bxe_fastpath *fp,
sys/dev/bxe/bxe.c
2980
BIT_VEC64_CLEAR_BIT(fp->sge_mask,
sys/dev/bxe/bxe.c
2986
fp->index, sge_len - 1,
sys/dev/bxe/bxe.c
2990
bxe_update_last_max_sge(fp,
sys/dev/bxe/bxe.c
2993
last_max = RX_SGE(fp->last_max_sge);
sys/dev/bxe/bxe.c
2995
first_elem = RX_SGE(fp->rx_sge_prod) >> BIT_VEC64_ELEM_SHIFT;
sys/dev/bxe/bxe.c
3004
if (__predict_true(fp->sge_mask[i])) {
sys/dev/bxe/bxe.c
3008
fp->sge_mask[i] = BIT_VEC64_ELEM_ONE_MASK;
sys/dev/bxe/bxe.c
3013
fp->rx_sge_prod += delta;
sys/dev/bxe/bxe.c
3015
bxe_clear_sge_mask_next_elems(fp);
sys/dev/bxe/bxe.c
3020
fp->index, fp->last_max_sge, fp->rx_sge_prod);
sys/dev/bxe/bxe.c
3030
struct bxe_fastpath *fp,
sys/dev/bxe/bxe.c
3043
fp->index, queue, tpa_info->placement_offset,
sys/dev/bxe/bxe.c
3049
rc = bxe_alloc_rx_tpa_mbuf(fp, queue);
sys/dev/bxe/bxe.c
3052
fp->eth_q_stats.rx_soft_errors++;
sys/dev/bxe/bxe.c
3061
fp->eth_q_stats.rx_ofld_frames_csum_ip++;
sys/dev/bxe/bxe.c
3062
fp->eth_q_stats.rx_ofld_frames_csum_tcp_udp++;
sys/dev/bxe/bxe.c
3070
rc = bxe_fill_frag_mbuf(sc, fp, tpa_info, queue, pages, m, cqe, cqe_idx);
sys/dev/bxe/bxe.c
3073
fp->eth_q_stats.rx_soft_errors++;
sys/dev/bxe/bxe.c
3085
m->m_pkthdr.flowid = fp->index;
sys/dev/bxe/bxe.c
3089
fp->eth_q_stats.rx_tpa_pkts++;
sys/dev/bxe/bxe.c
3096
fp->eth_q_stats.mbuf_alloc_tpa--;
sys/dev/bxe/bxe.c
3100
fp->rx_tpa_info[queue].state = BXE_TPA_STATE_STOP;
sys/dev/bxe/bxe.c
3101
fp->rx_tpa_queue_used &= ~(1 << queue);
sys/dev/bxe/bxe.c
3106
struct bxe_fastpath *fp,
sys/dev/bxe/bxe.c
3128
m_frag = fp->rx_sge_mbuf_chain[sge_idx].m;
sys/dev/bxe/bxe.c
3133
rc = bxe_alloc_rx_sge_mbuf(fp, sge_idx);
sys/dev/bxe/bxe.c
3138
fp->eth_q_stats.mbuf_alloc_sge--;
sys/dev/bxe/bxe.c
3146
bxe_update_sge_prod(fp->sc, fp, frags, &cqe_fp->sgl_or_raw_data);
sys/dev/bxe/bxe.c
3153
struct bxe_fastpath *fp)
sys/dev/bxe/bxe.c
3161
BXE_FP_RX_LOCK(fp);
sys/dev/bxe/bxe.c
3164
hw_cq_cons = le16toh(*fp->rx_cq_cons_sb);
sys/dev/bxe/bxe.c
3169
bd_cons = fp->rx_bd_cons;
sys/dev/bxe/bxe.c
3170
bd_prod = fp->rx_bd_prod;
sys/dev/bxe/bxe.c
3172
sw_cq_cons = fp->rx_cq_cons;
sys/dev/bxe/bxe.c
3173
sw_cq_prod = fp->rx_cq_prod;
sys/dev/bxe/bxe.c
3183
fp->index, hw_cq_cons, sw_cq_cons);
sys/dev/bxe/bxe.c
3198
cqe = &fp->rcq_chain[comp_ring_cons];
sys/dev/bxe/bxe.c
3207
fp->index,
sys/dev/bxe/bxe.c
3222
bxe_sp_event(sc, fp, cqe);
sys/dev/bxe/bxe.c
3226
rx_buf = &fp->rx_mbuf_chain[bd_cons];
sys/dev/bxe/bxe.c
3234
bxe_tpa_start(sc, fp, cqe_fp->queue_index,
sys/dev/bxe/bxe.c
3244
tpa_info = &fp->rx_tpa_info[queue];
sys/dev/bxe/bxe.c
3247
fp->index, queue);
sys/dev/bxe/bxe.c
3253
bxe_tpa_stop(sc, fp, tpa_info, queue, pages,
sys/dev/bxe/bxe.c
3256
bxe_update_sge_prod(sc, fp, pages, &cqe->end_agg_cqe.sgl_or_raw_data);
sys/dev/bxe/bxe.c
3267
fp->eth_q_stats.rx_soft_errors++;
sys/dev/bxe/bxe.c
3279
bd_cons, fp->index);
sys/dev/bxe/bxe.c
3290
rc = bxe_alloc_rx_bd_mbuf(fp, bd_cons,
sys/dev/bxe/bxe.c
3299
fp->index, rc);
sys/dev/bxe/bxe.c
3300
fp->eth_q_stats.rx_soft_errors++;
sys/dev/bxe/bxe.c
3304
memcpy(&fp->rx_mbuf_chain[bd_prod], rx_buf,
sys/dev/bxe/bxe.c
3313
fp->eth_q_stats.mbuf_alloc_rx--;
sys/dev/bxe/bxe.c
3320
fp->eth_q_stats.rx_bxe_service_rxsgl++;
sys/dev/bxe/bxe.c
3321
rc = bxe_service_rxsgl(fp, len, lenonbd, m, cqe_fp);
sys/dev/bxe/bxe.c
3324
fp->eth_q_stats.rx_jumbo_sge_pkts++;
sys/dev/bxe/bxe.c
3326
fp->eth_q_stats.rx_erroneous_jumbo_sge_pkts++;
sys/dev/bxe/bxe.c
3343
fp->eth_q_stats.rx_hw_csum_errors++;
sys/dev/bxe/bxe.c
3345
fp->eth_q_stats.rx_ofld_frames_csum_ip++;
sys/dev/bxe/bxe.c
3355
fp->eth_q_stats.rx_hw_csum_errors++;
sys/dev/bxe/bxe.c
3357
fp->eth_q_stats.rx_ofld_frames_csum_tcp_udp++;
sys/dev/bxe/bxe.c
3372
m->m_pkthdr.flowid = fp->index;
sys/dev/bxe/bxe.c
3398
fp->eth_q_stats.rx_budget_reached++;
sys/dev/bxe/bxe.c
3403
fp->rx_bd_cons = bd_cons;
sys/dev/bxe/bxe.c
3404
fp->rx_bd_prod = bd_prod_fw;
sys/dev/bxe/bxe.c
3405
fp->rx_cq_cons = sw_cq_cons;
sys/dev/bxe/bxe.c
3406
fp->rx_cq_prod = sw_cq_prod;
sys/dev/bxe/bxe.c
3409
bxe_update_rx_prod(sc, fp, bd_prod_fw, sw_cq_prod, fp->rx_sge_prod);
sys/dev/bxe/bxe.c
3411
fp->eth_q_stats.rx_pkts += rx_pkts;
sys/dev/bxe/bxe.c
3412
fp->eth_q_stats.rx_calls++;
sys/dev/bxe/bxe.c
3414
BXE_FP_RX_UNLOCK(fp);
sys/dev/bxe/bxe.c
3421
struct bxe_fastpath *fp,
sys/dev/bxe/bxe.c
3424
struct bxe_sw_tx_bd *tx_buf = &fp->tx_mbuf_chain[idx];
sys/dev/bxe/bxe.c
3431
bus_dmamap_unload(fp->tx_mbuf_tag, tx_buf->m_map);
sys/dev/bxe/bxe.c
3433
tx_start_bd = &fp->tx_chain[bd_idx].start_bd;
sys/dev/bxe/bxe.c
3441
fp->eth_q_stats.mbuf_alloc_tx--;
sys/dev/bxe/bxe.c
3443
fp->eth_q_stats.tx_chain_lost_mbuf++;
sys/dev/bxe/bxe.c
3455
struct bxe_fastpath *fp)
sys/dev/bxe/bxe.c
3457
BXE_FP_TX_LOCK(fp);
sys/dev/bxe/bxe.c
3459
if ((fp->watchdog_timer == 0) || (--fp->watchdog_timer)) {
sys/dev/bxe/bxe.c
3460
BXE_FP_TX_UNLOCK(fp);
sys/dev/bxe/bxe.c
3464
BLOGE(sc, "TX watchdog timeout on fp[%02d], resetting!\n", fp->index);
sys/dev/bxe/bxe.c
3466
BXE_FP_TX_UNLOCK(fp);
sys/dev/bxe/bxe.c
3477
struct bxe_fastpath *fp)
sys/dev/bxe/bxe.c
3483
BXE_FP_TX_LOCK_ASSERT(fp);
sys/dev/bxe/bxe.c
3485
bd_cons = fp->tx_bd_cons;
sys/dev/bxe/bxe.c
3486
hw_cons = le16toh(*fp->tx_cons_sb);
sys/dev/bxe/bxe.c
3487
sw_cons = fp->tx_pkt_cons;
sys/dev/bxe/bxe.c
3494
fp->index, hw_cons, sw_cons, pkt_cons);
sys/dev/bxe/bxe.c
3496
bd_cons = bxe_free_tx_pkt(sc, fp, pkt_cons);
sys/dev/bxe/bxe.c
3501
fp->tx_pkt_cons = sw_cons;
sys/dev/bxe/bxe.c
3502
fp->tx_bd_cons = bd_cons;
sys/dev/bxe/bxe.c
3506
fp->index, hw_cons, fp->tx_pkt_cons, fp->tx_pkt_prod);
sys/dev/bxe/bxe.c
3510
tx_bd_avail = bxe_tx_avail(sc, fp);
sys/dev/bxe/bxe.c
3518
if (fp->tx_pkt_prod != fp->tx_pkt_cons) {
sys/dev/bxe/bxe.c
3520
fp->watchdog_timer = BXE_TX_TIMEOUT;
sys/dev/bxe/bxe.c
3524
fp->watchdog_timer = 0;
sys/dev/bxe/bxe.c
3532
struct bxe_fastpath *fp;
sys/dev/bxe/bxe.c
3537
fp = &sc->fp[i];
sys/dev/bxe/bxe.c
3541
while (bxe_has_tx_work(fp)) {
sys/dev/bxe/bxe.c
3543
BXE_FP_TX_LOCK(fp);
sys/dev/bxe/bxe.c
3544
bxe_txeof(sc, fp);
sys/dev/bxe/bxe.c
3545
BXE_FP_TX_UNLOCK(fp);
sys/dev/bxe/bxe.c
3731
return (bxe_set_q_rx_mode(sc, sc->fp[0].cl_id, rx_mode_flags,
sys/dev/bxe/bxe.c
3884
struct bxe_fastpath *fp = &sc->fp[index];
sys/dev/bxe/bxe.c
3888
BLOGD(sc, DBG_LOAD, "stopping queue %d cid %d\n", index, fp->index);
sys/dev/bxe/bxe.c
3890
q_params.q_obj = &sc->sp_objs[fp->index].q_obj;
sys/dev/bxe/bxe.c
4222
struct bxe_fastpath *fp;
sys/dev/bxe/bxe.c
4224
fp = &sc->fp[i];
sys/dev/bxe/bxe.c
4225
fp->watchdog_timer = 0;
sys/dev/bxe/bxe.c
4226
BXE_FP_TX_LOCK(fp);
sys/dev/bxe/bxe.c
4227
BXE_FP_TX_UNLOCK(fp);
sys/dev/bxe/bxe.c
4815
bxe_set_pbd_csum_e2(struct bxe_fastpath *fp,
sys/dev/bxe/bxe.c
4879
fp->eth_q_stats.tx_ofld_frames_csum_tcp++;
sys/dev/bxe/bxe.c
4888
fp->eth_q_stats.tx_ofld_frames_csum_udp++;
sys/dev/bxe/bxe.c
4897
bxe_set_pbd_csum(struct bxe_fastpath *fp,
sys/dev/bxe/bxe.c
4986
fp->eth_q_stats.tx_ofld_frames_csum_tcp++;
sys/dev/bxe/bxe.c
4990
fp->eth_q_stats.tx_ofld_frames_csum_udp++;
sys/dev/bxe/bxe.c
5090
bxe_tx_encap(struct bxe_fastpath *fp, struct mbuf **m_head)
sys/dev/bxe/bxe.c
5112
sc = fp->sc;
sys/dev/bxe/bxe.c
5123
pkt_prod = fp->tx_pkt_prod;
sys/dev/bxe/bxe.c
5124
bd_prod = fp->tx_bd_prod;
sys/dev/bxe/bxe.c
5129
tx_buf = &fp->tx_mbuf_chain[TX_BD(pkt_prod)];
sys/dev/bxe/bxe.c
5130
error = bus_dmamap_load_mbuf_sg(fp->tx_mbuf_tag,
sys/dev/bxe/bxe.c
5136
fp->eth_q_stats.tx_dma_mapping_failure++;
sys/dev/bxe/bxe.c
5142
fp->eth_q_stats.mbuf_defrag_attempts++;
sys/dev/bxe/bxe.c
5145
fp->eth_q_stats.mbuf_defrag_failures++;
sys/dev/bxe/bxe.c
5150
error = bus_dmamap_load_mbuf_sg(fp->tx_mbuf_tag,
sys/dev/bxe/bxe.c
5154
fp->eth_q_stats.tx_dma_mapping_failure++;
sys/dev/bxe/bxe.c
5168
tx_bd_avail = bxe_tx_avail(sc, fp);
sys/dev/bxe/bxe.c
5173
fp->eth_q_stats.tx_hw_queue_full++;
sys/dev/bxe/bxe.c
5174
bus_dmamap_unload(fp->tx_mbuf_tag, tx_buf->m_map);
sys/dev/bxe/bxe.c
5180
if (__predict_false(fp->eth_q_stats.tx_hw_max_queue_depth <
sys/dev/bxe/bxe.c
5182
fp->eth_q_stats.tx_hw_max_queue_depth = (TX_BD_USABLE - tx_bd_avail);
sys/dev/bxe/bxe.c
5195
fp->eth_q_stats.tx_window_violation_tso++;
sys/dev/bxe/bxe.c
5198
fp->eth_q_stats.tx_window_violation_std++;
sys/dev/bxe/bxe.c
5202
fp->eth_q_stats.mbuf_defrag_attempts++;
sys/dev/bxe/bxe.c
5203
bus_dmamap_unload(fp->tx_mbuf_tag, tx_buf->m_map);
sys/dev/bxe/bxe.c
5207
fp->eth_q_stats.mbuf_defrag_failures++;
sys/dev/bxe/bxe.c
5213
error = bus_dmamap_load_mbuf_sg(fp->tx_mbuf_tag,
sys/dev/bxe/bxe.c
5217
fp->eth_q_stats.tx_dma_mapping_failure++;
sys/dev/bxe/bxe.c
5228
bus_dmamap_unload(fp->tx_mbuf_tag, tx_buf->m_map);
sys/dev/bxe/bxe.c
5229
fp->eth_q_stats.nsegs_path1_errors++;
sys/dev/bxe/bxe.c
5234
bus_dmamap_unload(fp->tx_mbuf_tag, tx_buf->m_map);
sys/dev/bxe/bxe.c
5235
fp->eth_q_stats.nsegs_path2_errors++;
sys/dev/bxe/bxe.c
5250
fp->eth_q_stats.tx_soft_errors++;
sys/dev/bxe/bxe.c
5251
fp->eth_q_stats.mbuf_alloc_tx--;
sys/dev/bxe/bxe.c
5268
tx_buf->first_bd = fp->tx_bd_prod;
sys/dev/bxe/bxe.c
5272
tx_start_bd = &fp->tx_chain[TX_BD(bd_prod)].start_bd;
sys/dev/bxe/bxe.c
5276
pkt_prod, tx_buf, fp->tx_pkt_prod, bd_prod, tx_start_bd);
sys/dev/bxe/bxe.c
5302
tx_start_bd->vlan_or_ethertype = htole16(fp->tx_pkt_prod);
sys/dev/bxe/bxe.c
5314
fp->eth_q_stats.tx_ofld_frames_csum_ip++;
sys/dev/bxe/bxe.c
5335
pbd_e2 = &fp->tx_chain[TX_BD(bd_prod)].parse_bd_e2;
sys/dev/bxe/bxe.c
5339
hlen = bxe_set_pbd_csum_e2(fp, m0, &pbd_e2_parsing_data);
sys/dev/bxe/bxe.c
5347
pbd_e1x = &fp->tx_chain[TX_BD(bd_prod)].parse_bd_e1x;
sys/dev/bxe/bxe.c
5351
hlen = bxe_set_pbd_csum(fp, m0, pbd_e1x);
sys/dev/bxe/bxe.c
5361
fp->eth_q_stats.tx_ofld_frames_lso++;
sys/dev/bxe/bxe.c
5365
fp->eth_q_stats.tx_ofld_frames_lso_hdr_splits++;
sys/dev/bxe/bxe.c
5375
tx_data_bd = &fp->tx_chain[TX_BD(bd_prod)].reg_bd;
sys/dev/bxe/bxe.c
5405
tx_data_bd = &fp->tx_chain[TX_BD(bd_prod)].reg_bd;
sys/dev/bxe/bxe.c
5468
tx_data_bd = &fp->tx_chain[TX_BD(tmp_bd)].reg_bd;
sys/dev/bxe/bxe.c
5498
fp->tx_db.data.prod += nbds;
sys/dev/bxe/bxe.c
5501
fp->tx_pkt_prod++;
sys/dev/bxe/bxe.c
5502
fp->tx_bd_prod = bd_prod;
sys/dev/bxe/bxe.c
5504
DOORBELL(sc, fp->index, fp->tx_db.raw);
sys/dev/bxe/bxe.c
5506
fp->eth_q_stats.tx_pkts++;
sys/dev/bxe/bxe.c
5522
struct bxe_fastpath *fp)
sys/dev/bxe/bxe.c
5528
BXE_FP_TX_LOCK_ASSERT(fp);
sys/dev/bxe/bxe.c
5543
fp->eth_q_stats.mbuf_alloc_tx++;
sys/dev/bxe/bxe.c
5550
if (__predict_false(bxe_tx_encap(fp, &m))) {
sys/dev/bxe/bxe.c
5551
fp->eth_q_stats.tx_encap_failures++;
sys/dev/bxe/bxe.c
5556
fp->eth_q_stats.mbuf_alloc_tx--;
sys/dev/bxe/bxe.c
5557
fp->eth_q_stats.tx_queue_xoff++;
sys/dev/bxe/bxe.c
5570
tx_bd_avail = bxe_tx_avail(sc, fp);
sys/dev/bxe/bxe.c
5575
bxe_txeof(sc, fp);
sys/dev/bxe/bxe.c
5585
fp->watchdog_timer = BXE_TX_TIMEOUT;
sys/dev/bxe/bxe.c
5594
struct bxe_fastpath *fp;
sys/dev/bxe/bxe.c
5608
fp = &sc->fp[0];
sys/dev/bxe/bxe.c
5611
fp->eth_q_stats.tx_queue_full_return++;
sys/dev/bxe/bxe.c
5615
BXE_FP_TX_LOCK(fp);
sys/dev/bxe/bxe.c
5616
bxe_tx_start_locked(sc, ifp, fp);
sys/dev/bxe/bxe.c
5617
BXE_FP_TX_UNLOCK(fp);
sys/dev/bxe/bxe.c
5623
struct bxe_fastpath *fp,
sys/dev/bxe/bxe.c
5626
struct buf_ring *tx_br = fp->tx_br;
sys/dev/bxe/bxe.c
5633
BXE_FP_TX_LOCK_ASSERT(fp);
sys/dev/bxe/bxe.c
5636
fp->eth_q_stats.bxe_tx_mq_sc_state_failures++;
sys/dev/bxe/bxe.c
5648
fp->eth_q_stats.tx_soft_errors++;
sys/dev/bxe/bxe.c
5654
fp->eth_q_stats.tx_request_link_down_failures++;
sys/dev/bxe/bxe.c
5660
if (depth > fp->eth_q_stats.tx_max_drbr_queue_depth) {
sys/dev/bxe/bxe.c
5661
fp->eth_q_stats.tx_max_drbr_queue_depth = depth;
sys/dev/bxe/bxe.c
5667
tx_bd_avail = bxe_tx_avail(sc, fp);
sys/dev/bxe/bxe.c
5670
bxe_txeof(sc, fp);
sys/dev/bxe/bxe.c
5671
tx_bd_avail = bxe_tx_avail(sc, fp);
sys/dev/bxe/bxe.c
5673
fp->eth_q_stats.bd_avail_too_less_failures++;
sys/dev/bxe/bxe.c
5682
fp->eth_q_stats.mbuf_alloc_tx++;
sys/dev/bxe/bxe.c
5689
rc = bxe_tx_encap(fp, &next);
sys/dev/bxe/bxe.c
5691
fp->eth_q_stats.tx_encap_failures++;
sys/dev/bxe/bxe.c
5696
fp->eth_q_stats.mbuf_alloc_tx--;
sys/dev/bxe/bxe.c
5697
fp->eth_q_stats.tx_frames_deferred++;
sys/dev/bxe/bxe.c
5717
fp->watchdog_timer = BXE_TX_TIMEOUT;
sys/dev/bxe/bxe.c
5723
fp->eth_q_stats.tx_mq_not_empty++;
sys/dev/bxe/bxe.c
5724
taskqueue_enqueue_timeout(fp->tq, &fp->tx_timeout_task, 1);
sys/dev/bxe/bxe.c
5734
struct bxe_fastpath *fp = (struct bxe_fastpath *)arg;
sys/dev/bxe/bxe.c
5735
struct bxe_softc *sc = fp->sc;
sys/dev/bxe/bxe.c
5738
BXE_FP_TX_LOCK(fp);
sys/dev/bxe/bxe.c
5739
bxe_tx_mq_start_locked(sc, ifp, fp, NULL);
sys/dev/bxe/bxe.c
5740
BXE_FP_TX_UNLOCK(fp);
sys/dev/bxe/bxe.c
5749
struct bxe_fastpath *fp;
sys/dev/bxe/bxe.c
5759
fp = &sc->fp[fp_index];
sys/dev/bxe/bxe.c
5762
fp->eth_q_stats.bxe_tx_mq_sc_state_failures++;
sys/dev/bxe/bxe.c
5766
if (BXE_FP_TX_TRYLOCK(fp)) {
sys/dev/bxe/bxe.c
5767
rc = bxe_tx_mq_start_locked(sc, ifp, fp, m);
sys/dev/bxe/bxe.c
5768
BXE_FP_TX_UNLOCK(fp);
sys/dev/bxe/bxe.c
5770
rc = drbr_enqueue(ifp, fp->tx_br, m);
sys/dev/bxe/bxe.c
5771
taskqueue_enqueue(fp->tq, &fp->tx_task);
sys/dev/bxe/bxe.c
5781
struct bxe_fastpath *fp;
sys/dev/bxe/bxe.c
5786
fp = &sc->fp[i];
sys/dev/bxe/bxe.c
5788
if (fp->state != BXE_FP_STATE_IRQ) {
sys/dev/bxe/bxe.c
5790
fp->index, fp->state);
sys/dev/bxe/bxe.c
5794
if (fp->tx_br != NULL) {
sys/dev/bxe/bxe.c
5795
BLOGD(sc, DBG_LOAD, "Clearing fp[%02d] buf_ring\n", fp->index);
sys/dev/bxe/bxe.c
5796
BXE_FP_TX_LOCK(fp);
sys/dev/bxe/bxe.c
5797
while ((m = buf_ring_dequeue_sc(fp->tx_br)) != NULL) {
sys/dev/bxe/bxe.c
5800
BXE_FP_TX_UNLOCK(fp);
sys/dev/bxe/bxe.c
5917
sc->fp[i].rx_buf_size = rx_buf_size;
sys/dev/bxe/bxe.c
5918
sc->fp[i].mbuf_alloc_size = MCLBYTES;
sys/dev/bxe/bxe.c
5920
sc->fp[i].rx_buf_size = rx_buf_size;
sys/dev/bxe/bxe.c
5921
sc->fp[i].mbuf_alloc_size = MJUMPAGESIZE;
sys/dev/bxe/bxe.c
5923
sc->fp[i].rx_buf_size = MCLBYTES;
sys/dev/bxe/bxe.c
5924
sc->fp[i].mbuf_alloc_size = MCLBYTES;
sys/dev/bxe/bxe.c
5926
sc->fp[i].rx_buf_size = MJUMPAGESIZE;
sys/dev/bxe/bxe.c
5927
sc->fp[i].mbuf_alloc_size = MJUMPAGESIZE;
sys/dev/bxe/bxe.c
5929
sc->fp[i].rx_buf_size = MCLBYTES;
sys/dev/bxe/bxe.c
5930
sc->fp[i].mbuf_alloc_size = MCLBYTES;
sys/dev/bxe/bxe.c
6066
bxe_free_rx_bd_chain(struct bxe_fastpath *fp)
sys/dev/bxe/bxe.c
6070
if (fp->rx_mbuf_tag == NULL) {
sys/dev/bxe/bxe.c
6076
if (fp->rx_mbuf_chain[i].m_map != NULL) {
sys/dev/bxe/bxe.c
6077
bus_dmamap_sync(fp->rx_mbuf_tag,
sys/dev/bxe/bxe.c
6078
fp->rx_mbuf_chain[i].m_map,
sys/dev/bxe/bxe.c
6080
bus_dmamap_unload(fp->rx_mbuf_tag,
sys/dev/bxe/bxe.c
6081
fp->rx_mbuf_chain[i].m_map);
sys/dev/bxe/bxe.c
6084
if (fp->rx_mbuf_chain[i].m != NULL) {
sys/dev/bxe/bxe.c
6085
m_freem(fp->rx_mbuf_chain[i].m);
sys/dev/bxe/bxe.c
6086
fp->rx_mbuf_chain[i].m = NULL;
sys/dev/bxe/bxe.c
6087
fp->eth_q_stats.mbuf_alloc_rx--;
sys/dev/bxe/bxe.c
6093
bxe_free_tpa_pool(struct bxe_fastpath *fp)
sys/dev/bxe/bxe.c
6098
sc = fp->sc;
sys/dev/bxe/bxe.c
6100
if (fp->rx_mbuf_tag == NULL) {
sys/dev/bxe/bxe.c
6108
if (fp->rx_tpa_info[i].bd.m_map != NULL) {
sys/dev/bxe/bxe.c
6109
bus_dmamap_sync(fp->rx_mbuf_tag,
sys/dev/bxe/bxe.c
6110
fp->rx_tpa_info[i].bd.m_map,
sys/dev/bxe/bxe.c
6112
bus_dmamap_unload(fp->rx_mbuf_tag,
sys/dev/bxe/bxe.c
6113
fp->rx_tpa_info[i].bd.m_map);
sys/dev/bxe/bxe.c
6116
if (fp->rx_tpa_info[i].bd.m != NULL) {
sys/dev/bxe/bxe.c
6117
m_freem(fp->rx_tpa_info[i].bd.m);
sys/dev/bxe/bxe.c
6118
fp->rx_tpa_info[i].bd.m = NULL;
sys/dev/bxe/bxe.c
6119
fp->eth_q_stats.mbuf_alloc_tpa--;
sys/dev/bxe/bxe.c
6125
bxe_free_sge_chain(struct bxe_fastpath *fp)
sys/dev/bxe/bxe.c
6129
if (fp->rx_sge_mbuf_tag == NULL) {
sys/dev/bxe/bxe.c
6135
if (fp->rx_sge_mbuf_chain[i].m_map != NULL) {
sys/dev/bxe/bxe.c
6136
bus_dmamap_sync(fp->rx_sge_mbuf_tag,
sys/dev/bxe/bxe.c
6137
fp->rx_sge_mbuf_chain[i].m_map,
sys/dev/bxe/bxe.c
6139
bus_dmamap_unload(fp->rx_sge_mbuf_tag,
sys/dev/bxe/bxe.c
6140
fp->rx_sge_mbuf_chain[i].m_map);
sys/dev/bxe/bxe.c
6143
if (fp->rx_sge_mbuf_chain[i].m != NULL) {
sys/dev/bxe/bxe.c
6144
m_freem(fp->rx_sge_mbuf_chain[i].m);
sys/dev/bxe/bxe.c
6145
fp->rx_sge_mbuf_chain[i].m = NULL;
sys/dev/bxe/bxe.c
6146
fp->eth_q_stats.mbuf_alloc_sge--;
sys/dev/bxe/bxe.c
6154
struct bxe_fastpath *fp;
sys/dev/bxe/bxe.c
6158
fp = &sc->fp[i];
sys/dev/bxe/bxe.c
6160
if (fp->tx_br != NULL) {
sys/dev/bxe/bxe.c
6162
if (mtx_initialized(&fp->tx_mtx)) {
sys/dev/bxe/bxe.c
6165
BXE_FP_TX_LOCK(fp);
sys/dev/bxe/bxe.c
6166
while ((m = buf_ring_dequeue_sc(fp->tx_br)) != NULL)
sys/dev/bxe/bxe.c
6168
BXE_FP_TX_UNLOCK(fp);
sys/dev/bxe/bxe.c
6173
bxe_free_rx_bd_chain(fp);
sys/dev/bxe/bxe.c
6174
bxe_free_tpa_pool(fp);
sys/dev/bxe/bxe.c
6175
bxe_free_sge_chain(fp);
sys/dev/bxe/bxe.c
6177
if (fp->eth_q_stats.mbuf_alloc_rx != 0) {
sys/dev/bxe/bxe.c
6179
fp->eth_q_stats.mbuf_alloc_rx);
sys/dev/bxe/bxe.c
6182
if (fp->eth_q_stats.mbuf_alloc_sge != 0) {
sys/dev/bxe/bxe.c
6184
fp->eth_q_stats.mbuf_alloc_sge);
sys/dev/bxe/bxe.c
6187
if (fp->eth_q_stats.mbuf_alloc_tpa != 0) {
sys/dev/bxe/bxe.c
6189
fp->eth_q_stats.mbuf_alloc_tpa);
sys/dev/bxe/bxe.c
6192
if (fp->eth_q_stats.mbuf_alloc_tx != 0) {
sys/dev/bxe/bxe.c
6194
fp->eth_q_stats.mbuf_alloc_tx);
sys/dev/bxe/bxe.c
6202
bxe_alloc_rx_bd_mbuf(struct bxe_fastpath *fp,
sys/dev/bxe/bxe.c
6216
m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, fp->mbuf_alloc_size);
sys/dev/bxe/bxe.c
6218
fp->eth_q_stats.mbuf_rx_bd_alloc_failed++;
sys/dev/bxe/bxe.c
6222
fp->eth_q_stats.mbuf_alloc_rx++;
sys/dev/bxe/bxe.c
6225
m->m_pkthdr.len = m->m_len = fp->rx_buf_size;
sys/dev/bxe/bxe.c
6228
rc = bus_dmamap_load_mbuf_sg(fp->rx_mbuf_tag,
sys/dev/bxe/bxe.c
6229
fp->rx_mbuf_spare_map,
sys/dev/bxe/bxe.c
6232
fp->eth_q_stats.mbuf_rx_bd_mapping_failed++;
sys/dev/bxe/bxe.c
6234
fp->eth_q_stats.mbuf_alloc_rx--;
sys/dev/bxe/bxe.c
6244
rx_buf = &fp->rx_mbuf_chain[prev_index];
sys/dev/bxe/bxe.c
6247
bus_dmamap_sync(fp->rx_mbuf_tag, rx_buf->m_map,
sys/dev/bxe/bxe.c
6249
bus_dmamap_unload(fp->rx_mbuf_tag, rx_buf->m_map);
sys/dev/bxe/bxe.c
6258
fp->rx_mbuf_chain[prev_index].m = NULL;
sys/dev/bxe/bxe.c
6261
rx_buf = &fp->rx_mbuf_chain[index];
sys/dev/bxe/bxe.c
6264
bus_dmamap_sync(fp->rx_mbuf_tag, rx_buf->m_map,
sys/dev/bxe/bxe.c
6266
bus_dmamap_unload(fp->rx_mbuf_tag, rx_buf->m_map);
sys/dev/bxe/bxe.c
6271
fp->rx_mbuf_chain[prev_index].m_map : rx_buf->m_map;
sys/dev/bxe/bxe.c
6272
rx_buf->m_map = fp->rx_mbuf_spare_map;
sys/dev/bxe/bxe.c
6273
fp->rx_mbuf_spare_map = map;
sys/dev/bxe/bxe.c
6274
bus_dmamap_sync(fp->rx_mbuf_tag, rx_buf->m_map,
sys/dev/bxe/bxe.c
6278
rx_bd = &fp->rx_chain[index];
sys/dev/bxe/bxe.c
6286
bxe_alloc_rx_tpa_mbuf(struct bxe_fastpath *fp,
sys/dev/bxe/bxe.c
6289
struct bxe_sw_tpa_info *tpa_info = &fp->rx_tpa_info[queue];
sys/dev/bxe/bxe.c
6297
m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, fp->mbuf_alloc_size);
sys/dev/bxe/bxe.c
6299
fp->eth_q_stats.mbuf_rx_tpa_alloc_failed++;
sys/dev/bxe/bxe.c
6303
fp->eth_q_stats.mbuf_alloc_tpa++;
sys/dev/bxe/bxe.c
6306
m->m_pkthdr.len = m->m_len = fp->rx_buf_size;
sys/dev/bxe/bxe.c
6309
rc = bus_dmamap_load_mbuf_sg(fp->rx_mbuf_tag,
sys/dev/bxe/bxe.c
6310
fp->rx_tpa_info_mbuf_spare_map,
sys/dev/bxe/bxe.c
6313
fp->eth_q_stats.mbuf_rx_tpa_mapping_failed++;
sys/dev/bxe/bxe.c
6315
fp->eth_q_stats.mbuf_alloc_tpa--;
sys/dev/bxe/bxe.c
6324
bus_dmamap_sync(fp->rx_mbuf_tag, tpa_info->bd.m_map,
sys/dev/bxe/bxe.c
6326
bus_dmamap_unload(fp->rx_mbuf_tag, tpa_info->bd.m_map);
sys/dev/bxe/bxe.c
6331
tpa_info->bd.m_map = fp->rx_tpa_info_mbuf_spare_map;
sys/dev/bxe/bxe.c
6332
fp->rx_tpa_info_mbuf_spare_map = map;
sys/dev/bxe/bxe.c
6333
bus_dmamap_sync(fp->rx_mbuf_tag, tpa_info->bd.m_map,
sys/dev/bxe/bxe.c
6347
bxe_alloc_rx_sge_mbuf(struct bxe_fastpath *fp,
sys/dev/bxe/bxe.c
6361
fp->eth_q_stats.mbuf_rx_sge_alloc_failed++;
sys/dev/bxe/bxe.c
6365
fp->eth_q_stats.mbuf_alloc_sge++;
sys/dev/bxe/bxe.c
6371
rc = bus_dmamap_load_mbuf_sg(fp->rx_sge_mbuf_tag,
sys/dev/bxe/bxe.c
6372
fp->rx_sge_mbuf_spare_map,
sys/dev/bxe/bxe.c
6375
fp->eth_q_stats.mbuf_rx_sge_mapping_failed++;
sys/dev/bxe/bxe.c
6377
fp->eth_q_stats.mbuf_alloc_sge--;
sys/dev/bxe/bxe.c
6384
sge_buf = &fp->rx_sge_mbuf_chain[index];
sys/dev/bxe/bxe.c
6388
bus_dmamap_sync(fp->rx_sge_mbuf_tag, sge_buf->m_map,
sys/dev/bxe/bxe.c
6390
bus_dmamap_unload(fp->rx_sge_mbuf_tag, sge_buf->m_map);
sys/dev/bxe/bxe.c
6395
sge_buf->m_map = fp->rx_sge_mbuf_spare_map;
sys/dev/bxe/bxe.c
6396
fp->rx_sge_mbuf_spare_map = map;
sys/dev/bxe/bxe.c
6397
bus_dmamap_sync(fp->rx_sge_mbuf_tag, sge_buf->m_map,
sys/dev/bxe/bxe.c
6401
sge = &fp->rx_sge_chain[index];
sys/dev/bxe/bxe.c
6411
struct bxe_fastpath *fp;
sys/dev/bxe/bxe.c
6417
fp = &sc->fp[i];
sys/dev/bxe/bxe.c
6420
fp->rx_bd_cons = 0;
sys/dev/bxe/bxe.c
6421
fp->rx_cq_cons = 0;
sys/dev/bxe/bxe.c
6425
rc = bxe_alloc_rx_bd_mbuf(fp, ring_prod, ring_prod);
sys/dev/bxe/bxe.c
6436
fp->rx_bd_prod = ring_prod;
sys/dev/bxe/bxe.c
6437
fp->rx_cq_prod = cqe_ring_prod;
sys/dev/bxe/bxe.c
6438
fp->eth_q_stats.rx_calls = fp->eth_q_stats.rx_pkts = 0;
sys/dev/bxe/bxe.c
6442
fp->tpa_enable = TRUE;
sys/dev/bxe/bxe.c
6446
rc = bxe_alloc_rx_tpa_mbuf(fp, j);
sys/dev/bxe/bxe.c
6450
fp->tpa_enable = FALSE;
sys/dev/bxe/bxe.c
6454
fp->rx_tpa_info[j].state = BXE_TPA_STATE_STOP;
sys/dev/bxe/bxe.c
6457
if (fp->tpa_enable) {
sys/dev/bxe/bxe.c
6461
rc = bxe_alloc_rx_sge_mbuf(fp, ring_prod);
sys/dev/bxe/bxe.c
6465
fp->tpa_enable = FALSE;
sys/dev/bxe/bxe.c
6473
fp->rx_sge_prod = ring_prod;
sys/dev/bxe/bxe.c
6482
bxe_free_rx_bd_chain(fp);
sys/dev/bxe/bxe.c
6483
bxe_free_tpa_pool(fp);
sys/dev/bxe/bxe.c
6484
bxe_free_sge_chain(fp);
sys/dev/bxe/bxe.c
662
struct bxe_fastpath *fp,
sys/dev/bxe/bxe.c
672
static int bxe_alloc_rx_bd_mbuf(struct bxe_fastpath *fp,
sys/dev/bxe/bxe.c
675
static int bxe_alloc_rx_tpa_mbuf(struct bxe_fastpath *fp,
sys/dev/bxe/bxe.c
677
static int bxe_alloc_rx_sge_mbuf(struct bxe_fastpath *fp,
sys/dev/bxe/bxe.c
680
struct bxe_fastpath *fp);
sys/dev/bxe/bxe.c
681
static void bxe_task_fp(struct bxe_fastpath *fp);
sys/dev/bxe/bxe.c
6985
struct bxe_fastpath *fp;
sys/dev/bxe/bxe.c
7019
fp = &sc->fp[i];
sys/dev/bxe/bxe.c
7020
taskqueue_enqueue(fp->tq, &fp->tx_task);
sys/dev/bxe/bxe.c
8672
struct bxe_fastpath *fp = (struct bxe_fastpath *)context;
sys/dev/bxe/bxe.c
8673
struct bxe_softc *sc = fp->sc;
sys/dev/bxe/bxe.c
8677
BLOGD(sc, DBG_INTR, "---> FP TASK QUEUE (%d) <---\n", fp->index);
sys/dev/bxe/bxe.c
8692
bxe_update_fp_sb_idx(fp);
sys/dev/bxe/bxe.c
8696
if (bxe_has_tx_work(fp)) {
sys/dev/bxe/bxe.c
8697
BXE_FP_TX_LOCK(fp);
sys/dev/bxe/bxe.c
8698
/* more_tx = */ bxe_txeof(sc, fp);
sys/dev/bxe/bxe.c
8699
BXE_FP_TX_UNLOCK(fp);
sys/dev/bxe/bxe.c
8702
if (bxe_has_rx_work(fp)) {
sys/dev/bxe/bxe.c
8703
more_rx = bxe_rxeof(sc, fp);
sys/dev/bxe/bxe.c
8708
taskqueue_enqueue(fp->tq, &fp->tq_task);
sys/dev/bxe/bxe.c
8712
bxe_ack_sb(sc, fp->igu_sb_id, USTORM_ID,
sys/dev/bxe/bxe.c
8713
le16toh(fp->fp_hc_idx), IGU_INT_ENABLE, 1);
sys/dev/bxe/bxe.c
8717
bxe_task_fp(struct bxe_fastpath *fp)
sys/dev/bxe/bxe.c
8719
struct bxe_softc *sc = fp->sc;
sys/dev/bxe/bxe.c
8723
BLOGD(sc, DBG_INTR, "---> FP TASK ISR (%d) <---\n", fp->index);
sys/dev/bxe/bxe.c
8726
bxe_update_fp_sb_idx(fp);
sys/dev/bxe/bxe.c
8730
if (bxe_has_tx_work(fp)) {
sys/dev/bxe/bxe.c
8731
BXE_FP_TX_LOCK(fp);
sys/dev/bxe/bxe.c
8732
/* more_tx = */ bxe_txeof(sc, fp);
sys/dev/bxe/bxe.c
8733
BXE_FP_TX_UNLOCK(fp);
sys/dev/bxe/bxe.c
8736
if (bxe_has_rx_work(fp)) {
sys/dev/bxe/bxe.c
8737
more_rx = bxe_rxeof(sc, fp);
sys/dev/bxe/bxe.c
8742
taskqueue_enqueue(fp->tq, &fp->tq_task);
sys/dev/bxe/bxe.c
8753
bxe_ack_sb(sc, fp->igu_sb_id, USTORM_ID,
sys/dev/bxe/bxe.c
8754
le16toh(fp->fp_hc_idx), IGU_INT_ENABLE, 1);
sys/dev/bxe/bxe.c
8768
struct bxe_fastpath *fp;
sys/dev/bxe/bxe.c
8794
fp = &sc->fp[i];
sys/dev/bxe/bxe.c
8795
mask = (0x2 << (fp->index + CNIC_SUPPORT(sc)));
sys/dev/bxe/bxe.c
8798
bxe_ack_sb(sc, fp->igu_sb_id, USTORM_ID, 0, IGU_INT_DISABLE, 0);
sys/dev/bxe/bxe.c
8799
bxe_task_fp(fp);
sys/dev/bxe/bxe.c
8838
struct bxe_fastpath *fp = (struct bxe_fastpath *)xfp;
sys/dev/bxe/bxe.c
8839
struct bxe_softc *sc = fp->sc;
sys/dev/bxe/bxe.c
8841
BLOGD(sc, DBG_INTR, "---> FP INTR %d <---\n", fp->index);
sys/dev/bxe/bxe.c
8845
curcpu, fp->index, fp->fw_sb_id, fp->igu_sb_id);
sys/dev/bxe/bxe.c
8848
bxe_ack_sb(sc, fp->igu_sb_id, USTORM_ID, 0, IGU_INT_DISABLE, 0);
sys/dev/bxe/bxe.c
8850
bxe_task_fp(fp);
sys/dev/bxe/bxe.c
9112
struct bxe_fastpath *fp;
sys/dev/bxe/bxe.c
9124
fp = &sc->fp[i];
sys/dev/bxe/bxe.c
9125
if (fp->tq) {
sys/dev/bxe/bxe.c
9126
taskqueue_drain(fp->tq, &fp->tq_task);
sys/dev/bxe/bxe.c
9127
taskqueue_drain(fp->tq, &fp->tx_task);
sys/dev/bxe/bxe.c
9128
while (taskqueue_cancel_timeout(fp->tq, &fp->tx_timeout_task,
sys/dev/bxe/bxe.c
9130
taskqueue_drain_timeout(fp->tq, &fp->tx_timeout_task);
sys/dev/bxe/bxe.c
9134
fp = &sc->fp[i];
sys/dev/bxe/bxe.c
9135
if (fp->tq != NULL) {
sys/dev/bxe/bxe.c
9136
taskqueue_free(fp->tq);
sys/dev/bxe/bxe.c
9137
fp->tq = NULL;
sys/dev/bxe/bxe.c
9161
struct bxe_fastpath *fp;
sys/dev/bxe/bxe.c
9176
fp = &sc->fp[i];
sys/dev/bxe/bxe.c
9177
snprintf(fp->tq_name, sizeof(fp->tq_name),
sys/dev/bxe/bxe.c
9179
NET_TASK_INIT(&fp->tq_task, 0, bxe_handle_fp_tq, fp);
sys/dev/bxe/bxe.c
9180
TASK_INIT(&fp->tx_task, 0, bxe_tx_mq_start_deferred, fp);
sys/dev/bxe/bxe.c
9181
fp->tq = taskqueue_create(fp->tq_name, M_NOWAIT,
sys/dev/bxe/bxe.c
9183
&fp->tq);
sys/dev/bxe/bxe.c
9184
TIMEOUT_TASK_INIT(fp->tq, &fp->tx_timeout_task, 0,
sys/dev/bxe/bxe.c
9185
bxe_tx_mq_start_deferred, fp);
sys/dev/bxe/bxe.c
9186
taskqueue_start_threads(&fp->tq, 1, PI_NET, /* higher priority */
sys/dev/bxe/bxe.c
9187
"%s", fp->tq_name);
sys/dev/bxe/bxe.c
9213
fp = &sc->fp[i];
sys/dev/bxe/bxe.c
9223
NULL, bxe_intr_fp, fp,
sys/dev/bxe/bxe.c
9238
fp->state = BXE_FP_STATE_IRQ;
sys/dev/bxe/bxe.c
9562
bxe_fp_qzone_id(struct bxe_fastpath *fp)
sys/dev/bxe/bxe.c
9564
if (CHIP_IS_E1x(fp->sc)) {
sys/dev/bxe/bxe.c
9565
return (fp->cl_id + SC_PORT(fp->sc) * ETH_MAX_RX_CLIENTS_E1H);
sys/dev/bxe/bxe.c
9567
return (fp->cl_id);
sys/dev/bxe/bxe.c
9573
struct bxe_fastpath *fp)
sys/dev/bxe/bxe.c
9578
offset += USTORM_RX_PRODS_E2_OFFSET(fp->cl_qzone_id);
sys/dev/bxe/bxe.c
9580
offset += USTORM_RX_PRODS_E1X_OFFSET(SC_PORT(sc), fp->cl_id);
sys/dev/bxe/bxe.c
9590
struct bxe_fastpath *fp = &sc->fp[idx];
sys/dev/bxe/bxe.c
9595
fp->sc = sc;
sys/dev/bxe/bxe.c
9596
fp->index = idx;
sys/dev/bxe/bxe.c
9598
fp->igu_sb_id = (sc->igu_base_sb + idx + CNIC_SUPPORT(sc));
sys/dev/bxe/bxe.c
9599
fp->fw_sb_id = (sc->base_fw_ndsb + idx + CNIC_SUPPORT(sc));
sys/dev/bxe/bxe.c
9601
fp->cl_id = (CHIP_IS_E1x(sc)) ?
sys/dev/bxe/bxe.c
9604
fp->igu_sb_id;
sys/dev/bxe/bxe.c
9605
fp->cl_qzone_id = bxe_fp_qzone_id(fp);
sys/dev/bxe/bxe.c
9609
fp->sb_index_values = fp->status_block.e2_sb->sb.index_values;
sys/dev/bxe/bxe.c
9610
fp->sb_running_index = fp->status_block.e2_sb->sb.running_index;
sys/dev/bxe/bxe.c
9612
fp->sb_index_values = fp->status_block.e1x_sb->sb.index_values;
sys/dev/bxe/bxe.c
9613
fp->sb_running_index = fp->status_block.e1x_sb->sb.running_index;
sys/dev/bxe/bxe.c
9617
fp->ustorm_rx_prods_offset = bxe_rx_ustorm_prods_offset(sc, fp);
sys/dev/bxe/bxe.c
9619
fp->rx_cq_cons_sb = &fp->sb_index_values[HC_INDEX_ETH_RX_CQ_CONS];
sys/dev/bxe/bxe.c
9628
fp->tx_cons_sb = &fp->sb_index_values[HC_INDEX_ETH_TX_CQ_CONS_COS0];
sys/dev/bxe/bxe.c
9635
bxe_init_sb(sc, fp->sb_dma.paddr, BXE_VF_ID_INVALID, FALSE,
sys/dev/bxe/bxe.c
9636
fp->fw_sb_id, fp->igu_sb_id);
sys/dev/bxe/bxe.c
9638
bxe_update_fp_sb_idx(fp);
sys/dev/bxe/bxe.c
9646
fp->cl_id,
sys/dev/bxe/bxe.c
9657
fp->cl_id,
sys/dev/bxe/bxe.c
9668
idx, fp->status_block.e2_sb, fp->cl_id, fp->fw_sb_id, fp->igu_sb_id);
sys/dev/bxe/bxe.c
9673
struct bxe_fastpath *fp,
sys/dev/bxe/bxe.c
9698
(fp->ustorm_rx_prods_offset + (i * 4)),
sys/dev/bxe/bxe.c
9706
fp->index, rx_bd_prod, rx_cq_prod, rx_sge_prod);
sys/dev/bxe/bxe.c
9712
struct bxe_fastpath *fp;
sys/dev/bxe/bxe.c
9716
fp = &sc->fp[i];
sys/dev/bxe/bxe.c
9718
fp->rx_bd_cons = 0;
sys/dev/bxe/bxe.c
9725
bxe_update_rx_prod(sc, fp,
sys/dev/bxe/bxe.c
9726
fp->rx_bd_prod,
sys/dev/bxe/bxe.c
9727
fp->rx_cq_prod,
sys/dev/bxe/bxe.c
9728
fp->rx_sge_prod);
sys/dev/bxe/bxe.c
9738
U64_LO(fp->rcq_dma.paddr));
sys/dev/bxe/bxe.c
9742
U64_HI(fp->rcq_dma.paddr));
sys/dev/bxe/bxe.c
9748
bxe_init_tx_ring_one(struct bxe_fastpath *fp)
sys/dev/bxe/bxe.c
9750
SET_FLAG(fp->tx_db.data.header.data, DOORBELL_HDR_T_DB_TYPE, 1);
sys/dev/bxe/bxe.c
9751
fp->tx_db.data.zero_fill1 = 0;
sys/dev/bxe/bxe.c
9752
fp->tx_db.data.prod = 0;
sys/dev/bxe/bxe.c
9754
fp->tx_pkt_prod = 0;
sys/dev/bxe/bxe.c
9755
fp->tx_pkt_cons = 0;
sys/dev/bxe/bxe.c
9756
fp->tx_bd_prod = 0;
sys/dev/bxe/bxe.c
9757
fp->tx_bd_cons = 0;
sys/dev/bxe/bxe.c
9758
fp->eth_q_stats.tx_pkts = 0;
sys/dev/bxe/bxe.c
9767
bxe_init_tx_ring_one(&sc->fp[i]);
sys/dev/bxe/bxe.h
1362
struct bxe_fastpath fp[MAX_RSS_CHAINS];
sys/dev/bxe/bxe.h
1871
#define BXE_FP(sc, nr, var) ((sc)->fp[(nr)].var)
sys/dev/bxe/bxe.h
1872
#define BXE_SP_OBJ(sc, fp) ((sc)->sp_objs[(fp)->index])
sys/dev/bxe/bxe.h
2289
bxe_update_fp_sb_idx(struct bxe_fastpath *fp)
sys/dev/bxe/bxe.h
2292
fp->fp_hc_idx = fp->sb_running_index[SM_RX_ID];
sys/dev/bxe/bxe.h
2421
bxe_stats_id(struct bxe_fastpath *fp)
sys/dev/bxe/bxe.h
2423
struct bxe_softc *sc = fp->sc;
sys/dev/bxe/bxe.h
2426
return (fp->cl_id);
sys/dev/bxe/bxe.h
2429
return (fp->cl_id + SC_PORT(sc) * FP_SB_MAX_E1x);
sys/dev/bxe/bxe.h
378
#define SGE_MASK_SET_BIT(fp, idx) \
sys/dev/bxe/bxe.h
379
__SGE_MASK_SET_BIT((fp)->sge_mask[(idx) >> RX_SGE_MASK_ELEM_SHIFT], \
sys/dev/bxe/bxe.h
382
#define SGE_MASK_CLEAR_BIT(fp, idx) \
sys/dev/bxe/bxe.h
383
__SGE_MASK_CLEAR_BIT((fp)->sge_mask[(idx) >> RX_SGE_MASK_ELEM_SHIFT], \
sys/dev/bxe/bxe.h
538
#define BXE_FP_TX_LOCK(fp) mtx_lock(&fp->tx_mtx)
sys/dev/bxe/bxe.h
539
#define BXE_FP_TX_UNLOCK(fp) mtx_unlock(&fp->tx_mtx)
sys/dev/bxe/bxe.h
540
#define BXE_FP_TX_LOCK_ASSERT(fp) mtx_assert(&fp->tx_mtx, MA_OWNED)
sys/dev/bxe/bxe.h
541
#define BXE_FP_TX_TRYLOCK(fp) mtx_trylock(&fp->tx_mtx)
sys/dev/bxe/bxe.h
543
#define BXE_FP_RX_LOCK(fp) mtx_lock(&fp->rx_mtx)
sys/dev/bxe/bxe.h
544
#define BXE_FP_RX_UNLOCK(fp) mtx_unlock(&fp->rx_mtx)
sys/dev/bxe/bxe.h
545
#define BXE_FP_RX_LOCK_ASSERT(fp) mtx_assert(&fp->rx_mtx, MA_OWNED)
sys/dev/bxe/bxe.h
607
#define FP_IDX(fp) (fp->index)
sys/dev/bxe/bxe.h
619
#define FP_CL_ID(fp) (fp->cl_id)
sys/dev/bxe/bxe.h
831
#define bxe_fcoe_fp(sc) (&sc->fp[FCOE_IDX(sc)])
sys/dev/bxe/bxe.h
838
#define bxe_ooo_fp(sc) (&sc->fp[OOO_IDX(sc)])
sys/dev/bxe/bxe.h
844
#define bxe_fwd_fp(sc) (&sc->fp[FWD_IDX(sc)])
sys/dev/bxe/bxe.h
848
#define bxe_fwd_txdata(fp) (fp->txdata_ptr[FIRST_TX_COS_INDEX])
sys/dev/bxe/bxe.h
850
#define IS_ETH_FP(fp) ((fp)->index < BXE_NUM_ETH_QUEUES((fp)->sc))
sys/dev/bxe/bxe.h
851
#define IS_FCOE_FP(fp) ((fp)->index == FCOE_IDX((fp)->sc))
sys/dev/bxe/bxe.h
853
#define IS_FWD_FP(fp) ((fp)->index == FWD_IDX((fp)->sc))
sys/dev/bxe/bxe.h
855
#define IS_OOO_FP(fp) ((fp)->index == OOO_IDX((fp)->sc))
sys/dev/bxe/bxe_stats.c
1005
struct bxe_fastpath *fp = &sc->fp[i];
sys/dev/bxe/bxe_stats.c
1008
struct tstorm_per_queue_stats *old_tclient = &fp->old_tclient;
sys/dev/bxe/bxe_stats.c
1011
struct ustorm_per_queue_stats *old_uclient = &fp->old_uclient;
sys/dev/bxe/bxe_stats.c
1014
struct xstorm_per_queue_stats *old_xclient = &fp->old_xclient;
sys/dev/bxe/bxe_stats.c
1015
struct bxe_eth_q_stats *qstats = &fp->eth_q_stats;
sys/dev/bxe/bxe_stats.c
1016
struct bxe_eth_q_stats_old *qstats_old = &fp->eth_q_stats_old;
sys/dev/bxe/bxe_stats.c
1176
le32toh(sc->fp[i].old_tclient.checksum_discard));
sys/dev/bxe/bxe_stats.c
1230
struct bxe_eth_q_stats *qstats = &sc->fp[i].eth_q_stats;
sys/dev/bxe/bxe_stats.c
1231
struct bxe_eth_q_stats_old *qstats_old = &sc->fp[i].eth_q_stats_old;
sys/dev/bxe/bxe_stats.c
1584
cur_query_entry->index = bxe_stats_id(&sc->fp[i]);
sys/dev/bxe/bxe_stats.c
1637
memset(&sc->fp[i].old_tclient, 0, sizeof(sc->fp[i].old_tclient));
sys/dev/bxe/bxe_stats.c
1638
memset(&sc->fp[i].old_uclient, 0, sizeof(sc->fp[i].old_uclient));
sys/dev/bxe/bxe_stats.c
1639
memset(&sc->fp[i].old_xclient, 0, sizeof(sc->fp[i].old_xclient));
sys/dev/bxe/bxe_stats.c
1641
memset(&sc->fp[i].eth_q_stats, 0,
sys/dev/bxe/bxe_stats.c
1642
sizeof(sc->fp[i].eth_q_stats));
sys/dev/bxe/bxe_stats.c
1643
memset(&sc->fp[i].eth_q_stats_old, 0,
sys/dev/bxe/bxe_stats.c
1644
sizeof(sc->fp[i].eth_q_stats_old));
sys/dev/bxe/bxe_stats.c
1684
struct bxe_fastpath *fp = &sc->fp[i];
sys/dev/bxe/bxe_stats.c
1685
struct bxe_eth_q_stats *qstats = &fp->eth_q_stats;
sys/dev/bxe/bxe_stats.c
1686
struct bxe_eth_q_stats_old *qstats_old = &fp->eth_q_stats_old;
sys/dev/bxe/bxe_stats.c
1736
struct bxe_eth_q_stats *qstats = &sc->fp[i].eth_q_stats;
sys/dev/bxe/ecore_sp.h
138
#define ECORE_FCOE_CID(sc) ((sc)->fp[FCOE_IDX(sc)].cl_id)
sys/dev/cxgb/cxgb_sge.c
1296
const uint64_t *fp = (const uint64_t *)sgl;
sys/dev/cxgb/cxgb_sge.c
1307
memcpy(&txd->flit[flits], fp, avail * sizeof(*fp));
sys/dev/cxgb/cxgb_sge.c
1313
fp += avail;
sys/dev/cxgb/cxgb_t3fw.c
117
const struct firmware *fp;
sys/dev/cxgb/cxgb_t3fw.c
122
fp = firmware_register("cxgb_t3c_protocol_sram", t3c_protocol_sram,
sys/dev/cxgb/cxgb_t3fw.c
125
if (fp == NULL)
sys/dev/cxgb/cxgb_t3fw.c
149
const struct firmware *fp;
sys/dev/cxgb/cxgb_t3fw.c
154
fp = firmware_register("cxgb_t3c_tp_eeprom", t3c_tp_eeprom,
sys/dev/cxgb/cxgb_t3fw.c
157
if (fp == NULL)
sys/dev/cxgb/cxgb_t3fw.c
21
const struct firmware *fp;
sys/dev/cxgb/cxgb_t3fw.c
26
fp = firmware_register("cxgb_t3fw", t3fw,
sys/dev/cxgb/cxgb_t3fw.c
29
if (fp == NULL)
sys/dev/cxgb/cxgb_t3fw.c
53
const struct firmware *fp;
sys/dev/cxgb/cxgb_t3fw.c
58
fp = firmware_register("cxgb_t3b_protocol_sram", t3b_protocol_sram,
sys/dev/cxgb/cxgb_t3fw.c
61
if (fp == NULL)
sys/dev/cxgb/cxgb_t3fw.c
85
const struct firmware *fp;
sys/dev/cxgb/cxgb_t3fw.c
90
fp = firmware_register("cxgb_t3b_tp_eeprom", t3b_tp_eeprom,
sys/dev/cxgb/cxgb_t3fw.c
93
if (fp == NULL)
sys/dev/cxgbe/cxgbei/icl_cxgbei.c
1020
struct file *fp;
sys/dev/cxgbe/cxgbei/icl_cxgbei.c
1036
cap_rights_init_one(&rights, CAP_SOCK_CLIENT), &fp);
sys/dev/cxgbe/cxgbei/icl_cxgbei.c
1039
if (fp->f_type != DTYPE_SOCKET) {
sys/dev/cxgbe/cxgbei/icl_cxgbei.c
1040
fdrop(fp, curthread);
sys/dev/cxgbe/cxgbei/icl_cxgbei.c
1043
so = fp->f_data;
sys/dev/cxgbe/cxgbei/icl_cxgbei.c
1046
fdrop(fp, curthread);
sys/dev/cxgbe/cxgbei/icl_cxgbei.c
1053
fdrop(fp, curthread);
sys/dev/cxgbe/cxgbei/icl_cxgbei.c
1058
fp->f_ops = &badfileops;
sys/dev/cxgbe/cxgbei/icl_cxgbei.c
1059
fp->f_data = NULL;
sys/dev/cxgbe/cxgbei/icl_cxgbei.c
1060
fdrop(fp, curthread);
sys/dev/cxgbe/cxgbei/icl_cxgbei.c
1698
struct file *fp;
sys/dev/cxgbe/cxgbei/icl_cxgbei.c
1706
cap_rights_init_one(&rights, CAP_SOCK_CLIENT), &fp);
sys/dev/cxgbe/cxgbei/icl_cxgbei.c
1709
if (fp->f_type != DTYPE_SOCKET) {
sys/dev/cxgbe/cxgbei/icl_cxgbei.c
1710
fdrop(fp, curthread);
sys/dev/cxgbe/cxgbei/icl_cxgbei.c
1713
so = fp->f_data;
sys/dev/cxgbe/cxgbei/icl_cxgbei.c
1716
fdrop(fp, curthread);
sys/dev/cxgbe/cxgbei/icl_cxgbei.c
1722
fdrop(fp, curthread);
sys/dev/cxgbe/cxgbei/icl_cxgbei.c
1725
fdrop(fp, curthread);
sys/dev/cxgbe/firmware/t4fw_interface.h
360
__be16 fp;
sys/dev/cxgbe/firmware/t4fw_interface.h
392
__be16 fp;
sys/dev/cxgbe/nvmf/nvmf_che.c
2403
struct file *fp;
sys/dev/cxgbe/nvmf/nvmf_che.c
2423
cap_rights_init_one(&rights, CAP_SOCK_CLIENT), &fp);
sys/dev/cxgbe/nvmf/nvmf_che.c
2426
if (fp->f_type != DTYPE_SOCKET) {
sys/dev/cxgbe/nvmf/nvmf_che.c
2427
fdrop(fp, curthread);
sys/dev/cxgbe/nvmf/nvmf_che.c
2430
so = fp->f_data;
sys/dev/cxgbe/nvmf/nvmf_che.c
2433
fdrop(fp, curthread);
sys/dev/cxgbe/nvmf/nvmf_che.c
2439
fdrop(fp, curthread);
sys/dev/cxgbe/nvmf/nvmf_che.c
2455
fdrop(fp, curthread);
sys/dev/cxgbe/nvmf/nvmf_che.c
2475
fdrop(fp, curthread);
sys/dev/cxgbe/nvmf/nvmf_che.c
2514
fdrop(fp, curthread);
sys/dev/cxgbe/nvmf/nvmf_che.c
2530
fdrop(fp, curthread);
sys/dev/cxgbe/nvmf/nvmf_che.c
2535
fp->f_ops = &badfileops;
sys/dev/cxgbe/nvmf/nvmf_che.c
2536
fp->f_data = NULL;
sys/dev/cxgbe/nvmf/nvmf_che.c
2597
fdrop(fp, curthread);
sys/dev/cxgbe/t4_filter.c
906
fwr->fp = htobe16(f->fs.val.sport);
sys/dev/enic/vnic_devcmd.h
1006
vnic_filter_size(struct filter_v2 *fp)
sys/dev/enic/vnic_devcmd.h
1010
switch (fp->type) {
sys/dev/enic/vnic_devcmd.h
1012
size = sizeof(fp->u.usnic);
sys/dev/enic/vnic_devcmd.h
1015
size = sizeof(fp->u.ipv4);
sys/dev/enic/vnic_devcmd.h
1019
size = sizeof(fp->u.mac_vlan);
sys/dev/enic/vnic_devcmd.h
1022
size = sizeof(fp->u.vlan_3tuple);
sys/dev/enic/vnic_devcmd.h
1026
size = sizeof(fp->u.generic_1);
sys/dev/enic/vnic_devcmd.h
1029
size = sizeof(fp->u);
sys/dev/enic/vnic_devcmd.h
1032
size += sizeof(fp->type);
sys/dev/filemon/filemon.c
253
struct file *fp;
sys/dev/filemon/filemon.c
258
if (filemon->fp == NULL)
sys/dev/filemon/filemon.c
270
fp = filemon->fp;
sys/dev/filemon/filemon.c
271
filemon->fp = NULL;
sys/dev/filemon/filemon.c
274
fdrop(fp, curthread);
sys/dev/filemon/filemon.c
360
struct file *fp;
sys/dev/filemon/filemon.c
372
if (filemon->fp != NULL) {
sys/dev/filemon/filemon.c
377
error = fget_write(td, *(int *)data, &cap_pwrite_rights, &fp);
sys/dev/filemon/filemon.c
383
if ((fp->f_ops->fo_flags & DFLAG_PASSABLE) == 0) {
sys/dev/filemon/filemon.c
384
fdrop(fp, curthread);
sys/dev/filemon/filemon.c
388
filemon->fp = fp;
sys/dev/filemon/filemon.c
84
struct file *fp; /* Output file pointer. */
sys/dev/filemon/filemon_wrapper.c
152
struct file *fp;
sys/dev/filemon/filemon_wrapper.c
160
fp = NULL;
sys/dev/filemon/filemon_wrapper.c
185
cap_rights_init_one(&rights, CAP_LOOKUP), &fp) == 0) {
sys/dev/filemon/filemon_wrapper.c
186
vn_fullpath(fp->f_vnode, &atpath, &freepath);
sys/dev/filemon/filemon_wrapper.c
206
if (fp != NULL)
sys/dev/filemon/filemon_wrapper.c
207
fdrop(fp, td);
sys/dev/filemon/filemon_wrapper.c
55
if (filemon->fp == NULL)
sys/dev/filemon/filemon_wrapper.c
68
if (filemon->fp->f_type == DTYPE_VNODE)
sys/dev/filemon/filemon_wrapper.c
71
error = fo_write(filemon->fp, &auio, filemon->cred, 0, curthread);
sys/dev/firewire/firewire.c
1006
fw_dump_hdr(struct fw_pkt *fp, char *prefix)
sys/dev/firewire/firewire.c
1010
fp->mode.hdr.dst & 0x3f,
sys/dev/firewire/firewire.c
1011
fp->mode.hdr.tlrt >> 2, fp->mode.hdr.tlrt & 3,
sys/dev/firewire/firewire.c
1012
fp->mode.hdr.tcode, fp->mode.hdr.pri,
sys/dev/firewire/firewire.c
1013
fp->mode.hdr.src);
sys/dev/firewire/firewire.c
1235
struct fw_pkt *fp;
sys/dev/firewire/firewire.c
1245
fp = &xfer->send.hdr;
sys/dev/firewire/firewire.c
1246
fp->mode.ld[1] = 0;
sys/dev/firewire/firewire.c
1248
fp->mode.ld[1] |= (1 << 23) | (root_node & 0x3f) << 24;
sys/dev/firewire/firewire.c
1250
fp->mode.ld[1] |= (1 << 22) | (gap_count & 0x3f) << 16;
sys/dev/firewire/firewire.c
1251
fp->mode.ld[2] = ~fp->mode.ld[1];
sys/dev/firewire/firewire.c
1253
fp->mode.common.tcode |= FWTCODE_PHY;
sys/dev/firewire/firewire.c
188
struct fw_pkt *fp;
sys/dev/firewire/firewire.c
1904
struct fw_pkt *fp, *resfp;
sys/dev/firewire/firewire.c
1922
fp = (struct fw_pkt *)rb->vec[0].iov_base;
sys/dev/firewire/firewire.c
1923
tcode = fp->mode.common.tcode;
sys/dev/firewire/firewire.c
1929
rb->xfer = fw_tl2xfer(rb->fc, fp->mode.hdr.src,
sys/dev/firewire/firewire.c
1930
fp->mode.hdr.tlrt >> 2, fp->mode.hdr.tcode);
sys/dev/firewire/firewire.c
1936
fp->mode.hdr.src,
sys/dev/firewire/firewire.c
1937
fp->mode.hdr.tlrt >> 2,
sys/dev/firewire/firewire.c
1938
fp->mode.hdr.tlrt & 3,
sys/dev/firewire/firewire.c
1939
fp->mode.rresq.data);
sys/dev/firewire/firewire.c
1942
rb->xfer = fw_tl2xfer(rb->fc, fp->mode.hdr.src,
sys/dev/firewire/firewire.c
1943
(fp->mode.hdr.tlrt >> 2)^3);
sys/dev/firewire/firewire.c
198
fp = &xfer->send.hdr;
sys/dev/firewire/firewire.c
1981
bind = fw_bindlookup(rb->fc, fp->mode.rreqq.dest_hi,
sys/dev/firewire/firewire.c
1982
fp->mode.rreqq.dest_lo);
sys/dev/firewire/firewire.c
1988
fp->mode.wreqq.dest_hi,
sys/dev/firewire/firewire.c
1989
fp->mode.wreqq.dest_lo,
sys/dev/firewire/firewire.c
1991
fp->mode.hdr.src,
sys/dev/firewire/firewire.c
1992
ntohl(fp->mode.wreqq.data));
sys/dev/firewire/firewire.c
200
tcode = fp->mode.common.tcode & 0xf;
sys/dev/firewire/firewire.c
2022
resfp->mode.hdr.dst = fp->mode.hdr.src;
sys/dev/firewire/firewire.c
2023
resfp->mode.hdr.tlrt = fp->mode.hdr.tlrt;
sys/dev/firewire/firewire.c
2024
resfp->mode.hdr.pri = fp->mode.hdr.pri;
sys/dev/firewire/firewire.c
209
((tcode != FWTCODE_RREQQ) || (fp->mode.rreqq.dest_hi != 0xffff) ||
sys/dev/firewire/firewire.c
210
(fp->mode.rreqq.dest_lo < 0xf0000000) ||
sys/dev/firewire/firewire.c
211
(fp->mode.rreqq.dest_lo >= 0xf0001000))) {
sys/dev/firewire/firewire.c
2139
struct fw_pkt *fp;
sys/dev/firewire/firewire.c
2148
fp = &xfer->send.hdr;
sys/dev/firewire/firewire.c
2149
fp->mode.lreq.dest_hi = 0xffff;
sys/dev/firewire/firewire.c
2150
fp->mode.lreq.tlrt = 0;
sys/dev/firewire/firewire.c
2151
fp->mode.lreq.tcode = FWTCODE_LREQ;
sys/dev/firewire/firewire.c
2152
fp->mode.lreq.pri = 0;
sys/dev/firewire/firewire.c
2153
fp->mode.lreq.src = 0;
sys/dev/firewire/firewire.c
2154
fp->mode.lreq.len = 8;
sys/dev/firewire/firewire.c
2155
fp->mode.lreq.extcode = EXTCODE_CMP_SWAP;
sys/dev/firewire/firewire.c
2156
fp->mode.lreq.dst = FWLOCALBUS | fc->irm;
sys/dev/firewire/firewire.c
2157
fp->mode.lreq.dest_lo = 0xf0000000 | BUS_MGR_ID;
sys/dev/firewire/firewire.c
227
len = fp->mode.stream.len;
sys/dev/firewire/firewire.c
229
len = fp->mode.rresb.len;
sys/dev/firewire/fwdev.c
272
struct fw_pkt *fp;
sys/dev/firewire/fwdev.c
288
fp = &xfer->recv.hdr;
sys/dev/firewire/fwdev.c
291
fc->irx_post(fc, fp->mode.ld);
sys/dev/firewire/fwdev.c
293
tinfo = &xfer->fc->tcode[fp->mode.hdr.tcode];
sys/dev/firewire/fwdev.c
294
err = uiomove(fp, tinfo->hdr_len, uio);
sys/dev/firewire/fwdev.c
320
struct fw_pkt *fp;
sys/dev/firewire/fwdev.c
363
fp = (struct fw_pkt *)fwdma_v_addr(ir->buf,
sys/dev/firewire/fwdev.c
366
fc->irx_post(fc, fp->mode.ld);
sys/dev/firewire/fwdev.c
367
if (fp->mode.stream.len == 0) {
sys/dev/firewire/fwdev.c
371
err = uiomove((caddr_t)fp,
sys/dev/firewire/fwdev.c
372
fp->mode.stream.len + sizeof(uint32_t), uio);
sys/dev/firewire/fwdev.c
452
struct fw_pkt *fp;
sys/dev/firewire/fwdev.c
495
fp = (struct fw_pkt *)fwdma_v_addr(it->buf,
sys/dev/firewire/fwdev.c
497
err = uiomove((caddr_t)fp, sizeof(struct fw_isohdr), uio);
sys/dev/firewire/fwdev.c
498
err = uiomove((caddr_t)fp->mode.stream.payload,
sys/dev/firewire/fwdev.c
499
fp->mode.stream.len, uio);
sys/dev/firewire/fwdev.c
547
struct fw_pkt *fp;
sys/dev/firewire/fwdev.c
645
fp = &asyreq->pkt;
sys/dev/firewire/fwdev.c
646
tinfo = &fc->tcode[fp->mode.hdr.tcode];
sys/dev/firewire/fwdev.c
667
fp->mode.hdr.dst = FWLOCALBUS | fwdev->dst;
sys/dev/firewire/fwdev.c
677
bcopy(fp, (void *)&xfer->send.hdr, tinfo->hdr_len);
sys/dev/firewire/fwdev.c
679
bcopy((char *)fp + tinfo->hdr_len,
sys/dev/firewire/fwdev.c
710
bcopy(&xfer->recv.hdr, fp, tinfo->hdr_len);
sys/dev/firewire/fwdev.c
711
bcopy(xfer->recv.payload, (char *)fp + tinfo->hdr_len, pay_len);
sys/dev/firewire/fwmem.c
129
struct fw_pkt *fp;
sys/dev/firewire/fwmem.c
136
fp = &xfer->send.hdr;
sys/dev/firewire/fwmem.c
137
fp->mode.rreqq.tcode = FWTCODE_RREQQ;
sys/dev/firewire/fwmem.c
138
fp->mode.rreqq.dest_hi = dst_hi;
sys/dev/firewire/fwmem.c
139
fp->mode.rreqq.dest_lo = dst_lo;
sys/dev/firewire/fwmem.c
166
struct fw_pkt *fp;
sys/dev/firewire/fwmem.c
172
fp = &xfer->send.hdr;
sys/dev/firewire/fwmem.c
173
fp->mode.wreqq.tcode = FWTCODE_WREQQ;
sys/dev/firewire/fwmem.c
174
fp->mode.wreqq.dest_hi = dst_hi;
sys/dev/firewire/fwmem.c
175
fp->mode.wreqq.dest_lo = dst_lo;
sys/dev/firewire/fwmem.c
176
fp->mode.wreqq.data = *(uint32_t *)data;
sys/dev/firewire/fwmem.c
203
struct fw_pkt *fp;
sys/dev/firewire/fwmem.c
209
fp = &xfer->send.hdr;
sys/dev/firewire/fwmem.c
210
fp->mode.rreqb.tcode = FWTCODE_RREQB;
sys/dev/firewire/fwmem.c
211
fp->mode.rreqb.dest_hi = dst_hi;
sys/dev/firewire/fwmem.c
212
fp->mode.rreqb.dest_lo = dst_lo;
sys/dev/firewire/fwmem.c
213
fp->mode.rreqb.len = len;
sys/dev/firewire/fwmem.c
214
fp->mode.rreqb.extcode = 0;
sys/dev/firewire/fwmem.c
241
struct fw_pkt *fp;
sys/dev/firewire/fwmem.c
247
fp = &xfer->send.hdr;
sys/dev/firewire/fwmem.c
248
fp->mode.wreqb.tcode = FWTCODE_WREQB;
sys/dev/firewire/fwmem.c
249
fp->mode.wreqb.dest_hi = dst_hi;
sys/dev/firewire/fwmem.c
250
fp->mode.wreqb.dest_lo = dst_lo;
sys/dev/firewire/fwmem.c
251
fp->mode.wreqb.len = len;
sys/dev/firewire/fwmem.c
252
fp->mode.wreqb.extcode = 0;
sys/dev/firewire/fwohci.c
2506
struct fw_pkt *fp;
sys/dev/firewire/fwohci.c
2523
fp = (struct fw_pkt *)db_tr->buf;
sys/dev/firewire/fwohci.c
2525
ohcifp->mode.ld[0] = fp->mode.ld[0];
sys/dev/firewire/fwohci.c
2527
ohcifp->mode.stream.len = fp->mode.stream.len;
sys/dev/firewire/fwohci.c
2536
FWOHCI_DMA_SET(db[2].db.desc.cmd, fp->mode.stream.len);
sys/dev/firewire/fwohci.c
2654
fwohci_arcv_swap(struct fw_pkt *fp, int len)
sys/dev/firewire/fwohci.c
2664
ld0 = FWOHCI_DMA_READ(fp->mode.ld[0]);
sys/dev/firewire/fwohci.c
2701
fp->mode.ld[i] = FWOHCI_DMA_READ(fp->mode.ld[i]);
sys/dev/firewire/fwohci.c
2707
fwohci_get_plen(struct fwohci_softc *sc, struct fwohci_dbch *dbch, struct fw_pkt *fp)
sys/dev/firewire/fwohci.c
2712
info = &tinfo[fp->mode.common.tcode];
sys/dev/firewire/fwohci.c
2715
r += roundup2((uint32_t)fp->mode.wreqb.len, sizeof(uint32_t));
sys/dev/firewire/fwohci.c
2720
fp->mode.common.tcode);
sys/dev/firewire/fwohci.c
2756
struct fw_pkt *fp;
sys/dev/firewire/fwohci.c
2845
fp=(struct fw_pkt *)vec[0].iov_base;
sys/dev/firewire/fwohci.c
2849
fp=(struct fw_pkt *)ld;
sys/dev/firewire/fwohci.c
2850
hlen = fwohci_arcv_swap(fp, len);
sys/dev/firewire/fwohci.c
2867
plen = fwohci_get_plen(sc, dbch, fp) - offset;
sys/dev/firewire/fwohci.c
2910
printf("fwohci_arcv: ack pending tcode=0x%x..\n", fp->mode.common.tcode);
sys/dev/firewire/fwohci.c
2940
fp->mode.common.tcode, stat);
sys/dev/firewire/fwohci.c
865
struct fw_pkt *fp;
sys/dev/firewire/fwohci.c
901
fp = &xfer->send.hdr;
sys/dev/firewire/fwohci.c
902
tcode = fp->mode.common.tcode;
sys/dev/firewire/fwohci.c
911
ld[i/4] = fp->mode.ld[i/4];
sys/dev/firewire/fwohci.c
916
ohcifp->mode.stream.len = fp->mode.stream.len;
sys/dev/firewire/fwohci.c
919
ld[1] = fp->mode.ld[1];
sys/dev/firewire/fwohci.c
920
ld[2] = fp->mode.ld[2];
sys/dev/firewire/fwohci.c
924
ohcifp->mode.asycomm.dst = fp->mode.hdr.dst;
sys/dev/firewire/if_fwe.c
488
struct fw_pkt *fp;
sys/dev/firewire/if_fwe.c
518
fp = &xfer->send.hdr;
sys/dev/firewire/if_fwe.c
520
fp->mode.stream.len = m->m_pkthdr.len;
sys/dev/firewire/if_fwe.c
550
struct fw_pkt *fp;
sys/dev/firewire/if_fwe.c
561
fp = mtod(sxfer->mbuf, struct fw_pkt *);
sys/dev/firewire/if_fwe.c
563
fwe->fd.fc->irx_post(fwe->fd.fc, fp->mode.ld);
sys/dev/firewire/if_fwe.c
574
if (sxfer->resp != 0 || fp->mode.stream.len <
sys/dev/firewire/if_fwe.c
585
m->m_len = m->m_pkthdr.len = fp->mode.stream.len - ETHER_ALIGN;
sys/dev/firewire/if_fwip.c
534
struct fw_pkt *fp;
sys/dev/firewire/if_fwip.c
593
fp = &xfer->send.hdr;
sys/dev/firewire/if_fwip.c
606
fp->mode.stream.len = m->m_pkthdr.len;
sys/dev/firewire/if_fwip.c
607
fp->mode.stream.chtag = broadcast_channel;
sys/dev/firewire/if_fwip.c
608
fp->mode.stream.tcode = FWTCODE_STREAM;
sys/dev/firewire/if_fwip.c
609
fp->mode.stream.sy = 0;
sys/dev/firewire/if_fwip.c
653
fp->mode.wreqb = fwip->last_hdr.mode.wreqb;
sys/dev/firewire/if_fwip.c
654
fp->mode.wreqb.len = m->m_pkthdr.len;
sys/dev/firewire/if_fwip.c
710
struct fw_pkt *fp;
sys/dev/firewire/if_fwip.c
720
fp = mtod(sxfer->mbuf, struct fw_pkt *);
sys/dev/firewire/if_fwip.c
722
fwip->fd.fc->irx_post(fwip->fd.fc, fp->mode.ld);
sys/dev/firewire/if_fwip.c
740
if (sxfer->resp != 0 || fp->mode.stream.len <
sys/dev/firewire/if_fwip.c
746
m->m_len = m->m_pkthdr.len = fp->mode.stream.len
sys/dev/firewire/if_fwip.c
747
+ sizeof(fp->mode.stream);
sys/dev/firewire/if_fwip.c
754
if (fp->mode.stream.chtag == broadcast_channel)
sys/dev/firewire/if_fwip.c
837
struct fw_pkt *fp;
sys/dev/firewire/if_fwip.c
845
fp = &xfer->recv.hdr;
sys/dev/firewire/if_fwip.c
851
address = ((uint64_t)fp->mode.wreqb.dest_hi << 32)
sys/dev/firewire/if_fwip.c
852
| fp->mode.wreqb.dest_lo;
sys/dev/firewire/if_fwip.c
853
if (fp->mode.wreqb.tcode != FWTCODE_WREQB) {
sys/dev/firewire/if_fwip.c
888
fp->mode.wreqb.src & 0x3f);
sys/dev/firewire/if_fwip.c
905
m->m_len = m->m_pkthdr.len = fp->mode.wreqb.len;
sys/dev/firewire/if_fwip.c
907
firewire_input(ifp, m, fp->mode.wreqb.src);
sys/dev/firewire/sbp.c
1113
struct fw_pkt *fp;
sys/dev/firewire/sbp.c
1127
fp = &xfer->send.hdr;
sys/dev/firewire/sbp.c
1128
fp->mode.wreqq.data = htonl(0xf);
sys/dev/firewire/sbp.c
1152
struct fw_pkt *fp;
sys/dev/firewire/sbp.c
1161
fp = &xfer->send.hdr;
sys/dev/firewire/sbp.c
1162
fp->mode.wreqq.dest_hi = 0xffff;
sys/dev/firewire/sbp.c
1163
fp->mode.wreqq.dest_lo = 0xf0000000 | BUSY_TIMEOUT;
sys/dev/firewire/sbp.c
1164
fp->mode.wreqq.data = htonl((1 << (13 + 12)) | 0xf);
sys/dev/firewire/sbp.c
1203
struct fw_pkt *fp;
sys/dev/firewire/sbp.c
1227
fp = &xfer->send.hdr;
sys/dev/firewire/sbp.c
1228
fp->mode.wreqb.len = 8;
sys/dev/firewire/sbp.c
1229
fp->mode.wreqb.extcode = 0;
sys/dev/firewire/sbp.c
1270
struct fw_pkt *fp;
sys/dev/firewire/sbp.c
1285
fp = &xfer->send.hdr;
sys/dev/firewire/sbp.c
1286
fp->mode.wreqq.data = htonl(0xf);
sys/dev/firewire/sbp.c
1294
struct fw_pkt *fp;
sys/dev/firewire/sbp.c
1332
fp = &xfer->send.hdr;
sys/dev/firewire/sbp.c
1333
fp->mode.wreqq.dest_hi = sdev->login->cmd_hi;
sys/dev/firewire/sbp.c
1334
fp->mode.wreqq.dest_lo = sdev->login->cmd_lo + offset;
sys/dev/firewire/sbp.c
1335
fp->mode.wreqq.tlrt = 0;
sys/dev/firewire/sbp.c
1336
fp->mode.wreqq.tcode = tcode;
sys/dev/firewire/sbp.c
1337
fp->mode.wreqq.pri = 0;
sys/dev/firewire/sbp.c
1338
fp->mode.wreqq.dst = FWLOCALBUS | sdev->target->fwdev->dst;
sys/dev/firewire/sbp.c
1347
struct fw_pkt *fp;
sys/dev/firewire/sbp.c
1421
fp = &xfer->send.hdr;
sys/dev/firewire/sbp.c
1422
fp->mode.wreqb.dest_hi = sdev->target->mgm_hi;
sys/dev/firewire/sbp.c
1423
fp->mode.wreqb.dest_lo = sdev->target->mgm_lo;
sys/dev/firewire/sbp.c
1424
fp->mode.wreqb.len = 8;
sys/dev/firewire/sbp.c
1425
fp->mode.wreqb.extcode = 0;
sys/dev/firewire/sbp.c
916
struct fw_pkt *fp;
sys/dev/firewire/sbp.c
925
fp = &xfer->send.hdr;
sys/dev/firewire/sbp.c
926
fp->mode.wreqq.dest_hi = 0xffff;
sys/dev/firewire/sbp.c
927
fp->mode.wreqq.dest_lo = 0xf0000000 | RESET_START;
sys/dev/firewire/sbp.c
928
fp->mode.wreqq.data = htonl(0xf);
sys/dev/firewire/sbp_targ.c
1878
struct fw_pkt *fp;
sys/dev/firewire/sbp_targ.c
1882
fp = &xfer->recv.hdr;
sys/dev/firewire/sbp_targ.c
1883
if (fp->mode.wreqb.tcode != FWTCODE_WREQB) {
sys/dev/firewire/sbp_targ.c
1884
printf("%s: tcode = %d\n", __func__, fp->mode.wreqb.tcode);
sys/dev/firewire/sbp_targ.c
1899
struct fw_pkt *fp, *sfp;
sys/dev/firewire/sbp_targ.c
1907
fp = &xfer->recv.hdr;
sys/dev/firewire/sbp_targ.c
1908
fwdev = fw_noderesolve_nodeid(sc->fd.fc, fp->mode.wreqb.src & 0x3f);
sys/dev/firewire/sbp_targ.c
1911
__func__, fp->mode.wreqb.src & 0x3f);
sys/dev/firewire/sbp_targ.c
1915
lo = fp->mode.wreqb.dest_lo;
sys/dev/firewire/sbp_targ.c
1931
sfp->mode.wres.dst = fp->mode.wreqb.src;
sys/dev/firewire/sbp_targ.c
1932
sfp->mode.wres.tlrt = fp->mode.wreqb.tlrt;
sys/dev/hwpmc/hwpmc_arm.c
105
ra = fp + FP_OFF * sizeof(uintptr_t);
sys/dev/hwpmc/hwpmc_arm.c
108
fp = *(uintptr_t *)ra;
sys/dev/hwpmc/hwpmc_arm.c
109
if (!PMC_IN_KERNEL_STACK(fp))
sys/dev/hwpmc/hwpmc_arm.c
120
uintptr_t pc, r, oldfp, fp;
sys/dev/hwpmc/hwpmc_arm.c
132
oldfp = fp = PMC_TRAPFRAME_TO_FP(tf);
sys/dev/hwpmc/hwpmc_arm.c
135
!PMC_IN_USERSPACE(fp))
sys/dev/hwpmc/hwpmc_arm.c
140
r = fp + PC_OFF * sizeof(uintptr_t);
sys/dev/hwpmc/hwpmc_arm.c
149
oldfp = fp;
sys/dev/hwpmc/hwpmc_arm.c
150
r = fp + FP_OFF * sizeof(uintptr_t);
sys/dev/hwpmc/hwpmc_arm.c
151
if (copyin((void *)r, &fp, sizeof(fp)) != 0)
sys/dev/hwpmc/hwpmc_arm.c
153
if (fp < oldfp || !PMC_IN_USERSPACE(fp))
sys/dev/hwpmc/hwpmc_arm.c
77
uintptr_t pc, ra, fp;
sys/dev/hwpmc/hwpmc_arm.c
89
fp = PMC_TRAPFRAME_TO_FP(tf);
sys/dev/hwpmc/hwpmc_arm.c
90
if (!PMC_IN_KERNEL(pc) || !PMC_IN_KERNEL_STACK(fp))
sys/dev/hwpmc/hwpmc_arm.c
95
ra = fp + PC_OFF * sizeof(uintptr_t);
sys/dev/hwpmc/hwpmc_arm64_md.c
103
oldfp = fp = PMC_TRAPFRAME_TO_FP(tf);
sys/dev/hwpmc/hwpmc_arm64_md.c
106
!PMC_IN_USERSPACE(fp))
sys/dev/hwpmc/hwpmc_arm64_md.c
111
r = fp + sizeof(uintptr_t);
sys/dev/hwpmc/hwpmc_arm64_md.c
120
oldfp = fp;
sys/dev/hwpmc/hwpmc_arm64_md.c
121
r = fp;
sys/dev/hwpmc/hwpmc_arm64_md.c
122
if (copyin((void *)r, &fp, sizeof(fp)) != 0)
sys/dev/hwpmc/hwpmc_arm64_md.c
124
if (fp < oldfp || !PMC_IN_USERSPACE(fp))
sys/dev/hwpmc/hwpmc_arm64_md.c
72
frame.fp = PMC_TRAPFRAME_TO_FP(tf);
sys/dev/hwpmc/hwpmc_arm64_md.c
73
if (!PMC_IN_KERNEL(frame.pc) || !PMC_IN_KERNEL_STACK(frame.fp))
sys/dev/hwpmc/hwpmc_arm64_md.c
91
uintptr_t pc, r, oldfp, fp;
sys/dev/hwpmc/hwpmc_x86.c
106
copyin((void *) fp, &fp, sizeof(fp)) != 0)
sys/dev/hwpmc/hwpmc_x86.c
115
if (fp < oldfp)
sys/dev/hwpmc/hwpmc_x86.c
118
r = fp + sizeof(uintptr_t); /* address of return address */
sys/dev/hwpmc/hwpmc_x86.c
119
oldfp = fp;
sys/dev/hwpmc/hwpmc_x86.c
122
copyin((void *) fp, &fp, sizeof(fp)) != 0)
sys/dev/hwpmc/hwpmc_x86.c
156
uintptr_t fp, pc, ra, sp;
sys/dev/hwpmc/hwpmc_x86.c
164
fp = PMC_TRAPFRAME_TO_FP(tf);
sys/dev/hwpmc/hwpmc_x86.c
168
ra = fp + sizeof(uintptr_t); /* points to return address */
sys/dev/hwpmc/hwpmc_x86.c
175
!PMC_IN_KERNEL_STACK(fp))
sys/dev/hwpmc/hwpmc_x86.c
207
fp = *(uintptr_t *)fp;
sys/dev/hwpmc/hwpmc_x86.c
216
ra = fp + sizeof(uintptr_t);
sys/dev/hwpmc/hwpmc_x86.c
217
if (!PMC_IN_KERNEL_STACK(fp) || !PMC_IN_KERNEL_STACK(ra))
sys/dev/hwpmc/hwpmc_x86.c
220
fp = *(uintptr_t *)fp;
sys/dev/hwpmc/hwpmc_x86.c
78
uintptr_t fp, oldfp, pc, r, sp;
sys/dev/hwpmc/hwpmc_x86.c
84
oldfp = fp = PMC_TRAPFRAME_TO_FP(tf);
sys/dev/hwpmc/hwpmc_x86.c
89
r = fp + sizeof(uintptr_t); /* points to return address */
sys/dev/ipmi/ipmi_linux.c
106
error = (fo_ioctl(fp, cmd, (caddr_t)args->arg, td->td_ucred, td));
sys/dev/ipmi/ipmi_linux.c
107
fdrop(fp, td);
sys/dev/ipmi/ipmi_linux.c
85
struct file *fp;
sys/dev/ipmi/ipmi_linux.c
90
&fp);
sys/dev/ipw/if_ipw.c
2309
const struct firmware *fp;
sys/dev/ipw/if_ipw.c
2339
fp = sc->sc_firmware;
sys/dev/ipw/if_ipw.c
2340
hdr = (const struct ipw_firmware_hdr *)fp->data;
sys/dev/ipw/if_ipw.c
2342
DPRINTF(("Loading firmware image '%s'\n", fp->name));
sys/dev/ipw/if_ipw.c
2343
fw = (const char *)fp->data + sizeof *hdr + le32toh(hdr->mainsz);
sys/dev/ipw/if_ipw.c
2371
fw = (const char *)fp->data + sizeof *hdr;
sys/dev/ipw/if_ipw.c
408
const struct firmware *fp;
sys/dev/ipw/if_ipw.c
445
fp = sc->sc_firmware;
sys/dev/ipw/if_ipw.c
446
if (fp->datasize < sizeof *hdr) {
sys/dev/ipw/if_ipw.c
448
"firmware image too short %zu\n", fp->datasize);
sys/dev/ipw/if_ipw.c
453
hdr = (const struct ipw_firmware_hdr *)fp->data;
sys/dev/ipw/if_ipw.c
454
if (fp->datasize < sizeof *hdr + le32toh(hdr->mainsz) +
sys/dev/ipw/if_ipw.c
457
"firmware image too short %zu\n", fp->datasize);
sys/dev/iscsi/icl_soft.c
1507
struct file *fp;
sys/dev/iscsi/icl_soft.c
1535
cap_rights_init_one(&rights, CAP_SOCK_CLIENT), &fp);
sys/dev/iscsi/icl_soft.c
1538
if (fp->f_type != DTYPE_SOCKET) {
sys/dev/iscsi/icl_soft.c
1539
fdrop(fp, curthread);
sys/dev/iscsi/icl_soft.c
1542
so = fp->f_data;
sys/dev/iscsi/icl_soft.c
1544
fdrop(fp, curthread);
sys/dev/iscsi/icl_soft.c
1552
fdrop(fp, curthread);
sys/dev/iscsi/icl_soft.c
1556
ic->ic_socket = fp->f_data;
sys/dev/iscsi/icl_soft.c
1557
fp->f_ops = &badfileops;
sys/dev/iscsi/icl_soft.c
1558
fp->f_data = NULL;
sys/dev/iscsi/icl_soft.c
1559
fdrop(fp, curthread);
sys/dev/iwi/if_iwi.c
2145
const struct firmware *fp = fw->fp;
sys/dev/iwi/if_iwi.c
2148
if (fp->datasize < sizeof (struct iwi_firmware_ohdr)) {
sys/dev/iwi/if_iwi.c
2149
device_printf(sc->sc_dev, "image '%s' too small\n", fp->name);
sys/dev/iwi/if_iwi.c
2152
hdr = (const struct iwi_firmware_ohdr *)fp->data;
sys/dev/iwi/if_iwi.c
2156
fp->name, IWI_FW_GET_MAJOR(le32toh(hdr->version)),
sys/dev/iwi/if_iwi.c
2161
fw->data = ((const char *) fp->data) + sizeof(struct iwi_firmware_ohdr);
sys/dev/iwi/if_iwi.c
2162
fw->size = fp->datasize - sizeof(struct iwi_firmware_ohdr);
sys/dev/iwi/if_iwi.c
2163
fw->name = fp->name;
sys/dev/iwi/if_iwi.c
2185
if (fw->fp == NULL)
sys/dev/iwi/if_iwi.c
2186
fw->fp = firmware_get(fwname);
sys/dev/iwi/if_iwi.c
2188
if (uc->fp == NULL && fw->fp != NULL && fw->fp->version < 300)
sys/dev/iwi/if_iwi.c
2189
uc->fp = firmware_get(ucname);
sys/dev/iwi/if_iwi.c
2210
const struct firmware *fp;
sys/dev/iwi/if_iwi.c
2231
fp = sc->fw_fw.fp;
sys/dev/iwi/if_iwi.c
2232
if (fp == NULL) {
sys/dev/iwi/if_iwi.c
2236
if (fp->version < 300) {
sys/dev/iwi/if_iwi.c
2246
if (sc->fw_uc.fp == NULL) {
sys/dev/iwi/if_iwi.c
2250
if (sc->fw_boot.fp == NULL) {
sys/dev/iwi/if_iwi.c
2251
sc->fw_boot.fp = firmware_get("iwi_boot");
sys/dev/iwi/if_iwi.c
2252
if (sc->fw_boot.fp == NULL) {
sys/dev/iwi/if_iwi.c
2258
if (sc->fw_boot.fp->version != sc->fw_fw.fp->version ||
sys/dev/iwi/if_iwi.c
2259
sc->fw_boot.fp->version != sc->fw_uc.fp->version) {
sys/dev/iwi/if_iwi.c
2263
sc->fw_boot.fp->name, sc->fw_boot.fp->version,
sys/dev/iwi/if_iwi.c
2264
sc->fw_uc.fp->name, sc->fw_uc.fp->version,
sys/dev/iwi/if_iwi.c
2265
sc->fw_fw.fp->name, sc->fw_fw.fp->version
sys/dev/iwi/if_iwi.c
2280
if (fp->datasize < sizeof(struct iwi_firmware_hdr)) {
sys/dev/iwi/if_iwi.c
2282
fp->name);
sys/dev/iwi/if_iwi.c
2285
hdr = (const struct iwi_firmware_hdr *)fp->data;
sys/dev/iwi/if_iwi.c
2286
if (fp->datasize < sizeof(*hdr) + le32toh(hdr->bsize) + le32toh(hdr->usize)
sys/dev/iwi/if_iwi.c
2289
fp->name);
sys/dev/iwi/if_iwi.c
2292
sc->fw_boot.data = ((const char *) fp->data) + sizeof(*hdr);
sys/dev/iwi/if_iwi.c
2294
sc->fw_boot.name = fp->name;
sys/dev/iwi/if_iwi.c
2297
sc->fw_uc.name = fp->name;
sys/dev/iwi/if_iwi.c
2300
sc->fw_fw.name = fp->name;
sys/dev/iwi/if_iwi.c
2317
if (fw->fp != NULL) {
sys/dev/iwi/if_iwi.c
2318
firmware_put(fw->fp, FIRMWARE_UNLOAD);
sys/dev/iwi/if_iwi.c
2319
fw->fp = NULL;
sys/dev/iwi/if_iwivar.h
115
const struct firmware *fp; /* image handle */
sys/dev/malo/if_malohal.c
431
const uint8_t *fp;
sys/dev/malo/if_malohal.c
452
fp = (const uint8_t *)fw->data + count;
sys/dev/malo/if_malohal.c
454
error = malo_hal_send_main(mh, fp, blocksize, seqnum++,
sys/dev/mfi/mfi_linux.c
79
struct file *fp;
sys/dev/mfi/mfi_linux.c
92
error = fget(p, args->fd, cap_rights_init_one(&rights, CAP_IOCTL), &fp);
sys/dev/mfi/mfi_linux.c
95
error = fo_ioctl(fp, cmd, (caddr_t)args->arg, p->td_ucred, p);
sys/dev/mfi/mfi_linux.c
96
fdrop(fp, p);
sys/dev/mlx5/mlx5_core/mlx5_uar.c
292
bool fp;
sys/dev/mlx5/mlx5_core/mlx5_uar.c
307
fp = (dbi % MLX5_BFREGS_PER_UAR) >= MLX5_NON_FP_BFREGS_PER_UAR;
sys/dev/mlx5/mlx5_core/mlx5_uar.c
308
if (fp) {
sys/dev/mrsas/mrsas_linux.c
105
error = fget(p, args->fd, cap_rights_init_one(&rights, CAP_IOCTL), &fp);
sys/dev/mrsas/mrsas_linux.c
109
error = fo_ioctl(fp, cmd, (caddr_t)args->arg, p->td_ucred, p);
sys/dev/mrsas/mrsas_linux.c
110
fdrop(fp, p);
sys/dev/mrsas/mrsas_linux.c
97
struct file *fp;
sys/dev/mwl/mwlhal.c
2531
const uint8_t *fp, *ep;
sys/dev/mwl/mwlhal.c
2599
for (fp = fmdata, ep = fp + fmsize; fp < ep; ) {
sys/dev/mwl/mwlhal.c
2610
fp += nbytes;
sys/dev/mwl/mwlhal.c
2624
if (blocksize > ep - fp) {
sys/dev/mwl/mwlhal.c
2626
blocksize = ep - fp;
sys/dev/mwl/mwlhal.c
2629
if (!mwlSendBlock2(mh, fp, nbytes)) {
sys/dev/mwl/mwlhal.c
2635
for (fp = fmdata, ep = fp + fmsize; fp < ep;) {
sys/dev/mwl/mwlhal.c
2636
nbytes = ep - fp;
sys/dev/mwl/mwlhal.c
2639
if (!mwlSendBlock(mh, FW_DOWNLOAD_BLOCK_SIZE, fp, nbytes)) {
sys/dev/mwl/mwlhal.c
2643
fp += nbytes;
sys/dev/mwl/mwlhal.c
943
FIXED_RATE_ENTRY *fp;
sys/dev/mwl/mwlhal.c
958
fp = pCmd->FixedRateTable;
sys/dev/mwl/mwlhal.c
959
fp->FixedRate =
sys/dev/mwl/mwlhal.c
961
fp->FixRateTypeFlags.FixRateType =
sys/dev/mwl/mwlhal.c
968
fp = pCmd->FixedRateTable;
sys/dev/mwl/mwlhal.c
972
fp->FixRateTypeFlags.FixRateType =
sys/dev/mwl/mwlhal.c
974
fp->FixedRate =
sys/dev/mwl/mwlhal.c
976
fp->FixRateTypeFlags.RetryCountValid =
sys/dev/mwl/mwlhal.c
978
fp->RetryCount =
sys/dev/mxge/mxge_eth_z8e.c
17
const struct firmware *fp;
sys/dev/mxge/mxge_eth_z8e.c
22
fp = firmware_register("mxge_eth_z8e", eth_z8e,
sys/dev/mxge/mxge_eth_z8e.c
25
if (fp == NULL)
sys/dev/mxge/mxge_ethp_z8e.c
17
const struct firmware *fp;
sys/dev/mxge/mxge_ethp_z8e.c
22
fp = firmware_register("mxge_ethp_z8e", ethp_z8e,
sys/dev/mxge/mxge_ethp_z8e.c
25
if (fp == NULL)
sys/dev/mxge/mxge_rss_eth_z8e.c
17
const struct firmware *fp;
sys/dev/mxge/mxge_rss_eth_z8e.c
22
fp = firmware_register("mxge_rss_eth_z8e", rss_eth_z8e,
sys/dev/mxge/mxge_rss_eth_z8e.c
25
if (fp == NULL)
sys/dev/mxge/mxge_rss_ethp_z8e.c
17
const struct firmware *fp;
sys/dev/mxge/mxge_rss_ethp_z8e.c
22
fp = firmware_register("mxge_rss_ethp_z8e", rss_ethp_z8e,
sys/dev/mxge/mxge_rss_ethp_z8e.c
25
if (fp == NULL)
sys/dev/nvmf/controller/ctl_frontend_nvmf.c
849
np->fp.afi = NVMEF(NVME_FIRMWARE_PAGE_AFI_SLOT, 1);
sys/dev/nvmf/controller/ctl_frontend_nvmf.c
850
memcpy(np->fp.revision[0], np->cdata.fr, sizeof(np->cdata.fr));
sys/dev/nvmf/controller/nvmft_controller.c
612
if (offset >= sizeof(ctrlr->np->fp)) {
sys/dev/nvmf/controller/nvmft_controller.c
616
todo = sizeof(ctrlr->np->fp) - offset;
sys/dev/nvmf/controller/nvmft_controller.c
621
m_copyback(m, 0, todo, (char *)&ctrlr->np->fp + offset);
sys/dev/nvmf/controller/nvmft_var.h
33
struct nvme_firmware_page fp;
sys/dev/nvmf/nvmf_tcp.c
1421
struct file *fp;
sys/dev/nvmf/nvmf_tcp.c
1436
cap_rights_init_one(&rights, CAP_SOCK_CLIENT), &fp);
sys/dev/nvmf/nvmf_tcp.c
1439
if (fp->f_type != DTYPE_SOCKET) {
sys/dev/nvmf/nvmf_tcp.c
1440
fdrop(fp, curthread);
sys/dev/nvmf/nvmf_tcp.c
1443
so = fp->f_data;
sys/dev/nvmf/nvmf_tcp.c
1446
fdrop(fp, curthread);
sys/dev/nvmf/nvmf_tcp.c
1451
fp->f_ops = &badfileops;
sys/dev/nvmf/nvmf_tcp.c
1452
fp->f_data = NULL;
sys/dev/nvmf/nvmf_tcp.c
1453
fdrop(fp, curthread);
sys/dev/pty/pty.c
129
struct file *fp)
sys/dev/pty/pty.c
132
return (pts_alloc(fflags & (FREAD|FWRITE), td, fp));
sys/dev/pty/pty.c
60
ptydev_fdopen(struct cdev *dev, int fflags, struct thread *td, struct file *fp)
sys/dev/pty/pty.c
72
error = pts_alloc_external(fflags & (FREAD|FWRITE), td, fp, dev, name);
sys/dev/qat/qat_common/adf_freebsd_uio.c
111
struct file *fp, **new_files;
sys/dev/qat/qat_common/adf_freebsd_uio.c
119
error = fget(curthread, mem_fd, cap_rights_init(&rights), &fp);
sys/dev/qat/qat_common/adf_freebsd_uio.c
144
new_files[old_count] = fp;
sys/dev/qlnx/qlnxe/ecore_hsi_fcoe.h
759
struct fcoe_mstorm_fcoe_conn_st_ctx_fp fp /* Fast path part of the fcoe storm context of Mstorm */;
sys/dev/qlnx/qlnxe/qlnx_os.c
100
static int qlnx_send(qlnx_host_t *ha, struct qlnx_fastpath *fp,
sys/dev/qlnx/qlnxe/qlnx_os.c
107
static int qlnx_transmit_locked(if_t ifp, struct qlnx_fastpath *fp,
sys/dev/qlnx/qlnxe/qlnx_os.c
1310
struct qlnx_fastpath *fp = &ha->fp_array[i];
sys/dev/qlnx/qlnxe/qlnx_os.c
1323
qlnx_free_tx_br(ha, fp);
sys/dev/qlnx/qlnxe/qlnx_os.c
1411
struct qlnx_fastpath *fp;
sys/dev/qlnx/qlnxe/qlnx_os.c
1426
fp = &ha->fp_array[i];
sys/dev/qlnx/qlnxe/qlnx_os.c
1428
if (fp->txq[0]->handle != NULL) {
sys/dev/qlnx/qlnxe/qlnx_os.c
1430
(uint16_t)usecs, fp->txq[0]->handle);
sys/dev/qlnx/qlnxe/qlnx_os.c
144
static int qlnx_alloc_tx_br(qlnx_host_t *ha, struct qlnx_fastpath *fp);
sys/dev/qlnx/qlnxe/qlnx_os.c
1446
struct qlnx_fastpath *fp;
sys/dev/qlnx/qlnxe/qlnx_os.c
145
static void qlnx_free_tx_br(qlnx_host_t *ha, struct qlnx_fastpath *fp);
sys/dev/qlnx/qlnxe/qlnx_os.c
1461
fp = &ha->fp_array[i];
sys/dev/qlnx/qlnxe/qlnx_os.c
1463
if (fp->rxq->handle != NULL) {
sys/dev/qlnx/qlnxe/qlnx_os.c
1465
0, fp->rxq->handle);
sys/dev/qlnx/qlnxe/qlnx_os.c
147
static uint16_t qlnx_num_tx_compl(qlnx_host_t *ha, struct qlnx_fastpath *fp,
sys/dev/qlnx/qlnxe/qlnx_os.c
149
static void qlnx_tx_int(qlnx_host_t *ha, struct qlnx_fastpath *fp,
sys/dev/qlnx/qlnxe/qlnx_os.c
151
static int qlnx_rx_int(qlnx_host_t *ha, struct qlnx_fastpath *fp, int budget,
sys/dev/qlnx/qlnxe/qlnx_os.c
2739
qlnx_free_tx_pkt(qlnx_host_t *ha, struct qlnx_fastpath *fp,
sys/dev/qlnx/qlnxe/qlnx_os.c
2764
fp->rss_id,
sys/dev/qlnx/qlnxe/qlnx_os.c
2771
fp->err_tx_free_pkt_null++;
sys/dev/qlnx/qlnxe/qlnx_os.c
2784
fp->tx_pkts_freed++;
sys/dev/qlnx/qlnxe/qlnx_os.c
2785
fp->tx_pkts_completed++;
sys/dev/qlnx/qlnxe/qlnx_os.c
2807
qlnx_tx_int(qlnx_host_t *ha, struct qlnx_fastpath *fp,
sys/dev/qlnx/qlnxe/qlnx_os.c
2832
fp->rss_id,
sys/dev/qlnx/qlnxe/qlnx_os.c
2839
fp->err_tx_cons_idx_conflict++;
sys/dev/qlnx/qlnxe/qlnx_os.c
2850
qlnx_free_tx_pkt(ha, fp, txq);
sys/dev/qlnx/qlnxe/qlnx_os.c
2858
qlnx_transmit_locked(if_t ifp, struct qlnx_fastpath *fp, struct mbuf *mp)
sys/dev/qlnx/qlnxe/qlnx_os.c
2865
txq = fp->txq[0];
sys/dev/qlnx/qlnxe/qlnx_os.c
2866
ha = (qlnx_host_t *)fp->edev;
sys/dev/qlnx/qlnxe/qlnx_os.c
2870
ret = drbr_enqueue(ifp, fp->tx_br, mp);
sys/dev/qlnx/qlnxe/qlnx_os.c
2875
ret = drbr_enqueue(ifp, fp->tx_br, mp);
sys/dev/qlnx/qlnxe/qlnx_os.c
2877
mp = drbr_peek(ifp, fp->tx_br);
sys/dev/qlnx/qlnxe/qlnx_os.c
2880
if (qlnx_send(ha, fp, &mp)) {
sys/dev/qlnx/qlnxe/qlnx_os.c
2882
drbr_putback(ifp, fp->tx_br, mp);
sys/dev/qlnx/qlnxe/qlnx_os.c
2884
fp->tx_pkts_processed++;
sys/dev/qlnx/qlnxe/qlnx_os.c
2885
drbr_advance(ifp, fp->tx_br);
sys/dev/qlnx/qlnxe/qlnx_os.c
2890
drbr_advance(ifp, fp->tx_br);
sys/dev/qlnx/qlnxe/qlnx_os.c
2891
fp->tx_pkts_transmitted++;
sys/dev/qlnx/qlnxe/qlnx_os.c
2892
fp->tx_pkts_processed++;
sys/dev/qlnx/qlnxe/qlnx_os.c
2896
mp = drbr_peek(ifp, fp->tx_br);
sys/dev/qlnx/qlnxe/qlnx_os.c
2900
if((qlnx_num_tx_compl(ha,fp, fp->txq[0]) > QLNX_TX_COMPL_THRESH) ||
sys/dev/qlnx/qlnxe/qlnx_os.c
2903
(void)qlnx_tx_int(ha, fp, fp->txq[0]);
sys/dev/qlnx/qlnxe/qlnx_os.c
2913
struct qlnx_fastpath *fp;
sys/dev/qlnx/qlnxe/qlnx_os.c
2926
fp = &ha->fp_array[rss_id];
sys/dev/qlnx/qlnxe/qlnx_os.c
2928
if (fp->tx_br == NULL) {
sys/dev/qlnx/qlnxe/qlnx_os.c
2933
if (mtx_trylock(&fp->tx_mtx)) {
sys/dev/qlnx/qlnxe/qlnx_os.c
2935
tx_pkts = fp->tx_pkts_transmitted;
sys/dev/qlnx/qlnxe/qlnx_os.c
2936
tx_compl = fp->tx_pkts_completed;
sys/dev/qlnx/qlnxe/qlnx_os.c
2939
ret = qlnx_transmit_locked(ifp, fp, mp);
sys/dev/qlnx/qlnxe/qlnx_os.c
2942
fp->tx_pkts_trans_ctx += (fp->tx_pkts_transmitted - tx_pkts);
sys/dev/qlnx/qlnxe/qlnx_os.c
2943
fp->tx_pkts_compl_ctx += (fp->tx_pkts_completed - tx_compl);
sys/dev/qlnx/qlnxe/qlnx_os.c
2945
mtx_unlock(&fp->tx_mtx);
sys/dev/qlnx/qlnxe/qlnx_os.c
2947
if (mp != NULL && (fp->fp_taskqueue != NULL)) {
sys/dev/qlnx/qlnxe/qlnx_os.c
2948
ret = drbr_enqueue(ifp, fp->tx_br, mp);
sys/dev/qlnx/qlnxe/qlnx_os.c
2949
taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task);
sys/dev/qlnx/qlnxe/qlnx_os.c
2963
struct qlnx_fastpath *fp;
sys/dev/qlnx/qlnxe/qlnx_os.c
2972
fp = &ha->fp_array[rss_id];
sys/dev/qlnx/qlnxe/qlnx_os.c
2974
if (fp == NULL)
sys/dev/qlnx/qlnxe/qlnx_os.c
2977
if (fp->tx_br) {
sys/dev/qlnx/qlnxe/qlnx_os.c
2978
mtx_lock(&fp->tx_mtx);
sys/dev/qlnx/qlnxe/qlnx_os.c
2980
while ((mp = drbr_dequeue(ifp, fp->tx_br)) != NULL) {
sys/dev/qlnx/qlnxe/qlnx_os.c
2981
fp->tx_pkts_freed++;
sys/dev/qlnx/qlnxe/qlnx_os.c
2984
mtx_unlock(&fp->tx_mtx);
sys/dev/qlnx/qlnxe/qlnx_os.c
3064
qlnx_tso_check(struct qlnx_fastpath *fp, bus_dma_segment_t *segs, int nsegs,
sys/dev/qlnx/qlnxe/qlnx_os.c
3100
fp->tx_lso_wnd_min_len++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3112
qlnx_send(qlnx_host_t *ha, struct qlnx_fastpath *fp, struct mbuf **m_headp)
sys/dev/qlnx/qlnxe/qlnx_os.c
3138
QL_DPRINT8(ha, "enter[%d]\n", fp->rss_id);
sys/dev/qlnx/qlnxe/qlnx_os.c
3148
txq = fp->txq[0];
sys/dev/qlnx/qlnxe/qlnx_os.c
3152
fp->tx_nsegs_gt_elem_left++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3153
fp->err_tx_nsegs_gt_elem_left++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3168
if (!fp->tx_tso_min_pkt_len) {
sys/dev/qlnx/qlnxe/qlnx_os.c
3169
fp->tx_tso_min_pkt_len = m_head->m_pkthdr.len;
sys/dev/qlnx/qlnxe/qlnx_os.c
3170
fp->tx_tso_min_pkt_len = m_head->m_pkthdr.len;
sys/dev/qlnx/qlnxe/qlnx_os.c
3172
if (fp->tx_tso_min_pkt_len > m_head->m_pkthdr.len)
sys/dev/qlnx/qlnxe/qlnx_os.c
3173
fp->tx_tso_min_pkt_len =
sys/dev/qlnx/qlnxe/qlnx_os.c
3175
if (fp->tx_tso_max_pkt_len < m_head->m_pkthdr.len)
sys/dev/qlnx/qlnxe/qlnx_os.c
3176
fp->tx_tso_max_pkt_len =
sys/dev/qlnx/qlnxe/qlnx_os.c
3189
qlnx_tso_check(fp, segs, nsegs, offset))))) {
sys/dev/qlnx/qlnxe/qlnx_os.c
3194
fp->tx_defrag++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3198
fp->err_tx_defrag++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3199
fp->tx_pkts_freed++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3211
fp->err_tx_defrag_dmamap_load++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3217
fp->tx_pkts_freed++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3226
fp->err_tx_non_tso_max_seg++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3232
fp->tx_pkts_freed++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3242
fp->err_tx_dmamap_load++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3246
fp->tx_pkts_freed++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3256
fp->tx_pkts[(nsegs - 1)]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3258
fp->tx_pkts[(QLNX_FP_MAX_SEGS - 1)]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3264
fp->tx_pkts_hist[0]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3267
fp->tx_pkts_hist[1]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3270
fp->tx_pkts_hist[2]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3273
fp->tx_pkts_hist[3]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3276
fp->tx_pkts_hist[4]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3279
fp->tx_pkts_hist[5]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3282
fp->tx_pkts_hist[6]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3285
fp->tx_pkts_hist[7]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3288
fp->tx_pkts_hist[8]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3291
fp->tx_pkts_hist[9]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3294
fp->tx_pkts_hist[10]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3297
fp->tx_pkts_hist[11]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3300
fp->tx_pkts_hist[12]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3303
fp->tx_pkts_hist[13]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3306
fp->tx_pkts_hist[14]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3309
fp->tx_pkts_hist[15]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3312
fp->tx_pkts_hist[16]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3314
fp->tx_pkts_hist[17]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3322
fp->tx_pkts_q[0]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3324
fp->tx_pkts_q[1]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3326
fp->tx_pkts_q[2]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3328
fp->tx_pkts_q[3]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3330
fp->tx_pkts_q[4]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3332
fp->tx_pkts_q[5]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3334
fp->tx_pkts_q[6]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3336
fp->tx_pkts_q[7]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3338
fp->tx_pkts_q[8]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3340
fp->tx_pkts_q[9]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3342
fp->tx_pkts_q[10]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3344
fp->tx_pkts_q[11]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3346
fp->tx_pkts_q[12]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3348
fp->tx_pkts_q[13]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3350
fp->tx_pkts_q[14]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3352
fp->tx_pkts_q[15]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3354
fp->tx_pkts_q[16]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3363
nsegs, elem_left, fp->rss_id);
sys/dev/qlnx/qlnxe/qlnx_os.c
3365
fp->tx_nsegs_gt_elem_left++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3367
(void)qlnx_tx_int(ha, fp, txq);
sys/dev/qlnx/qlnxe/qlnx_os.c
3373
nsegs, elem_left, fp->rss_id);
sys/dev/qlnx/qlnxe/qlnx_os.c
3375
fp->err_tx_nsegs_gt_elem_left++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3376
fp->tx_ring_full = 1;
sys/dev/qlnx/qlnxe/qlnx_os.c
3564
fp->tx_tso_pkts++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3581
fp->tx_non_tso_pkts++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3587
if (fp->tx_tso_max_nsegs < nsegs)
sys/dev/qlnx/qlnxe/qlnx_os.c
3588
fp->tx_tso_max_nsegs = nsegs;
sys/dev/qlnx/qlnxe/qlnx_os.c
3590
if ((nsegs < fp->tx_tso_min_nsegs) || (!fp->tx_tso_min_nsegs))
sys/dev/qlnx/qlnxe/qlnx_os.c
3591
fp->tx_tso_min_nsegs = nsegs;
sys/dev/qlnx/qlnxe/qlnx_os.c
3602
QL_DPRINT8(ha, "exit[%d]\n", fp->rss_id);
sys/dev/qlnx/qlnxe/qlnx_os.c
3623
struct qlnx_fastpath *fp = &ha->fp_array[i];
sys/dev/qlnx/qlnxe/qlnx_os.c
3625
mtx_lock(&fp->tx_mtx);
sys/dev/qlnx/qlnxe/qlnx_os.c
3626
mtx_unlock(&fp->tx_mtx);
sys/dev/qlnx/qlnxe/qlnx_os.c
3628
if (fp->fp_taskqueue != NULL)
sys/dev/qlnx/qlnxe/qlnx_os.c
3629
taskqueue_enqueue(fp->fp_taskqueue,
sys/dev/qlnx/qlnxe/qlnx_os.c
3630
&fp->fp_task);
sys/dev/qlnx/qlnxe/qlnx_os.c
3719
qlnx_rx_jumbo_chain(qlnx_host_t *ha, struct qlnx_fastpath *fp,
sys/dev/qlnx/qlnxe/qlnx_os.c
3727
rxq = fp->rxq;
sys/dev/qlnx/qlnxe/qlnx_os.c
3738
fp->err_rx_mp_null++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3755
fp->err_rx_alloc_errors++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3791
struct qlnx_fastpath *fp,
sys/dev/qlnx/qlnxe/qlnx_os.c
3824
fp->rss_id, cqe->type, cqe->bitfields, cqe->seg_len,
sys/dev/qlnx/qlnxe/qlnx_os.c
3833
fp->err_rx_tpa_invalid_agg_num++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3841
QL_DPRINT7(ha, "[rss_id = %d]: mp = %p \n ", fp->rss_id, mp);
sys/dev/qlnx/qlnxe/qlnx_os.c
3844
QL_DPRINT7(ha, "[%d]: mp = NULL\n", fp->rss_id);
sys/dev/qlnx/qlnxe/qlnx_os.c
3845
fp->err_rx_mp_null++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3853
" flags = %x, dropping incoming packet\n", fp->rss_id,
sys/dev/qlnx/qlnxe/qlnx_os.c
3856
fp->err_rx_hw_errors++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3868
fp->rss_id);
sys/dev/qlnx/qlnxe/qlnx_os.c
3870
fp->err_rx_alloc_errors++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3920
fp->rss_id);
sys/dev/qlnx/qlnxe/qlnx_os.c
3955
QL_DPRINT7(ha, "[%d]: 4\n ", fp->rss_id);
sys/dev/qlnx/qlnxe/qlnx_os.c
3967
QL_DPRINT7(ha, "[%d]: mpc = NULL\n", fp->rss_id);
sys/dev/qlnx/qlnxe/qlnx_os.c
3968
fp->err_rx_mp_null++;
sys/dev/qlnx/qlnxe/qlnx_os.c
3983
" buffer\n", fp->rss_id);
sys/dev/qlnx/qlnxe/qlnx_os.c
4021
fp->rss_id);
sys/dev/qlnx/qlnxe/qlnx_os.c
4095
fp->rss_id, rxq->tpa_info[agg_index].agg_state,
sys/dev/qlnx/qlnxe/qlnx_os.c
4102
qlnx_tpa_cont(qlnx_host_t *ha, struct qlnx_fastpath *fp,
sys/dev/qlnx/qlnxe/qlnx_os.c
4121
fp->rss_id, cqe->type, cqe->tpa_agg_index,
sys/dev/qlnx/qlnxe/qlnx_os.c
4128
QL_DPRINT7(ha, "[%d]: 0\n ", fp->rss_id);
sys/dev/qlnx/qlnxe/qlnx_os.c
4129
fp->err_rx_tpa_invalid_agg_num++;
sys/dev/qlnx/qlnxe/qlnx_os.c
4134
QL_DPRINT7(ha, "[%d]: 1\n ", fp->rss_id);
sys/dev/qlnx/qlnxe/qlnx_os.c
4152
QL_DPRINT7(ha, "[%d]: mpc = NULL\n", fp->rss_id);
sys/dev/qlnx/qlnxe/qlnx_os.c
4154
fp->err_rx_mp_null++;
sys/dev/qlnx/qlnxe/qlnx_os.c
4169
" buffer\n", fp->rss_id);
sys/dev/qlnx/qlnxe/qlnx_os.c
4205
fp->rss_id, mpf, mpl);
sys/dev/qlnx/qlnxe/qlnx_os.c
4218
qlnx_tpa_end(qlnx_host_t *ha, struct qlnx_fastpath *fp,
sys/dev/qlnx/qlnxe/qlnx_os.c
4242
fp->rss_id, cqe->type, cqe->tpa_agg_index,
sys/dev/qlnx/qlnxe/qlnx_os.c
4251
QL_DPRINT7(ha, "[%d]: 0\n ", fp->rss_id);
sys/dev/qlnx/qlnxe/qlnx_os.c
4253
fp->err_rx_tpa_invalid_agg_num++;
sys/dev/qlnx/qlnxe/qlnx_os.c
4258
QL_DPRINT7(ha, "[%d]: 1\n ", fp->rss_id);
sys/dev/qlnx/qlnxe/qlnx_os.c
4265
QL_DPRINT7(ha, "[%d]: 2\n ", fp->rss_id);
sys/dev/qlnx/qlnxe/qlnx_os.c
4278
QL_DPRINT7(ha, "[%d]: mpc = NULL\n", fp->rss_id);
sys/dev/qlnx/qlnxe/qlnx_os.c
4280
fp->err_rx_mp_null++;
sys/dev/qlnx/qlnxe/qlnx_os.c
4295
" buffer\n", fp->rss_id);
sys/dev/qlnx/qlnxe/qlnx_os.c
4330
QL_DPRINT7(ha, "[%d]: 5\n ", fp->rss_id);
sys/dev/qlnx/qlnxe/qlnx_os.c
4333
QL_DPRINT7(ha, "[%d]: 6\n ", fp->rss_id);
sys/dev/qlnx/qlnxe/qlnx_os.c
4341
QL_DPRINT7(ha, "[%d]: 7\n ", fp->rss_id);
sys/dev/qlnx/qlnxe/qlnx_os.c
435
qlnx_num_tx_compl(qlnx_host_t *ha, struct qlnx_fastpath *fp,
sys/dev/qlnx/qlnxe/qlnx_os.c
4376
fp->rss_id, mp->m_pkthdr.csum_data,
sys/dev/qlnx/qlnxe/qlnx_os.c
4389
qlnx_rx_int(qlnx_host_t *ha, struct qlnx_fastpath *fp, int budget,
sys/dev/qlnx/qlnxe/qlnx_os.c
4394
struct qlnx_rx_queue *rxq = fp->rxq;
sys/dev/qlnx/qlnxe/qlnx_os.c
4408
p_hwfn = &ha->cdev.hwfns[(fp->rss_id % cdev->num_hwfns)];
sys/dev/qlnx/qlnxe/qlnx_os.c
4443
qlnx_tpa_start(ha, fp, rxq,
sys/dev/qlnx/qlnxe/qlnx_os.c
4445
fp->tpa_start++;
sys/dev/qlnx/qlnxe/qlnx_os.c
4449
qlnx_tpa_cont(ha, fp, rxq,
sys/dev/qlnx/qlnxe/qlnx_os.c
4451
fp->tpa_cont++;
sys/dev/qlnx/qlnxe/qlnx_os.c
4455
rx_pkt += qlnx_tpa_end(ha, fp, rxq,
sys/dev/qlnx/qlnxe/qlnx_os.c
4457
fp->tpa_end++;
sys/dev/qlnx/qlnxe/qlnx_os.c
4473
fp->err_rx_mp_null++;
sys/dev/qlnx/qlnxe/qlnx_os.c
4510
fp->err_rx_hw_errors++;
sys/dev/qlnx/qlnxe/qlnx_os.c
4524
fp->err_rx_alloc_errors++;
sys/dev/qlnx/qlnxe/qlnx_os.c
4540
if (qlnx_rx_jumbo_chain(ha, fp, mp,
sys/dev/qlnx/qlnxe/qlnx_os.c
4550
fp->err_rx_jumbo_chain_pkts++;
sys/dev/qlnx/qlnxe/qlnx_os.c
4653
struct qlnx_fastpath *fp = NULL;
sys/dev/qlnx/qlnxe/qlnx_os.c
4669
fp = &ha->fp_array[idx];
sys/dev/qlnx/qlnxe/qlnx_os.c
4671
if (fp == NULL) {
sys/dev/qlnx/qlnxe/qlnx_os.c
4684
ecore_sb_ack(fp->sb_info, IGU_INT_DISABLE, 0);
sys/dev/qlnx/qlnxe/qlnx_os.c
4688
txq = fp->txq[tc];
sys/dev/qlnx/qlnxe/qlnx_os.c
4693
if (mtx_trylock(&fp->tx_mtx)) {
sys/dev/qlnx/qlnxe/qlnx_os.c
4695
tx_compl = fp->tx_pkts_completed;
sys/dev/qlnx/qlnxe/qlnx_os.c
4698
qlnx_tx_int(ha, fp, fp->txq[tc]);
sys/dev/qlnx/qlnxe/qlnx_os.c
4700
fp->tx_pkts_compl_intr +=
sys/dev/qlnx/qlnxe/qlnx_os.c
4701
(fp->tx_pkts_completed - tx_compl);
sys/dev/qlnx/qlnxe/qlnx_os.c
4702
if ((fp->tx_pkts_completed - tx_compl) <= 32)
sys/dev/qlnx/qlnxe/qlnx_os.c
4703
fp->tx_comInt[0]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
4704
else if (((fp->tx_pkts_completed - tx_compl) > 32) &&
sys/dev/qlnx/qlnxe/qlnx_os.c
4705
((fp->tx_pkts_completed - tx_compl) <= 64))
sys/dev/qlnx/qlnxe/qlnx_os.c
4706
fp->tx_comInt[1]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
4707
else if(((fp->tx_pkts_completed - tx_compl) > 64) &&
sys/dev/qlnx/qlnxe/qlnx_os.c
4708
((fp->tx_pkts_completed - tx_compl) <= 128))
sys/dev/qlnx/qlnxe/qlnx_os.c
4709
fp->tx_comInt[2]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
4710
else if(((fp->tx_pkts_completed - tx_compl) > 128))
sys/dev/qlnx/qlnxe/qlnx_os.c
4711
fp->tx_comInt[3]++;
sys/dev/qlnx/qlnxe/qlnx_os.c
4713
mtx_unlock(&fp->tx_mtx);
sys/dev/qlnx/qlnxe/qlnx_os.c
4718
rx_int = qlnx_rx_int(ha, fp, ha->rx_pkt_threshold,
sys/dev/qlnx/qlnxe/qlnx_os.c
4722
fp->rx_pkts += rx_int;
sys/dev/qlnx/qlnxe/qlnx_os.c
4734
lro = &fp->rxq->lro;
sys/dev/qlnx/qlnxe/qlnx_os.c
4740
fp->lro_cnt_1024++;
sys/dev/qlnx/qlnxe/qlnx_os.c
4742
fp->lro_cnt_512++;
sys/dev/qlnx/qlnxe/qlnx_os.c
4744
fp->lro_cnt_256++;
sys/dev/qlnx/qlnxe/qlnx_os.c
4746
fp->lro_cnt_128++;
sys/dev/qlnx/qlnxe/qlnx_os.c
4748
fp->lro_cnt_64++;
sys/dev/qlnx/qlnxe/qlnx_os.c
4756
ecore_sb_update_sb_idx(fp->sb_info);
sys/dev/qlnx/qlnxe/qlnx_os.c
4758
ecore_sb_ack(fp->sb_info, IGU_INT_ENABLE, 1);
sys/dev/qlnx/qlnxe/qlnx_os.c
536
struct qlnx_fastpath *fp;
sys/dev/qlnx/qlnxe/qlnx_os.c
540
fp = context;
sys/dev/qlnx/qlnxe/qlnx_os.c
542
if (fp == NULL)
sys/dev/qlnx/qlnxe/qlnx_os.c
545
ha = (qlnx_host_t *)fp->edev;
sys/dev/qlnx/qlnxe/qlnx_os.c
550
if (!drbr_empty(ifp, fp->tx_br)) {
sys/dev/qlnx/qlnxe/qlnx_os.c
551
if(mtx_trylock(&fp->tx_mtx)) {
sys/dev/qlnx/qlnxe/qlnx_os.c
553
tx_pkts = fp->tx_pkts_transmitted;
sys/dev/qlnx/qlnxe/qlnx_os.c
554
tx_compl = fp->tx_pkts_completed;
sys/dev/qlnx/qlnxe/qlnx_os.c
557
qlnx_transmit_locked(ifp, fp, NULL);
sys/dev/qlnx/qlnxe/qlnx_os.c
560
fp->tx_pkts_trans_fp +=
sys/dev/qlnx/qlnxe/qlnx_os.c
561
(fp->tx_pkts_transmitted - tx_pkts);
sys/dev/qlnx/qlnxe/qlnx_os.c
562
fp->tx_pkts_compl_fp +=
sys/dev/qlnx/qlnxe/qlnx_os.c
563
(fp->tx_pkts_completed - tx_compl);
sys/dev/qlnx/qlnxe/qlnx_os.c
565
mtx_unlock(&fp->tx_mtx);
sys/dev/qlnx/qlnxe/qlnx_os.c
5702
struct qlnx_fastpath *fp = &ha->fp_array[rss_id];
sys/dev/qlnx/qlnxe/qlnx_os.c
5704
fp->rss_id = rss_id;
sys/dev/qlnx/qlnxe/qlnx_os.c
5705
fp->edev = ha;
sys/dev/qlnx/qlnxe/qlnx_os.c
5706
fp->sb_info = &ha->sb_array[rss_id];
sys/dev/qlnx/qlnxe/qlnx_os.c
5707
fp->rxq = &ha->rxq_array[rss_id];
sys/dev/qlnx/qlnxe/qlnx_os.c
5708
fp->rxq->rxq_id = rss_id;
sys/dev/qlnx/qlnxe/qlnx_os.c
5712
fp->txq[tc] = &ha->txq_array[txq_array_index];
sys/dev/qlnx/qlnxe/qlnx_os.c
5713
fp->txq[tc]->index = txq_array_index;
sys/dev/qlnx/qlnxe/qlnx_os.c
5716
snprintf(fp->name, sizeof(fp->name), "%s-fp-%d", qlnx_name_str,
sys/dev/qlnx/qlnxe/qlnx_os.c
5719
fp->tx_ring_full = 0;
sys/dev/qlnx/qlnxe/qlnx_os.c
5723
fp->tx_pkts_processed = 0;
sys/dev/qlnx/qlnxe/qlnx_os.c
5724
fp->tx_pkts_freed = 0;
sys/dev/qlnx/qlnxe/qlnx_os.c
5725
fp->tx_pkts_transmitted = 0;
sys/dev/qlnx/qlnxe/qlnx_os.c
5726
fp->tx_pkts_completed = 0;
sys/dev/qlnx/qlnxe/qlnx_os.c
5729
fp->tx_pkts_trans_ctx = 0;
sys/dev/qlnx/qlnxe/qlnx_os.c
5730
fp->tx_pkts_compl_ctx = 0;
sys/dev/qlnx/qlnxe/qlnx_os.c
5731
fp->tx_pkts_trans_fp = 0;
sys/dev/qlnx/qlnxe/qlnx_os.c
5732
fp->tx_pkts_compl_fp = 0;
sys/dev/qlnx/qlnxe/qlnx_os.c
5733
fp->tx_pkts_compl_intr = 0;
sys/dev/qlnx/qlnxe/qlnx_os.c
5735
fp->tx_lso_wnd_min_len = 0;
sys/dev/qlnx/qlnxe/qlnx_os.c
5736
fp->tx_defrag = 0;
sys/dev/qlnx/qlnxe/qlnx_os.c
5737
fp->tx_nsegs_gt_elem_left = 0;
sys/dev/qlnx/qlnxe/qlnx_os.c
5738
fp->tx_tso_max_nsegs = 0;
sys/dev/qlnx/qlnxe/qlnx_os.c
5739
fp->tx_tso_min_nsegs = 0;
sys/dev/qlnx/qlnxe/qlnx_os.c
5740
fp->err_tx_nsegs_gt_elem_left = 0;
sys/dev/qlnx/qlnxe/qlnx_os.c
5741
fp->err_tx_dmamap_create = 0;
sys/dev/qlnx/qlnxe/qlnx_os.c
5742
fp->err_tx_defrag_dmamap_load = 0;
sys/dev/qlnx/qlnxe/qlnx_os.c
5743
fp->err_tx_non_tso_max_seg = 0;
sys/dev/qlnx/qlnxe/qlnx_os.c
5744
fp->err_tx_dmamap_load = 0;
sys/dev/qlnx/qlnxe/qlnx_os.c
5745
fp->err_tx_defrag = 0;
sys/dev/qlnx/qlnxe/qlnx_os.c
5746
fp->err_tx_free_pkt_null = 0;
sys/dev/qlnx/qlnxe/qlnx_os.c
5747
fp->err_tx_cons_idx_conflict = 0;
sys/dev/qlnx/qlnxe/qlnx_os.c
5749
fp->rx_pkts = 0;
sys/dev/qlnx/qlnxe/qlnx_os.c
5750
fp->err_m_getcl = 0;
sys/dev/qlnx/qlnxe/qlnx_os.c
5751
fp->err_m_getjcl = 0;
sys/dev/qlnx/qlnxe/qlnx_os.c
579
struct qlnx_fastpath *fp;
sys/dev/qlnx/qlnxe/qlnx_os.c
582
fp = &ha->fp_array[i];
sys/dev/qlnx/qlnxe/qlnx_os.c
587
TASK_INIT(&fp->fp_task, 0, qlnx_fp_taskqueue, fp);
sys/dev/qlnx/qlnxe/qlnx_os.c
589
fp->fp_taskqueue = taskqueue_create(tq_name, M_NOWAIT,
sys/dev/qlnx/qlnxe/qlnx_os.c
591
&fp->fp_taskqueue);
sys/dev/qlnx/qlnxe/qlnx_os.c
593
if (fp->fp_taskqueue == NULL)
sys/dev/qlnx/qlnxe/qlnx_os.c
596
taskqueue_start_threads(&fp->fp_taskqueue, 1, PI_NET, "%s",
sys/dev/qlnx/qlnxe/qlnx_os.c
599
QL_DPRINT1(ha, "%p\n",fp->fp_taskqueue);
sys/dev/qlnx/qlnxe/qlnx_os.c
609
struct qlnx_fastpath *fp;
sys/dev/qlnx/qlnxe/qlnx_os.c
6097
qlnx_free_mem_txq(qlnx_host_t *ha, struct qlnx_fastpath *fp,
sys/dev/qlnx/qlnxe/qlnx_os.c
6117
qlnx_alloc_mem_txq(qlnx_host_t *ha, struct qlnx_fastpath *fp,
sys/dev/qlnx/qlnxe/qlnx_os.c
612
fp = &ha->fp_array[i];
sys/dev/qlnx/qlnxe/qlnx_os.c
614
if (fp->fp_taskqueue != NULL) {
sys/dev/qlnx/qlnxe/qlnx_os.c
6147
qlnx_free_mem_txq(ha, fp, txq);
sys/dev/qlnx/qlnxe/qlnx_os.c
615
taskqueue_drain(fp->fp_taskqueue, &fp->fp_task);
sys/dev/qlnx/qlnxe/qlnx_os.c
6152
qlnx_free_tx_br(qlnx_host_t *ha, struct qlnx_fastpath *fp)
sys/dev/qlnx/qlnxe/qlnx_os.c
6157
if (mtx_initialized(&fp->tx_mtx)) {
sys/dev/qlnx/qlnxe/qlnx_os.c
6158
if (fp->tx_br != NULL) {
sys/dev/qlnx/qlnxe/qlnx_os.c
6159
mtx_lock(&fp->tx_mtx);
sys/dev/qlnx/qlnxe/qlnx_os.c
616
taskqueue_free(fp->fp_taskqueue);
sys/dev/qlnx/qlnxe/qlnx_os.c
6161
while ((mp = drbr_dequeue(ifp, fp->tx_br)) != NULL) {
sys/dev/qlnx/qlnxe/qlnx_os.c
6162
fp->tx_pkts_freed++;
sys/dev/qlnx/qlnxe/qlnx_os.c
6166
mtx_unlock(&fp->tx_mtx);
sys/dev/qlnx/qlnxe/qlnx_os.c
6168
buf_ring_free(fp->tx_br, M_DEVBUF);
sys/dev/qlnx/qlnxe/qlnx_os.c
6169
fp->tx_br = NULL;
sys/dev/qlnx/qlnxe/qlnx_os.c
617
fp->fp_taskqueue = NULL;
sys/dev/qlnx/qlnxe/qlnx_os.c
6171
mtx_destroy(&fp->tx_mtx);
sys/dev/qlnx/qlnxe/qlnx_os.c
6177
qlnx_free_mem_fp(qlnx_host_t *ha, struct qlnx_fastpath *fp)
sys/dev/qlnx/qlnxe/qlnx_os.c
6181
qlnx_free_mem_sb(ha, fp->sb_info);
sys/dev/qlnx/qlnxe/qlnx_os.c
6183
qlnx_free_mem_rxq(ha, fp->rxq);
sys/dev/qlnx/qlnxe/qlnx_os.c
6186
qlnx_free_mem_txq(ha, fp, fp->txq[tc]);
sys/dev/qlnx/qlnxe/qlnx_os.c
6192
qlnx_alloc_tx_br(qlnx_host_t *ha, struct qlnx_fastpath *fp)
sys/dev/qlnx/qlnxe/qlnx_os.c
6194
snprintf(fp->tx_mtx_name, sizeof(fp->tx_mtx_name),
sys/dev/qlnx/qlnxe/qlnx_os.c
6195
"qlnx%d_fp%d_tx_mq_lock", ha->dev_unit, fp->rss_id);
sys/dev/qlnx/qlnxe/qlnx_os.c
6197
mtx_init(&fp->tx_mtx, fp->tx_mtx_name, NULL, MTX_DEF);
sys/dev/qlnx/qlnxe/qlnx_os.c
6199
fp->tx_br = buf_ring_alloc(TX_RING_SIZE, M_DEVBUF,
sys/dev/qlnx/qlnxe/qlnx_os.c
6200
M_NOWAIT, &fp->tx_mtx);
sys/dev/qlnx/qlnxe/qlnx_os.c
6201
if (fp->tx_br == NULL) {
sys/dev/qlnx/qlnxe/qlnx_os.c
6203
ha->dev_unit, fp->rss_id);
sys/dev/qlnx/qlnxe/qlnx_os.c
6210
qlnx_alloc_mem_fp(qlnx_host_t *ha, struct qlnx_fastpath *fp)
sys/dev/qlnx/qlnxe/qlnx_os.c
6214
rc = qlnx_alloc_mem_sb(ha, fp->sb_info, fp->rss_id);
sys/dev/qlnx/qlnxe/qlnx_os.c
6234
rc = qlnx_alloc_mem_rxq(ha, fp->rxq);
sys/dev/qlnx/qlnxe/qlnx_os.c
6239
rc = qlnx_alloc_mem_txq(ha, fp, fp->txq[tc]);
sys/dev/qlnx/qlnxe/qlnx_os.c
6247
qlnx_free_mem_fp(ha, fp);
sys/dev/qlnx/qlnxe/qlnx_os.c
6257
struct qlnx_fastpath *fp = &ha->fp_array[i];
sys/dev/qlnx/qlnxe/qlnx_os.c
6259
qlnx_free_mem_fp(ha, fp);
sys/dev/qlnx/qlnxe/qlnx_os.c
627
struct qlnx_fastpath *fp;
sys/dev/qlnx/qlnxe/qlnx_os.c
6270
struct qlnx_fastpath *fp = &ha->fp_array[rss_id];
sys/dev/qlnx/qlnxe/qlnx_os.c
6272
rc = qlnx_alloc_mem_fp(ha, fp);
sys/dev/qlnx/qlnxe/qlnx_os.c
630
fp = &ha->fp_array[i];
sys/dev/qlnx/qlnxe/qlnx_os.c
632
if (fp->fp_taskqueue != NULL) {
sys/dev/qlnx/qlnxe/qlnx_os.c
634
taskqueue_drain(fp->fp_taskqueue, &fp->fp_task);
sys/dev/qlnx/qlnxe/qlnx_os.c
6340
struct qlnx_fastpath *fp;
sys/dev/qlnx/qlnxe/qlnx_os.c
6380
fp = &ha->fp_array[fp_index];
sys/dev/qlnx/qlnxe/qlnx_os.c
6381
rss->rss_ind_table[j] = fp->rxq->handle;
sys/dev/qlnx/qlnxe/qlnx_os.c
6509
struct qlnx_fastpath *fp;
sys/dev/qlnx/qlnxe/qlnx_os.c
6541
fp = &ha->fp_array[i];
sys/dev/qlnx/qlnxe/qlnx_os.c
6542
p_hwfn = &cdev->hwfns[(fp->rss_id % cdev->num_hwfns)];
sys/dev/qlnx/qlnxe/qlnx_os.c
6551
qparams.p_sb = fp->sb_info;
sys/dev/qlnx/qlnxe/qlnx_os.c
6558
fp->rxq->rx_buf_size, /* bd_max_bytes */
sys/dev/qlnx/qlnxe/qlnx_os.c
6560
fp->rxq->rx_bd_ring.p_phys_addr,
sys/dev/qlnx/qlnxe/qlnx_os.c
6562
ecore_chain_get_pbl_phys(&fp->rxq->rx_comp_ring),
sys/dev/qlnx/qlnxe/qlnx_os.c
6564
ecore_chain_get_page_cnt(&fp->rxq->rx_comp_ring),
sys/dev/qlnx/qlnxe/qlnx_os.c
6572
fp->rxq->hw_rxq_prod_addr = rx_ret_params.p_prod;
sys/dev/qlnx/qlnxe/qlnx_os.c
6573
fp->rxq->handle = rx_ret_params.p_handle;
sys/dev/qlnx/qlnxe/qlnx_os.c
6574
fp->rxq->hw_cons_ptr =
sys/dev/qlnx/qlnxe/qlnx_os.c
6575
&fp->sb_info->sb_virt->pi_array[RX_PI];
sys/dev/qlnx/qlnxe/qlnx_os.c
6577
qlnx_update_rx_prod(p_hwfn, fp->rxq);
sys/dev/qlnx/qlnxe/qlnx_os.c
6580
struct qlnx_tx_queue *txq = fp->txq[tc];
sys/dev/qlnx/qlnxe/qlnx_os.c
6590
qparams.p_sb = fp->sb_info;
sys/dev/qlnx/qlnxe/qlnx_os.c
6611
&fp->sb_info->sb_virt->pi_array[TX_PI(tc)];
sys/dev/qlnx/qlnxe/qlnx_os.c
6636
fp = &ha->fp_array[(i % ha->num_rss)];
sys/dev/qlnx/qlnxe/qlnx_os.c
6637
rss_params->rss_ind_table[i] = fp->rxq->handle;
sys/dev/qlnx/qlnxe/qlnx_os.c
6689
qlnx_drain_txq(qlnx_host_t *ha, struct qlnx_fastpath *fp,
sys/dev/qlnx/qlnxe/qlnx_os.c
6701
mtx_lock(&fp->tx_mtx);
sys/dev/qlnx/qlnxe/qlnx_os.c
6703
(void)qlnx_tx_int(ha, fp, txq);
sys/dev/qlnx/qlnxe/qlnx_os.c
6705
mtx_unlock(&fp->tx_mtx);
sys/dev/qlnx/qlnxe/qlnx_os.c
6712
QL_DPRINT2(ha, "[%d, %d]: done\n", fp->rss_id, txq->index);
sys/dev/qlnx/qlnxe/qlnx_os.c
6722
struct qlnx_fastpath *fp;
sys/dev/qlnx/qlnxe/qlnx_os.c
6752
fp = &ha->fp_array[i];
sys/dev/qlnx/qlnxe/qlnx_os.c
6755
struct qlnx_tx_queue *txq = fp->txq[tc];
sys/dev/qlnx/qlnxe/qlnx_os.c
6757
rc = qlnx_drain_txq(ha, fp, txq);
sys/dev/qlnx/qlnxe/qlnx_os.c
6767
fp = &ha->fp_array[i];
sys/dev/qlnx/qlnxe/qlnx_os.c
6775
fp->txq[tc]->handle);
sys/dev/qlnx/qlnxe/qlnx_os.c
6785
rc = ecore_eth_rx_queue_stop(p_hwfn, fp->rxq->handle, false,
sys/dev/qlnx/qlnxe/qlnx_os.c
7148
struct qlnx_fastpath *fp = &ha->fp_array[i];
sys/dev/qlnx/qlnxe/qlnx_os.c
7151
lro = &fp->rxq->lro;
sys/dev/qlxgbe/ql_isr.c
954
qla_tx_fp_t *fp;
sys/dev/qlxgbe/ql_isr.c
963
fp = &ha->tx_fp[idx];
sys/dev/qlxgbe/ql_isr.c
966
if ((fp->fp_taskqueue != NULL) &&
sys/dev/qlxgbe/ql_isr.c
968
taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task);
sys/dev/qlxgbe/ql_os.c
1361
qla_alloc_tx_br(qla_host_t *ha, qla_tx_fp_t *fp)
sys/dev/qlxgbe/ql_os.c
1363
snprintf(fp->tx_mtx_name, sizeof(fp->tx_mtx_name),
sys/dev/qlxgbe/ql_os.c
1364
"qla%d_fp%d_tx_mq_lock", ha->pci_func, fp->txr_idx);
sys/dev/qlxgbe/ql_os.c
1366
mtx_init(&fp->tx_mtx, fp->tx_mtx_name, NULL, MTX_DEF);
sys/dev/qlxgbe/ql_os.c
1368
fp->tx_br = buf_ring_alloc(NUM_TX_DESCRIPTORS, M_DEVBUF,
sys/dev/qlxgbe/ql_os.c
1369
M_NOWAIT, &fp->tx_mtx);
sys/dev/qlxgbe/ql_os.c
1370
if (fp->tx_br == NULL) {
sys/dev/qlxgbe/ql_os.c
1372
" fp[%d, %d]\n", ha->pci_func, fp->txr_idx));
sys/dev/qlxgbe/ql_os.c
1379
qla_free_tx_br(qla_host_t *ha, qla_tx_fp_t *fp)
sys/dev/qlxgbe/ql_os.c
1384
if (mtx_initialized(&fp->tx_mtx)) {
sys/dev/qlxgbe/ql_os.c
1385
if (fp->tx_br != NULL) {
sys/dev/qlxgbe/ql_os.c
1386
mtx_lock(&fp->tx_mtx);
sys/dev/qlxgbe/ql_os.c
1388
while ((mp = drbr_dequeue(ifp, fp->tx_br)) != NULL) {
sys/dev/qlxgbe/ql_os.c
1392
mtx_unlock(&fp->tx_mtx);
sys/dev/qlxgbe/ql_os.c
1394
buf_ring_free(fp->tx_br, M_DEVBUF);
sys/dev/qlxgbe/ql_os.c
1395
fp->tx_br = NULL;
sys/dev/qlxgbe/ql_os.c
1397
mtx_destroy(&fp->tx_mtx);
sys/dev/qlxgbe/ql_os.c
1405
qla_tx_fp_t *fp;
sys/dev/qlxgbe/ql_os.c
1414
fp = context;
sys/dev/qlxgbe/ql_os.c
1416
if (fp == NULL)
sys/dev/qlxgbe/ql_os.c
1419
ha = (qla_host_t *)fp->ha;
sys/dev/qlxgbe/ql_os.c
1423
txr_idx = fp->txr_idx;
sys/dev/qlxgbe/ql_os.c
1425
mtx_lock(&fp->tx_mtx);
sys/dev/qlxgbe/ql_os.c
1428
mtx_unlock(&fp->tx_mtx);
sys/dev/qlxgbe/ql_os.c
1434
rx_pkts_left = ql_rcv_isr(ha, fp->txr_idx, 64);
sys/dev/qlxgbe/ql_os.c
1437
ql_hw_tx_done_locked(ha, fp->txr_idx);
sys/dev/qlxgbe/ql_os.c
1438
ql_hw_tx_done_locked(ha, (fp->txr_idx + (ha->hw.num_tx_rings >> 1)));
sys/dev/qlxgbe/ql_os.c
1440
ql_hw_tx_done_locked(ha, fp->txr_idx);
sys/dev/qlxgbe/ql_os.c
1443
mp = drbr_peek(ifp, fp->tx_br);
sys/dev/qlxgbe/ql_os.c
1454
txr_idx = fp->txr_idx;
sys/dev/qlxgbe/ql_os.c
1463
drbr_putback(ifp, fp->tx_br, mp);
sys/dev/qlxgbe/ql_os.c
1465
drbr_advance(ifp, fp->tx_br);
sys/dev/qlxgbe/ql_os.c
1468
mtx_unlock(&fp->tx_mtx);
sys/dev/qlxgbe/ql_os.c
1472
drbr_advance(ifp, fp->tx_br);
sys/dev/qlxgbe/ql_os.c
1482
mp = drbr_peek(ifp, fp->tx_br);
sys/dev/qlxgbe/ql_os.c
1485
mtx_unlock(&fp->tx_mtx);
sys/dev/qlxgbe/ql_os.c
1493
taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task);
sys/dev/qlxgbe/ql_os.c
1496
QL_ENABLE_INTERRUPTS(ha, fp->txr_idx);
sys/dev/qlxgbe/ql_os.c
1513
qla_tx_fp_t *fp = &ha->tx_fp[i];
sys/dev/qlxgbe/ql_os.c
1518
NET_TASK_INIT(&fp->fp_task, 0, qla_fp_taskqueue, fp);
sys/dev/qlxgbe/ql_os.c
1520
fp->fp_taskqueue = taskqueue_create_fast(tq_name, M_NOWAIT,
sys/dev/qlxgbe/ql_os.c
1522
&fp->fp_taskqueue);
sys/dev/qlxgbe/ql_os.c
1524
if (fp->fp_taskqueue == NULL)
sys/dev/qlxgbe/ql_os.c
1527
taskqueue_start_threads(&fp->fp_taskqueue, 1, PI_NET, "%s",
sys/dev/qlxgbe/ql_os.c
1531
fp->fp_taskqueue));
sys/dev/qlxgbe/ql_os.c
1543
qla_tx_fp_t *fp = &ha->tx_fp[i];
sys/dev/qlxgbe/ql_os.c
1545
if (fp->fp_taskqueue != NULL) {
sys/dev/qlxgbe/ql_os.c
1546
taskqueue_drain_all(fp->fp_taskqueue);
sys/dev/qlxgbe/ql_os.c
1547
taskqueue_free(fp->fp_taskqueue);
sys/dev/qlxgbe/ql_os.c
1548
fp->fp_taskqueue = NULL;
sys/dev/qlxgbe/ql_os.c
1560
qla_tx_fp_t *fp = &ha->tx_fp[i];
sys/dev/qlxgbe/ql_os.c
1562
if (fp->fp_taskqueue != NULL) {
sys/dev/qlxgbe/ql_os.c
1563
taskqueue_drain_all(fp->fp_taskqueue);
sys/dev/qlxgbe/ql_os.c
1573
qla_tx_fp_t *fp;
sys/dev/qlxgbe/ql_os.c
1582
fp = &ha->tx_fp[rss_id];
sys/dev/qlxgbe/ql_os.c
1584
if (fp->tx_br == NULL) {
sys/dev/qlxgbe/ql_os.c
1590
ret = drbr_enqueue(ifp, fp->tx_br, mp);
sys/dev/qlxgbe/ql_os.c
1593
if (fp->fp_taskqueue != NULL)
sys/dev/qlxgbe/ql_os.c
1594
taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task);
sys/dev/qlxgbe/ql_os.c
1608
qla_tx_fp_t *fp;
sys/dev/qlxgbe/ql_os.c
1617
fp = &ha->tx_fp[i];
sys/dev/qlxgbe/ql_os.c
1619
if (fp == NULL)
sys/dev/qlxgbe/ql_os.c
1622
if (fp->tx_br) {
sys/dev/qlxgbe/ql_os.c
1623
mtx_lock(&fp->tx_mtx);
sys/dev/qlxgbe/ql_os.c
1625
while ((mp = drbr_dequeue(ifp, fp->tx_br)) != NULL) {
sys/dev/qlxgbe/ql_os.c
1628
mtx_unlock(&fp->tx_mtx);
sys/dev/qlxgbe/ql_os.c
1648
qla_tx_fp_t *fp;
sys/dev/qlxgbe/ql_os.c
1650
fp = &ha->tx_fp[i];
sys/dev/qlxgbe/ql_os.c
1652
if (fp == NULL)
sys/dev/qlxgbe/ql_os.c
1655
if (fp->tx_br != NULL) {
sys/dev/qlxgbe/ql_os.c
1656
mtx_lock(&fp->tx_mtx);
sys/dev/qlxgbe/ql_os.c
1657
mtx_unlock(&fp->tx_mtx);
sys/dev/qlxgbe/ql_os.c
2076
qla_tx_fp_t *fp;
sys/dev/qlxgbe/ql_os.c
2078
fp = &ha->tx_fp[i];
sys/dev/qlxgbe/ql_os.c
2080
if (fp == NULL)
sys/dev/qlxgbe/ql_os.c
2083
if (fp->tx_br != NULL) {
sys/dev/qlxgbe/ql_os.c
2084
mtx_lock(&fp->tx_mtx);
sys/dev/qlxgbe/ql_os.c
2085
mtx_unlock(&fp->tx_mtx);
sys/dev/ral/rt2661.c
2422
const struct firmware *fp;
sys/dev/ral/rt2661.c
2439
fp = firmware_get(imagename);
sys/dev/ral/rt2661.c
2441
if (fp == NULL) {
sys/dev/ral/rt2661.c
2461
RAL_WRITE_REGION_1(sc, RT2661_MCU_CODE_BASE, fp->data, fp->datasize);
sys/dev/ral/rt2661.c
2480
firmware_put(fp, FIRMWARE_UNLOAD);
sys/dev/ral/rt2860.c
4113
const struct firmware *fp;
sys/dev/ral/rt2860.c
4119
fp = firmware_get("rt2860fw");
sys/dev/ral/rt2860.c
4121
if (fp == NULL) {
sys/dev/ral/rt2860.c
4130
RAL_WRITE_REGION_1(sc, RT2860_FW_BASE, fp->data, fp->datasize);
sys/dev/ral/rt2860.c
4153
firmware_put(fp, FIRMWARE_UNLOAD);
sys/dev/sound/usb/uaudio.c
5574
sub->fifo.fp[USB_FIFO_RX],
sys/dev/sound/usb/uaudio.c
5773
usb_fifo_get_data_linear(sub->fifo.fp[USB_FIFO_TX],
sys/dev/sound/usb/uaudio.c
5839
if ((sub->fifo.fp[USB_FIFO_RX] == fifo) ||
sys/dev/sound/usb/uaudio.c
5840
(sub->fifo.fp[USB_FIFO_TX] == fifo)) {
sys/dev/tdfx/tdfx_linux.c
55
struct file *fp;
sys/dev/tdfx/tdfx_linux.c
57
error = fget(td, args->fd, cap_rights_init_one(&rights, CAP_IOCTL), &fp);
sys/dev/tdfx/tdfx_linux.c
63
error = fo_ioctl(fp, cmd, (caddr_t)&d_pio, td->td_ucred, td);
sys/dev/tdfx/tdfx_linux.c
64
fdrop(fp, td);
sys/dev/usb/input/atp.c
2110
usb_fifo_reset(sc->sc_fifo.fp[USB_FIFO_RX]);
sys/dev/usb/input/atp.c
2149
usb_fifo_put_data_linear(sc->sc_fifo.fp[USB_FIFO_RX], buf,
sys/dev/usb/input/atp.c
2409
if (usb_fifo_put_bytes_max(sc->sc_fifo.fp[USB_FIFO_RX]) != 0) {
sys/dev/usb/input/uep.c
301
if (usb_fifo_put_bytes_max(sc->fifo.fp[USB_FIFO_RX]) == 0)
sys/dev/usb/input/uep.c
484
usb_fifo_put_data_linear(sc->fifo.fp[USB_FIFO_RX], buf,
sys/dev/usb/input/uhid.c
173
if (usb_fifo_get_data(sc->sc_fifo.fp[USB_FIFO_TX], pc,
sys/dev/usb/input/uhid.c
214
usb_fifo_put_data(sc->sc_fifo.fp[USB_FIFO_RX], pc,
sys/dev/usb/input/uhid.c
230
sc->sc_fifo.fp[USB_FIFO_RX]) != 0) {
sys/dev/usb/input/uhid.c
286
if (usb_fifo_get_data(sc->sc_fifo.fp[USB_FIFO_TX], pc,
sys/dev/usb/input/uhid.c
304
if (usb_fifo_get_data(sc->sc_fifo.fp[USB_FIFO_TX], pc,
sys/dev/usb/input/uhid.c
326
usb_fifo_get_data_error(sc->sc_fifo.fp[USB_FIFO_TX]);
sys/dev/usb/input/uhid.c
342
usb_fifo_put_data(sc->sc_fifo.fp[USB_FIFO_RX], pc, sizeof(req),
sys/dev/usb/input/uhid.c
348
if (usb_fifo_put_bytes_max(sc->sc_fifo.fp[USB_FIFO_RX]) > 0) {
sys/dev/usb/input/uhid.c
364
usb_fifo_put_data_error(sc->sc_fifo.fp[USB_FIFO_RX]);
sys/dev/usb/input/ums.c
380
if (usb_fifo_put_bytes_max(sc->sc_fifo.fp[USB_FIFO_RX]) == 0) {
sys/dev/usb/input/ums.c
916
usb_fifo_put_data_linear(sc->sc_fifo.fp[USB_FIFO_RX], buf,
sys/dev/usb/input/ums.c
948
usb_fifo_reset(sc->sc_fifo.fp[USB_FIFO_RX]);
sys/dev/usb/input/wsp.c
1359
sc->sc_fifo.fp[USB_FIFO_RX]) != 0) {
sys/dev/usb/input/wsp.c
1412
usb_fifo_put_data_linear(sc->sc_fifo.fp[USB_FIFO_RX], buf,
sys/dev/usb/input/wsp.c
1420
usb_fifo_reset(sc->sc_fifo.fp[USB_FIFO_RX]);
sys/dev/usb/storage/urio.c
264
struct usb_fifo *f = sc->sc_fifo.fp[USB_FIFO_TX];
sys/dev/usb/storage/urio.c
310
struct usb_fifo *f = sc->sc_fifo.fp[USB_FIFO_RX];
sys/dev/usb/usb_dev.c
1837
f_sc->fp[USB_FIFO_TX] = NULL;
sys/dev/usb/usb_dev.c
1838
f_sc->fp[USB_FIFO_RX] = NULL;
sys/dev/usb/usb_dev.c
1890
f_sc->fp[USB_FIFO_TX] = f_tx;
sys/dev/usb/usb_dev.c
1891
f_sc->fp[USB_FIFO_RX] = f_rx;
sys/dev/usb/usb_dev.c
2012
usb_fifo_free(f_sc->fp[USB_FIFO_TX]);
sys/dev/usb/usb_dev.c
2013
usb_fifo_free(f_sc->fp[USB_FIFO_RX]);
sys/dev/usb/usb_dev.c
2015
f_sc->fp[USB_FIFO_TX] = NULL;
sys/dev/usb/usb_dev.c
2016
f_sc->fp[USB_FIFO_RX] = NULL;
sys/dev/usb/usbdi.h
559
struct usb_fifo *fp[2];
sys/dev/wpi/if_wpi.c
5014
const struct firmware *fp;
sys/dev/wpi/if_wpi.c
5025
fp = firmware_get(WPI_FW_NAME);
sys/dev/wpi/if_wpi.c
5028
if (fp == NULL) {
sys/dev/wpi/if_wpi.c
5034
sc->fw_fp = fp;
sys/dev/wpi/if_wpi.c
5036
if (fp->datasize < sizeof (struct wpi_firmware_hdr)) {
sys/dev/wpi/if_wpi.c
5038
"firmware file too short: %zu bytes\n", fp->datasize);
sys/dev/wpi/if_wpi.c
5043
fw->size = fp->datasize;
sys/dev/wpi/if_wpi.c
5044
fw->data = (const uint8_t *)fp->data;
sys/fs/devfs/devfs_vnops.c
1004
devfs_kqfilter_f(struct file *fp, struct knote *kn)
sys/fs/devfs/devfs_vnops.c
1014
error = devfs_fp_check(fp, &dev, &dsw, &ref);
sys/fs/devfs/devfs_vnops.c
114
devfs_fp_check(struct file *fp, struct cdev **devp, struct cdevsw **dswp,
sys/fs/devfs/devfs_vnops.c
117
*dswp = devvn_refthread(fp->f_vnode, devp, ref);
sys/fs/devfs/devfs_vnops.c
118
if (*dswp == NULL || *devp != fp->f_data) {
sys/fs/devfs/devfs_vnops.c
127
curthread->td_fpop = fp;
sys/fs/devfs/devfs_vnops.c
1286
struct file *fp = ap->a_fp;
sys/fs/devfs/devfs_vnops.c
1304
if (fp == NULL && dsw->d_fdopen != NULL) {
sys/fs/devfs/devfs_vnops.c
1316
td->td_fpop = fp;
sys/fs/devfs/devfs_vnops.c
1317
if (fp != NULL) {
sys/fs/devfs/devfs_vnops.c
1318
fp->f_data = dev;
sys/fs/devfs/devfs_vnops.c
1319
fp->f_vnode = vp;
sys/fs/devfs/devfs_vnops.c
1322
error = dsw->d_fdopen(dev, ap->a_mode, td, fp);
sys/fs/devfs/devfs_vnops.c
134
struct file *fp;
sys/fs/devfs/devfs_vnops.c
1342
KASSERT(fp != NULL, ("Could not vnode bypass device on NULL fp"));
sys/fs/devfs/devfs_vnops.c
1344
if (fp == NULL)
sys/fs/devfs/devfs_vnops.c
1347
if (fp->f_ops == &badfileops)
sys/fs/devfs/devfs_vnops.c
1348
finit(fp, fp->f_flag, DTYPE_VNODE, dev, &devfs_ops_f);
sys/fs/devfs/devfs_vnops.c
138
fp = curthread->td_fpop;
sys/fs/devfs/devfs_vnops.c
139
if (fp == NULL)
sys/fs/devfs/devfs_vnops.c
1409
devfs_poll_f(struct file *fp, int events, struct ucred *cred, struct thread *td)
sys/fs/devfs/devfs_vnops.c
141
p = fp->f_cdevpriv;
sys/fs/devfs/devfs_vnops.c
1417
error = devfs_fp_check(fp, &dev, &dsw, &ref);
sys/fs/devfs/devfs_vnops.c
1419
error = vnops.fo_poll(fp, events, cred, td);
sys/fs/devfs/devfs_vnops.c
1440
devfs_read_f(struct file *fp, struct uio *uio, struct ucred *cred,
sys/fs/devfs/devfs_vnops.c
1452
error = devfs_fp_check(fp, &dev, &dsw, &ref);
sys/fs/devfs/devfs_vnops.c
1454
error = vnops.fo_read(fp, uio, cred, flags, td);
sys/fs/devfs/devfs_vnops.c
1458
ioflag = fp->f_flag & (O_NONBLOCK | O_DIRECT);
sys/fs/devfs/devfs_vnops.c
1462
foffset_lock_uio(fp, uio, flags | FOF_NOLOCK);
sys/fs/devfs/devfs_vnops.c
1469
foffset_unlock_uio(fp, uio, flags | FOF_NOLOCK | FOF_NEXTOFF_R);
sys/fs/devfs/devfs_vnops.c
153
struct file *fp;
sys/fs/devfs/devfs_vnops.c
158
fp = curthread->td_fpop;
sys/fs/devfs/devfs_vnops.c
159
if (fp == NULL)
sys/fs/devfs/devfs_vnops.c
161
cdp = cdev2priv((struct cdev *)fp->f_data);
sys/fs/devfs/devfs_vnops.c
165
p->cdpd_fp = fp;
sys/fs/devfs/devfs_vnops.c
167
if (fp->f_cdevpriv == NULL) {
sys/fs/devfs/devfs_vnops.c
169
fp->f_cdevpriv = p;
sys/fs/devfs/devfs_vnops.c
1889
devfs_stat_f(struct file *fp, struct stat *sb, struct ucred *cred)
sys/fs/devfs/devfs_vnops.c
1892
return (vnops.fo_stat(fp, sb, cred));
sys/fs/devfs/devfs_vnops.c
1948
devfs_truncate_f(struct file *fp, off_t length, struct ucred *cred, struct thread *td)
sys/fs/devfs/devfs_vnops.c
1951
return (vnops.fo_truncate(fp, length, cred, td));
sys/fs/devfs/devfs_vnops.c
1955
devfs_write_f(struct file *fp, struct uio *uio, struct ucred *cred,
sys/fs/devfs/devfs_vnops.c
1967
error = devfs_fp_check(fp, &dev, &dsw, &ref);
sys/fs/devfs/devfs_vnops.c
1969
error = vnops.fo_write(fp, uio, cred, flags, td);
sys/fs/devfs/devfs_vnops.c
1973
ioflag = fp->f_flag & (O_NONBLOCK | O_DIRECT | O_FSYNC);
sys/fs/devfs/devfs_vnops.c
1976
foffset_lock_uio(fp, uio, flags | FOF_NOLOCK);
sys/fs/devfs/devfs_vnops.c
1988
foffset_unlock_uio(fp, uio, flags | FOF_NOLOCK | FOF_NEXTOFF_W);
sys/fs/devfs/devfs_vnops.c
1993
devfs_mmap_f(struct file *fp, vm_map_t map, vm_offset_t *addr, vm_size_t size,
sys/fs/devfs/devfs_vnops.c
2006
vp = fp->f_vnode;
sys/fs/devfs/devfs_vnops.c
2019
if ((fp->f_flag & FREAD) != 0)
sys/fs/devfs/devfs_vnops.c
203
struct file *fp;
sys/fs/devfs/devfs_vnops.c
2038
if ((fp->f_flag & FWRITE) != 0)
sys/fs/devfs/devfs_vnops.c
2046
error = devfs_fp_check(fp, &dev, &dsw, &ref);
sys/fs/devfs/devfs_vnops.c
207
fp = p->cdpd_fp;
sys/fs/devfs/devfs_vnops.c
208
KASSERT(fp->f_cdevpriv == p,
sys/fs/devfs/devfs_vnops.c
209
("devfs_destoy_cdevpriv %p != %p", fp->f_cdevpriv, p));
sys/fs/devfs/devfs_vnops.c
210
cdp = cdev2priv((struct cdev *)fp->f_data);
sys/fs/devfs/devfs_vnops.c
212
fp->f_cdevpriv = NULL;
sys/fs/devfs/devfs_vnops.c
226
devfs_fpdrop(struct file *fp)
sys/fs/devfs/devfs_vnops.c
231
if ((p = fp->f_cdevpriv) == NULL) {
sys/fs/devfs/devfs_vnops.c
241
struct file *fp;
sys/fs/devfs/devfs_vnops.c
243
fp = curthread->td_fpop;
sys/fs/devfs/devfs_vnops.c
244
if (fp == NULL)
sys/fs/devfs/devfs_vnops.c
246
devfs_fpdrop(fp);
sys/fs/devfs/devfs_vnops.c
788
devfs_close_f(struct file *fp, struct thread *td)
sys/fs/devfs/devfs_vnops.c
798
curthread->td_fpop = fp;
sys/fs/devfs/devfs_vnops.c
799
error = vnops.fo_close(fp, td);
sys/fs/devfs/devfs_vnops.c
806
if (fp->f_cdevpriv != NULL)
sys/fs/devfs/devfs_vnops.c
807
devfs_fpdrop(fp);
sys/fs/devfs/devfs_vnops.c
888
devfs_ioctl_f(struct file *fp, u_long com, void *data, struct ucred *cred, struct thread *td)
sys/fs/devfs/devfs_vnops.c
894
td->td_fpop = fp;
sys/fs/devfs/devfs_vnops.c
895
error = vnops.fo_ioctl(fp, com, data, cred, td);
sys/fs/fdescfs/fdesc_vnops.c
248
struct file *fp;
sys/fs/fdescfs/fdesc_vnops.c
264
if ((fdm->flags & FMNT_NODUP) != 0 && a->fp->f_type == DTYPE_VNODE) {
sys/fs/fdescfs/fdesc_vnops.c
265
vp = a->fp->f_vnode;
sys/fs/fdescfs/fdesc_vnops.c
272
fdrop(a->fp, a->td);
sys/fs/fdescfs/fdesc_vnops.c
289
struct file *fp;
sys/fs/fdescfs/fdesc_vnops.c
335
if ((error = fget(td, fd, &cap_no_rights, &fp)) != 0)
sys/fs/fdescfs/fdesc_vnops.c
350
arg.fp = fp;
sys/fs/fdescfs/fdesc_vnops.c
362
fdrop(fp, td);
sys/fs/fdescfs/fdesc_vnops.c
482
struct file *fp;
sys/fs/fdescfs/fdesc_vnops.c
502
cap_rights_init_one(&rights, CAP_EXTATTR_SET), &fp);
sys/fs/fdescfs/fdesc_vnops.c
505
cap_rights_init_one(&rights, CAP_EXTATTR_SET), NULL, &fp);
sys/fs/fdescfs/fdesc_vnops.c
521
vp = fp->f_vnode;
sys/fs/fdescfs/fdesc_vnops.c
528
fdrop(fp, td);
sys/fs/fdescfs/fdesc_vnops.c
634
struct file *fp;
sys/fs/fdescfs/fdesc_vnops.c
649
error = fget_cap(td, fd_fd, &cap_no_rights, NULL, &fp, NULL);
sys/fs/fdescfs/fdesc_vnops.c
653
switch (fp->f_type) {
sys/fs/fdescfs/fdesc_vnops.c
655
vp = fp->f_vnode;
sys/fs/fdescfs/fdesc_vnops.c
669
fdrop(fp, td);
sys/fs/fifofs/fifo_vnops.c
129
struct file *fp;
sys/fs/fifofs/fifo_vnops.c
137
fp = ap->a_fp;
sys/fs/fifofs/fifo_vnops.c
140
if (fp == NULL || (ap->a_mode & FEXEC) != 0)
sys/fs/fifofs/fifo_vnops.c
171
fp->f_pipegen = fpipe->pipe_wgen - fip->fi_writers;
sys/fs/fifofs/fifo_vnops.c
250
KASSERT(fp != NULL, ("can't fifo/vnode bypass"));
sys/fs/fifofs/fifo_vnops.c
251
KASSERT(fp->f_ops == &badfileops, ("not badfileops in fifo_open"));
sys/fs/fifofs/fifo_vnops.c
252
finit(fp, fp->f_flag, DTYPE_FIFO, fpipe, &pipeops);
sys/fs/fuse/fuse_vfsops.c
309
struct file *fp, *fptmp;
sys/fs/fuse/fuse_vfsops.c
375
err = fget(td, fd, &cap_read_rights, &fp);
sys/fs/fuse/fuse_vfsops.c
382
td->td_fpop = fp;
sys/fs/fuse/fuse_vfsops.c
385
fdrop(fp, td);
sys/fs/msdosfs/msdosfs_vfsops.c
1073
struct fsinfo *fp;
sys/fs/msdosfs/msdosfs_vfsops.c
1087
fp = (struct fsinfo *)bp->b_data;
sys/fs/msdosfs/msdosfs_vfsops.c
1088
putulong(fp->fsinfree, pmp->pm_freeclustercount);
sys/fs/msdosfs/msdosfs_vfsops.c
1089
putulong(fp->fsinxtfree, pmp->pm_nxtfree);
sys/fs/msdosfs/msdosfs_vfsops.c
774
struct fsinfo *fp;
sys/fs/msdosfs/msdosfs_vfsops.c
779
fp = (struct fsinfo *)bp->b_data;
sys/fs/msdosfs/msdosfs_vfsops.c
780
if (!bcmp(fp->fsisig1, "RRaA", 4) &&
sys/fs/msdosfs/msdosfs_vfsops.c
781
!bcmp(fp->fsisig2, "rrAa", 4) &&
sys/fs/msdosfs/msdosfs_vfsops.c
782
!bcmp(fp->fsisig3, "\0\0\125\252", 4)) {
sys/fs/msdosfs/msdosfs_vfsops.c
783
pmp->pm_nxtfree = getulong(fp->fsinxtfree);
sys/fs/nfsclient/nfs_clcomsubs.c
269
struct nfs_fattr *fp;
sys/fs/nfsclient/nfs_clcomsubs.c
277
NFSM_DISSECT(fp, struct nfs_fattr *, NFSX_V3FATTR);
sys/fs/nfsclient/nfs_clcomsubs.c
278
nap->na_type = nfsv34tov_type(fp->fa_type);
sys/fs/nfsclient/nfs_clcomsubs.c
279
nap->na_mode = fxdr_unsigned(u_short, fp->fa_mode);
sys/fs/nfsclient/nfs_clcomsubs.c
281
fxdr_unsigned(int, fp->fa3_rdev.specdata1),
sys/fs/nfsclient/nfs_clcomsubs.c
282
fxdr_unsigned(int, fp->fa3_rdev.specdata2));
sys/fs/nfsclient/nfs_clcomsubs.c
283
nap->na_nlink = fxdr_unsigned(uint32_t, fp->fa_nlink);
sys/fs/nfsclient/nfs_clcomsubs.c
284
nap->na_uid = fxdr_unsigned(uid_t, fp->fa_uid);
sys/fs/nfsclient/nfs_clcomsubs.c
285
nap->na_gid = fxdr_unsigned(gid_t, fp->fa_gid);
sys/fs/nfsclient/nfs_clcomsubs.c
286
nap->na_size = fxdr_hyper(&fp->fa3_size);
sys/fs/nfsclient/nfs_clcomsubs.c
288
nap->na_bytes = fxdr_hyper(&fp->fa3_used);
sys/fs/nfsclient/nfs_clcomsubs.c
289
nap->na_fileid = fxdr_hyper(&fp->fa3_fileid);
sys/fs/nfsclient/nfs_clcomsubs.c
290
fxdr_nfsv3time(&fp->fa3_atime, &nap->na_atime);
sys/fs/nfsclient/nfs_clcomsubs.c
291
fxdr_nfsv3time(&fp->fa3_ctime, &nap->na_ctime);
sys/fs/nfsclient/nfs_clcomsubs.c
292
fxdr_nfsv3time(&fp->fa3_mtime, &nap->na_mtime);
sys/fs/nfsclient/nfs_clcomsubs.c
299
NFSM_DISSECT(fp, struct nfs_fattr *, NFSX_V2FATTR);
sys/fs/nfsclient/nfs_clcomsubs.c
300
nap->na_type = nfsv2tov_type(fp->fa_type);
sys/fs/nfsclient/nfs_clcomsubs.c
301
nap->na_mode = fxdr_unsigned(u_short, fp->fa_mode);
sys/fs/nfsclient/nfs_clcomsubs.c
304
nap->na_rdev = fxdr_unsigned(dev_t, fp->fa2_rdev);
sys/fs/nfsclient/nfs_clcomsubs.c
311
nap->na_nlink = fxdr_unsigned(u_short, fp->fa_nlink);
sys/fs/nfsclient/nfs_clcomsubs.c
312
nap->na_uid = fxdr_unsigned(uid_t, fp->fa_uid);
sys/fs/nfsclient/nfs_clcomsubs.c
313
nap->na_gid = fxdr_unsigned(gid_t, fp->fa_gid);
sys/fs/nfsclient/nfs_clcomsubs.c
314
nap->na_size = fxdr_unsigned(u_int32_t, fp->fa2_size);
sys/fs/nfsclient/nfs_clcomsubs.c
315
nap->na_blocksize = fxdr_unsigned(int32_t, fp->fa2_blocksize);
sys/fs/nfsclient/nfs_clcomsubs.c
317
(u_quad_t)fxdr_unsigned(int32_t, fp->fa2_blocks) *
sys/fs/nfsclient/nfs_clcomsubs.c
319
nap->na_fileid = fxdr_unsigned(uint64_t, fp->fa2_fileid);
sys/fs/nfsclient/nfs_clcomsubs.c
320
fxdr_nfsv2time(&fp->fa2_atime, &nap->na_atime);
sys/fs/nfsclient/nfs_clcomsubs.c
321
fxdr_nfsv2time(&fp->fa2_mtime, &nap->na_mtime);
sys/fs/nfsclient/nfs_clcomsubs.c
324
fp->fa2_ctime.nfsv2_sec);
sys/fs/nfsclient/nfs_clcomsubs.c
328
nap->na_gen = fxdr_unsigned(u_int32_t,fp->fa2_ctime.nfsv2_usec);
sys/fs/nfsclient/nfs_clkrpc.c
181
nfscbd_addsock(struct file *fp)
sys/fs/nfsclient/nfs_clkrpc.c
188
so = fp->f_data;
sys/fs/nfsclient/nfs_clkrpc.c
204
fp->f_ops = &badfileops;
sys/fs/nfsclient/nfs_clkrpc.c
205
fp->f_data = NULL;
sys/fs/nfsclient/nfs_clport.c
1325
struct file *fp;
sys/fs/nfsclient/nfs_clport.c
1347
cap_rights_init_one(&rights, CAP_SOCK_CLIENT), &fp);
sys/fs/nfsclient/nfs_clport.c
1350
if (fp->f_type != DTYPE_SOCKET) {
sys/fs/nfsclient/nfs_clport.c
1351
fdrop(fp, td);
sys/fs/nfsclient/nfs_clport.c
1355
error = nfscbd_addsock(fp);
sys/fs/nfsclient/nfs_clport.c
1356
fdrop(fp, td);
sys/fs/nfsserver/nfs_nfsdkrpc.c
524
nfsrvd_addsock(struct file *fp)
sys/fs/nfsserver/nfs_nfsdkrpc.c
532
so = fp->f_data;
sys/fs/nfsserver/nfs_nfsdkrpc.c
548
fp->f_ops = &badfileops;
sys/fs/nfsserver/nfs_nfsdkrpc.c
549
fp->f_data = NULL;
sys/fs/nfsserver/nfs_nfsdport.c
3795
struct file *fp;
sys/fs/nfsserver/nfs_nfsdport.c
3800
(fp = fdp->fd_ofiles[fd].fde_file) == NULL) {
sys/fs/nfsserver/nfs_nfsdport.c
3804
*fpp = fp;
sys/fs/nfsserver/nfs_nfsdport.c
4046
struct file *fp;
sys/fs/nfsserver/nfs_nfsdport.c
4070
cap_rights_init_one(&rights, CAP_SOCK_SERVER), &fp);
sys/fs/nfsserver/nfs_nfsdport.c
4073
if (fp->f_type != DTYPE_SOCKET) {
sys/fs/nfsserver/nfs_nfsdport.c
4074
fdrop(fp, td);
sys/fs/nfsserver/nfs_nfsdport.c
4078
error = nfsrvd_addsock(fp);
sys/fs/nfsserver/nfs_nfsdport.c
4079
fdrop(fp, td);
sys/fs/nfsserver/nfs_nfsdport.c
4257
struct file *fp = NULL;
sys/fs/nfsserver/nfs_nfsdport.c
4349
error = fp_getfvp(p, stablefd, &fp, &vp);
sys/fs/nfsserver/nfs_nfsdport.c
4350
if (!error && (NFSFPFLAG(fp) & (FREAD | FWRITE)) != (FREAD | FWRITE))
sys/fs/nfsserver/nfs_nfsdport.c
4355
NFSD_VNET(nfsrv_stablefirst).nsf_fp = fp;
sys/fs/nfsserver/nfs_nfsdsubs.c
1416
struct nfs_fattr *fp;
sys/fs/nfsserver/nfs_nfsdsubs.c
1426
NFSM_BUILD(fp, struct nfs_fattr *, fattr_size);
sys/fs/nfsserver/nfs_nfsdsubs.c
1431
fp->fa_nlink = txdr_unsigned(nvap->na_nlink);
sys/fs/nfsserver/nfs_nfsdsubs.c
1432
fp->fa_uid = txdr_unsigned(nvap->na_uid);
sys/fs/nfsserver/nfs_nfsdsubs.c
1433
fp->fa_gid = txdr_unsigned(nvap->na_gid);
sys/fs/nfsserver/nfs_nfsdsubs.c
1435
fp->fa_type = vtonfsv34_type(nvap->na_type);
sys/fs/nfsserver/nfs_nfsdsubs.c
1436
fp->fa_mode = vtonfsv34_mode(nvap->na_mode);
sys/fs/nfsserver/nfs_nfsdsubs.c
1437
txdr_hyper(nvap->na_size, (uint32_t*)&fp->fa3_size);
sys/fs/nfsserver/nfs_nfsdsubs.c
1438
txdr_hyper(nvap->na_bytes, (uint32_t*)&fp->fa3_used);
sys/fs/nfsserver/nfs_nfsdsubs.c
1439
fp->fa3_rdev.specdata1 = txdr_unsigned(NFSMAJOR(nvap->na_rdev));
sys/fs/nfsserver/nfs_nfsdsubs.c
1440
fp->fa3_rdev.specdata2 = txdr_unsigned(NFSMINOR(nvap->na_rdev));
sys/fs/nfsserver/nfs_nfsdsubs.c
1441
fp->fa3_fsid.nfsuquad[0] = 0;
sys/fs/nfsserver/nfs_nfsdsubs.c
1442
fp->fa3_fsid.nfsuquad[1] = txdr_unsigned(nvap->na_fsid);
sys/fs/nfsserver/nfs_nfsdsubs.c
1443
txdr_hyper(nvap->na_fileid, (uint32_t*)&fp->fa3_fileid);
sys/fs/nfsserver/nfs_nfsdsubs.c
1444
txdr_nfsv3time(&nvap->na_atime, &fp->fa3_atime);
sys/fs/nfsserver/nfs_nfsdsubs.c
1445
txdr_nfsv3time(&nvap->na_mtime, &fp->fa3_mtime);
sys/fs/nfsserver/nfs_nfsdsubs.c
1446
txdr_nfsv3time(&nvap->na_ctime, &fp->fa3_ctime);
sys/fs/nfsserver/nfs_nfsdsubs.c
1448
fp->fa_type = vtonfsv2_type(nvap->na_type);
sys/fs/nfsserver/nfs_nfsdsubs.c
1449
fp->fa_mode = vtonfsv2_mode(nvap->na_type, nvap->na_mode);
sys/fs/nfsserver/nfs_nfsdsubs.c
1450
fp->fa2_size = txdr_unsigned(nvap->na_size);
sys/fs/nfsserver/nfs_nfsdsubs.c
1451
fp->fa2_blocksize = txdr_unsigned(nvap->na_blocksize);
sys/fs/nfsserver/nfs_nfsdsubs.c
1453
fp->fa2_rdev = 0xffffffff;
sys/fs/nfsserver/nfs_nfsdsubs.c
1455
fp->fa2_rdev = txdr_unsigned(nvap->na_rdev);
sys/fs/nfsserver/nfs_nfsdsubs.c
1456
fp->fa2_blocks = txdr_unsigned(nvap->na_bytes / NFS_FABLKSIZE);
sys/fs/nfsserver/nfs_nfsdsubs.c
1457
fp->fa2_fsid = txdr_unsigned(nvap->na_fsid);
sys/fs/nfsserver/nfs_nfsdsubs.c
1458
fp->fa2_fileid = txdr_unsigned(nvap->na_fileid);
sys/fs/nfsserver/nfs_nfsdsubs.c
1459
txdr_nfsv2time(&nvap->na_atime, &fp->fa2_atime);
sys/fs/nfsserver/nfs_nfsdsubs.c
1460
txdr_nfsv2time(&nvap->na_mtime, &fp->fa2_mtime);
sys/fs/nfsserver/nfs_nfsdsubs.c
1461
txdr_nfsv2time(&nvap->na_ctime, &fp->fa2_ctime);
sys/fs/tmpfs/tmpfs.h
470
int tmpfs_fo_close(struct file *fp, struct thread *td);
sys/fs/tmpfs/tmpfs_vnops.c
296
struct file *fp;
sys/fs/tmpfs/tmpfs_vnops.c
322
fp = v->a_fp;
sys/fs/tmpfs/tmpfs_vnops.c
323
MPASS(fp == NULL || fp->f_data == NULL);
sys/fs/tmpfs/tmpfs_vnops.c
324
if (error == 0 && fp != NULL && vp->v_type == VREG) {
sys/fs/tmpfs/tmpfs_vnops.c
326
finit_vnode(fp, mode, node, &tmpfs_fnops);
sys/fs/tmpfs/tmpfs_vnops.c
344
tmpfs_fo_close(struct file *fp, struct thread *td)
sys/fs/tmpfs/tmpfs_vnops.c
348
node = fp->f_data;
sys/fs/tmpfs/tmpfs_vnops.c
353
return (vnops.fo_close(fp, td));
sys/i386/i386/db_disasm.c
1058
const struct finst * fp;
sys/i386/i386/db_disasm.c
1064
fp = &db_Esc_inst[inst - 0xd8][f_reg(regmodrm)];
sys/i386/i386/db_disasm.c
1067
if (*fp->f_name == '\0') {
sys/i386/i386/db_disasm.c
1075
db_printf("%s", fp->f_name);
sys/i386/i386/db_disasm.c
1076
switch(fp->f_size) {
sys/i386/i386/db_disasm.c
1105
switch (fp->f_rrmode) {
sys/i386/i386/db_disasm.c
1107
name = (fp->f_rrname) ? fp->f_rrname : fp->f_name;
sys/i386/i386/db_disasm.c
1111
name = (fp->f_rrname) ? fp->f_rrname : fp->f_name;
sys/i386/i386/db_disasm.c
1115
name = (fp->f_rrname) ? fp->f_rrname : fp->f_name;
sys/i386/i386/db_disasm.c
1119
name = ((const char * const *)fp->f_rrname)[f_rm(regmodrm)];
sys/i386/i386/db_disasm.c
1125
name = ((const char * const *)fp->f_rrname)[f_rm(regmodrm)];
sys/i386/i386/db_trace.c
200
db_numargs(struct i386_frame *fp)
sys/i386/i386/db_trace.c
206
argp = (char *)db_get_value((int)&fp->f_retaddr, 4, false);
sys/i386/i386/db_trace.c
258
db_nextframe(struct i386_frame **fp, db_addr_t *ip, struct thread *td)
sys/i386/i386/db_trace.c
267
eip = db_get_value((int) &(*fp)->f_retaddr, 4, false);
sys/i386/i386/db_trace.c
268
ebp = db_get_value((int) &(*fp)->f_frame, 4, false);
sys/i386/i386/db_trace.c
316
*fp = (struct i386_frame *) ebp;
sys/i386/i386/db_trace.c
320
db_print_stack_entry(name, 0, 0, 0, eip, &(*fp)->f_frame);
sys/i386/i386/db_trace.c
335
*fp = (struct i386_frame *) ebp;
sys/i386/i386/db_trace.c
344
tf = (struct trapframe *)(*fp)->f_frame;
sys/i386/i386/db_trace.c
352
*fp = 0;
sys/i386/i386/db_trace.c
394
*fp = (struct i386_frame *) ebp;
sys/i386/i386/exec_machdep.c
130
struct osigframe sf, *fp;
sys/i386/i386/exec_machdep.c
150
fp = (struct osigframe *)((uintptr_t)td->td_sigstk.ss_sp +
sys/i386/i386/exec_machdep.c
156
fp = (struct osigframe *)regs->tf_esp - 1;
sys/i386/i386/exec_machdep.c
160
sf.sf_scp = (register_t)&fp->sf_siginfo.si_sc;
sys/i386/i386/exec_machdep.c
164
sf.sf_arg2 = (register_t)&fp->sf_siginfo;
sys/i386/i386/exec_machdep.c
230
if (copyout(&sf, fp, sizeof(*fp)) != 0) {
sys/i386/i386/exec_machdep.c
235
regs->tf_esp = (int)fp;
sys/i386/linux/linux_sysvec.c
159
struct l_rt_sigframe *fp, frame;
sys/i386/linux/linux_sysvec.c
174
fp = (struct l_rt_sigframe *)((uintptr_t)td->td_sigstk.ss_sp +
sys/i386/linux/linux_sysvec.c
177
fp = (struct l_rt_sigframe *)regs->tf_esp - 1;
sys/i386/linux/linux_sysvec.c
186
frame.sf_siginfo = PTROUT(&fp->sf_si);
sys/i386/linux/linux_sysvec.c
187
frame.sf_ucontext = PTROUT(&fp->sf_uc);
sys/i386/linux/linux_sysvec.c
223
if (copyout(&frame, fp, sizeof(frame)) != 0) {
sys/i386/linux/linux_sysvec.c
233
regs->tf_esp = PTROUT(fp);
sys/i386/linux/linux_sysvec.c
263
struct l_sigframe *fp, frame;
sys/i386/linux/linux_sysvec.c
283
fp = (struct l_sigframe *)((uintptr_t)td->td_sigstk.ss_sp +
sys/i386/linux/linux_sysvec.c
286
fp = (struct l_sigframe *)regs->tf_esp - 1;
sys/i386/linux/linux_sysvec.c
322
if (copyout(&frame, fp, sizeof(frame)) != 0) {
sys/i386/linux/linux_sysvec.c
332
regs->tf_esp = PTROUT(fp);
sys/kern/kern_conf.c
363
giant_fdopen(struct cdev *dev, int oflags, struct thread *td, struct file *fp)
sys/kern/kern_conf.c
372
retval = dsw->d_gianttrick->d_fdopen(dev, oflags, td, fp);
sys/kern/kern_descrip.c
1000
fdrop(fp, td);
sys/kern/kern_descrip.c
103
static int closefp(struct filedesc *fdp, int fd, struct file *fp,
sys/kern/kern_descrip.c
105
static void export_file_to_kinfo(struct file *fp, int fd,
sys/kern/kern_descrip.c
1399
closefp_impl(struct filedesc *fdp, int fd, struct file *fp, struct thread *td,
sys/kern/kern_descrip.c
1415
if (fp->f_ops->fo_fdclose != NULL)
sys/kern/kern_descrip.c
1416
fp->f_ops->fo_fdclose(fp, fd, td);
sys/kern/kern_descrip.c
1421
audit_sysclose(td, fd, fp);
sys/kern/kern_descrip.c
1423
error = closef(fp, td);
sys/kern/kern_descrip.c
1437
closefp_hl(struct filedesc *fdp, int fd, struct file *fp, struct thread *td,
sys/kern/kern_descrip.c
1456
error = closefp_impl(fdp, fd, fp, td, audit);
sys/kern/kern_descrip.c
1471
closefp(struct filedesc *fdp, int fd, struct file *fp, struct thread *td,
sys/kern/kern_descrip.c
1478
return (closefp_hl(fdp, fd, fp, td, holdleaders, audit));
sys/kern/kern_descrip.c
1480
return (closefp_impl(fdp, fd, fp, td, audit));
sys/kern/kern_descrip.c
1504
struct file *fp;
sys/kern/kern_descrip.c
1509
if ((fp = fget_noref(fdp, fd)) == NULL) {
sys/kern/kern_descrip.c
1516
return (closefp(fdp, fd, fp, td, true, true));
sys/kern/kern_descrip.c
1551
struct file *fp;
sys/kern/kern_descrip.c
1563
fp = fdt->fdt_ofiles[fd].fde_file;
sys/kern/kern_descrip.c
1564
if (fp == NULL) {
sys/kern/kern_descrip.c
1569
(void) closefp(fdp, fd, fp, td, true, true);
sys/kern/kern_descrip.c
1719
struct file *fp;
sys/kern/kern_descrip.c
1724
error = fget(td, fd, &cap_fstat_rights, &fp);
sys/kern/kern_descrip.c
1728
AUDIT_ARG_FILE(td->td_proc, fp);
sys/kern/kern_descrip.c
1732
error = fo_stat(fp, sbp, td->td_ucred);
sys/kern/kern_descrip.c
1733
fdrop(fp, td);
sys/kern/kern_descrip.c
1800
struct file *fp;
sys/kern/kern_descrip.c
1804
error = fget(td, fd, &cap_fpathconf_rights, &fp);
sys/kern/kern_descrip.c
1812
vp = fp->f_vnode;
sys/kern/kern_descrip.c
1817
} else if (fp->f_type == DTYPE_PIPE || fp->f_type == DTYPE_SOCKET) {
sys/kern/kern_descrip.c
1828
fdrop(fp, td);
sys/kern/kern_descrip.c
2188
struct file *fp;
sys/kern/kern_descrip.c
2194
error = _falloc_noinstall(td, &fp, 2);
sys/kern/kern_descrip.c
2199
error = finstall_refed(td, fp, &fd, flags, fcaps);
sys/kern/kern_descrip.c
2201
falloc_abort(td, fp);
sys/kern/kern_descrip.c
2205
*resultfp = fp;
sys/kern/kern_descrip.c
2217
struct file *fp;
sys/kern/kern_descrip.c
2237
fp = uma_zalloc(file_zone, M_WAITOK);
sys/kern/kern_descrip.c
2238
bzero(fp, sizeof(*fp));
sys/kern/kern_descrip.c
2239
refcount_init(&fp->f_count, n);
sys/kern/kern_descrip.c
2240
fp->f_cred = crhold(td->td_ucred);
sys/kern/kern_descrip.c
2241
fp->f_ops = &badfileops;
sys/kern/kern_descrip.c
2242
*resultfp = fp;
sys/kern/kern_descrip.c
2247
falloc_abort(struct thread *td, struct file *fp)
sys/kern/kern_descrip.c
2253
refcount_init(&fp->f_count, 0);
sys/kern/kern_descrip.c
2254
_fdrop(fp, td);
sys/kern/kern_descrip.c
2261
_finstall(struct filedesc *fdp, struct file *fp, int fd, int flags,
sys/kern/kern_descrip.c
2266
MPASS(fp != NULL);
sys/kern/kern_descrip.c
2275
fde->fde_file = fp;
sys/kern/kern_descrip.c
2287
finstall_refed(struct thread *td, struct file *fp, int *fd, int flags,
sys/kern/kern_descrip.c
2298
_finstall(fdp, fp, *fd, flags, fcaps);
sys/kern/kern_descrip.c
2305
finstall(struct thread *td, struct file *fp, int *fd, int flags,
sys/kern/kern_descrip.c
2312
if (!fhold(fp))
sys/kern/kern_descrip.c
2314
error = finstall_refed(td, fp, fd, flags, fcaps);
sys/kern/kern_descrip.c
2316
fdrop(fp, td);
sys/kern/kern_descrip.c
2518
struct file *fp;
sys/kern/kern_descrip.c
2556
fp = NULL;
sys/kern/kern_descrip.c
2559
if (ops->fo_fork(newfdp, ofde->fde_file, &fp, p1,
sys/kern/kern_descrip.c
2572
if (fp != NULL)
sys/kern/kern_descrip.c
2573
nfde->fde_file = fp;
sys/kern/kern_descrip.c
2625
struct file *fp;
sys/kern/kern_descrip.c
2641
FILEDESC_FOREACH_FP(fdp, i, fp) {
sys/kern/kern_descrip.c
2642
if (fp->f_type != DTYPE_VNODE ||
sys/kern/kern_descrip.c
2643
!fhold(fp))
sys/kern/kern_descrip.c
2650
vp = fp->f_vnode;
sys/kern/kern_descrip.c
2655
fdrop(fp, td);
sys/kern/kern_descrip.c
2704
struct file *fp;
sys/kern/kern_descrip.c
2719
fp = fde->fde_file;
sys/kern/kern_descrip.c
2721
(void) closef(fp, td);
sys/kern/kern_descrip.c
2797
is_unsafe(struct file *fp)
sys/kern/kern_descrip.c
2801
if (fp->f_type != DTYPE_VNODE)
sys/kern/kern_descrip.c
2804
vp = fp->f_vnode;
sys/kern/kern_descrip.c
2815
struct file *fp;
sys/kern/kern_descrip.c
2823
fp = fdp->fd_ofiles[i].fde_file;
sys/kern/kern_descrip.c
2824
if (fp != NULL && is_unsafe(fp)) {
sys/kern/kern_descrip.c
2833
(void) closef(fp, td);
sys/kern/kern_descrip.c
2846
fdclose(struct thread *td, struct file *fp, int idx)
sys/kern/kern_descrip.c
2851
if (fdp->fd_ofiles[idx].fde_file == fp) {
sys/kern/kern_descrip.c
2854
fdrop(fp, td);
sys/kern/kern_descrip.c
2867
struct file *fp;
sys/kern/kern_descrip.c
2874
fp = fde->fde_file;
sys/kern/kern_descrip.c
2875
if (fp->f_type == DTYPE_MQUEUE ||
sys/kern/kern_descrip.c
2879
(void) closefp(fdp, i, fp, td, false, false);
sys/kern/kern_descrip.c
2938
closef(struct file *fp, struct thread *td)
sys/kern/kern_descrip.c
2959
if (fp->f_type == DTYPE_VNODE) {
sys/kern/kern_descrip.c
2960
vp = fp->f_vnode;
sys/kern/kern_descrip.c
2989
vp = fp->f_vnode;
sys/kern/kern_descrip.c
3004
return (fdrop_close(fp, td));
sys/kern/kern_descrip.c
3011
closef_nothread(struct file *fp)
sys/kern/kern_descrip.c
3014
fdrop(fp, NULL);
sys/kern/kern_descrip.c
3025
finit(struct file *fp, u_int flag, short type, void *data,
sys/kern/kern_descrip.c
3028
fp->f_data = data;
sys/kern/kern_descrip.c
3029
fp->f_flag = flag;
sys/kern/kern_descrip.c
3030
fp->f_type = type;
sys/kern/kern_descrip.c
3031
atomic_store_rel_ptr((volatile uintptr_t *)&fp->f_ops, (uintptr_t)ops);
sys/kern/kern_descrip.c
3035
finit_vnode(struct file *fp, u_int flag, void *data, const struct fileops *ops)
sys/kern/kern_descrip.c
3037
fp->f_seqcount[UIO_READ] = 1;
sys/kern/kern_descrip.c
3038
fp->f_seqcount[UIO_WRITE] = 1;
sys/kern/kern_descrip.c
3039
finit(fp, (flag & FMASK) | (fp->f_flag & FHASLOCK), DTYPE_VNODE,
sys/kern/kern_descrip.c
3082
struct file *fp;
sys/kern/kern_descrip.c
3087
error = fget_unlocked_seq(td, fd, needrightsp, flagsp, &fp,
sys/kern/kern_descrip.c
3095
fdrop(fp, td);
sys/kern/kern_descrip.c
3102
fdrop(fp, td);
sys/kern/kern_descrip.c
3105
*fpp = fp;
sys/kern/kern_descrip.c
3134
struct file *fp;
sys/kern/kern_descrip.c
3147
fp = fget_noref(fdp, fd);
sys/kern/kern_descrip.c
3148
if (fp != NULL && fhold(fp)) {
sys/kern/kern_descrip.c
3149
*fpp = fp;
sys/kern/kern_descrip.c
3168
struct file *fp;
sys/kern/kern_descrip.c
3190
error1 = fget_remote(td, p, fd, &fp);
sys/kern/kern_descrip.c
3193
error = fn(p, fd, fp, arg);
sys/kern/kern_descrip.c
3194
fdrop(fp, td);
sys/kern/kern_descrip.c
3210
struct file *fp;
sys/kern/kern_descrip.c
3230
fp = fde->fde_file;
sys/kern/kern_descrip.c
3231
if (__predict_false(fp == NULL))
sys/kern/kern_descrip.c
3235
flags = fp->f_flag & FSEARCH;
sys/kern/kern_descrip.c
3238
vp = fp->f_vnode;
sys/kern/kern_descrip.c
3281
struct file *fp;
sys/kern/kern_descrip.c
3293
fp = fde->fde_file;
sys/kern/kern_descrip.c
3294
if (__predict_false(fp == NULL))
sys/kern/kern_descrip.c
3296
flags = fp->f_flag & FSEARCH;
sys/kern/kern_descrip.c
3299
vp = fp->f_vnode;
sys/kern/kern_descrip.c
3309
if (__predict_false(fp != fdt->fdt_ofiles[fd].fde_file))
sys/kern/kern_descrip.c
3322
struct file *fp;
sys/kern/kern_descrip.c
3334
error = fget_cap(td, ndp->ni_dirfd, &rights, &flags, &fp,
sys/kern/kern_descrip.c
3338
if (__predict_false(fp->f_ops == &badfileops)) {
sys/kern/kern_descrip.c
3342
vp = fp->f_vnode;
sys/kern/kern_descrip.c
3351
if ((fp->f_flag & FSEARCH) != 0)
sys/kern/kern_descrip.c
3357
fdrop(fp, td);
sys/kern/kern_descrip.c
3385
fdrop(fp, td);
sys/kern/kern_descrip.c
3409
struct file *fp;
sys/kern/kern_descrip.c
3424
fp = fde->fde_file;
sys/kern/kern_descrip.c
3426
if (__predict_false(fp == NULL)) {
sys/kern/kern_descrip.c
3439
if (__predict_false(!refcount_acquire_if_not_zero(&fp->f_count))) {
sys/kern/kern_descrip.c
3451
fdrop(fp, td);
sys/kern/kern_descrip.c
3453
*fpp = fp;
sys/kern/kern_descrip.c
3467
struct file *fp;
sys/kern/kern_descrip.c
3476
fp = fdt->fdt_ofiles[fd].fde_file;
sys/kern/kern_descrip.c
3478
if (__predict_false(fp == NULL))
sys/kern/kern_descrip.c
3480
if (__predict_false(!refcount_acquire_if_not_zero(&fp->f_count))) {
sys/kern/kern_descrip.c
3490
if (__predict_true(fp == fdt->fdt_ofiles[fd].fde_file))
sys/kern/kern_descrip.c
3492
fdrop(fp, td);
sys/kern/kern_descrip.c
3496
*fpp = fp;
sys/kern/kern_descrip.c
3517
struct file *fp;
sys/kern/kern_descrip.c
3534
fp = fde->fde_file;
sys/kern/kern_descrip.c
3537
fp = fdt->fdt_ofiles[fd].fde_file;
sys/kern/kern_descrip.c
3540
if (__predict_false(fp == NULL))
sys/kern/kern_descrip.c
3546
if (__predict_false(!refcount_acquire_if_not_zero(&fp->f_count)))
sys/kern/kern_descrip.c
3558
if (__predict_false(fp != fdt->fdt_ofiles[fd].fde_file))
sys/kern/kern_descrip.c
3561
*fpp = fp;
sys/kern/kern_descrip.c
3566
fdrop(fp, td);
sys/kern/kern_descrip.c
3596
struct file *fp;
sys/kern/kern_descrip.c
3607
fp = fde->fde_file;
sys/kern/kern_descrip.c
3608
if (__predict_false(fp == NULL))
sys/kern/kern_descrip.c
3610
MPASS(refcount_load(&fp->f_count) > 0);
sys/kern/kern_descrip.c
3615
*fpp = fp;
sys/kern/kern_descrip.c
3623
struct file *fp;
sys/kern/kern_descrip.c
3631
fp = fdp->fd_ofiles[fd].fde_file;
sys/kern/kern_descrip.c
3632
if (__predict_false(fp == NULL))
sys/kern/kern_descrip.c
3635
MPASS(refcount_load(&fp->f_count) > 0);
sys/kern/kern_descrip.c
3636
*fpp = fp;
sys/kern/kern_descrip.c
3658
struct file *fp;
sys/kern/kern_descrip.c
3662
error = fget_unlocked(td, fd, needrightsp, &fp);
sys/kern/kern_descrip.c
3665
if (__predict_false(fp->f_ops == &badfileops)) {
sys/kern/kern_descrip.c
3666
fdrop(fp, td);
sys/kern/kern_descrip.c
3677
if ((fp->f_flag & flags) == 0)
sys/kern/kern_descrip.c
3681
if (fp->f_ops != &path_fileops &&
sys/kern/kern_descrip.c
3682
((fp->f_flag & (FREAD | FEXEC)) == 0 ||
sys/kern/kern_descrip.c
3683
(fp->f_flag & FWRITE) != 0))
sys/kern/kern_descrip.c
3693
fdrop(fp, td);
sys/kern/kern_descrip.c
3697
*fpp = fp;
sys/kern/kern_descrip.c
3721
struct file *fp;
sys/kern/kern_descrip.c
3728
error = fget_unlocked_seq(td, fd, rightsp, NULL, &fp, &seq);
sys/kern/kern_descrip.c
3731
if (__predict_false(fp->f_ops == &badfileops)) {
sys/kern/kern_descrip.c
3732
fdrop(fp, td);
sys/kern/kern_descrip.c
3739
fdrop(fp, td);
sys/kern/kern_descrip.c
3747
*fpp = fp;
sys/kern/kern_descrip.c
3776
struct file *fp;
sys/kern/kern_descrip.c
3783
error = fget_unlocked_seq(td, fd, rightsp, NULL, &fp, &seq);
sys/kern/kern_descrip.c
3789
fdrop(fp, td);
sys/kern/kern_descrip.c
3792
fdrop(fp, td);
sys/kern/kern_descrip.c
3795
*fpp = fp;
sys/kern/kern_descrip.c
3811
struct file *fp;
sys/kern/kern_descrip.c
3815
error = _fget(td, fd, &fp, flags, needrightsp);
sys/kern/kern_descrip.c
3818
if (fp->f_vnode == NULL) {
sys/kern/kern_descrip.c
3821
*vpp = fp->f_vnode;
sys/kern/kern_descrip.c
3824
fdrop(fp, td);
sys/kern/kern_descrip.c
3842
struct file *fp;
sys/kern/kern_descrip.c
3845
error = fget_cap(td, fd, needrightsp, NULL, &fp, &caps);
sys/kern/kern_descrip.c
3848
if (fp->f_ops == &badfileops) {
sys/kern/kern_descrip.c
3852
if (fp->f_vnode == NULL) {
sys/kern/kern_descrip.c
3858
*vpp = fp->f_vnode;
sys/kern/kern_descrip.c
3860
fdrop(fp, td);
sys/kern/kern_descrip.c
3865
fdrop(fp, td);
sys/kern/kern_descrip.c
3902
_fdrop(struct file *fp, struct thread *td)
sys/kern/kern_descrip.c
3906
KASSERT(refcount_load(&fp->f_count) == 0,
sys/kern/kern_descrip.c
3907
("fdrop: fp %p count %d", fp, refcount_load(&fp->f_count)));
sys/kern/kern_descrip.c
3909
error = fo_close(fp, td);
sys/kern/kern_descrip.c
3911
crfree(fp->f_cred);
sys/kern/kern_descrip.c
3912
free(fp->f_advice, M_FADVISE);
sys/kern/kern_descrip.c
3913
uma_zfree(file_zone, fp);
sys/kern/kern_descrip.c
3934
struct file *fp;
sys/kern/kern_descrip.c
3939
error = fget(td, uap->fd, &cap_flock_rights, &fp);
sys/kern/kern_descrip.c
3943
if (fp->f_type != DTYPE_VNODE && fp->f_type != DTYPE_FIFO) {
sys/kern/kern_descrip.c
3946
if (fp->f_ops == &path_fileops) {
sys/kern/kern_descrip.c
3951
vp = fp->f_vnode;
sys/kern/kern_descrip.c
3957
atomic_clear_int(&fp->f_flag, FHASLOCK);
sys/kern/kern_descrip.c
3958
error = VOP_ADVLOCK(vp, (caddr_t)fp, F_UNLCK, &lf, F_FLOCK);
sys/kern/kern_descrip.c
3969
atomic_set_int(&fp->f_flag, FHASLOCK);
sys/kern/kern_descrip.c
3970
error = VOP_ADVLOCK(vp, (caddr_t)fp, F_SETLK, &lf,
sys/kern/kern_descrip.c
3973
fdrop(fp, td);
sys/kern/kern_descrip.c
3984
struct file *fp;
sys/kern/kern_descrip.c
3997
if ((fp = fget_noref(fdp, dfd)) == NULL) {
sys/kern/kern_descrip.c
4022
if (((mode & (FREAD|FWRITE)) | fp->f_flag) != fp->f_flag) {
sys/kern/kern_descrip.c
4027
if (!fhold(fp)) {
sys/kern/kern_descrip.c
4091
struct file *fp;
sys/kern/kern_descrip.c
4096
FILEDESC_FOREACH_FP(fdp, i, fp) {
sys/kern/kern_descrip.c
4097
if (fp->f_type == DTYPE_VNODE) {
sys/kern/kern_descrip.c
4098
vp = fp->f_vnode;
sys/kern/kern_descrip.c
4517
struct file *fp;
sys/kern/kern_descrip.c
4523
FILEDESC_FOREACH_FP(fdp, i, fp) {
sys/kern/kern_descrip.c
4524
if (fp->f_type != DTYPE_VNODE ||
sys/kern/kern_descrip.c
4525
(atomic_load_int(&fp->f_flag) & FWRITE) == 0)
sys/kern/kern_descrip.c
4527
vp = fp->f_vnode;
sys/kern/kern_descrip.c
4633
struct file *fp;
sys/kern/kern_descrip.c
4683
FILEDESC_FOREACH_FP(fdp, n, fp) {
sys/kern/kern_descrip.c
4685
xf.xf_file = (uintptr_t)fp;
sys/kern/kern_descrip.c
4686
xf.xf_data = (uintptr_t)fp->f_data;
sys/kern/kern_descrip.c
4687
xf.xf_vnode = (uintptr_t)fp->f_vnode;
sys/kern/kern_descrip.c
4688
xf.xf_type = (uintptr_t)fp->f_type;
sys/kern/kern_descrip.c
4689
xf.xf_count = refcount_load(&fp->f_count);
sys/kern/kern_descrip.c
4691
xf.xf_offset = foffset_get(fp);
sys/kern/kern_descrip.c
4692
xf.xf_flag = fp->f_flag;
sys/kern/kern_descrip.c
4764
export_file_to_kinfo(struct file *fp, int fd, cap_rights_t *rightsp,
sys/kern/kern_descrip.c
4773
kif->kf_flags = xlate_fflags(fp->f_flag);
sys/kern/kern_descrip.c
4779
kif->kf_ref_count = refcount_load(&fp->f_count);
sys/kern/kern_descrip.c
4780
kif->kf_offset = foffset_get(fp);
sys/kern/kern_descrip.c
4786
error = fo_fill_kinfo(fp, kif, fdp);
sys/kern/kern_descrip.c
4845
export_file_to_sb(struct file *fp, int fd, cap_rights_t *rightsp,
sys/kern/kern_descrip.c
4852
export_file_to_kinfo(fp, fd, rightsp, &efbuf->kif, efbuf->fdp,
sys/kern/kern_descrip.c
4886
struct file *fp;
sys/kern/kern_descrip.c
4965
FILEDESC_FOREACH_FP(fdp, i, fp) {
sys/kern/kern_descrip.c
4977
error = export_file_to_sb(fp, i, &rights, efbuf);
sys/kern/kern_descrip.c
5089
struct file *fp;
sys/kern/kern_descrip.c
5130
FILEDESC_FOREACH_FP(fdp, i, fp) {
sys/kern/kern_descrip.c
5131
export_file_to_kinfo(fp, i, NULL, kif, fdp,
sys/kern/kern_descrip.c
5318
file_to_first_proc(struct file *fp)
sys/kern/kern_descrip.c
5331
if (fp == fdp->fd_ofiles[n].fde_file)
sys/kern/kern_descrip.c
5339
db_print_file(struct file *fp, int header)
sys/kern/kern_descrip.c
5349
p = file_to_first_proc(fp);
sys/kern/kern_descrip.c
5351
fp, file_type_to_name(fp->f_type), XPTRWIDTH, fp->f_data,
sys/kern/kern_descrip.c
5352
fp->f_flag, 0, refcount_load(&fp->f_count), 0, XPTRWIDTH, fp->f_vnode,
sys/kern/kern_descrip.c
5360
struct file *fp;
sys/kern/kern_descrip.c
5366
fp = (struct file *)addr;
sys/kern/kern_descrip.c
5367
db_print_file(fp, 1);
sys/kern/kern_descrip.c
5373
struct file *fp;
sys/kern/kern_descrip.c
5385
if ((fp = fdp->fd_ofiles[n].fde_file) == NULL)
sys/kern/kern_descrip.c
5387
db_print_file(fp, header);
sys/kern/kern_descrip.c
5427
badfo_readwrite(struct file *fp, struct uio *uio, struct ucred *active_cred,
sys/kern/kern_descrip.c
5435
badfo_truncate(struct file *fp, off_t length, struct ucred *active_cred,
sys/kern/kern_descrip.c
5443
badfo_ioctl(struct file *fp, u_long com, void *data, struct ucred *active_cred,
sys/kern/kern_descrip.c
5451
badfo_poll(struct file *fp, int events, struct ucred *active_cred,
sys/kern/kern_descrip.c
5459
badfo_kqfilter(struct file *fp, struct knote *kn)
sys/kern/kern_descrip.c
5466
badfo_stat(struct file *fp, struct stat *sb, struct ucred *active_cred)
sys/kern/kern_descrip.c
5473
badfo_close(struct file *fp, struct thread *td)
sys/kern/kern_descrip.c
5480
badfo_chmod(struct file *fp, mode_t mode, struct ucred *active_cred,
sys/kern/kern_descrip.c
5488
badfo_chown(struct file *fp, uid_t uid, gid_t gid, struct ucred *active_cred,
sys/kern/kern_descrip.c
5496
badfo_sendfile(struct file *fp, int sockfd, struct uio *hdr_uio,
sys/kern/kern_descrip.c
5505
badfo_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp)
sys/kern/kern_descrip.c
5527
path_poll(struct file *fp, int events, struct ucred *active_cred,
sys/kern/kern_descrip.c
5534
path_close(struct file *fp, struct thread *td)
sys/kern/kern_descrip.c
5536
MPASS(fp->f_type == DTYPE_VNODE);
sys/kern/kern_descrip.c
5537
fp->f_ops = &badfileops;
sys/kern/kern_descrip.c
5538
vrele(fp->f_vnode);
sys/kern/kern_descrip.c
5560
invfo_rdwr(struct file *fp, struct uio *uio, struct ucred *active_cred,
sys/kern/kern_descrip.c
5568
invfo_truncate(struct file *fp, off_t length, struct ucred *active_cred,
sys/kern/kern_descrip.c
5576
invfo_ioctl(struct file *fp, u_long com, void *data,
sys/kern/kern_descrip.c
5584
invfo_poll(struct file *fp, int events, struct ucred *active_cred,
sys/kern/kern_descrip.c
5592
invfo_kqfilter(struct file *fp, struct knote *kn)
sys/kern/kern_descrip.c
5599
invfo_chmod(struct file *fp, mode_t mode, struct ucred *active_cred,
sys/kern/kern_descrip.c
5607
invfo_chown(struct file *fp, uid_t uid, gid_t gid, struct ucred *active_cred,
sys/kern/kern_descrip.c
5615
invfo_sendfile(struct file *fp, int sockfd, struct uio *hdr_uio,
sys/kern/kern_descrip.c
573
struct file *fp, *fp2;
sys/kern/kern_descrip.c
644
error = fget_fcntl(td, fd, &cap_fcntl_rights, F_GETFL, &fp);
sys/kern/kern_descrip.c
647
td->td_retval[0] = OFLAGS(fp->f_flag);
sys/kern/kern_descrip.c
648
fdrop(fp, td);
sys/kern/kern_descrip.c
652
error = fget_fcntl(td, fd, &cap_fcntl_rights, F_SETFL, &fp);
sys/kern/kern_descrip.c
655
if (fp->f_ops == &path_fileops) {
sys/kern/kern_descrip.c
656
fdrop(fp, td);
sys/kern/kern_descrip.c
660
fsetfl_lock(fp);
sys/kern/kern_descrip.c
662
tmp = flg = fp->f_flag;
sys/kern/kern_descrip.c
665
} while (atomic_cmpset_int(&fp->f_flag, flg, tmp) == 0);
sys/kern/kern_descrip.c
669
tmp = fp->f_flag & FNONBLOCK;
sys/kern/kern_descrip.c
670
error = fo_ioctl(fp, FIONBIO, &tmp, td->td_ucred, td);
sys/kern/kern_descrip.c
675
tmp = fp->f_flag & FASYNC;
sys/kern/kern_descrip.c
676
error = fo_ioctl(fp, FIOASYNC, &tmp, td->td_ucred, td);
sys/kern/kern_descrip.c
680
fsetfl_unlock(fp);
sys/kern/kern_descrip.c
681
fdrop(fp, td);
sys/kern/kern_descrip.c
685
tmp = ~fp->f_flag & FNONBLOCK;
sys/kern/kern_descrip.c
686
(void)fo_ioctl(fp, FIONBIO, &tmp, td->td_ucred, td);
sys/kern/kern_descrip.c
690
tmp = flg = fp->f_flag;
sys/kern/kern_descrip.c
694
} while (atomic_cmpset_int(&fp->f_flag, flg, tmp) == 0);
sys/kern/kern_descrip.c
695
fsetfl_unlock(fp);
sys/kern/kern_descrip.c
696
fdrop(fp, td);
sys/kern/kern_descrip.c
700
error = fget_fcntl(td, fd, &cap_fcntl_rights, F_GETOWN, &fp);
sys/kern/kern_descrip.c
703
error = fo_ioctl(fp, FIOGETOWN, &tmp, td->td_ucred, td);
sys/kern/kern_descrip.c
706
fdrop(fp, td);
sys/kern/kern_descrip.c
710
error = fget_fcntl(td, fd, &cap_fcntl_rights, F_SETOWN, &fp);
sys/kern/kern_descrip.c
714
error = fo_ioctl(fp, FIOSETOWN, &tmp, td->td_ucred, td);
sys/kern/kern_descrip.c
715
fdrop(fp, td);
sys/kern/kern_descrip.c
737
error = fget_unlocked(td, fd, &cap_flock_rights, &fp);
sys/kern/kern_descrip.c
740
if (fp->f_type != DTYPE_VNODE || fp->f_ops == &path_fileops) {
sys/kern/kern_descrip.c
742
fdrop(fp, td);
sys/kern/kern_descrip.c
747
foffset = foffset_get(fp);
sys/kern/kern_descrip.c
752
fdrop(fp, td);
sys/kern/kern_descrip.c
758
vp = fp->f_vnode;
sys/kern/kern_descrip.c
761
if ((fp->f_flag & FREAD) == 0) {
sys/kern/kern_descrip.c
774
if ((fp->f_flag & FWRITE) == 0) {
sys/kern/kern_descrip.c
804
fdrop(fp, td);
sys/kern/kern_descrip.c
826
fdrop(fp, td);
sys/kern/kern_descrip.c
829
if (fp != fp2) {
sys/kern/kern_descrip.c
837
fdrop(fp, td);
sys/kern/kern_descrip.c
842
error = fget_unlocked(td, fd, &cap_flock_rights, &fp);
sys/kern/kern_descrip.c
845
if (fp->f_type != DTYPE_VNODE || fp->f_ops == &path_fileops) {
sys/kern/kern_descrip.c
847
fdrop(fp, td);
sys/kern/kern_descrip.c
854
fdrop(fp, td);
sys/kern/kern_descrip.c
858
foffset = foffset_get(fp);
sys/kern/kern_descrip.c
864
fdrop(fp, td);
sys/kern/kern_descrip.c
869
vp = fp->f_vnode;
sys/kern/kern_descrip.c
872
fdrop(fp, td);
sys/kern/kern_descrip.c
876
error = fget_unlocked(td, fd, &cap_no_rights, &fp);
sys/kern/kern_descrip.c
879
error = fo_add_seals(fp, arg);
sys/kern/kern_descrip.c
880
fdrop(fp, td);
sys/kern/kern_descrip.c
884
error = fget_unlocked(td, fd, &cap_no_rights, &fp);
sys/kern/kern_descrip.c
887
if (fo_get_seals(fp, &seals) == 0)
sys/kern/kern_descrip.c
891
fdrop(fp, td);
sys/kern/kern_descrip.c
898
error = fget_unlocked(td, fd, &cap_no_rights, &fp);
sys/kern/kern_descrip.c
901
if (fp->f_type != DTYPE_VNODE || fp->f_ops == &path_fileops) {
sys/kern/kern_descrip.c
902
fdrop(fp, td);
sys/kern/kern_descrip.c
906
vp = fp->f_vnode;
sys/kern/kern_descrip.c
908
fdrop(fp, td);
sys/kern/kern_descrip.c
919
fdrop(fp, td);
sys/kern/kern_descrip.c
923
bsize = fp->f_vnode->v_mount->mnt_stat.f_iosize;
sys/kern/kern_descrip.c
925
fp->f_seqcount[UIO_READ] = MIN(IO_SEQMAX,
sys/kern/kern_descrip.c
927
atomic_set_int(&fp->f_flag, FRDAHEAD);
sys/kern/kern_descrip.c
929
atomic_clear_int(&fp->f_flag, FRDAHEAD);
sys/kern/kern_descrip.c
932
fdrop(fp, td);
sys/kern/kern_descrip.c
949
error = fget_unlocked(td, fd, &cap_no_rights, &fp);
sys/kern/kern_descrip.c
952
if (fp->f_type != DTYPE_VNODE) {
sys/kern/kern_descrip.c
953
fdrop(fp, td);
sys/kern/kern_descrip.c
957
vp = fp->f_vnode;
sys/kern/kern_descrip.c
967
fdrop(fp, td);
sys/kern/kern_descrip.c
975
fdrop(fp, td);
sys/kern/kern_descrip.c
996
error = fget_cap_noref(fdp, fd, &cap_fcntl_rights, &fp, NULL);
sys/kern/kern_descrip.c
997
if (error == 0 && fhold(fp)) {
sys/kern/kern_descrip.c
998
export_file_to_kinfo(fp, fd, NULL, kif, fdp, 0);
sys/kern/kern_event.c
111
static int kqueue_acquire(struct file *fp, struct kqueue **kqp);
sys/kern/kern_event.c
1268
struct file *fp;
sys/kern/kern_event.c
1271
error = kern_kqueue_alloc(td, td->td_proc->p_fd, &fd, &fp, flags,
sys/kern/kern_event.c
1276
fdrop(fp, td);
sys/kern/kern_event.c
1468
struct file *fp;
sys/kern/kern_event.c
1476
error = fget(td, fd, &rights, &fp);
sys/kern/kern_event.c
1480
error = kern_kevent_fp(td, fp, nchanges, nevents, k_ops, timeout);
sys/kern/kern_event.c
1481
fdrop(fp, td);
sys/kern/kern_event.c
1531
kern_kevent_fp(struct thread *td, struct file *fp, int nchanges, int nevents,
sys/kern/kern_event.c
1537
error = kqueue_acquire(fp, &kq);
sys/kern/kern_event.c
1657
struct file *fp;
sys/kern/kern_event.c
1666
fp = NULL;
sys/kern/kern_event.c
1702
error = fget(td, kev->ident, &cap_event_rights, &fp);
sys/kern/kern_event.c
1709
fdrop(fp, td);
sys/kern/kern_event.c
1710
fp = NULL;
sys/kern/kern_event.c
1717
if (fp->f_type == DTYPE_KQUEUE) {
sys/kern/kern_event.c
1725
if (fp->f_data == kq) {
sys/kern/kern_event.c
1790
if (fp != NULL) {
sys/kern/kern_event.c
1791
fdrop(fp, td);
sys/kern/kern_event.c
1792
fp = NULL;
sys/kern/kern_event.c
1816
kev->ident) != fp) {
sys/kern/kern_event.c
1822
kn->kn_fp = fp;
sys/kern/kern_event.c
1853
fp = NULL;
sys/kern/kern_event.c
1935
if (fp != NULL)
sys/kern/kern_event.c
1936
fdrop(fp, td);
sys/kern/kern_event.c
1957
kqueue_acquire(struct file *fp, struct kqueue **kqp)
sys/kern/kern_event.c
1962
kq = fp->f_data;
sys/kern/kern_event.c
1963
if (fp->f_type != DTYPE_KQUEUE || kq == NULL)
sys/kern/kern_event.c
2311
kqueue_ioctl(struct file *fp, u_long cmd, void *data,
sys/kern/kern_event.c
2335
kq = fp->f_data;
sys/kern/kern_event.c
2359
kqueue_poll(struct file *fp, int events, struct ucred *active_cred,
sys/kern/kern_event.c
2366
if ((error = kqueue_acquire(fp, &kq)))
sys/kern/kern_event.c
2386
kqueue_stat(struct file *fp, struct stat *st, struct ucred *active_cred)
sys/kern/kern_event.c
2484
kqueue_close(struct file *fp, struct thread *td)
sys/kern/kern_event.c
2486
struct kqueue *kq = fp->f_data;
sys/kern/kern_event.c
2491
if ((error = kqueue_acquire(fp, &kq)))
sys/kern/kern_event.c
2516
fp->f_data = NULL;
sys/kern/kern_event.c
2522
kqueue_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp)
sys/kern/kern_event.c
2524
struct kqueue *kq = fp->f_data;
sys/kern/kern_event.c
3030
struct file *fp;
sys/kern/kern_event.c
3035
&fp);
sys/kern/kern_event.c
3038
if ((error = kqueue_acquire(fp, &kq)) != 0)
sys/kern/kern_event.c
3045
fdrop(fp, td);
sys/kern/kern_event.c
3050
kqueue_fork_alloc(struct filedesc *fdp, struct file *fp, struct file **fp1,
sys/kern/kern_event.c
3056
MPASS(fp->f_type == DTYPE_KQUEUE);
sys/kern/kern_event.c
3057
kq = fp->f_data;
sys/kern/kern_event.c
3066
(*fp1)->f_flag = fp->f_flag & (FREAD | FWRITE | FEXEC |
sys/kern/kern_event.c
3147
kqueue_fork_copy(struct filedesc *fdp, struct file *fp, struct file *fp1,
sys/kern/kern_event.c
3155
MPASS(fp == NULL);
sys/kern/kern_event.c
3184
kqueue_fork(struct filedesc *fdp, struct file *fp, struct file **fp1,
sys/kern/kern_event.c
3188
return (kqueue_fork_alloc(fdp, fp, fp1, td));
sys/kern/kern_event.c
3189
return (kqueue_fork_copy(fdp, fp, *fp1, p1, td));
sys/kern/kern_event.c
3303
kern_proc_kqueues_out1_cb(struct proc *p, int fd, struct file *fp, void *arg)
sys/kern/kern_event.c
3308
if (fp->f_type != DTYPE_KQUEUE)
sys/kern/kern_event.c
3311
kq = fp->f_data;
sys/kern/kern_event.c
3354
struct file *fp;
sys/kern/kern_event.c
3358
error = fget_remote(td, p, kq_fd, &fp);
sys/kern/kern_event.c
3360
if (fp->f_type != DTYPE_KQUEUE) {
sys/kern/kern_event.c
3363
kq = fp->f_data;
sys/kern/kern_event.c
3367
fdrop(fp, td);
sys/kern/kern_event.c
406
kqueue_kqfilter(struct file *fp, struct knote *kn)
sys/kern/kern_exit.c
1511
struct file *fp;
sys/kern/kern_exit.c
1522
error = fget(td, fd, &cap_pdwait_rights, &fp);
sys/kern/kern_exit.c
1525
if (fp->f_type != DTYPE_PROCDESC) {
sys/kern/kern_exit.c
1529
pd = fp->f_data;
sys/kern/kern_exit.c
1580
fdrop(fp, td);
sys/kern/kern_fail.c
192
struct fail_point *fp);
sys/kern/kern_fail.c
194
static inline void fail_point_setting_release_ref(struct fail_point *fp);
sys/kern/kern_fail.c
210
fail_point_swap_settings(struct fail_point *fp,
sys/kern/kern_fail.c
215
static inline void fail_point_eval_swap_out(struct fail_point *fp,
sys/kern/kern_fail.c
219
fail_point_is_off(struct fail_point *fp)
sys/kern/kern_fail.c
227
fp_setting = fail_point_setting_get_ref(fp);
sys/kern/kern_fail.c
237
fail_point_setting_release_ref(fp);
sys/kern/kern_fail.c
244
fail_point_setting_new(struct fail_point *fp)
sys/kern/kern_fail.c
249
fs_new->fs_parent = fp;
sys/kern/kern_fail.c
301
fail_point_setting_get_ref(struct fail_point *fp)
sys/kern/kern_fail.c
306
atomic_add_acq_32(&fp->fp_ref_cnt, 1);
sys/kern/kern_fail.c
307
fp_setting = fp->fp_setting;
sys/kern/kern_fail.c
314
fail_point_setting_release_ref(struct fail_point *fp)
sys/kern/kern_fail.c
317
KASSERT(&fp->fp_ref_cnt > 0, ("Attempting to deref w/no refs"));
sys/kern/kern_fail.c
318
atomic_subtract_rel_32(&fp->fp_ref_cnt, 1);
sys/kern/kern_fail.c
334
fail_point_swap_settings(struct fail_point *fp,
sys/kern/kern_fail.c
339
fp_setting_old = fp->fp_setting;
sys/kern/kern_fail.c
340
fp->fp_setting = fp_setting_new;
sys/kern/kern_fail.c
346
fail_point_eval_swap_out(struct fail_point *fp,
sys/kern/kern_fail.c
351
if (fp->fp_setting == fp_setting)
sys/kern/kern_fail.c
352
fail_point_swap_settings(fp, NULL);
sys/kern/kern_fail.c
390
fail_point_drain(struct fail_point *fp, int expected_ref)
sys/kern/kern_fail.c
394
entries = fail_point_swap_settings(fp, NULL);
sys/kern/kern_fail.c
400
while (fp->fp_ref_cnt > expected_ref) {
sys/kern/kern_fail.c
401
wakeup(FP_PAUSE_CHANNEL(fp));
sys/kern/kern_fail.c
402
tsleep(&fp, PWAIT, "fail_point_drain", hz / 100);
sys/kern/kern_fail.c
404
if (fp->fp_callout)
sys/kern/kern_fail.c
405
callout_drain(fp->fp_callout);
sys/kern/kern_fail.c
406
fail_point_swap_settings(fp, entries);
sys/kern/kern_fail.c
410
fail_point_pause(struct fail_point *fp, enum fail_point_return_code *pret,
sys/kern/kern_fail.c
414
if (fp->fp_pre_sleep_fn)
sys/kern/kern_fail.c
415
fp->fp_pre_sleep_fn(fp->fp_pre_sleep_arg);
sys/kern/kern_fail.c
417
msleep_spin(FP_PAUSE_CHANNEL(fp), mtx_sleep, "failpt", 0);
sys/kern/kern_fail.c
419
if (fp->fp_post_sleep_fn)
sys/kern/kern_fail.c
420
fp->fp_post_sleep_fn(fp->fp_post_sleep_arg);
sys/kern/kern_fail.c
424
fail_point_sleep(struct fail_point *fp, int msecs,
sys/kern/kern_fail.c
433
if (!(fp->fp_flags & FAIL_POINT_USE_TIMEOUT_PATH)) {
sys/kern/kern_fail.c
434
if (fp->fp_pre_sleep_fn)
sys/kern/kern_fail.c
435
fp->fp_pre_sleep_fn(fp->fp_pre_sleep_arg);
sys/kern/kern_fail.c
437
tsleep(FP_SLEEP_CHANNEL(fp), PWAIT, "failpt", timo);
sys/kern/kern_fail.c
439
if (fp->fp_post_sleep_fn)
sys/kern/kern_fail.c
440
fp->fp_post_sleep_fn(fp->fp_post_sleep_arg);
sys/kern/kern_fail.c
442
if (fp->fp_pre_sleep_fn)
sys/kern/kern_fail.c
443
fp->fp_pre_sleep_fn(fp->fp_pre_sleep_arg);
sys/kern/kern_fail.c
445
callout_reset(fp->fp_callout, timo,
sys/kern/kern_fail.c
446
fp->fp_post_sleep_fn, fp->fp_post_sleep_arg);
sys/kern/kern_fail.c
466
fail_point_init(struct fail_point *fp, const char *fmt, ...)
sys/kern/kern_fail.c
472
fp->fp_setting = NULL;
sys/kern/kern_fail.c
473
fp->fp_flags = 0;
sys/kern/kern_fail.c
486
fp->fp_name = name;
sys/kern/kern_fail.c
487
fp->fp_location = "";
sys/kern/kern_fail.c
488
fp->fp_flags |= FAIL_POINT_DYNAMIC_NAME;
sys/kern/kern_fail.c
489
fp->fp_pre_sleep_fn = NULL;
sys/kern/kern_fail.c
490
fp->fp_pre_sleep_arg = NULL;
sys/kern/kern_fail.c
491
fp->fp_post_sleep_fn = NULL;
sys/kern/kern_fail.c
492
fp->fp_post_sleep_arg = NULL;
sys/kern/kern_fail.c
496
fail_point_alloc_callout(struct fail_point *fp)
sys/kern/kern_fail.c
503
if (fp->fp_callout != NULL)
sys/kern/kern_fail.c
505
fp->fp_callout = fp_malloc(sizeof(*fp->fp_callout), M_WAITOK);
sys/kern/kern_fail.c
506
callout_init(fp->fp_callout, CALLOUT_MPSAFE);
sys/kern/kern_fail.c
516
fail_point_destroy(struct fail_point *fp)
sys/kern/kern_fail.c
519
fail_point_drain(fp, 0);
sys/kern/kern_fail.c
521
if ((fp->fp_flags & FAIL_POINT_DYNAMIC_NAME) != 0) {
sys/kern/kern_fail.c
522
fp_free(__DECONST(void *, fp->fp_name));
sys/kern/kern_fail.c
523
fp->fp_name = NULL;
sys/kern/kern_fail.c
525
fp->fp_flags = 0;
sys/kern/kern_fail.c
526
if (fp->fp_callout) {
sys/kern/kern_fail.c
527
fp_free(fp->fp_callout);
sys/kern/kern_fail.c
528
fp->fp_callout = NULL;
sys/kern/kern_fail.c
544
fail_point_eval_nontrivial(struct fail_point *fp, int *return_value)
sys/kern/kern_fail.c
558
fp_setting = fail_point_setting_get_ref(fp);
sys/kern/kern_fail.c
592
panic("fail point %s panicking", fp->fp_name);
sys/kern/kern_fail.c
603
fp->fp_name);
sys/kern/kern_fail.c
608
printf("fail point %s executing\n", fp->fp_name);
sys/kern/kern_fail.c
615
fail_point_sleep(fp, msecs, &ret);
sys/kern/kern_fail.c
628
fail_point_pause(fp, &ret, &fp_setting->feq_mtx);
sys/kern/kern_fail.c
649
if (fail_point_is_off(fp))
sys/kern/kern_fail.c
650
fail_point_eval_swap_out(fp, fp_setting);
sys/kern/kern_fail.c
653
fail_point_setting_release_ref(fp);
sys/kern/kern_fail.c
662
fail_point_get(struct fail_point *fp, struct sbuf *sb,
sys/kern/kern_fail.c
679
fp_setting = fail_point_setting_get_ref(fp);
sys/kern/kern_fail.c
693
fail_point_setting_release_ref(fp);
sys/kern/kern_fail.c
734
sleepq_sbuf_print_stacks(sb, FP_SLEEP_CHANNEL(fp), 0,
sys/kern/kern_fail.c
744
sleepq_sbuf_print_stacks(sb, FP_PAUSE_CHANNEL(fp), 0,
sys/kern/kern_fail.c
759
fail_point_set(struct fail_point *fp, char *buf)
sys/kern/kern_fail.c
776
fail_point_setting_get_ref(fp);
sys/kern/kern_fail.c
777
entries = fail_point_setting_new(fp);
sys/kern/kern_fail.c
820
} else if (ent->fe_type == FAIL_POINT_SLEEP && (fp->fp_flags &
sys/kern/kern_fail.c
836
entries = fail_point_swap_settings(fp, NULL);
sys/kern/kern_fail.c
838
wakeup(FP_PAUSE_CHANNEL(fp));
sys/kern/kern_fail.c
841
wakeup(FP_PAUSE_CHANNEL(fp));
sys/kern/kern_fail.c
842
fail_point_swap_settings(fp, entries);
sys/kern/kern_fail.c
849
fp->fp_name, fp->fp_location, buf);
sys/kern/kern_fail.c
852
fp->fp_name, fp->fp_location, buf);
sys/kern/kern_fail.c
855
fail_point_setting_release_ref(fp);
sys/kern/kern_fail.c
867
struct fail_point *fp;
sys/kern/kern_fail.c
874
fp = arg1;
sys/kern/kern_fail.c
901
error = fail_point_set(fp, buf);
sys/kern/kern_fail.c
908
fail_point_get(fp, &sb, false);
sys/kern/kern_fail.c
92
#define FP_SLEEP_CHANNEL(fp) (void*)(fp)
sys/kern/kern_fail.c
923
struct fail_point *fp;
sys/kern/kern_fail.c
926
fp = arg1;
sys/kern/kern_fail.c
93
#define FP_PAUSE_CHANNEL(fp) __DEVOLATILE(void*, &fp->fp_setting)
sys/kern/kern_fail.c
935
fail_point_get(fp, &sb, true);
sys/kern/kern_jaildesc.c
117
struct file *fp;
sys/kern/kern_jaildesc.c
120
error = fget(td, fd, &cap_no_rights, &fp);
sys/kern/kern_jaildesc.c
124
error = jaildesc_get_prison_impl(fp, prp);
sys/kern/kern_jaildesc.c
132
*ucredp = crhold(fp->f_cred);
sys/kern/kern_jaildesc.c
135
fdrop(fp, td);
sys/kern/kern_jaildesc.c
147
struct file *fp;
sys/kern/kern_jaildesc.c
157
error = falloc_caps(td, &fp, fdp, 0, NULL);
sys/kern/kern_jaildesc.c
162
finit(fp, priv_check_cred(fp->f_cred, PRIV_JAIL_SET) == 0 ?
sys/kern/kern_jaildesc.c
168
*fpp = fp;
sys/kern/kern_jaildesc.c
177
jaildesc_get_prison(struct file *fp, struct prison **prp)
sys/kern/kern_jaildesc.c
180
return (jaildesc_get_prison_impl(fp, prp));
sys/kern/kern_jaildesc.c
187
jaildesc_set_prison(struct file *fp, struct prison *pr)
sys/kern/kern_jaildesc.c
192
jd = fp->f_data;
sys/kern/kern_jaildesc.c
249
jaildesc_close(struct file *fp, struct thread *td)
sys/kern/kern_jaildesc.c
254
jd = fp->f_data;
sys/kern/kern_jaildesc.c
255
fp->f_data = NULL;
sys/kern/kern_jaildesc.c
303
jaildesc_poll(struct file *fp, int events, struct ucred *active_cred,
sys/kern/kern_jaildesc.c
310
jd = fp->f_data;
sys/kern/kern_jaildesc.c
386
jaildesc_kqfilter(struct file *fp, struct knote *kn)
sys/kern/kern_jaildesc.c
390
jd = fp->f_data;
sys/kern/kern_jaildesc.c
403
jaildesc_stat(struct file *fp, struct stat *sb, struct ucred *active_cred)
sys/kern/kern_jaildesc.c
408
jd = fp->f_data;
sys/kern/kern_jaildesc.c
420
jaildesc_fill_kinfo(struct file *fp, struct kinfo_file *kif,
sys/kern/kern_jaildesc.c
425
jd = fp->f_data;
sys/kern/kern_jaildesc.c
82
jaildesc_get_prison_impl(struct file *fp, struct prison **prp)
sys/kern/kern_jaildesc.c
87
if (fp->f_type != DTYPE_JAILDESC)
sys/kern/kern_jaildesc.c
90
jd = fp->f_data;
sys/kern/kern_lock.c
119
LK_CAN_SHARE(uintptr_t x, int flags, bool fp)
sys/kern/kern_lock.c
125
if (fp || (!(x & LK_SHARE)))
sys/kern/kern_lock.c
184
int flags, bool fp);
sys/kern/kern_lock.c
509
lockmgr_slock_try(struct lock *lk, uintptr_t *xp, int flags, bool fp)
sys/kern/kern_lock.c
519
while (LK_CAN_SHARE(*xp, flags, fp)) {
sys/kern/kern_rwlock.c
402
__rw_can_read(struct thread *td, uintptr_t v, bool fp)
sys/kern/kern_rwlock.c
408
if (!fp && td->td_rw_rlocks && (v & RW_LOCK_READ))
sys/kern/kern_rwlock.c
414
__rw_rlock_try(struct rwlock *rw, struct thread *td, uintptr_t *vp, bool fp
sys/kern/kern_rwlock.c
428
while (__rw_can_read(td, *vp, fp)) {
sys/kern/kern_sendfile.c
1202
struct file *fp;
sys/kern/kern_sendfile.c
1253
if ((error = fget_read(td, uap->fd, &cap_pread_rights, &fp)) != 0)
sys/kern/kern_sendfile.c
1256
error = fo_sendfile(fp, uap->s, hdr_uio, trl_uio, uap->offset,
sys/kern/kern_sendfile.c
1258
fdrop(fp, td);
sys/kern/kern_sendfile.c
520
sendfile_getobj(struct thread *td, struct file *fp, vm_object_t *obj_res,
sys/kern/kern_sendfile.c
537
if (fp->f_type == DTYPE_VNODE) {
sys/kern/kern_sendfile.c
538
vp = fp->f_vnode;
sys/kern/kern_sendfile.c
564
} else if (fp->f_type == DTYPE_SHM) {
sys/kern/kern_sendfile.c
565
shmfd = fp->f_data;
sys/kern/kern_sendfile.c
699
vn_sendfile(struct file *fp, int sockfd, struct uio *hdr_uio,
sys/kern/kern_sendfile.c
733
error = sendfile_getobj(td, fp, &obj, &vp, &shmfd, &obj_size);
sys/kern/kern_sx.c
1002
while (__sx_can_read(td, *xp, fp)) {
sys/kern/kern_sx.c
980
__sx_can_read(struct thread *td, uintptr_t x, bool fp)
sys/kern/kern_sx.c
986
if (!fp && td->td_sx_slocks && (x & SX_LOCK_SHARED))
sys/kern/kern_sx.c
992
__sx_slock_try(struct sx *sx, struct thread *td, uintptr_t *xp, bool fp
sys/kern/kern_umtx.c
4605
struct file *fp;
sys/kern/kern_umtx.c
4637
error = falloc_caps(td, &fp, &fd, O_CLOEXEC, NULL);
sys/kern/kern_umtx.c
4640
finit(fp, FFLAGS(O_RDWR), DTYPE_SHM, reg->ushm_obj,
sys/kern/kern_umtx.c
4643
fdrop(fp, td);
sys/kern/kern_vnodedumper.c
64
struct file *fp;
sys/kern/kern_vnodedumper.c
75
error = getvnode(curthread, fd, &cap_write_rights, &fp);
sys/kern/kern_vnodedumper.c
78
vp = fp->f_vnode;
sys/kern/kern_vnodedumper.c
80
if ((fp->f_flag & FWRITE) == 0) {
sys/kern/kern_vnodedumper.c
88
fdrop(fp, curthread);
sys/kern/subr_firmware.c
157
struct priv_fw *fp;
sys/kern/subr_firmware.c
161
LIST_FOREACH(fp, &firmware_table, link) {
sys/kern/subr_firmware.c
162
if (fp->fw.name != NULL && strcasecmp(name, fp->fw.name) == 0)
sys/kern/subr_firmware.c
172
if (*fp->fw.name == '/' && strlen(fp->fw.name) > strlen(name)) {
sys/kern/subr_firmware.c
173
const char *p = fp->fw.name + strlen(fp->fw.name) - strlen(name);
sys/kern/subr_firmware.c
178
return (fp);
sys/kern/subr_firmware.c
237
struct priv_fw *fp;
sys/kern/subr_firmware.c
241
fp = lookup(imagename);
sys/kern/subr_firmware.c
242
if (fp == NULL) {
sys/kern/subr_firmware.c
250
} else if (fp->refcnt != 0) { /* cannot unregister */
sys/kern/subr_firmware.c
253
LIST_REMOVE(fp, link);
sys/kern/subr_firmware.c
254
free(__DECONST(char *, fp->fw.name), M_FIRMWARE);
sys/kern/subr_firmware.c
255
free(fp, M_FIRMWARE);
sys/kern/subr_firmware.c
276
struct priv_fw *fp;
sys/kern/subr_firmware.c
329
fp = PRIV_FW(fw);
sys/kern/subr_firmware.c
330
fp->flags |= FW_BINARY;
sys/kern/subr_firmware.c
350
struct priv_fw *fp;
sys/kern/subr_firmware.c
365
fp = lookup(fwli->imagename);
sys/kern/subr_firmware.c
366
if (fp == NULL || fp->file != NULL) {
sys/kern/subr_firmware.c
368
if (fp == NULL)
sys/kern/subr_firmware.c
375
fp->file = result; /* record the module identity */
sys/kern/subr_firmware.c
393
struct priv_fw *fp;
sys/kern/subr_firmware.c
396
fp = lookup(imagename);
sys/kern/subr_firmware.c
397
if (fp != NULL)
sys/kern/subr_firmware.c
427
fp = lookup(imagename);
sys/kern/subr_firmware.c
428
if (fp == NULL) {
sys/kern/subr_firmware.c
433
if (fp->refcnt == 0 && fp->parent != NULL)
sys/kern/subr_firmware.c
434
fp->parent->refcnt++;
sys/kern/subr_firmware.c
435
fp->refcnt++;
sys/kern/subr_firmware.c
437
return &fp->fw;
sys/kern/subr_firmware.c
459
struct priv_fw *fp = PRIV_FW(p);
sys/kern/subr_firmware.c
462
fp->refcnt--;
sys/kern/subr_firmware.c
463
if (fp->refcnt == 0) {
sys/kern/subr_firmware.c
464
if (fp->parent != NULL)
sys/kern/subr_firmware.c
465
fp->parent->refcnt--;
sys/kern/subr_firmware.c
467
fp->flags |= FW_UNLOAD;
sys/kern/subr_firmware.c
468
if (fp->file)
sys/kern/subr_firmware.c
513
struct priv_fw *fp, *tmp;
sys/kern/subr_firmware.c
517
LIST_FOREACH_SAFE(fp, &firmware_table, link, tmp) {
sys/kern/subr_firmware.c
518
if (((fp->flags & FW_BINARY) == 0 && fp->file == NULL) ||
sys/kern/subr_firmware.c
519
fp->refcnt != 0 || (fp->flags & FW_UNLOAD) == 0)
sys/kern/subr_firmware.c
528
if ((fp->flags & FW_BINARY) != 0) {
sys/kern/subr_firmware.c
529
LIST_REMOVE(fp, link);
sys/kern/subr_firmware.c
530
free(__DECONST(char *, fp->fw.data), M_FIRMWARE);
sys/kern/subr_firmware.c
531
free(__DECONST(char *, fp->fw.name), M_FIRMWARE);
sys/kern/subr_firmware.c
532
free(fp, M_FIRMWARE);
sys/kern/subr_firmware.c
543
fp->flags &= ~FW_UNLOAD; /* do not try again */
sys/kern/subr_firmware.c
550
(void)linker_release_module(NULL, NULL, fp->file);
sys/kern/subr_firmware.c
579
struct priv_fw *fp;
sys/kern/subr_firmware.c
593
fp = PRIV_FW(fw);
sys/kern/subr_firmware.c
594
fp->refcnt++; /* Hold an extra reference so we never unload */
sys/kern/subr_firmware.c
604
struct priv_fw *fp;
sys/kern/subr_firmware.c
629
LIST_FOREACH(fp, &firmware_table, link)
sys/kern/subr_firmware.c
630
fp->flags |= FW_UNLOAD;
sys/kern/subr_firmware.c
635
LIST_FOREACH(fp, &firmware_table, link) {
sys/kern/subr_firmware.c
636
if (fp->fw.name != NULL) {
sys/kern/subr_firmware.c
638
__func__, fp->fw.name, fp->refcnt);
sys/kern/subr_kdb.c
257
void (*fp)(u_int, u_int, u_int) = (void *)0xdeadc0de;
sys/kern/subr_kdb.c
266
(*fp)(0x11111111, 0x22222222, 0x33333333);
sys/kern/sys_eventfd.c
110
eventfd_create_file(struct thread *td, struct file *fp, uint32_t initval,
sys/kern/sys_eventfd.c
129
finit(fp, fflags, DTYPE_EVENTFD, efd, &eventfdops);
sys/kern/sys_eventfd.c
135
eventfd_get(struct file *fp)
sys/kern/sys_eventfd.c
139
if (fp->f_data == NULL || fp->f_ops != &eventfdops)
sys/kern/sys_eventfd.c
142
efd = fp->f_data;
sys/kern/sys_eventfd.c
182
eventfd_close(struct file *fp, struct thread *td)
sys/kern/sys_eventfd.c
186
efd = fp->f_data;
sys/kern/sys_eventfd.c
192
eventfd_read(struct file *fp, struct uio *uio, struct ucred *active_cred,
sys/kern/sys_eventfd.c
203
efd = fp->f_data;
sys/kern/sys_eventfd.c
206
if ((fp->f_flag & FNONBLOCK) != 0) {
sys/kern/sys_eventfd.c
234
eventfd_write(struct file *fp, struct uio *uio, struct ucred *active_cred,
sys/kern/sys_eventfd.c
250
efd = fp->f_data;
sys/kern/sys_eventfd.c
254
if ((fp->f_flag & FNONBLOCK) != 0) {
sys/kern/sys_eventfd.c
276
eventfd_poll(struct file *fp, int events, struct ucred *active_cred,
sys/kern/sys_eventfd.c
282
efd = fp->f_data;
sys/kern/sys_eventfd.c
298
eventfd_kqfilter(struct file *fp, struct knote *kn)
sys/kern/sys_eventfd.c
300
struct eventfd *efd = fp->f_data;
sys/kern/sys_eventfd.c
359
eventfd_ioctl(struct file *fp, u_long cmd, void *data,
sys/kern/sys_eventfd.c
372
eventfd_stat(struct file *fp, struct stat *st, struct ucred *active_cred)
sys/kern/sys_eventfd.c
380
eventfd_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp)
sys/kern/sys_eventfd.c
382
struct eventfd *efd = fp->f_data;
sys/kern/sys_generic.c
1441
struct file *fp;
sys/kern/sys_generic.c
1459
error = fget_only_user(fdp, fd, &cap_event_rights, &fp);
sys/kern/sys_generic.c
1461
error = fget_unlocked(td, fd, &cap_event_rights, &fp);
sys/kern/sys_generic.c
1466
ev = fo_poll(fp, selflags(ibits, idx, bit), td->td_ucred, td);
sys/kern/sys_generic.c
1468
fput_only_user(fdp, fp);
sys/kern/sys_generic.c
1470
fdrop(fp, td);
sys/kern/sys_generic.c
1487
struct file *fp;
sys/kern/sys_generic.c
1505
error = fget_only_user(fdp, fd, &cap_event_rights, &fp);
sys/kern/sys_generic.c
1507
error = fget_unlocked(td, fd, &cap_event_rights, &fp);
sys/kern/sys_generic.c
1511
ev = fo_poll(fp, flags, td->td_ucred, td);
sys/kern/sys_generic.c
1513
fput_only_user(fdp, fp);
sys/kern/sys_generic.c
1515
fdrop(fp, td);
sys/kern/sys_generic.c
1706
struct file *fp;
sys/kern/sys_generic.c
1723
error = fget_only_user(fdp, fd->fd, &cap_event_rights, &fp);
sys/kern/sys_generic.c
1725
error = fget_unlocked(td, fd->fd, &cap_event_rights, &fp);
sys/kern/sys_generic.c
1735
fd->revents = fo_poll(fp, fd->events, td->td_ucred, td);
sys/kern/sys_generic.c
1737
fput_only_user(fdp, fp);
sys/kern/sys_generic.c
1739
fdrop(fp, td);
sys/kern/sys_generic.c
1773
struct file *fp;
sys/kern/sys_generic.c
1786
error = fget_only_user(fdp, fds->fd, &cap_event_rights, &fp);
sys/kern/sys_generic.c
1788
error = fget_unlocked(td, fds->fd, &cap_event_rights, &fp);
sys/kern/sys_generic.c
1799
fds->revents = fo_poll(fp, fds->events,
sys/kern/sys_generic.c
1802
fput_only_user(fdp, fp);
sys/kern/sys_generic.c
1804
fdrop(fp, td);
sys/kern/sys_generic.c
284
struct file *fp;
sys/kern/sys_generic.c
287
error = fget_read(td, fd, &cap_read_rights, &fp);
sys/kern/sys_generic.c
290
error = dofileread(td, fd, fp, auio, (off_t)-1, 0);
sys/kern/sys_generic.c
291
fdrop(fp, td);
sys/kern/sys_generic.c
323
struct file *fp;
sys/kern/sys_generic.c
326
error = fget_read(td, fd, &cap_pread_rights, &fp);
sys/kern/sys_generic.c
329
if (!(fp->f_ops->fo_flags & DFLAG_SEEKABLE))
sys/kern/sys_generic.c
332
(fp->f_vnode == NULL || fp->f_vnode->v_type != VCHR))
sys/kern/sys_generic.c
335
error = dofileread(td, fd, fp, auio, offset, FOF_OFFSET);
sys/kern/sys_generic.c
336
fdrop(fp, td);
sys/kern/sys_generic.c
345
dofileread(struct thread *td, int fd, struct file *fp, struct uio *auio,
sys/kern/sys_generic.c
369
if ((error = fo_read(fp, auio, td->td_ucred, flags, td))) {
sys/kern/sys_generic.c
486
struct file *fp;
sys/kern/sys_generic.c
489
error = fget_write(td, fd, &cap_write_rights, &fp);
sys/kern/sys_generic.c
492
error = dofilewrite(td, fd, fp, auio, (off_t)-1, 0);
sys/kern/sys_generic.c
493
fdrop(fp, td);
sys/kern/sys_generic.c
525
struct file *fp;
sys/kern/sys_generic.c
528
error = fget_write(td, fd, &cap_pwrite_rights, &fp);
sys/kern/sys_generic.c
531
if (!(fp->f_ops->fo_flags & DFLAG_SEEKABLE))
sys/kern/sys_generic.c
534
(fp->f_vnode == NULL || fp->f_vnode->v_type != VCHR))
sys/kern/sys_generic.c
537
error = dofilewrite(td, fd, fp, auio, offset, FOF_OFFSET);
sys/kern/sys_generic.c
538
fdrop(fp, td);
sys/kern/sys_generic.c
547
dofilewrite(struct thread *td, int fd, struct file *fp, struct uio *auio,
sys/kern/sys_generic.c
565
error = fo_write(fp, auio, td->td_ucred, flags, td);
sys/kern/sys_generic.c
570
if (error != 0 && fp->f_type != DTYPE_SOCKET) {
sys/kern/sys_generic.c
601
struct file *fp;
sys/kern/sys_generic.c
607
error = fget(td, fd, &cap_ftruncate_rights, &fp);
sys/kern/sys_generic.c
610
AUDIT_ARG_FILE(td->td_proc, fp);
sys/kern/sys_generic.c
611
if (!(fp->f_flag & FWRITE)) {
sys/kern/sys_generic.c
612
fdrop(fp, td);
sys/kern/sys_generic.c
615
error = fo_truncate(fp, length, td->td_ucred, td);
sys/kern/sys_generic.c
616
fdrop(fp, td);
sys/kern/sys_generic.c
730
struct file *fp;
sys/kern/sys_generic.c
756
if ((fp = fget_noref(fdp, fd)) == NULL) {
sys/kern/sys_generic.c
761
fp = NULL; /* fhold() was not called yet */
sys/kern/sys_generic.c
764
if (!fhold(fp)) {
sys/kern/sys_generic.c
766
fp = NULL;
sys/kern/sys_generic.c
774
error = fget(td, fd, &cap_ioctl_rights, &fp);
sys/kern/sys_generic.c
776
fp = NULL;
sys/kern/sys_generic.c
780
if ((fp->f_flag & (FREAD | FWRITE)) == 0) {
sys/kern/sys_generic.c
797
fsetfl_lock(fp);
sys/kern/sys_generic.c
798
if (((fp->f_flag & f_flag) != 0) != (tmp != 0)) {
sys/kern/sys_generic.c
799
error = fo_ioctl(fp, com, (void *)&tmp, td->td_ucred,
sys/kern/sys_generic.c
803
atomic_set_int(&fp->f_flag, f_flag);
sys/kern/sys_generic.c
805
atomic_clear_int(&fp->f_flag, f_flag);
sys/kern/sys_generic.c
808
fsetfl_unlock(fp);
sys/kern/sys_generic.c
811
error = fo_ioctl(fp, com, data, td->td_ucred, td);
sys/kern/sys_generic.c
829
if (fp != NULL)
sys/kern/sys_generic.c
830
fdrop(fp, td);
sys/kern/sys_generic.c
846
struct file *fp;
sys/kern/sys_generic.c
858
error = fget(td, fd, &cap_pwrite_rights, &fp);
sys/kern/sys_generic.c
861
AUDIT_ARG_FILE(td->td_proc, fp);
sys/kern/sys_generic.c
862
if ((fp->f_ops->fo_flags & DFLAG_SEEKABLE) == 0) {
sys/kern/sys_generic.c
866
if ((fp->f_flag & FWRITE) == 0) {
sys/kern/sys_generic.c
871
error = fo_fallocate(fp, offset, len, td);
sys/kern/sys_generic.c
873
fdrop(fp, td);
sys/kern/sys_generic.c
901
struct file *fp;
sys/kern/sys_generic.c
926
error = fget_write(td, fd, &cap_pwrite_rights, &fp);
sys/kern/sys_generic.c
929
AUDIT_ARG_FILE(td->td_proc, fp);
sys/kern/sys_generic.c
930
if ((fp->f_ops->fo_flags & DFLAG_SEEKABLE) == 0) {
sys/kern/sys_generic.c
934
if ((fp->f_flag & FWRITE) == 0) {
sys/kern/sys_generic.c
939
error = fo_fspacectl(fp, cmd, &rmsr.r_offset, &rmsr.r_len, flags,
sys/kern/sys_generic.c
948
fdrop(fp, td);
sys/kern/sys_generic.c
955
struct file *fp;
sys/kern/sys_generic.c
959
error = falloc_noinstall(td, &fp);
sys/kern/sys_generic.c
970
error = eventfd_create_file(td, fp, ae->initval, ae->flags);
sys/kern/sys_generic.c
977
error = inotify_create_file(td, fp, si->flags, &fflags);
sys/kern/sys_generic.c
986
error = finstall(td, fp, &fd, fflags, NULL);
sys/kern/sys_generic.c
987
fdrop(fp, td);
sys/kern/sys_pipe.c
1144
pipe_write(struct file *fp, struct uio *uio, struct ucred *active_cred,
sys/kern/sys_pipe.c
1151
rpipe = fp->f_data;
sys/kern/sys_pipe.c
1228
(fp->f_flag & FNONBLOCK) == 0) {
sys/kern/sys_pipe.c
1343
if (fp->f_flag & FNONBLOCK) {
sys/kern/sys_pipe.c
1409
pipe_truncate(struct file *fp, off_t length, struct ucred *active_cred,
sys/kern/sys_pipe.c
1415
cpipe = fp->f_data;
sys/kern/sys_pipe.c
1417
error = vnops.fo_truncate(fp, length, active_cred, td);
sys/kern/sys_pipe.c
1419
error = invfo_truncate(fp, length, active_cred, td);
sys/kern/sys_pipe.c
1427
pipe_ioctl(struct file *fp, u_long cmd, void *data, struct ucred *active_cred,
sys/kern/sys_pipe.c
1430
struct pipe *mpipe = fp->f_data;
sys/kern/sys_pipe.c
1457
if (!(fp->f_flag & FREAD)) {
sys/kern/sys_pipe.c
1498
pipe_poll(struct file *fp, int events, struct ucred *active_cred,
sys/kern/sys_pipe.c
1509
rpipe = fp->f_data;
sys/kern/sys_pipe.c
1517
if (fp->f_flag & FREAD && events & (POLLIN | POLLRDNORM))
sys/kern/sys_pipe.c
1521
if (fp->f_flag & FWRITE && events & (POLLOUT | POLLWRNORM))
sys/kern/sys_pipe.c
1531
if (rpipe->pipe_type & PIPE_TYPE_NAMED && fp->f_flag & FREAD && levents &&
sys/kern/sys_pipe.c
1532
fp->f_pipegen == rpipe->pipe_wgen)
sys/kern/sys_pipe.c
1537
if (fp->f_flag & FREAD)
sys/kern/sys_pipe.c
1550
if ((fp->f_flag & FREAD) != 0) {
sys/kern/sys_pipe.c
1556
if ((fp->f_flag & FWRITE) != 0 &&
sys/kern/sys_pipe.c
1576
pipe_stat(struct file *fp, struct stat *ub, struct ucred *active_cred)
sys/kern/sys_pipe.c
1583
pipe = fp->f_data;
sys/kern/sys_pipe.c
1597
return (vnops.fo_stat(fp, ub, active_cred));
sys/kern/sys_pipe.c
1611
ub->st_uid = fp->f_cred->cr_uid;
sys/kern/sys_pipe.c
1612
ub->st_gid = fp->f_cred->cr_gid;
sys/kern/sys_pipe.c
1623
pipe_close(struct file *fp, struct thread *td)
sys/kern/sys_pipe.c
1626
if (fp->f_vnode != NULL)
sys/kern/sys_pipe.c
1627
return vnops.fo_close(fp, td);
sys/kern/sys_pipe.c
1628
fp->f_ops = &badfileops;
sys/kern/sys_pipe.c
1629
pipe_dtor(fp->f_data);
sys/kern/sys_pipe.c
1630
fp->f_data = NULL;
sys/kern/sys_pipe.c
1635
pipe_chmod(struct file *fp, mode_t mode, struct ucred *active_cred, struct thread *td)
sys/kern/sys_pipe.c
1640
cpipe = fp->f_data;
sys/kern/sys_pipe.c
1642
error = vn_chmod(fp, mode, active_cred, td);
sys/kern/sys_pipe.c
1644
error = invfo_chmod(fp, mode, active_cred, td);
sys/kern/sys_pipe.c
1649
pipe_chown(struct file *fp, uid_t uid, gid_t gid, struct ucred *active_cred,
sys/kern/sys_pipe.c
1655
cpipe = fp->f_data;
sys/kern/sys_pipe.c
1657
error = vn_chown(fp, uid, gid, active_cred, td);
sys/kern/sys_pipe.c
1659
error = invfo_chown(fp, uid, gid, active_cred, td);
sys/kern/sys_pipe.c
1664
pipe_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp)
sys/kern/sys_pipe.c
1668
if (fp->f_type == DTYPE_FIFO)
sys/kern/sys_pipe.c
1669
return (vn_fill_kinfo(fp, kif, fdp));
sys/kern/sys_pipe.c
1671
pi = fp->f_data;
sys/kern/sys_pipe.c
1788
pipe_kqfilter(struct file *fp, struct knote *kn)
sys/kern/sys_pipe.c
1797
if ((kn->kn_filter == EVFILT_READ) && !(fp->f_flag & FREAD)) {
sys/kern/sys_pipe.c
1801
if ((kn->kn_filter == EVFILT_WRITE) && !(fp->f_flag & FWRITE)) {
sys/kern/sys_pipe.c
1805
cpipe = fp->f_data;
sys/kern/sys_pipe.c
1823
return (vnops.fo_kqfilter(fp, kn));
sys/kern/sys_pipe.c
1849
struct file *fp = kn->kn_fp;
sys/kern/sys_pipe.c
1859
fp->f_pipegen != rpipe->pipe_wgen)) {
sys/kern/sys_pipe.c
753
pipe_read(struct file *fp, struct uio *uio, struct ucred *active_cred,
sys/kern/sys_pipe.c
761
rpipe = fp->f_data;
sys/kern/sys_pipe.c
772
if ((fp->f_flag & FNONBLOCK) != 0 && !mac_pipe_check_read_enabled()) {
sys/kern/sys_pipe.c
892
if (fp->f_flag & FNONBLOCK) {
sys/kern/sys_procdesc.c
126
struct file *fp;
sys/kern/sys_procdesc.c
129
error = fget(td, fd, rightsp, &fp);
sys/kern/sys_procdesc.c
132
if (fp->f_type != DTYPE_PROCDESC) {
sys/kern/sys_procdesc.c
136
pd = fp->f_data;
sys/kern/sys_procdesc.c
145
fdrop(fp, td);
sys/kern/sys_procdesc.c
172
struct file *fp;
sys/kern/sys_procdesc.c
175
error = fget(td, fd, rightsp, &fp);
sys/kern/sys_procdesc.c
178
if (fp->f_type != DTYPE_PROCDESC) {
sys/kern/sys_procdesc.c
182
*pidp = procdesc_pid(fp);
sys/kern/sys_procdesc.c
184
fdrop(fp, td);
sys/kern/sys_procdesc.c
252
procdesc_finit(struct procdesc *pdp, struct file *fp)
sys/kern/sys_procdesc.c
255
finit(fp, FREAD | FWRITE, DTYPE_PROCDESC, pdp, &procdesc_ops);
sys/kern/sys_procdesc.c
356
procdesc_close(struct file *fp, struct thread *td)
sys/kern/sys_procdesc.c
361
KASSERT(fp->f_type == DTYPE_PROCDESC, ("procdesc_close: !procdesc"));
sys/kern/sys_procdesc.c
363
pd = fp->f_data;
sys/kern/sys_procdesc.c
364
fp->f_ops = &badfileops;
sys/kern/sys_procdesc.c
365
fp->f_data = NULL;
sys/kern/sys_procdesc.c
430
procdesc_poll(struct file *fp, int events, struct ucred *active_cred,
sys/kern/sys_procdesc.c
437
pd = fp->f_data;
sys/kern/sys_procdesc.c
501
procdesc_kqfilter(struct file *fp, struct knote *kn)
sys/kern/sys_procdesc.c
505
pd = fp->f_data;
sys/kern/sys_procdesc.c
518
procdesc_stat(struct file *fp, struct stat *sb, struct ucred *active_cred)
sys/kern/sys_procdesc.c
529
pd = fp->f_data;
sys/kern/sys_procdesc.c
557
procdesc_fill_kinfo(struct file *fp, struct kinfo_file *kif,
sys/kern/sys_procdesc.c
563
pdp = fp->f_data;
sys/kern/sys_process.c
1630
fp = NULL;
sys/kern/sys_process.c
1631
error = fget_write(td, pc->pc_fd, &cap_write_rights, &fp);
sys/kern/sys_process.c
1634
if (fp->f_type != DTYPE_VNODE || fp->f_vnode->v_type != VREG) {
sys/kern/sys_process.c
1653
tcq->tc_vp = fp->f_vnode;
sys/kern/sys_process.c
1669
fdrop(fp, td);
sys/kern/sys_process.c
857
struct file *fp;
sys/kern/sys_socket.c
120
soo_read(struct file *fp, struct uio *uio, struct ucred *active_cred,
sys/kern/sys_socket.c
123
struct socket *so = fp->f_data;
sys/kern/sys_socket.c
136
soo_write(struct file *fp, struct uio *uio, struct ucred *active_cred,
sys/kern/sys_socket.c
139
struct socket *so = fp->f_data;
sys/kern/sys_socket.c
152
soo_ioctl(struct file *fp, u_long cmd, void *data, struct ucred *active_cred,
sys/kern/sys_socket.c
155
struct socket *so = fp->f_data;
sys/kern/sys_socket.c
282
soo_poll(struct file *fp, int events, struct ucred *active_cred,
sys/kern/sys_socket.c
285
struct socket *so = fp->f_data;
sys/kern/sys_socket.c
297
soo_kqfilter(struct file *fp, struct knote *kn)
sys/kern/sys_socket.c
299
struct socket *so = fp->f_data;
sys/kern/sys_socket.c
305
soo_stat(struct file *fp, struct stat *ub, struct ucred *active_cred)
sys/kern/sys_socket.c
307
struct socket *so = fp->f_data;
sys/kern/sys_socket.c
353
soo_close(struct file *fp, struct thread *td)
sys/kern/sys_socket.c
358
so = fp->f_data;
sys/kern/sys_socket.c
359
fp->f_ops = &badfileops;
sys/kern/sys_socket.c
360
fp->f_data = NULL;
sys/kern/sys_socket.c
368
soo_fdclose(struct file *fp, int fd __unused, struct thread *td)
sys/kern/sys_socket.c
372
so = fp->f_data;
sys/kern/sys_socket.c
378
soo_chmod(struct file *fp, mode_t mode, struct ucred *cred, struct thread *td)
sys/kern/sys_socket.c
383
so = fp->f_data;
sys/kern/sys_socket.c
392
soo_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp)
sys/kern/sys_socket.c
400
so = fp->f_data;
sys/kern/sys_socket.c
625
struct file *fp = job->fd_file;
sys/kern/sys_socket.c
654
error = mac_socket_check_receive(fp->f_cred, so);
sys/kern/sys_socket.c
667
error = mac_socket_check_send(fp->f_cred, so);
sys/kern/sys_socket.c
823
soo_aio_queue(struct file *fp, struct kaiocb *job)
sys/kern/sys_socket.c
825
struct socket *so = fp->f_data;
sys/kern/sys_timerfd.c
191
timerfd_read(struct file *fp, struct uio *uio, struct ucred *active_cred,
sys/kern/sys_timerfd.c
194
struct timerfd *tfd = fp->f_data;
sys/kern/sys_timerfd.c
215
if ((fp->f_flag & FNONBLOCK) != 0) {
sys/kern/sys_timerfd.c
238
timerfd_ioctl(struct file *fp, u_long cmd, void *data,
sys/kern/sys_timerfd.c
244
atomic_set_int(&fp->f_flag, FASYNC);
sys/kern/sys_timerfd.c
246
atomic_clear_int(&fp->f_flag, FASYNC);
sys/kern/sys_timerfd.c
250
atomic_set_int(&fp->f_flag, FNONBLOCK);
sys/kern/sys_timerfd.c
252
atomic_clear_int(&fp->f_flag, FNONBLOCK);
sys/kern/sys_timerfd.c
259
timerfd_poll(struct file *fp, int events, struct ucred *active_cred,
sys/kern/sys_timerfd.c
262
struct timerfd *tfd = fp->f_data;
sys/kern/sys_timerfd.c
303
timerfd_kqfilter(struct file *fp, struct knote *kn)
sys/kern/sys_timerfd.c
305
struct timerfd *tfd = fp->f_data;
sys/kern/sys_timerfd.c
318
timerfd_stat(struct file *fp, struct stat *sb, struct ucred *active_cred)
sys/kern/sys_timerfd.c
320
struct timerfd *tfd = fp->f_data;
sys/kern/sys_timerfd.c
323
sb->st_nlink = fp->f_count - 1;
sys/kern/sys_timerfd.c
324
sb->st_uid = fp->f_cred->cr_uid;
sys/kern/sys_timerfd.c
325
sb->st_gid = fp->f_cred->cr_gid;
sys/kern/sys_timerfd.c
339
timerfd_close(struct file *fp, struct thread *td)
sys/kern/sys_timerfd.c
341
struct timerfd *tfd = fp->f_data;
sys/kern/sys_timerfd.c
352
fp->f_ops = &badfileops;
sys/kern/sys_timerfd.c
358
timerfd_fill_kinfo(struct file *fp, struct kinfo_file *kif,
sys/kern/sys_timerfd.c
361
struct timerfd *tfd = fp->f_data;
sys/kern/sys_timerfd.c
437
struct file *fp;
sys/kern/sys_timerfd.c
467
error = falloc(td, &fp, &fd, fflags);
sys/kern/sys_timerfd.c
484
finit(fp, fflags, DTYPE_TIMERFD, tfd, &timerfdops);
sys/kern/sys_timerfd.c
486
fdrop(fp, td);
sys/kern/sys_timerfd.c
495
struct file *fp;
sys/kern/sys_timerfd.c
499
error = fget(td, fd, &cap_write_rights, &fp);
sys/kern/sys_timerfd.c
502
if (fp->f_type != DTYPE_TIMERFD) {
sys/kern/sys_timerfd.c
503
fdrop(fp, td);
sys/kern/sys_timerfd.c
506
tfd = fp->f_data;
sys/kern/sys_timerfd.c
512
fdrop(fp, td);
sys/kern/sys_timerfd.c
520
struct file *fp;
sys/kern/sys_timerfd.c
531
error = fget(td, fd, &cap_write_rights, &fp);
sys/kern/sys_timerfd.c
534
if (fp->f_type != DTYPE_TIMERFD) {
sys/kern/sys_timerfd.c
535
fdrop(fp, td);
sys/kern/sys_timerfd.c
538
tfd = fp->f_data;
sys/kern/sys_timerfd.c
574
fdrop(fp, td);
sys/kern/tty.c
2122
struct file *fp;
sys/kern/tty.c
2138
&fp, NULL);
sys/kern/tty.c
2139
if (error == 0 && !fhold(fp))
sys/kern/tty.c
2144
if (fp->f_ops == &badfileops) {
sys/kern/tty.c
2155
if (fp->f_type != DTYPE_VNODE || fp->f_vnode->v_type != VCHR) {
sys/kern/tty.c
2161
cdp = devvn_refthread(fp->f_vnode, &dev, &ref);
sys/kern/tty.c
2166
if (dev != fp->f_data) {
sys/kern/tty.c
2198
done1: fdrop(fp, curthread);
sys/kern/tty_pts.c
110
ptsdev_read(struct file *fp, struct uio *uio, struct ucred *active_cred,
sys/kern/tty_pts.c
113
struct tty *tp = fp->f_data;
sys/kern/tty_pts.c
169
if (fp->f_flag & O_NONBLOCK) {
sys/kern/tty_pts.c
184
ptsdev_write(struct file *fp, struct uio *uio, struct ucred *active_cred,
sys/kern/tty_pts.c
187
struct tty *tp = fp->f_data;
sys/kern/tty_pts.c
228
if (fp->f_flag & O_NONBLOCK) {
sys/kern/tty_pts.c
257
ptsdev_ioctl(struct file *fp, u_long cmd, void *data,
sys/kern/tty_pts.c
260
struct tty *tp = fp->f_data;
sys/kern/tty_pts.c
375
error = tty_ioctl(tp, cmd, data, fp->f_flag, td);
sys/kern/tty_pts.c
384
ptsdev_poll(struct file *fp, int events, struct ucred *active_cred,
sys/kern/tty_pts.c
387
struct tty *tp = fp->f_data;
sys/kern/tty_pts.c
441
struct file *fp = kn->kn_fp;
sys/kern/tty_pts.c
442
struct tty *tp = fp->f_data;
sys/kern/tty_pts.c
451
struct file *fp = kn->kn_fp;
sys/kern/tty_pts.c
452
struct tty *tp = fp->f_data;
sys/kern/tty_pts.c
467
struct file *fp = kn->kn_fp;
sys/kern/tty_pts.c
468
struct tty *tp = fp->f_data;
sys/kern/tty_pts.c
477
struct file *fp = kn->kn_fp;
sys/kern/tty_pts.c
478
struct tty *tp = fp->f_data;
sys/kern/tty_pts.c
504
ptsdev_kqfilter(struct file *fp, struct knote *kn)
sys/kern/tty_pts.c
506
struct tty *tp = fp->f_data;
sys/kern/tty_pts.c
531
ptsdev_stat(struct file *fp, struct stat *sb, struct ucred *active_cred)
sys/kern/tty_pts.c
533
struct tty *tp = fp->f_data;
sys/kern/tty_pts.c
567
ptsdev_close(struct file *fp, struct thread *td)
sys/kern/tty_pts.c
569
struct tty *tp = fp->f_data;
sys/kern/tty_pts.c
581
if (fp->f_vnode != NULL)
sys/kern/tty_pts.c
582
return (vnops.fo_close(fp, td));
sys/kern/tty_pts.c
588
ptsdev_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp)
sys/kern/tty_pts.c
593
tp = fp->f_data;
sys/kern/tty_pts.c
732
pts_alloc(int fflags, struct thread *td, struct file *fp)
sys/kern/tty_pts.c
778
finit(fp, fflags, DTYPE_PTS, tp, &ptsdev_ops);
sys/kern/tty_pts.c
785
pts_alloc_external(int fflags, struct thread *td, struct file *fp,
sys/kern/tty_pts.c
825
finit(fp, fflags, DTYPE_PTS, tp, &ptsdev_ops);
sys/kern/tty_pts.c
835
struct file *fp;
sys/kern/tty_pts.c
844
error = falloc(td, &fp, &fd, uap->flags);
sys/kern/tty_pts.c
849
error = pts_alloc(FFLAGS(uap->flags & O_ACCMODE), td, fp);
sys/kern/tty_pts.c
851
fdclose(td, fp, fd);
sys/kern/tty_pts.c
852
fdrop(fp, td);
sys/kern/tty_pts.c
858
fdrop(fp, td);
sys/kern/uipc_mqueue.c
160
#define FPTOMQ(fp) ((struct mqueue *)(((struct mqfs_node *) \
sys/kern/uipc_mqueue.c
161
(fp)->f_data)->mn_data))
sys/kern/uipc_mqueue.c
2014
struct file *fp;
sys/kern/uipc_mqueue.c
2056
error = falloc(td, &fp, &fd, O_CLOEXEC);
sys/kern/uipc_mqueue.c
2100
fdclose(td, fp, fd);
sys/kern/uipc_mqueue.c
2101
fdrop(fp, td);
sys/kern/uipc_mqueue.c
2108
finit(fp, flags & (FREAD | FWRITE | O_NONBLOCK), DTYPE_MQUEUE, pn,
sys/kern/uipc_mqueue.c
2112
fdrop(fp, td);
sys/kern/uipc_mqueue.c
2233
struct file *fp;
sys/kern/uipc_mqueue.c
2240
error = getmq(td, mqd, &fp, NULL, &mq);
sys/kern/uipc_mqueue.c
2248
oflag = flag = fp->f_flag;
sys/kern/uipc_mqueue.c
2251
} while (atomic_cmpset_int(&fp->f_flag, oflag, flag) == 0);
sys/kern/uipc_mqueue.c
2253
oflag = fp->f_flag;
sys/kern/uipc_mqueue.c
2255
fdrop(fp, td);
sys/kern/uipc_mqueue.c
2284
struct file *fp;
sys/kern/uipc_mqueue.c
2288
error = getmq_read(td, mqd, &fp, NULL, &mq);
sys/kern/uipc_mqueue.c
2291
waitok = (fp->f_flag & O_NONBLOCK) == 0;
sys/kern/uipc_mqueue.c
2294
fdrop(fp, td);
sys/kern/uipc_mqueue.c
2321
struct file *fp;
sys/kern/uipc_mqueue.c
2325
error = getmq_write(td, mqd, &fp, NULL, &mq);
sys/kern/uipc_mqueue.c
2328
waitok = (fp->f_flag & O_NONBLOCK) == 0;
sys/kern/uipc_mqueue.c
2331
fdrop(fp, td);
sys/kern/uipc_mqueue.c
2359
struct file *fp, *fp2;
sys/kern/uipc_mqueue.c
2376
error = getmq(td, mqd, &fp, NULL, &mq);
sys/kern/uipc_mqueue.c
2394
if (fp2 != fp) {
sys/kern/uipc_mqueue.c
2450
fdrop(fp, td);
sys/kern/uipc_mqueue.c
2477
struct file *fp;
sys/kern/uipc_mqueue.c
2484
fp = fget_noref(fdp, i);
sys/kern/uipc_mqueue.c
2485
if (fp != NULL && fp->f_ops == &mqueueops) {
sys/kern/uipc_mqueue.c
2486
mq = FPTOMQ(fp);
sys/kern/uipc_mqueue.c
2488
notifier_remove(p, FPTOMQ(fp), i);
sys/kern/uipc_mqueue.c
2497
mqf_poll(struct file *fp, int events, struct ucred *active_cred,
sys/kern/uipc_mqueue.c
2500
struct mqueue *mq = FPTOMQ(fp);
sys/kern/uipc_mqueue.c
2525
mqf_close(struct file *fp, struct thread *td)
sys/kern/uipc_mqueue.c
2529
fp->f_ops = &badfileops;
sys/kern/uipc_mqueue.c
2530
pn = fp->f_data;
sys/kern/uipc_mqueue.c
2531
fp->f_data = NULL;
sys/kern/uipc_mqueue.c
2539
mqf_fdclose(struct file *fp, int fd, struct thread *td)
sys/kern/uipc_mqueue.c
2549
mq = FPTOMQ(fp);
sys/kern/uipc_mqueue.c
2566
mqf_stat(struct file *fp, struct stat *st, struct ucred *active_cred)
sys/kern/uipc_mqueue.c
2568
struct mqfs_node *pn = fp->f_data;
sys/kern/uipc_mqueue.c
2584
mqf_chmod(struct file *fp, mode_t mode, struct ucred *active_cred,
sys/kern/uipc_mqueue.c
2591
pn = fp->f_data;
sys/kern/uipc_mqueue.c
2604
mqf_chown(struct file *fp, uid_t uid, gid_t gid, struct ucred *active_cred,
sys/kern/uipc_mqueue.c
2611
pn = fp->f_data;
sys/kern/uipc_mqueue.c
2629
mqf_kqfilter(struct file *fp, struct knote *kn)
sys/kern/uipc_mqueue.c
2631
struct mqueue *mq = FPTOMQ(fp);
sys/kern/uipc_mqueue.c
2677
mqf_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp)
sys/kern/uipc_sem.c
163
ksem_stat(struct file *fp, struct stat *sb, struct ucred *active_cred)
sys/kern/uipc_sem.c
170
ks = fp->f_data;
sys/kern/uipc_sem.c
173
error = mac_posixsem_check_stat(active_cred, fp->f_cred, ks);
sys/kern/uipc_sem.c
198
ksem_chmod(struct file *fp, mode_t mode, struct ucred *active_cred,
sys/kern/uipc_sem.c
205
ks = fp->f_data;
sys/kern/uipc_sem.c
223
ksem_chown(struct file *fp, uid_t uid, gid_t gid, struct ucred *active_cred,
sys/kern/uipc_sem.c
230
ks = fp->f_data;
sys/kern/uipc_sem.c
253
ksem_closef(struct file *fp, struct thread *td)
sys/kern/uipc_sem.c
257
ks = fp->f_data;
sys/kern/uipc_sem.c
258
fp->f_data = NULL;
sys/kern/uipc_sem.c
265
ksem_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp)
sys/kern/uipc_sem.c
272
ks = fp->f_data;
sys/kern/uipc_sem.c
468
struct file *fp;
sys/kern/uipc_sem.c
484
error = falloc(td, &fp, &fd, O_CLOEXEC);
sys/kern/uipc_sem.c
498
fdclose(td, fp, fd);
sys/kern/uipc_sem.c
499
fdrop(fp, td);
sys/kern/uipc_sem.c
524
fdclose(td, fp, fd);
sys/kern/uipc_sem.c
525
fdrop(fp, td);
sys/kern/uipc_sem.c
576
fdclose(td, fp, fd);
sys/kern/uipc_sem.c
577
fdrop(fp, td);
sys/kern/uipc_sem.c
582
finit(fp, FREAD | FWRITE, DTYPE_SEM, ks, &ksem_ops);
sys/kern/uipc_sem.c
584
fdrop(fp, td);
sys/kern/uipc_sem.c
594
struct file *fp;
sys/kern/uipc_sem.c
597
error = fget(td, id, rightsp, &fp);
sys/kern/uipc_sem.c
600
if (fp->f_type != DTYPE_SEM) {
sys/kern/uipc_sem.c
601
fdrop(fp, td);
sys/kern/uipc_sem.c
604
ks = fp->f_data;
sys/kern/uipc_sem.c
606
fdrop(fp, td);
sys/kern/uipc_sem.c
609
*fpp = fp;
sys/kern/uipc_sem.c
693
struct file *fp;
sys/kern/uipc_sem.c
698
error = ksem_get(td, uap->id, &cap_no_rights, &fp);
sys/kern/uipc_sem.c
701
ks = fp->f_data;
sys/kern/uipc_sem.c
703
fdrop(fp, td);
sys/kern/uipc_sem.c
707
fdrop(fp, td);
sys/kern/uipc_sem.c
720
struct file *fp;
sys/kern/uipc_sem.c
726
cap_rights_init_one(&rights, CAP_SEM_POST), &fp);
sys/kern/uipc_sem.c
729
ks = fp->f_data;
sys/kern/uipc_sem.c
733
error = mac_posixsem_check_post(td->td_ucred, fp->f_cred, ks);
sys/kern/uipc_sem.c
748
fdrop(fp, td);
sys/kern/uipc_sem.c
812
struct file *fp;
sys/kern/uipc_sem.c
819
&fp);
sys/kern/uipc_sem.c
822
ks = fp->f_data;
sys/kern/uipc_sem.c
827
error = mac_posixsem_check_wait(td->td_ucred, fp->f_cred, ks);
sys/kern/uipc_sem.c
866
fdrop(fp, td);
sys/kern/uipc_sem.c
882
struct file *fp;
sys/kern/uipc_sem.c
888
cap_rights_init_one(&rights, CAP_SEM_GETVALUE), &fp);
sys/kern/uipc_sem.c
891
ks = fp->f_data;
sys/kern/uipc_sem.c
895
error = mac_posixsem_check_getvalue(td->td_ucred, fp->f_cred, ks);
sys/kern/uipc_sem.c
898
fdrop(fp, td);
sys/kern/uipc_sem.c
905
fdrop(fp, td);
sys/kern/uipc_sem.c
918
struct file *fp;
sys/kern/uipc_sem.c
924
error = ksem_get(td, uap->id, &cap_no_rights, &fp);
sys/kern/uipc_sem.c
927
ks = fp->f_data;
sys/kern/uipc_sem.c
929
fdrop(fp, td);
sys/kern/uipc_sem.c
943
fdrop(fp, td);
sys/kern/uipc_shm.c
1139
struct file *fp;
sys/kern/uipc_shm.c
1212
error = falloc_caps(td, &fp, &fd, flags & O_CLOEXEC, fcaps);
sys/kern/uipc_shm.c
1332
td->td_ucred, fp->f_cred, shmfd);
sys/kern/uipc_shm.c
1356
finit(fp, FFLAGS(flags & O_ACCMODE), DTYPE_SHM, shmfd, &shm_ops);
sys/kern/uipc_shm.c
1359
fdrop(fp, td);
sys/kern/uipc_shm.c
1365
fdclose(td, fp, fd);
sys/kern/uipc_shm.c
1366
fdrop(fp, td);
sys/kern/uipc_shm.c
1668
shm_mmap(struct file *fp, vm_map_t map, vm_offset_t *addr, vm_size_t objsize,
sys/kern/uipc_shm.c
1678
shmfd = fp->f_data;
sys/kern/uipc_shm.c
1683
if ((fp->f_flag & FREAD) != 0)
sys/kern/uipc_shm.c
1696
if ((fp->f_flag & FWRITE) != 0 &&
sys/kern/uipc_shm.c
1760
shm_chmod(struct file *fp, mode_t mode, struct ucred *active_cred,
sys/kern/uipc_shm.c
1767
shmfd = fp->f_data;
sys/kern/uipc_shm.c
1789
shm_chown(struct file *fp, uid_t uid, gid_t gid, struct ucred *active_cred,
sys/kern/uipc_shm.c
1796
shmfd = fp->f_data;
sys/kern/uipc_shm.c
1823
shm_map(struct file *fp, size_t size, off_t offset, void **memp)
sys/kern/uipc_shm.c
1830
if (fp->f_type != DTYPE_SHM)
sys/kern/uipc_shm.c
1832
shmfd = fp->f_data;
sys/kern/uipc_shm.c
1881
shm_unmap(struct file *fp, void *mem, size_t size)
sys/kern/uipc_shm.c
1893
if (fp->f_type != DTYPE_SHM)
sys/kern/uipc_shm.c
1895
shmfd = fp->f_data;
sys/kern/uipc_shm.c
1950
shm_fill_kinfo(struct file *fp, struct kinfo_file *kif,
sys/kern/uipc_shm.c
1956
res = shm_fill_kinfo_locked(fp->f_data, kif, false);
sys/kern/uipc_shm.c
1962
shm_add_seals(struct file *fp, int seals)
sys/kern/uipc_shm.c
1970
shmfd = fp->f_data;
sys/kern/uipc_shm.c
2007
shm_get_seals(struct file *fp, int *seals)
sys/kern/uipc_shm.c
2011
shmfd = fp->f_data;
sys/kern/uipc_shm.c
2078
shm_fspacectl(struct file *fp, int cmd, off_t *offset, off_t *length, int flags,
sys/kern/uipc_shm.c
2092
shmfd = fp->f_data;
sys/kern/uipc_shm.c
2116
shm_fallocate(struct file *fp, off_t offset, off_t len, struct thread *td)
sys/kern/uipc_shm.c
2125
shmfd = fp->f_data;
sys/kern/uipc_shm.c
417
shm_seek(struct file *fp, off_t offset, int whence, struct thread *td)
sys/kern/uipc_shm.c
423
shmfd = fp->f_data;
sys/kern/uipc_shm.c
424
foffset = foffset_lock(fp, 0);
sys/kern/uipc_shm.c
453
foffset_unlock(fp, offset, error != 0 ? FOF_NOUPDATE : 0);
sys/kern/uipc_shm.c
458
shm_read(struct file *fp, struct uio *uio, struct ucred *active_cred,
sys/kern/uipc_shm.c
465
shmfd = fp->f_data;
sys/kern/uipc_shm.c
467
error = mac_posixshm_check_read(active_cred, fp->f_cred, shmfd);
sys/kern/uipc_shm.c
471
foffset_lock_uio(fp, uio, flags);
sys/kern/uipc_shm.c
476
foffset_unlock_uio(fp, uio, flags);
sys/kern/uipc_shm.c
481
shm_write(struct file *fp, struct uio *uio, struct ucred *active_cred,
sys/kern/uipc_shm.c
492
shmfd = fp->f_data;
sys/kern/uipc_shm.c
494
error = mac_posixshm_check_write(active_cred, fp->f_cred, shmfd);
sys/kern/uipc_shm.c
500
foffset_lock_uio(fp, uio, flags);
sys/kern/uipc_shm.c
508
foffset_unlock_uio(fp, uio, flags);
sys/kern/uipc_shm.c
535
foffset_unlock_uio(fp, uio, flags);
sys/kern/uipc_shm.c
540
shm_truncate(struct file *fp, off_t length, struct ucred *active_cred,
sys/kern/uipc_shm.c
548
shmfd = fp->f_data;
sys/kern/uipc_shm.c
550
error = mac_posixshm_check_truncate(active_cred, fp->f_cred, shmfd);
sys/kern/uipc_shm.c
558
shm_ioctl(struct file *fp, u_long com, void *data, struct ucred *active_cred,
sys/kern/uipc_shm.c
565
shmfd = fp->f_data;
sys/kern/uipc_shm.c
610
shm_stat(struct file *fp, struct stat *sb, struct ucred *active_cred)
sys/kern/uipc_shm.c
617
shmfd = fp->f_data;
sys/kern/uipc_shm.c
620
error = mac_posixshm_check_stat(active_cred, fp->f_cred, shmfd);
sys/kern/uipc_shm.c
655
shm_close(struct file *fp, struct thread *td)
sys/kern/uipc_shm.c
659
shmfd = fp->f_data;
sys/kern/uipc_shm.c
660
fp->f_data = NULL;
sys/kern/uipc_socket.c
4050
struct file *fp;
sys/kern/uipc_socket.c
4059
&cap_send_rights, &fp);
sys/kern/uipc_socket.c
4062
so2 = fp->f_data;
sys/kern/uipc_socket.c
4065
fdrop(fp, sopt->sopt_td);
sys/kern/uipc_syscalls.c
1025
fdrop(fp, td);
sys/kern/uipc_syscalls.c
103
*fpp = fp;
sys/kern/uipc_syscalls.c
111
struct file *fp;
sys/kern/uipc_syscalls.c
114
error = fget_unlocked(td, fd, rightsp, &fp);
sys/kern/uipc_syscalls.c
117
if (__predict_false(fp->f_type != DTYPE_SOCKET)) {
sys/kern/uipc_syscalls.c
118
fdrop(fp, td);
sys/kern/uipc_syscalls.c
1194
struct file *fp;
sys/kern/uipc_syscalls.c
1201
error = getsock(td, s, &cap_shutdown_rights, &fp);
sys/kern/uipc_syscalls.c
1203
so = fp->f_data;
sys/kern/uipc_syscalls.c
121
*fpp = fp;
sys/kern/uipc_syscalls.c
1214
fdrop(fp, td);
sys/kern/uipc_syscalls.c
1232
struct file *fp;
sys/kern/uipc_syscalls.c
1259
error = getsock_cap(td, s, &cap_setsockopt_rights, &fp,
sys/kern/uipc_syscalls.c
1263
so = fp->f_data;
sys/kern/uipc_syscalls.c
1265
fdrop(fp, td);
sys/kern/uipc_syscalls.c
1299
struct file *fp;
sys/kern/uipc_syscalls.c
1326
error = getsock_cap(td, s, &cap_getsockopt_rights, &fp, &fcaps);
sys/kern/uipc_syscalls.c
1329
so = fp->f_data;
sys/kern/uipc_syscalls.c
1332
fdrop(fp, td);
sys/kern/uipc_syscalls.c
1370
struct file *fp;
sys/kern/uipc_syscalls.c
1374
error = getsock(td, fd, &cap_getsockname_rights, &fp);
sys/kern/uipc_syscalls.c
1377
so = fp->f_data;
sys/kern/uipc_syscalls.c
1383
fdrop(fp, td);
sys/kern/uipc_syscalls.c
143
struct file *fp;
sys/kern/uipc_syscalls.c
1434
struct file *fp;
sys/kern/uipc_syscalls.c
1438
error = getsock(td, fd, &cap_getpeername_rights, &fp);
sys/kern/uipc_syscalls.c
1441
so = fp->f_data;
sys/kern/uipc_syscalls.c
1454
fdrop(fp, td);
sys/kern/uipc_syscalls.c
1545
struct file *fp;
sys/kern/uipc_syscalls.c
1572
&fp);
sys/kern/uipc_syscalls.c
1574
fdclose(td, fp, fd);
sys/kern/uipc_syscalls.c
1575
fdrop(fp, td);
sys/kern/uipc_syscalls.c
168
error = falloc(td, &fp, &fd, oflag);
sys/kern/uipc_syscalls.c
174
fdclose(td, fp, fd);
sys/kern/uipc_syscalls.c
176
finit(fp, FREAD | FWRITE | fflag, DTYPE_SOCKET, so, &socketops);
sys/kern/uipc_syscalls.c
178
(void) fo_ioctl(fp, FIONBIO, &fflag, td->td_ucred, td);
sys/kern/uipc_syscalls.c
181
fdrop(fp, td);
sys/kern/uipc_syscalls.c
203
struct file *fp;
sys/kern/uipc_syscalls.c
217
error = getsock(td, fd, &cap_bind_rights, &fp);
sys/kern/uipc_syscalls.c
220
so = fp->f_data;
sys/kern/uipc_syscalls.c
236
fdrop(fp, td);
sys/kern/uipc_syscalls.c
265
struct file *fp;
sys/kern/uipc_syscalls.c
269
error = getsock(td, s, &cap_listen_rights, &fp);
sys/kern/uipc_syscalls.c
271
so = fp->f_data;
sys/kern/uipc_syscalls.c
277
fdrop(fp, td);
sys/kern/uipc_syscalls.c
291
struct file *fp;
sys/kern/uipc_syscalls.c
300
error = kern_accept4(td, s, (struct sockaddr *)&ss, flags, &fp);
sys/kern/uipc_syscalls.c
319
fdclose(td, fp, td->td_retval[0]);
sys/kern/uipc_syscalls.c
320
fdrop(fp, td);
sys/kern/uipc_syscalls.c
326
kern_accept(struct thread *td, int s, struct sockaddr *sa, struct file **fp)
sys/kern/uipc_syscalls.c
328
return (kern_accept4(td, s, sa, ACCEPT4_INHERIT, fp));
sys/kern/uipc_syscalls.c
333
struct file **fp)
sys/kern/uipc_syscalls.c
419
if (fp != NULL) {
sys/kern/uipc_syscalls.c
421
*fp = nfp;
sys/kern/uipc_syscalls.c
424
*fp = NULL;
sys/kern/uipc_syscalls.c
477
struct file *fp;
sys/kern/uipc_syscalls.c
491
error = getsock(td, fd, &cap_connect_rights, &fp);
sys/kern/uipc_syscalls.c
494
so = fp->f_data;
sys/kern/uipc_syscalls.c
531
fdrop(fp, td);
sys/kern/uipc_syscalls.c
727
struct file *fp;
sys/kern/uipc_syscalls.c
744
error = getsock(td, s, rights, &fp);
sys/kern/uipc_syscalls.c
749
so = (struct socket *)fp->f_data;
sys/kern/uipc_syscalls.c
802
fdrop(fp, td);
sys/kern/uipc_syscalls.c
896
struct file *fp;
sys/kern/uipc_syscalls.c
909
error = getsock(td, s, &cap_recv_rights, &fp);
sys/kern/uipc_syscalls.c
91
struct file *fp;
sys/kern/uipc_syscalls.c
912
so = fp->f_data;
sys/kern/uipc_syscalls.c
917
fdrop(fp, td);
sys/kern/uipc_syscalls.c
932
fdrop(fp, td);
sys/kern/uipc_syscalls.c
94
error = fget_cap(td, fd, rightsp, NULL, &fp, havecapsp);
sys/kern/uipc_syscalls.c
97
if (__predict_false(fp->f_type != DTYPE_SOCKET)) {
sys/kern/uipc_syscalls.c
98
fdrop(fp, td);
sys/kern/uipc_usrreq.c
3451
struct file *fp;
sys/kern/uipc_usrreq.c
3457
fp = fdep[i]->fde_file;
sys/kern/uipc_usrreq.c
3459
unp_discard(fp);
sys/kern/uipc_usrreq.c
3465
restrict_rights(struct file *fp, struct thread *td)
sys/kern/uipc_usrreq.c
3469
prison1 = fp->f_cred->cr_prison;
sys/kern/uipc_usrreq.c
3535
struct file *fp;
sys/kern/uipc_usrreq.c
3537
fp = fdep[i]->fde_file;
sys/kern/uipc_usrreq.c
3538
_finstall(fdesc, fp, *fdp, fdflags |
sys/kern/uipc_usrreq.c
3539
(restrict_rights(fp, td) ?
sys/kern/uipc_usrreq.c
3541
unp_externalize_fp(fp);
sys/kern/uipc_usrreq.c
3663
struct file *fp;
sys/kern/uipc_usrreq.c
3733
fp = fget_noref(fdesc, *fdp);
sys/kern/uipc_usrreq.c
3734
if (fp == NULL) {
sys/kern/uipc_usrreq.c
3739
if (!(fp->f_ops->fo_flags & DFLAG_PASSABLE)) {
sys/kern/uipc_usrreq.c
3899
fptounp(struct file *fp)
sys/kern/uipc_usrreq.c
3903
if (fp->f_type != DTYPE_SOCKET)
sys/kern/uipc_usrreq.c
3905
if ((so = fp->f_data) == NULL)
sys/kern/uipc_usrreq.c
3913
unp_discard(struct file *fp)
sys/kern/uipc_usrreq.c
3917
if (unp_externalize_fp(fp)) {
sys/kern/uipc_usrreq.c
3919
dr->ud_fp = fp;
sys/kern/uipc_usrreq.c
3926
closef_nothread(fp);
sys/kern/uipc_usrreq.c
3957
unp_internalize_fp(struct file *fp)
sys/kern/uipc_usrreq.c
3962
if ((unp = fptounp(fp)) != NULL) {
sys/kern/uipc_usrreq.c
3963
unp->unp_file = fp;
sys/kern/uipc_usrreq.c
3971
unp_externalize_fp(struct file *fp)
sys/kern/uipc_usrreq.c
3977
if ((unp = fptounp(fp)) != NULL) {
sys/kern/uipc_usrreq.c
3998
struct file *fp;
sys/kern/uipc_usrreq.c
4009
fp = fdep[i]->fde_file;
sys/kern/uipc_usrreq.c
4010
if ((unp = fptounp(fp)) == NULL)
sys/kern/uipc_usrreq.c
4022
struct file *fp;
sys/kern/uipc_usrreq.c
4033
fp = fdep[i]->fde_file;
sys/kern/uipc_usrreq.c
4034
if ((unp = fptounp(fp)) == NULL)
sys/kern/vfs_acl.c
431
struct file *fp;
sys/kern/vfs_acl.c
437
cap_rights_init_one(&rights, CAP_ACL_GET), NULL, &fp);
sys/kern/vfs_acl.c
439
error = vacl_get_acl(td, fp->f_vnode, uap->type, uap->aclp);
sys/kern/vfs_acl.c
440
fdrop(fp, td);
sys/kern/vfs_acl.c
451
struct file *fp;
sys/kern/vfs_acl.c
457
cap_rights_init_one(&rights, CAP_ACL_SET), &fp);
sys/kern/vfs_acl.c
459
error = vacl_set_acl(td, fp->f_vnode, uap->type, uap->aclp);
sys/kern/vfs_acl.c
460
fdrop(fp, td);
sys/kern/vfs_acl.c
508
struct file *fp;
sys/kern/vfs_acl.c
514
cap_rights_init_one(&rights, CAP_ACL_DELETE), &fp);
sys/kern/vfs_acl.c
516
error = vacl_delete(td, fp->f_vnode, uap->type);
sys/kern/vfs_acl.c
517
fdrop(fp, td);
sys/kern/vfs_acl.c
566
struct file *fp;
sys/kern/vfs_acl.c
572
cap_rights_init_one(&rights, CAP_ACL_CHECK), NULL, &fp);
sys/kern/vfs_acl.c
574
error = vacl_aclcheck(td, fp->f_vnode, uap->type, uap->aclp);
sys/kern/vfs_acl.c
575
fdrop(fp, td);
sys/kern/vfs_aio.c
1221
struct file *fp;
sys/kern/vfs_aio.c
1234
fp = job->fd_file;
sys/kern/vfs_aio.c
1240
if (fp == NULL || fp->f_type != DTYPE_VNODE)
sys/kern/vfs_aio.c
1243
vp = fp->f_vnode;
sys/kern/vfs_aio.c
1506
struct file *fp = NULL;
sys/kern/vfs_aio.c
1595
error = fget_write(td, fd, &cap_pwrite_rights, &fp);
sys/kern/vfs_aio.c
1599
error = fget_read(td, fd, &cap_pread_rights, &fp);
sys/kern/vfs_aio.c
1603
error = fget(td, fd, &cap_fsync_rights, &fp);
sys/kern/vfs_aio.c
1608
error = fget(td, fd, &cap_no_rights, &fp);
sys/kern/vfs_aio.c
1616
if ((opcode & LIO_SYNC) && fp->f_vnode == NULL) {
sys/kern/vfs_aio.c
1624
(fp->f_vnode == NULL || fp->f_vnode->v_type != VCHR)) {
sys/kern/vfs_aio.c
1629
if (fp != NULL && fp->f_ops == &path_fileops) {
sys/kern/vfs_aio.c
1634
job->fd_file = fp;
sys/kern/vfs_aio.c
1640
fdrop(fp, td);
sys/kern/vfs_aio.c
1700
} else if (fp->f_ops->fo_aio_queue == NULL)
sys/kern/vfs_aio.c
1701
error = aio_queue_file(fp, job);
sys/kern/vfs_aio.c
1703
error = fo_aio_queue(fp, job);
sys/kern/vfs_aio.c
1729
if (fp)
sys/kern/vfs_aio.c
1730
fdrop(fp, td);
sys/kern/vfs_aio.c
1782
aio_queue_file(struct file *fp, struct kaiocb *job)
sys/kern/vfs_aio.c
1796
if (fp->f_type == DTYPE_VNODE) {
sys/kern/vfs_aio.c
1797
vp = fp->f_vnode;
sys/kern/vfs_aio.c
1799
mp = fp->f_vnode->v_mount;
sys/kern/vfs_aio.c
2048
struct file *fp;
sys/kern/vfs_aio.c
2055
error = fget(td, uap->fd, &cap_no_rights, &fp);
sys/kern/vfs_aio.c
2063
if (fp->f_type == DTYPE_VNODE) {
sys/kern/vfs_aio.c
2064
vp = fp->f_vnode;
sys/kern/vfs_aio.c
2066
fdrop(fp, td);
sys/kern/vfs_aio.c
2103
fdrop(fp, td);
sys/kern/vfs_aio.c
315
static int aio_queue_file(struct file *fp, struct kaiocb *job);
sys/kern/vfs_aio.c
772
struct file *fp;
sys/kern/vfs_aio.c
790
fp = job->fd_file;
sys/kern/vfs_aio.c
807
error = fo_read(fp, job->uiop, fp->f_cred,
sys/kern/vfs_aio.c
811
if (fp->f_type == DTYPE_VNODE)
sys/kern/vfs_aio.c
813
error = fo_write(fp, job->uiop, fp->f_cred, (job->ioflags &
sys/kern/vfs_aio.c
849
struct file *fp = job->fd_file;
sys/kern/vfs_aio.c
856
if (fp->f_vnode != NULL) {
sys/kern/vfs_aio.c
857
error = aio_fsync_vnode(td, fp->f_vnode,
sys/kern/vfs_extattr.c
247
struct file *fp;
sys/kern/vfs_extattr.c
256
cap_rights_init_one(&rights, CAP_EXTATTR_SET), NULL, &fp);
sys/kern/vfs_extattr.c
260
error = extattr_set_vp(fp->f_vnode, attrnamespace,
sys/kern/vfs_extattr.c
262
fdrop(fp, td);
sys/kern/vfs_extattr.c
435
struct file *fp;
sys/kern/vfs_extattr.c
444
cap_rights_init_one(&rights, CAP_EXTATTR_GET), NULL, &fp);
sys/kern/vfs_extattr.c
448
error = extattr_get_vp(fp->f_vnode, attrnamespace,
sys/kern/vfs_extattr.c
451
fdrop(fp, td);
sys/kern/vfs_extattr.c
591
struct file *fp;
sys/kern/vfs_extattr.c
600
cap_rights_init_one(&rights, CAP_EXTATTR_DELETE), NULL, &fp);
sys/kern/vfs_extattr.c
604
error = extattr_delete_vp(fp->f_vnode, attrnamespace,
sys/kern/vfs_extattr.c
606
fdrop(fp, td);
sys/kern/vfs_extattr.c
760
struct file *fp;
sys/kern/vfs_extattr.c
767
cap_rights_init_one(&rights, CAP_EXTATTR_LIST), NULL, &fp);
sys/kern/vfs_extattr.c
771
error = extattr_list_vp(fp->f_vnode, attrnamespace, auiop, td);
sys/kern/vfs_extattr.c
773
fdrop(fp, td);
sys/kern/vfs_inotify.c
1006
struct file *fp;
sys/kern/vfs_inotify.c
1012
error = fget_inotify(td, fd, &cap_inotify_rm_rights, &fp);
sys/kern/vfs_inotify.c
1015
sc = fp->f_data;
sys/kern/vfs_inotify.c
1042
fdrop(fp, td);
sys/kern/vfs_inotify.c
209
inotify_read(struct file *fp, struct uio *uio, struct ucred *cred, int flags,
sys/kern/vfs_inotify.c
217
sc = fp->f_data;
sys/kern/vfs_inotify.c
222
if ((flags & IO_NDELAY) != 0 || (fp->f_flag & FNONBLOCK) != 0) {
sys/kern/vfs_inotify.c
272
inotify_ioctl(struct file *fp, u_long com, void *data, struct ucred *cred,
sys/kern/vfs_inotify.c
277
sc = fp->f_data;
sys/kern/vfs_inotify.c
294
inotify_poll(struct file *fp, int events, struct ucred *cred, struct thread *td)
sys/kern/vfs_inotify.c
299
sc = fp->f_data;
sys/kern/vfs_inotify.c
332
inotify_kqfilter(struct file *fp, struct knote *kn)
sys/kern/vfs_inotify.c
338
sc = fp->f_data;
sys/kern/vfs_inotify.c
346
inotify_stat(struct file *fp, struct stat *sb, struct ucred *cred)
sys/kern/vfs_inotify.c
350
sc = fp->f_data;
sys/kern/vfs_inotify.c
431
inotify_close(struct file *fp, struct thread *td)
sys/kern/vfs_inotify.c
437
sc = fp->f_data;
sys/kern/vfs_inotify.c
474
inotify_fill_kinfo(struct file *fp, struct kinfo_file *kif,
sys/kern/vfs_inotify.c
479
sc = fp->f_data;
sys/kern/vfs_inotify.c
488
inotify_create_file(struct thread *td, struct file *fp, int flags, int *fflagsp)
sys/kern/vfs_inotify.c
516
finit(fp, fflags, DTYPE_INOTIFY, sc, &inotifyfdops);
sys/kern/vfs_inotify.c
903
struct file *fp;
sys/kern/vfs_inotify.c
906
error = fget(td, fd, needrightsp, &fp);
sys/kern/vfs_inotify.c
909
if (fp->f_type != DTYPE_INOTIFY) {
sys/kern/vfs_inotify.c
910
fdrop(fp, td);
sys/kern/vfs_inotify.c
913
*fpp = fp;
sys/kern/vfs_inotify.c
922
struct file *fp;
sys/kern/vfs_inotify.c
928
fp = NULL;
sys/kern/vfs_inotify.c
940
error = fget_inotify(td, fd, &cap_inotify_add_rights, &fp);
sys/kern/vfs_inotify.c
943
sc = fp->f_data;
sys/kern/vfs_inotify.c
991
fdrop(fp, td);
sys/kern/vfs_mount.c
2984
struct mntoptnames *fp;
sys/kern/vfs_mount.c
3004
for (fp = optnames; fp->o_opt != 0; fp++) {
sys/kern/vfs_mount.c
3005
if ((mp->mnt_flag & fp->o_opt) != 0) {
sys/kern/vfs_mount.c
3006
sbuf_cat(&sb, fp->o_name);
sys/kern/vfs_subr.c
478
struct file *fp;
sys/kern/vfs_subr.c
488
error = getvnode(curthread, fd, &cap_fcntl_rights, &fp);
sys/kern/vfs_subr.c
491
vp = fp->f_vnode;
sys/kern/vfs_subr.c
500
fdrop(fp, td);
sys/kern/vfs_syscalls.c
1049
struct file *fp;
sys/kern/vfs_syscalls.c
1053
error = getvnode_path(td, uap->fd, &cap_fchroot_rights, &fdflags, &fp);
sys/kern/vfs_syscalls.c
1057
fdrop(fp, td);
sys/kern/vfs_syscalls.c
1060
vp = fp->f_vnode;
sys/kern/vfs_syscalls.c
1062
fdrop(fp, td);
sys/kern/vfs_syscalls.c
1192
finit_open(struct file *fp, struct vnode *vp, int flags)
sys/kern/vfs_syscalls.c
1199
fp->f_vnode = vp;
sys/kern/vfs_syscalls.c
1205
if (fp->f_ops == &badfileops) {
sys/kern/vfs_syscalls.c
1207
("Unexpected fifo fp %p vp %p", fp, vp));
sys/kern/vfs_syscalls.c
1209
finit(fp, (flags & FMASK) | (fp->f_flag & FKQALLOWED),
sys/kern/vfs_syscalls.c
1212
finit_vnode(fp, flags, NULL, &vnops);
sys/kern/vfs_syscalls.c
1229
struct file *fp;
sys/kern/vfs_syscalls.c
1254
error = falloc_noinstall(td, &fp);
sys/kern/vfs_syscalls.c
1258
fp->f_flag = flags & FMASK;
sys/kern/vfs_syscalls.c
1264
td->td_ucred, fp);
sys/kern/vfs_syscalls.c
1271
if (error == ENXIO && fp->f_ops != &badfileops) {
sys/kern/vfs_syscalls.c
1299
finit_open(fp, vp, flags);
sys/kern/vfs_syscalls.c
1302
error = fo_truncate(fp, 0, td->td_ucred, td);
sys/kern/vfs_syscalls.c
1310
*fpp = fp;
sys/kern/vfs_syscalls.c
1328
error = finstall_refed(td, fp, &indx, flags, fcaps);
sys/kern/vfs_syscalls.c
1335
falloc_abort(td, fp);
sys/kern/vfs_syscalls.c
1343
falloc_abort(td, fp);
sys/kern/vfs_syscalls.c
2024
struct file *fp;
sys/kern/vfs_syscalls.c
2030
fp = NULL;
sys/kern/vfs_syscalls.c
2032
error = getvnode_path(td, fd, &cap_no_rights, NULL, &fp);
sys/kern/vfs_syscalls.c
2055
} else if (fp != NULL && fp->f_vnode != vp) {
sys/kern/vfs_syscalls.c
2056
if (VN_IS_DOOMED(fp->f_vnode))
sys/kern/vfs_syscalls.c
2104
if (fp != NULL)
sys/kern/vfs_syscalls.c
2105
fdrop(fp, td);
sys/kern/vfs_syscalls.c
2130
struct file *fp;
sys/kern/vfs_syscalls.c
2134
error = fget(td, fd, &cap_seek_rights, &fp);
sys/kern/vfs_syscalls.c
2137
error = (fp->f_ops->fo_flags & DFLAG_SEEKABLE) != 0 ?
sys/kern/vfs_syscalls.c
2138
fo_seek(fp, offset, whence, td) : ESPIPE;
sys/kern/vfs_syscalls.c
2139
fdrop(fp, td);
sys/kern/vfs_syscalls.c
2945
struct file *fp;
sys/kern/vfs_syscalls.c
2951
&fp);
sys/kern/vfs_syscalls.c
2956
vn_lock(fp->f_vnode, LK_SHARED | LK_RETRY);
sys/kern/vfs_syscalls.c
2957
AUDIT_ARG_VNODE1(fp->f_vnode);
sys/kern/vfs_syscalls.c
2958
VOP_UNLOCK(fp->f_vnode);
sys/kern/vfs_syscalls.c
2961
error = setfflags(td, fp->f_vnode, uap->flags);
sys/kern/vfs_syscalls.c
2962
fdrop(fp, td);
sys/kern/vfs_syscalls.c
3076
struct file *fp;
sys/kern/vfs_syscalls.c
3082
error = fget(td, uap->fd, &cap_fchmod_rights, &fp);
sys/kern/vfs_syscalls.c
3085
error = fo_chmod(fp, uap->mode, td->td_ucred, td);
sys/kern/vfs_syscalls.c
3086
fdrop(fp, td);
sys/kern/vfs_syscalls.c
3208
struct file *fp;
sys/kern/vfs_syscalls.c
3213
error = fget(td, uap->fd, &cap_fchown_rights, &fp);
sys/kern/vfs_syscalls.c
3216
error = fo_chown(fp, uap->uid, uap->gid, td->td_ucred, td);
sys/kern/vfs_syscalls.c
3217
fdrop(fp, td);
sys/kern/vfs_syscalls.c
3451
struct file *fp;
sys/kern/vfs_syscalls.c
3458
error = getvnode(td, fd, &cap_futimes_rights, &fp);
sys/kern/vfs_syscalls.c
3463
vn_lock(fp->f_vnode, LK_SHARED | LK_RETRY);
sys/kern/vfs_syscalls.c
3464
AUDIT_ARG_VNODE1(fp->f_vnode);
sys/kern/vfs_syscalls.c
3465
VOP_UNLOCK(fp->f_vnode);
sys/kern/vfs_syscalls.c
3468
error = setutimes(td, fp->f_vnode, ts, 2, tptr == NULL);
sys/kern/vfs_syscalls.c
3469
fdrop(fp, td);
sys/kern/vfs_syscalls.c
3485
struct file *fp;
sys/kern/vfs_syscalls.c
3494
error = getvnode(td, fd, &cap_futimes_rights, &fp);
sys/kern/vfs_syscalls.c
3499
vn_lock(fp->f_vnode, LK_SHARED | LK_RETRY);
sys/kern/vfs_syscalls.c
3500
AUDIT_ARG_VNODE1(fp->f_vnode);
sys/kern/vfs_syscalls.c
3501
VOP_UNLOCK(fp->f_vnode);
sys/kern/vfs_syscalls.c
3504
error = setutimes(td, fp->f_vnode, ts, 2, flags & UTIMENS_NULL);
sys/kern/vfs_syscalls.c
3505
fdrop(fp, td);
sys/kern/vfs_syscalls.c
3657
struct file *fp;
sys/kern/vfs_syscalls.c
3661
error = getvnode(td, fd, &cap_fsync_rights, &fp);
sys/kern/vfs_syscalls.c
3664
vp = fp->f_vnode;
sys/kern/vfs_syscalls.c
367
struct file *fp;
sys/kern/vfs_syscalls.c
3682
fdrop(fp, td);
sys/kern/vfs_syscalls.c
373
error = getvnode_path(td, fd, &cap_fstatfs_rights, NULL, &fp);
sys/kern/vfs_syscalls.c
376
vp = fp->f_vnode;
sys/kern/vfs_syscalls.c
385
fdrop(fp, td);
sys/kern/vfs_syscalls.c
4043
struct file *fp;
sys/kern/vfs_syscalls.c
4048
fp = NULL;
sys/kern/vfs_syscalls.c
4051
CAP_LOOKUP), &fp);
sys/kern/vfs_syscalls.c
4084
if (fp != NULL && fp->f_vnode != vp) {
sys/kern/vfs_syscalls.c
4085
if (VN_IS_DOOMED(fp->f_vnode))
sys/kern/vfs_syscalls.c
4121
if (fp != NULL)
sys/kern/vfs_syscalls.c
4122
fdrop(fp, td);
sys/kern/vfs_syscalls.c
4324
struct file *fp;
sys/kern/vfs_syscalls.c
4335
error = getvnode(td, fd, &cap_read_rights, &fp);
sys/kern/vfs_syscalls.c
4338
if ((fp->f_flag & FREAD) == 0) {
sys/kern/vfs_syscalls.c
4339
fdrop(fp, td);
sys/kern/vfs_syscalls.c
4342
vp = fp->f_vnode;
sys/kern/vfs_syscalls.c
4343
foffset = foffset_lock(fp, 0);
sys/kern/vfs_syscalls.c
4376
error = VOP_READDIR(vp, &auio, fp->f_cred, &eofflag, NULL,
sys/kern/vfs_syscalls.c
4390
fp->f_vnode = vp;
sys/kern/vfs_syscalls.c
4401
foffset_unlock(fp, foffset, 0);
sys/kern/vfs_syscalls.c
4402
fdrop(fp, td);
sys/kern/vfs_syscalls.c
4483
struct file *fp;
sys/kern/vfs_syscalls.c
4486
error = fget_unlocked_flags(td, fd, rightsp, flagsp, &fp);
sys/kern/vfs_syscalls.c
4502
if (__predict_false(fp->f_vnode == NULL || fp->f_ops == &badfileops)) {
sys/kern/vfs_syscalls.c
4503
fdrop(fp, td);
sys/kern/vfs_syscalls.c
4508
*fpp = fp;
sys/kern/vfs_syscalls.c
4744
struct file *fp;
sys/kern/vfs_syscalls.c
4784
error = falloc_noinstall(td, &fp);
sys/kern/vfs_syscalls.c
4790
fp->f_flag = flags & FMASK;
sys/kern/vfs_syscalls.c
4795
error = vn_open_vnode(vp, flags, td->td_ucred, td, fp);
sys/kern/vfs_syscalls.c
4797
KASSERT(fp->f_ops == &badfileops,
sys/kern/vfs_syscalls.c
4808
finit_open(fp, vp, flags);
sys/kern/vfs_syscalls.c
4811
error = fo_truncate(fp, 0, td->td_ucred, td);
sys/kern/vfs_syscalls.c
4816
error = finstall(td, fp, &indx, flags, NULL);
sys/kern/vfs_syscalls.c
4818
fdrop(fp, td);
sys/kern/vfs_syscalls.c
4939
struct file *fp;
sys/kern/vfs_syscalls.c
4963
error = fget(td, fd, &cap_no_rights, &fp);
sys/kern/vfs_syscalls.c
4966
AUDIT_ARG_FILE(td->td_proc, fp);
sys/kern/vfs_syscalls.c
4967
if ((fp->f_ops->fo_flags & DFLAG_SEEKABLE) == 0) {
sys/kern/vfs_syscalls.c
4971
if (fp->f_type != DTYPE_VNODE) {
sys/kern/vfs_syscalls.c
4975
vp = fp->f_vnode;
sys/kern/vfs_syscalls.c
4993
mtx_pool_lock(mtxpool_sleep, fp);
sys/kern/vfs_syscalls.c
4994
fa = fp->f_advice;
sys/kern/vfs_syscalls.c
5007
fp->f_advice = new;
sys/kern/vfs_syscalls.c
5010
mtx_pool_unlock(mtxpool_sleep, fp);
sys/kern/vfs_syscalls.c
5018
mtx_pool_lock(mtxpool_sleep, fp);
sys/kern/vfs_syscalls.c
5019
fa = fp->f_advice;
sys/kern/vfs_syscalls.c
5023
fp->f_advice = NULL;
sys/kern/vfs_syscalls.c
5039
fp->f_advice = NULL;
sys/kern/vfs_syscalls.c
5042
mtx_pool_unlock(mtxpool_sleep, fp);
sys/kern/vfs_syscalls.c
5050
if (fp != NULL)
sys/kern/vfs_syscalls.c
5051
fdrop(fp, td);
sys/kern/vfs_syscalls.c
893
struct file *fp;
sys/kern/vfs_syscalls.c
899
&fp);
sys/kern/vfs_syscalls.c
903
fdrop(fp, td);
sys/kern/vfs_syscalls.c
906
vp = fp->f_vnode;
sys/kern/vfs_syscalls.c
908
fdrop(fp, td);
sys/kern/vfs_vnops.c
1002
fsetfl_unlock(struct file *fp)
sys/kern/vfs_vnops.c
1006
mtxp = mtx_pool_find(mtxpool_sleep, fp);
sys/kern/vfs_vnops.c
1008
file_v_unlock_mtxp(fp, mtxp, FILE_V_SETFL_LOCKED,
sys/kern/vfs_vnops.c
1035
foffset_lock_uio(struct file *fp, struct uio *uio, int flags)
sys/kern/vfs_vnops.c
1039
uio->uio_offset = foffset_lock(fp, flags);
sys/kern/vfs_vnops.c
1043
foffset_unlock_uio(struct file *fp, struct uio *uio, int flags)
sys/kern/vfs_vnops.c
1047
foffset_unlock(fp, uio->uio_offset, flags);
sys/kern/vfs_vnops.c
1051
get_advice(struct file *fp, struct uio *uio)
sys/kern/vfs_vnops.c
1057
if (fp->f_advice == NULL || fp->f_vnode->v_type != VREG)
sys/kern/vfs_vnops.c
1060
mtxp = mtx_pool_find(mtxpool_sleep, fp);
sys/kern/vfs_vnops.c
1062
if (fp->f_advice != NULL &&
sys/kern/vfs_vnops.c
1063
uio->uio_offset >= fp->f_advice->fa_start &&
sys/kern/vfs_vnops.c
1064
uio->uio_offset + uio->uio_resid <= fp->f_advice->fa_end)
sys/kern/vfs_vnops.c
1065
ret = fp->f_advice->fa_advice;
sys/kern/vfs_vnops.c
1071
get_write_ioflag(struct file *fp)
sys/kern/vfs_vnops.c
1078
vp = fp->f_vnode;
sys/kern/vfs_vnops.c
1081
if ((fp->f_flag & O_DIRECT) != 0)
sys/kern/vfs_vnops.c
1084
if ((fp->f_flag & O_FSYNC) != 0 ||
sys/kern/vfs_vnops.c
1093
if ((fp->f_flag & O_DSYNC) != 0)
sys/kern/vfs_vnops.c
1210
vn_read(struct file *fp, struct uio *uio, struct ucred *active_cred, int flags,
sys/kern/vfs_vnops.c
1221
vp = fp->f_vnode;
sys/kern/vfs_vnops.c
1223
if (fp->f_flag & FNONBLOCK)
sys/kern/vfs_vnops.c
1225
if (fp->f_flag & O_DIRECT)
sys/kern/vfs_vnops.c
1234
error = VOP_READ_PGCACHE(vp, uio, ioflag, fp->f_cred);
sys/kern/vfs_vnops.c
1236
fp->f_nextoff[UIO_READ] = uio->uio_offset;
sys/kern/vfs_vnops.c
1243
advice = get_advice(fp, uio);
sys/kern/vfs_vnops.c
1250
ioflag |= sequential_heuristic(uio, fp);
sys/kern/vfs_vnops.c
1259
error = mac_vnode_check_read(active_cred, fp->f_cred, vp);
sys/kern/vfs_vnops.c
1262
error = VOP_READ(vp, uio, ioflag, fp->f_cred);
sys/kern/vfs_vnops.c
1263
fp->f_nextoff[UIO_READ] = uio->uio_offset;
sys/kern/vfs_vnops.c
1281
vn_write(struct file *fp, struct uio *uio, struct ucred *active_cred, int flags,
sys/kern/vfs_vnops.c
1294
vp = fp->f_vnode;
sys/kern/vfs_vnops.c
1298
if (vp->v_type == VREG && (fp->f_flag & O_APPEND) != 0)
sys/kern/vfs_vnops.c
1300
if ((fp->f_flag & FNONBLOCK) != 0)
sys/kern/vfs_vnops.c
1302
ioflag |= get_write_ioflag(fp);
sys/kern/vfs_vnops.c
1313
advice = get_advice(fp, uio);
sys/kern/vfs_vnops.c
1320
ioflag |= sequential_heuristic(uio, fp);
sys/kern/vfs_vnops.c
1329
error = mac_vnode_check_write(active_cred, fp->f_cred, vp);
sys/kern/vfs_vnops.c
1332
error = VOP_WRITE(vp, uio, ioflag, fp->f_cred);
sys/kern/vfs_vnops.c
1333
fp->f_nextoff[UIO_WRITE] = uio->uio_offset;
sys/kern/vfs_vnops.c
1397
error = (args->args.fop_args.doio)(args->args.fop_args.fp,
sys/kern/vfs_vnops.c
1592
vn_io_fault(struct file *fp, struct uio *uio, struct ucred *active_cred,
sys/kern/vfs_vnops.c
1603
vp = fp->f_vnode;
sys/kern/vfs_vnops.c
1624
foffset_lock_uio(fp, uio, flags);
sys/kern/vfs_vnops.c
1629
} else if ((fp->f_flag & O_APPEND) != 0 ||
sys/kern/vfs_vnops.c
1640
args.args.fop_args.fp = fp;
sys/kern/vfs_vnops.c
1646
error = doio(fp, uio, active_cred, flags | FOF_OFFSET, td);
sys/kern/vfs_vnops.c
1650
foffset_unlock_uio(fp, uio, flags);
sys/kern/vfs_vnops.c
175
struct file *fp;
sys/kern/vfs_vnops.c
1764
vn_truncate(struct file *fp, off_t length, struct ucred *active_cred,
sys/kern/vfs_vnops.c
1772
vp = fp->f_vnode;
sys/kern/vfs_vnops.c
1790
error = mac_vnode_check_write(active_cred, fp->f_cred, vp);
sys/kern/vfs_vnops.c
1794
error = vn_truncate_locked(vp, length, (fp->f_flag & O_FSYNC) != 0,
sys/kern/vfs_vnops.c
1795
fp->f_cred);
sys/kern/vfs_vnops.c
1834
vn_statfile(struct file *fp, struct stat *sb, struct ucred *active_cred)
sys/kern/vfs_vnops.c
1836
struct vnode *vp = fp->f_vnode;
sys/kern/vfs_vnops.c
1840
error = VOP_STAT(vp, sb, active_cred, fp->f_cred);
sys/kern/vfs_vnops.c
1850
vn_ioctl(struct file *fp, u_long com, void *data, struct ucred *active_cred,
sys/kern/vfs_vnops.c
1858
vp = fp->f_vnode;
sys/kern/vfs_vnops.c
1866
*(int *)data = size - fp->f_offset;
sys/kern/vfs_vnops.c
1872
error = mac_vnode_check_read(active_cred, fp->f_cred,
sys/kern/vfs_vnops.c
188
vn_open(struct nameidata *ndp, int *flagp, int cmode, struct file *fp)
sys/kern/vfs_vnops.c
1884
return (VOP_IOCTL(vp, com, data, fp->f_flag,
sys/kern/vfs_vnops.c
1889
return (VOP_IOCTL(vp, com, data, fp->f_flag,
sys/kern/vfs_vnops.c
1900
vn_poll(struct file *fp, int events, struct ucred *active_cred,
sys/kern/vfs_vnops.c
1906
vp = fp->f_vnode;
sys/kern/vfs_vnops.c
1911
error = mac_vnode_check_poll(active_cred, fp->f_cred, vp);
sys/kern/vfs_vnops.c
1917
error = VOP_POLL(vp, events, fp->f_cred, td);
sys/kern/vfs_vnops.c
192
return (vn_open_cred(ndp, flagp, cmode, 0, td->td_ucred, fp));
sys/kern/vfs_vnops.c
2050
vn_closefile(struct file *fp, struct thread *td)
sys/kern/vfs_vnops.c
2057
vp = fp->f_vnode;
sys/kern/vfs_vnops.c
2058
fp->f_ops = &badfileops;
sys/kern/vfs_vnops.c
2059
ref = (fp->f_flag & FHASLOCK) != 0;
sys/kern/vfs_vnops.c
2061
error = vn_close1(vp, fp->f_flag, fp->f_cred, td, ref);
sys/kern/vfs_vnops.c
2068
(void) VOP_ADVLOCK(vp, fp, F_UNLCK, &lf, F_FLOCK);
sys/kern/vfs_vnops.c
2419
vn_kqfilter(struct file *fp, struct knote *kn)
sys/kern/vfs_vnops.c
2422
return (VOP_KQFILTER(fp->f_vnode, kn));
sys/kern/vfs_vnops.c
2426
vn_kqfilter_opath(struct file *fp, struct knote *kn)
sys/kern/vfs_vnops.c
2428
if ((fp->f_flag & FKQALLOWED) == 0)
sys/kern/vfs_vnops.c
2430
return (vn_kqfilter(fp, kn));
sys/kern/vfs_vnops.c
254
struct ucred *cred, struct file *fp)
sys/kern/vfs_vnops.c
2725
vn_chmod(struct file *fp, mode_t mode, struct ucred *active_cred,
sys/kern/vfs_vnops.c
2730
vp = fp->f_vnode;
sys/kern/vfs_vnops.c
2740
vn_chown(struct file *fp, uid_t uid, gid_t gid, struct ucred *active_cred,
sys/kern/vfs_vnops.c
2745
vp = fp->f_vnode;
sys/kern/vfs_vnops.c
2861
vn_seek(struct file *fp, off_t offset, int whence, struct thread *td)
sys/kern/vfs_vnops.c
2869
vp = fp->f_vnode;
sys/kern/vfs_vnops.c
2875
foffset = foffset_read(fp);
sys/kern/vfs_vnops.c
2882
foffset = foffset_lock(fp, 0);
sys/kern/vfs_vnops.c
2905
fo_ioctl(fp, DIOCGMEDIASIZE, &size, cred, td) == 0)
sys/kern/vfs_vnops.c
2916
error = fo_ioctl(fp, FIOSEEKDATA, &offset, cred, td);
sys/kern/vfs_vnops.c
2921
error = fo_ioctl(fp, FIOSEEKHOLE, &offset, cred, td);
sys/kern/vfs_vnops.c
2935
foffset_unlock(fp, offset, error != 0 ? FOF_NOUPDATE : 0);
sys/kern/vfs_vnops.c
2963
vn_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp)
sys/kern/vfs_vnops.c
2968
if (fp->f_type == DTYPE_FIFO)
sys/kern/vfs_vnops.c
2972
vp = fp->f_vnode;
sys/kern/vfs_vnops.c
3048
vn_mmap(struct file *fp, vm_map_t map, vm_offset_t *addr, vm_size_t size,
sys/kern/vfs_vnops.c
3072
if ((fp->f_flag & FPOSIXSHM) != 0)
sys/kern/vfs_vnops.c
3075
vp = fp->f_vnode;
sys/kern/vfs_vnops.c
3093
if ((fp->f_flag & FREAD) != 0)
sys/kern/vfs_vnops.c
3104
if ((fp->f_flag & FWRITE) != 0)
sys/kern/vfs_vnops.c
378
error = vn_open_vnode(vp, fmode, cred, curthread, fp);
sys/kern/vfs_vnops.c
3892
vn_fallocate(struct file *fp, off_t offset, off_t len, struct thread *td)
sys/kern/vfs_vnops.c
3902
vp = fp->f_vnode;
sys/kern/vfs_vnops.c
3928
error = mac_vnode_check_write(td->td_ucred, fp->f_cred, vp);
sys/kern/vfs_vnops.c
398
vn_open_vnode_advlock(struct vnode *vp, int fmode, struct file *fp)
sys/kern/vfs_vnops.c
4041
vn_fspacectl(struct file *fp, int cmd, off_t *offset, off_t *length, int flags,
sys/kern/vfs_vnops.c
4053
vp = fp->f_vnode;
sys/kern/vfs_vnops.c
4058
ioflag = get_write_ioflag(fp);
sys/kern/vfs_vnops.c
406
KASSERT(fp != NULL, ("open with flock requires fp"));
sys/kern/vfs_vnops.c
4063
active_cred, active_cred, fp->f_cred);
sys/kern/vfs_vnops.c
407
if (fp->f_type != DTYPE_NONE && fp->f_type != DTYPE_VNODE)
sys/kern/vfs_vnops.c
422
error = VOP_ADVLOCK(vp, (caddr_t)fp, F_SETLK, &lf, type);
sys/kern/vfs_vnops.c
424
fp->f_flag |= FHASLOCK;
sys/kern/vfs_vnops.c
436
struct thread *td, struct file *fp)
sys/kern/vfs_vnops.c
488
fp->f_flag |= FKQALLOWED;
sys/kern/vfs_vnops.c
495
error = VOP_OPEN(vp, fmode, cred, td, fp);
sys/kern/vfs_vnops.c
499
error = vn_open_vnode_advlock(vp, fmode, fp);
sys/kern/vfs_vnops.c
513
if (fp != NULL) {
sys/kern/vfs_vnops.c
520
fp->f_flag |= FOPENFAILED;
sys/kern/vfs_vnops.c
521
fp->f_vnode = vp;
sys/kern/vfs_vnops.c
522
if (fp->f_ops == &badfileops) {
sys/kern/vfs_vnops.c
523
fp->f_type = DTYPE_VNODE;
sys/kern/vfs_vnops.c
524
fp->f_ops = &vnops;
sys/kern/vfs_vnops.c
609
sequential_heuristic(struct uio *uio, struct file *fp)
sys/kern/vfs_vnops.c
613
ASSERT_VOP_LOCKED(fp->f_vnode, __func__);
sys/kern/vfs_vnops.c
616
if (fp->f_flag & FRDAHEAD)
sys/kern/vfs_vnops.c
617
return (fp->f_seqcount[rw] << IO_SEQSHIFT);
sys/kern/vfs_vnops.c
626
if ((uio->uio_offset == 0 && fp->f_seqcount[rw] > 0) ||
sys/kern/vfs_vnops.c
627
uio->uio_offset == fp->f_nextoff[rw]) {
sys/kern/vfs_vnops.c
638
fp->f_seqcount[rw] = IO_SEQMAX;
sys/kern/vfs_vnops.c
640
fp->f_seqcount[rw] += howmany(uio->uio_resid, 16384);
sys/kern/vfs_vnops.c
641
if (fp->f_seqcount[rw] > IO_SEQMAX)
sys/kern/vfs_vnops.c
642
fp->f_seqcount[rw] = IO_SEQMAX;
sys/kern/vfs_vnops.c
644
return (fp->f_seqcount[rw] << IO_SEQSHIFT);
sys/kern/vfs_vnops.c
648
if (fp->f_seqcount[rw] > 1)
sys/kern/vfs_vnops.c
649
fp->f_seqcount[rw] = 1;
sys/kern/vfs_vnops.c
651
fp->f_seqcount[rw] = 0;
sys/kern/vfs_vnops.c
802
file_v_lock(struct file *fp, short lock_bit, short lock_wait_bit)
sys/kern/vfs_vnops.c
807
flagsp = &fp->f_vflags;
sys/kern/vfs_vnops.c
841
file_v_unlock(struct file *fp, short lock_bit, short lock_wait_bit)
sys/kern/vfs_vnops.c
846
flagsp = &fp->f_vflags;
sys/kern/vfs_vnops.c
864
foffset_lock(struct file *fp, int flags)
sys/kern/vfs_vnops.c
869
file_v_lock(fp, FILE_V_FOFFSET_LOCKED,
sys/kern/vfs_vnops.c
873
return (atomic_load_long(&fp->f_offset));
sys/kern/vfs_vnops.c
877
foffset_unlock(struct file *fp, off_t val, int flags)
sys/kern/vfs_vnops.c
882
atomic_store_long(&fp->f_offset, val);
sys/kern/vfs_vnops.c
884
fp->f_nextoff[UIO_READ] = val;
sys/kern/vfs_vnops.c
886
fp->f_nextoff[UIO_WRITE] = val;
sys/kern/vfs_vnops.c
889
file_v_unlock(fp, FILE_V_FOFFSET_LOCKED,
sys/kern/vfs_vnops.c
895
foffset_read(struct file *fp)
sys/kern/vfs_vnops.c
898
return (atomic_load_long(&fp->f_offset));
sys/kern/vfs_vnops.c
902
fsetfl_lock(struct file *fp)
sys/kern/vfs_vnops.c
904
file_v_lock(fp, FILE_V_SETFL_LOCKED, FILE_V_SETFL_LOCK_WAITING);
sys/kern/vfs_vnops.c
908
fsetfl_unlock(struct file *fp)
sys/kern/vfs_vnops.c
910
file_v_unlock(fp, FILE_V_SETFL_LOCKED, FILE_V_SETFL_LOCK_WAITING);
sys/kern/vfs_vnops.c
916
file_v_lock_mtxp(struct file *fp, struct mtx *mtxp, short lock_bit,
sys/kern/vfs_vnops.c
921
while ((fp->f_vflags & lock_bit) != 0) {
sys/kern/vfs_vnops.c
922
fp->f_vflags |= lock_wait_bit;
sys/kern/vfs_vnops.c
923
msleep(&fp->f_vflags, mtxp, PRI_MAX_KERN,
sys/kern/vfs_vnops.c
926
fp->f_vflags |= lock_bit;
sys/kern/vfs_vnops.c
930
file_v_unlock_mtxp(struct file *fp, struct mtx *mtxp, short lock_bit,
sys/kern/vfs_vnops.c
935
KASSERT((fp->f_vflags & lock_bit) != 0, ("Lost lock_bit"));
sys/kern/vfs_vnops.c
936
if ((fp->f_vflags & lock_wait_bit) != 0)
sys/kern/vfs_vnops.c
937
wakeup(&fp->f_vflags);
sys/kern/vfs_vnops.c
938
fp->f_vflags &= ~(lock_bit | lock_wait_bit);
sys/kern/vfs_vnops.c
942
foffset_lock(struct file *fp, int flags)
sys/kern/vfs_vnops.c
949
mtxp = mtx_pool_find(mtxpool_sleep, fp);
sys/kern/vfs_vnops.c
952
file_v_lock_mtxp(fp, mtxp, FILE_V_FOFFSET_LOCKED,
sys/kern/vfs_vnops.c
955
res = fp->f_offset;
sys/kern/vfs_vnops.c
961
foffset_unlock(struct file *fp, off_t val, int flags)
sys/kern/vfs_vnops.c
967
mtxp = mtx_pool_find(mtxpool_sleep, fp);
sys/kern/vfs_vnops.c
970
fp->f_offset = val;
sys/kern/vfs_vnops.c
972
fp->f_nextoff[UIO_READ] = val;
sys/kern/vfs_vnops.c
974
fp->f_nextoff[UIO_WRITE] = val;
sys/kern/vfs_vnops.c
976
file_v_unlock_mtxp(fp, mtxp, FILE_V_FOFFSET_LOCKED,
sys/kern/vfs_vnops.c
983
foffset_read(struct file *fp)
sys/kern/vfs_vnops.c
986
return (foffset_lock(fp, FOF_NOLOCK));
sys/kern/vfs_vnops.c
990
fsetfl_lock(struct file *fp)
sys/kern/vfs_vnops.c
994
mtxp = mtx_pool_find(mtxpool_sleep, fp);
sys/kern/vfs_vnops.c
996
file_v_lock_mtxp(fp, mtxp, FILE_V_SETFL_LOCKED,
sys/net/altq/altq_rmclass.c
1679
struct rmc_funcs *fp;
sys/net/altq/altq_rmclass.c
1681
for (fp = rmc_funcs; fp->func != NULL; fp++)
sys/net/altq/altq_rmclass.c
1682
if (fp->func == func)
sys/net/altq/altq_rmclass.c
1683
return (fp->name);
sys/net/altq/altq_subr.c
1499
struct flowinfo_in *fp = (struct flowinfo_in *)&flow;
sys/net/altq/altq_subr.c
1507
&afp->f_filter, fp))
sys/net/altq/altq_subr.c
1518
&afp->f_filter, fp))
sys/net/altq/altq_subr.c
1523
i = ACC_GET_HASH_INDEX(fp->fi_dst.s_addr);
sys/net/altq/altq_subr.c
1532
&afp->f_filter, fp))
sys/net/altq/altq_subr.c
1830
struct ip4_frag *fp;
sys/net/altq/altq_subr.c
1839
fp = ip4f_alloc();
sys/net/altq/altq_subr.c
1840
fp->ip4f_id = ip->ip_id;
sys/net/altq/altq_subr.c
1841
fp->ip4f_info.fi_proto = ip->ip_p;
sys/net/altq/altq_subr.c
1842
fp->ip4f_info.fi_src.s_addr = ip->ip_src.s_addr;
sys/net/altq/altq_subr.c
1843
fp->ip4f_info.fi_dst.s_addr = ip->ip_dst.s_addr;
sys/net/altq/altq_subr.c
1846
fp->ip4f_info.fi_sport = fin->fi_sport;
sys/net/altq/altq_subr.c
1847
fp->ip4f_info.fi_dport = fin->fi_dport;
sys/net/altq/altq_subr.c
1848
fp->ip4f_info.fi_gpi = fin->fi_gpi;
sys/net/altq/altq_subr.c
1856
struct ip4_frag *fp;
sys/net/altq/altq_subr.c
1858
for (fp = TAILQ_FIRST(&ip4f_list); fp != NULL && fp->ip4f_valid;
sys/net/altq/altq_subr.c
1859
fp = TAILQ_NEXT(fp, ip4f_chain))
sys/net/altq/altq_subr.c
1860
if (ip->ip_id == fp->ip4f_id &&
sys/net/altq/altq_subr.c
1861
ip->ip_src.s_addr == fp->ip4f_info.fi_src.s_addr &&
sys/net/altq/altq_subr.c
1862
ip->ip_dst.s_addr == fp->ip4f_info.fi_dst.s_addr &&
sys/net/altq/altq_subr.c
1863
ip->ip_p == fp->ip4f_info.fi_proto) {
sys/net/altq/altq_subr.c
1865
fin->fi_sport = fp->ip4f_info.fi_sport;
sys/net/altq/altq_subr.c
1866
fin->fi_dport = fp->ip4f_info.fi_dport;
sys/net/altq/altq_subr.c
1867
fin->fi_gpi = fp->ip4f_info.fi_gpi;
sys/net/altq/altq_subr.c
1872
ip4f_free(fp);
sys/net/altq/altq_subr.c
1884
struct ip4_frag *fp;
sys/net/altq/altq_subr.c
1889
fp = malloc(sizeof(struct ip4_frag),
sys/net/altq/altq_subr.c
1891
if (fp == NULL) {
sys/net/altq/altq_subr.c
1897
fp->ip4f_valid = 0;
sys/net/altq/altq_subr.c
1898
TAILQ_INSERT_TAIL(&ip4f_list, fp, ip4f_chain);
sys/net/altq/altq_subr.c
1906
struct ip4_frag *fp;
sys/net/altq/altq_subr.c
1909
fp = TAILQ_LAST(&ip4f_list, ip4f_list);
sys/net/altq/altq_subr.c
1910
TAILQ_REMOVE(&ip4f_list, fp, ip4f_chain);
sys/net/altq/altq_subr.c
1911
fp->ip4f_valid = 1;
sys/net/altq/altq_subr.c
1912
TAILQ_INSERT_HEAD(&ip4f_list, fp, ip4f_chain);
sys/net/altq/altq_subr.c
1913
return (fp);
sys/net/altq/altq_subr.c
1917
ip4f_free(fp)
sys/net/altq/altq_subr.c
1918
struct ip4_frag *fp;
sys/net/altq/altq_subr.c
1920
TAILQ_REMOVE(&ip4f_list, fp, ip4f_chain);
sys/net/altq/altq_subr.c
1921
fp->ip4f_valid = 0;
sys/net/altq/altq_subr.c
1922
TAILQ_INSERT_TAIL(&ip4f_list, fp, ip4f_chain);
sys/net/bpf.c
1780
bpf_setf(struct bpf_d *d, struct bpf_program *fp, u_long cmd)
sys/net/bpf.c
1800
fp32 = (struct bpf_program32 *)fp;
sys/net/bpf.c
1804
fp = &fp_swab;
sys/net/bpf.c
1825
flen = fp->bf_len;
sys/net/bpf.c
1826
if (flen > bpf_maxinsns || (fp->bf_insns == NULL && flen != 0))
sys/net/bpf.c
1828
size = flen * sizeof(*fp->bf_insns);
sys/net/bpf.c
1833
if (copyin(fp->bf_insns, filter, size) != 0 ||
sys/net/bpf_jitter.c
66
bpf_jitter(struct bpf_insn *fp, int nins)
sys/net/bpf_jitter.c
81
if (fp == NULL || nins == 0) {
sys/net/bpf_jitter.c
87
if ((filter->func = bpf_jit_compile(fp, nins, &filter->size)) == NULL) {
sys/net/bpf_jitter.h
71
bpf_jit_filter *bpf_jitter(struct bpf_insn *fp, int nins);
sys/net/if_ovpn.c
634
struct file *fp = NULL;
sys/net/if_ovpn.c
665
ret = getsock(td, fd, &cap_connect_rights, &fp);
sys/net/if_ovpn.c
669
so = fp->f_data;
sys/net/if_ovpn.c
816
if (fp != NULL)
sys/net/if_ovpn.c
817
fdrop(fp, td);
sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c
271
struct usb_fifo *f = sc->sc_fifo.fp[USB_FIFO_TX];
sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c
305
struct usb_fifo *fifo = sc->sc_fifo.fp[USB_FIFO_RX];
sys/netinet/in_fib_dxr.c
692
struct range_entry_long *fp =
sys/netinet/in_fib_dxr.c
722
if (fhp->end > oend && fhp->nexthop != fp->nexthop) {
sys/netinet/in_fib_dxr.c
723
fp++;
sys/netinet/in_fib_dxr.c
725
fp->start = (oend + 1) & DXR_RANGE_MASK;
sys/netinet/in_fib_dxr.c
726
fp->nexthop = fhp->nexthop;
sys/netinet/in_fib_dxr.c
729
if (start > ((chunk << DXR_RANGE_SHIFT) | fp->start) &&
sys/netinet/in_fib_dxr.c
730
nh != fp->nexthop) {
sys/netinet/in_fib_dxr.c
731
fp++;
sys/netinet/in_fib_dxr.c
733
fp->start = start & DXR_RANGE_MASK;
sys/netinet/in_fib_dxr.c
735
if ((--fp)->nexthop == nh)
sys/netinet/in_fib_dxr.c
738
fp++;
sys/netinet/in_fib_dxr.c
740
fp->nexthop = nh;
sys/netinet/in_fib_dxr.c
750
struct range_entry_long *fp;
sys/netinet/in_fib_dxr.c
764
fp = &da->range_tbl[da->rtbl_top].re;
sys/netinet/in_fib_dxr.c
766
fp->start = first & DXR_RANGE_MASK;
sys/netinet/in_fib_dxr.c
767
fp->nexthop = da->heap[0].nexthop;
sys/netinet/in_fib_dxr.c
778
fp = &da->range_tbl[da->rtbl_top + da->rtbl_work_frags].re;
sys/netinet/in_fib_dxr.c
788
if (fhp->end > oend && fhp->nexthop != fp->nexthop) {
sys/netinet/in_fib_dxr.c
792
fp++;
sys/netinet/in_fib_dxr.c
794
fp->start = (oend + 1) & DXR_RANGE_MASK;
sys/netinet/in_fib_dxr.c
795
fp->nexthop = fhp->nexthop;
sys/netinet/in_fib_dxr.c
801
da->direct_tbl[chunk].base = fp->nexthop;
sys/netinet/in_fib_dxr.c
811
fp = &da->range_tbl[da->rtbl_top].re;
sys/netinet/in_fib_dxr.c
812
for (i = 0; i <= da->rtbl_work_frags; i++, fp++)
sys/netinet/in_fib_dxr.c
813
if ((fp->start & 0xff) != 0 || fp->nexthop > RE_SHORT_MAX_NH)
sys/netinet/in_fib_dxr.c
816
fp = &da->range_tbl[da->rtbl_top].re;
sys/netinet/in_fib_dxr.c
817
fps = (void *) fp;
sys/netinet/in_fib_dxr.c
818
for (i = 0; i <= da->rtbl_work_frags; i++, fp++, fps++) {
sys/netinet/in_fib_dxr.c
819
start = fp->start;
sys/netinet/in_fib_dxr.c
820
nh = fp->nexthop;
sys/netinet/in_pcb.c
2897
uint32_t *faddr, uint16_t *fp)
sys/netinet/in_pcb.c
2904
*fp = inp->inp_fport;
sys/netinet/in_pcb.h
566
uint32_t *faddr, uint16_t *fp);
sys/netinet/ip_reass.c
113
ipq_timeout(struct ipqbucket *bucket, struct ipq *fp)
sys/netinet/ip_reass.c
116
IPSTAT_ADD(ips_fragtimeout, fp->ipq_nfrags);
sys/netinet/ip_reass.c
117
ipq_free(bucket, fp);
sys/netinet/ip_reass.c
121
ipq_drop(struct ipqbucket *bucket, struct ipq *fp)
sys/netinet/ip_reass.c
124
IPSTAT_ADD(ips_fragdropped, fp->ipq_nfrags);
sys/netinet/ip_reass.c
125
ipq_free(bucket, fp);
sys/netinet/ip_reass.c
204
struct ipq *fp;
sys/netinet/ip_reass.c
297
TAILQ_FOREACH(fp, head, ipq_list)
sys/netinet/ip_reass.c
298
if (ip->ip_id == fp->ipq_id &&
sys/netinet/ip_reass.c
299
ip->ip_src.s_addr == fp->ipq_src.s_addr &&
sys/netinet/ip_reass.c
300
ip->ip_dst.s_addr == fp->ipq_dst.s_addr &&
sys/netinet/ip_reass.c
302
mac_ipq_match(m, fp) &&
sys/netinet/ip_reass.c
304
ip->ip_p == fp->ipq_p)
sys/netinet/ip_reass.c
309
if (fp == NULL) {
sys/netinet/ip_reass.c
311
fp = uma_zalloc(V_ipq_zone, M_NOWAIT);
sys/netinet/ip_reass.c
312
if (fp == NULL)
sys/netinet/ip_reass.c
313
fp = ipq_reuse(hash);
sys/netinet/ip_reass.c
314
if (fp == NULL)
sys/netinet/ip_reass.c
317
if (mac_ipq_init(fp, M_NOWAIT) != 0) {
sys/netinet/ip_reass.c
318
uma_zfree(V_ipq_zone, fp);
sys/netinet/ip_reass.c
319
fp = NULL;
sys/netinet/ip_reass.c
322
mac_ipq_create(m, fp);
sys/netinet/ip_reass.c
324
TAILQ_INSERT_HEAD(head, fp, ipq_list);
sys/netinet/ip_reass.c
326
fp->ipq_nfrags = 1;
sys/netinet/ip_reass.c
328
fp->ipq_expire = time_uptime + V_ipfragttl;
sys/netinet/ip_reass.c
329
fp->ipq_p = ip->ip_p;
sys/netinet/ip_reass.c
330
fp->ipq_id = ip->ip_id;
sys/netinet/ip_reass.c
331
fp->ipq_src = ip->ip_src;
sys/netinet/ip_reass.c
332
fp->ipq_dst = ip->ip_dst;
sys/netinet/ip_reass.c
333
fp->ipq_frags = m;
sys/netinet/ip_reass.c
335
fp->ipq_maxoff = -1;
sys/netinet/ip_reass.c
337
fp->ipq_maxoff = ntohs(ip->ip_off) + ntohs(ip->ip_len);
sys/netinet/ip_reass.c
339
if (fp == TAILQ_LAST(head, ipqhead))
sys/netinet/ip_reass.c
352
if (fp->ipq_maxoff > 0) {
sys/netinet/ip_reass.c
354
if (((m->m_flags & M_IP_FRAG) && i >= fp->ipq_maxoff) ||
sys/netinet/ip_reass.c
356
i != fp->ipq_maxoff)) {
sys/netinet/ip_reass.c
357
fp = NULL;
sys/netinet/ip_reass.c
361
fp->ipq_maxoff = ntohs(ip->ip_off) + ntohs(ip->ip_len);
sys/netinet/ip_reass.c
362
fp->ipq_nfrags++;
sys/netinet/ip_reass.c
365
mac_ipq_update(m, fp);
sys/netinet/ip_reass.c
377
ecn0 = GETIP(fp->ipq_frags)->ip_tos & IPTOS_ECN_MASK;
sys/netinet/ip_reass.c
382
GETIP(fp->ipq_frags)->ip_tos |= IPTOS_ECN_CE;
sys/netinet/ip_reass.c
390
for (p = NULL, q = fp->ipq_frags; q; p = q, q = q->m_nextpkt)
sys/netinet/ip_reass.c
417
m->m_nextpkt = fp->ipq_frags;
sys/netinet/ip_reass.c
418
fp->ipq_frags = m;
sys/netinet/ip_reass.c
439
fp->ipq_nfrags--;
sys/netinet/ip_reass.c
455
for (p = NULL, q = fp->ipq_frags; q; p = q, q = q->m_nextpkt) {
sys/netinet/ip_reass.c
457
if (fp->ipq_nfrags > V_maxfragsperpacket)
sys/netinet/ip_reass.c
458
ipq_drop(&V_ipq[hash], fp);
sys/netinet/ip_reass.c
465
if (fp->ipq_nfrags > V_maxfragsperpacket)
sys/netinet/ip_reass.c
466
ipq_drop(&V_ipq[hash], fp);
sys/netinet/ip_reass.c
473
q = fp->ipq_frags;
sys/netinet/ip_reass.c
477
ipq_drop(&V_ipq[hash], fp);
sys/netinet/ip_reass.c
506
atomic_subtract_int(&nfrags, fp->ipq_nfrags);
sys/netinet/ip_reass.c
508
mac_ipq_reassemble(fp, m);
sys/netinet/ip_reass.c
509
mac_ipq_destroy(fp);
sys/netinet/ip_reass.c
518
ip->ip_src = fp->ipq_src;
sys/netinet/ip_reass.c
519
ip->ip_dst = fp->ipq_dst;
sys/netinet/ip_reass.c
520
TAILQ_REMOVE(head, fp, ipq_list);
sys/netinet/ip_reass.c
522
uma_zfree(V_ipq_zone, fp);
sys/netinet/ip_reass.c
571
if (fp != NULL) {
sys/netinet/ip_reass.c
572
fp->ipq_nfrags--;
sys/netinet/ip_reass.c
591
struct ipq *fp;
sys/netinet/ip_reass.c
597
fp = TAILQ_LAST(&bucket->head, ipqhead);
sys/netinet/ip_reass.c
598
KASSERT(fp != NULL && fp->ipq_expire <= time_uptime,
sys/netinet/ip_reass.c
600
fp ? (uintmax_t)fp->ipq_expire : 0, (uintmax_t)time_uptime));
sys/netinet/ip_reass.c
602
while (fp != NULL && fp->ipq_expire <= time_uptime) {
sys/netinet/ip_reass.c
603
ipq_timeout(bucket, fp);
sys/netinet/ip_reass.c
604
fp = TAILQ_LAST(&bucket->head, ipqhead);
sys/netinet/ip_reass.c
613
struct ipq *fp;
sys/netinet/ip_reass.c
617
if ((fp = TAILQ_LAST(&bucket->head, ipqhead)) != NULL) {
sys/netinet/ip_reass.c
621
t = fp->ipq_expire - time_uptime;
sys/netinet/ip_reass.c
640
struct ipq *fp = TAILQ_FIRST(&V_ipq[i].head);
sys/netinet/ip_reass.c
642
dropped += fp->ipq_nfrags;
sys/netinet/ip_reass.c
643
ipq_free(&V_ipq[i], fp);
sys/netinet/ip_reass.c
731
struct ipq *fp, *temp;
sys/netinet/ip_reass.c
751
TAILQ_FOREACH_SAFE(fp, &V_ipq[i].head, ipq_list, temp) {
sys/netinet/ip_reass.c
752
for (m = fp->ipq_frags; m != NULL; m = m->m_nextpkt) {
sys/netinet/ip_reass.c
789
struct ipq *fp;
sys/netinet/ip_reass.c
800
(fp = TAILQ_LAST(&V_ipq[i].head, ipqhead)) != NULL)
sys/netinet/ip_reass.c
801
ipq_timeout(&V_ipq[i], fp);
sys/netinet/ip_reass.c
816
fp = TAILQ_LAST(&V_ipq[i].head, ipqhead);
sys/netinet/ip_reass.c
817
if (fp != NULL) {
sys/netinet/ip_reass.c
818
ipq_timeout(&V_ipq[i], fp);
sys/netinet/ip_reass.c
892
struct ipq *fp;
sys/netinet/ip_reass.c
901
fp = TAILQ_LAST(&V_ipq[bucket].head, ipqhead);
sys/netinet/ip_reass.c
902
if (fp) {
sys/netinet/ip_reass.c
905
IPSTAT_ADD(ips_fragtimeout, fp->ipq_nfrags);
sys/netinet/ip_reass.c
906
atomic_subtract_int(&nfrags, fp->ipq_nfrags);
sys/netinet/ip_reass.c
907
while (fp->ipq_frags) {
sys/netinet/ip_reass.c
908
m = fp->ipq_frags;
sys/netinet/ip_reass.c
909
fp->ipq_frags = m->m_nextpkt;
sys/netinet/ip_reass.c
912
TAILQ_REMOVE(&V_ipq[bucket].head, fp, ipq_list);
sys/netinet/ip_reass.c
923
return (fp);
sys/netinet/ip_reass.c
930
ipq_free(struct ipqbucket *bucket, struct ipq *fp)
sys/netinet/ip_reass.c
934
atomic_subtract_int(&nfrags, fp->ipq_nfrags);
sys/netinet/ip_reass.c
935
while (fp->ipq_frags) {
sys/netinet/ip_reass.c
936
q = fp->ipq_frags;
sys/netinet/ip_reass.c
937
fp->ipq_frags = q->m_nextpkt;
sys/netinet/ip_reass.c
940
TAILQ_REMOVE(&bucket->head, fp, ipq_list);
sys/netinet/ip_reass.c
942
uma_zfree(V_ipq_zone, fp);
sys/netinet/sctp_syscalls.c
232
struct file *fp = NULL;
sys/netinet/sctp_syscalls.c
260
error = getsock(td, uap->sd, &rights, &fp);
sys/netinet/sctp_syscalls.c
271
so = (struct socket *)fp->f_data;
sys/netinet/sctp_syscalls.c
320
if (fp != NULL)
sys/netinet/sctp_syscalls.c
321
fdrop(fp, td);
sys/netinet/sctp_syscalls.c
332
struct file *fp = NULL;
sys/netinet/sctp_syscalls.c
360
error = getsock(td, uap->sd, &rights, &fp);
sys/netinet/sctp_syscalls.c
378
so = (struct socket *)fp->f_data;
sys/netinet/sctp_syscalls.c
437
if (fp != NULL)
sys/netinet/sctp_syscalls.c
438
fdrop(fp, td);
sys/netinet/sctp_syscalls.c
452
struct file *fp = NULL;
sys/netinet/sctp_syscalls.c
463
&fp);
sys/netinet/sctp_syscalls.c
476
so = fp->f_data;
sys/netinet/sctp_syscalls.c
572
if (fp != NULL)
sys/netinet/sctp_syscalls.c
573
fdrop(fp, td);
sys/netlink/netlink_message_parser.h
119
const struct nlfield_parser *fp; /* array of header field parsers */
sys/netlink/netlink_message_parser.h
128
.fp = &((_fp)[0]), \
sys/netlink/netlink_message_parser.h
146
.fp = &((_fp)[0]), \
sys/netlink/netlink_message_parser.h
262
const struct nlfield_parser *fp = &parser->fp[i];
sys/netlink/netlink_message_parser.h
263
void *src = (char *)hdr + fp->off_in;
sys/netlink/netlink_message_parser.h
264
void *dst = (char *)target + fp->off_out;
sys/netlink/netlink_message_parser.h
266
error = fp->cb(src, npt, dst);
sys/netlink/netlink_snl.h
158
const struct snl_field_parser *fp; /* array of header field parsers */
sys/netlink/netlink_snl.h
167
.fp = &((_fp)[0]), \
sys/netlink/netlink_snl.h
181
.fp = &((_fp)[0]), \
sys/netlink/netlink_snl.h
492
const struct snl_field_parser *fp = &ps[i];
sys/netlink/netlink_snl.h
493
void *src = (char *)hdr + fp->off_in;
sys/netlink/netlink_snl.h
494
void *dst = (char *)target + fp->off_out;
sys/netlink/netlink_snl.h
496
fp->cb(ss, src, dst);
sys/netlink/netlink_snl.h
508
parser->fp, parser->fp_size, target);
sys/netlink/netlink_snl.h
987
snl_parse_fields(ss, (struct nlmsghdr *)errmsg, hdrlen, ps->fp, ps->fp_size, e);
sys/netpfil/ipfilter/netinet/fil.c
3638
frentry_t *fp;
sys/netpfil/ipfilter/netinet/fil.c
3640
while ((fp = *listp) != NULL) {
sys/netpfil/ipfilter/netinet/fil.c
3641
if ((fp->fr_type & FR_T_BUILTIN) ||
sys/netpfil/ipfilter/netinet/fil.c
3642
!(fp->fr_flags & FR_COPIED)) {
sys/netpfil/ipfilter/netinet/fil.c
3643
listp = &fp->fr_next;
sys/netpfil/ipfilter/netinet/fil.c
3646
*listp = fp->fr_next;
sys/netpfil/ipfilter/netinet/fil.c
3647
if (fp->fr_next != NULL)
sys/netpfil/ipfilter/netinet/fil.c
3648
fp->fr_next->fr_pnext = fp->fr_pnext;
sys/netpfil/ipfilter/netinet/fil.c
3649
fp->fr_pnext = NULL;
sys/netpfil/ipfilter/netinet/fil.c
3651
if (fp->fr_grphead != NULL) {
sys/netpfil/ipfilter/netinet/fil.c
3652
freed += ipf_group_flush(softc, fp->fr_grphead);
sys/netpfil/ipfilter/netinet/fil.c
3653
fp->fr_names[fp->fr_grhead] = '\0';
sys/netpfil/ipfilter/netinet/fil.c
3656
if (fp->fr_icmpgrp != NULL) {
sys/netpfil/ipfilter/netinet/fil.c
3657
freed += ipf_group_flush(softc, fp->fr_icmpgrp);
sys/netpfil/ipfilter/netinet/fil.c
3658
fp->fr_names[fp->fr_icmphead] = '\0';
sys/netpfil/ipfilter/netinet/fil.c
3661
if (fp->fr_srctrack.ht_max_nodes)
sys/netpfil/ipfilter/netinet/fil.c
3662
ipf_rb_ht_flush(&fp->fr_srctrack);
sys/netpfil/ipfilter/netinet/fil.c
3664
fp->fr_next = NULL;
sys/netpfil/ipfilter/netinet/fil.c
3666
ASSERT(fp->fr_ref > 0);
sys/netpfil/ipfilter/netinet/fil.c
3667
if (ipf_derefrule(softc, &fp) == 0)
sys/netpfil/ipfilter/netinet/fil.c
3813
frentry_t *fp;
sys/netpfil/ipfilter/netinet/fil.c
3816
for (fp = *listp; (fp != NULL) && (fp != rp); fp = fp->fr_next)
sys/netpfil/ipfilter/netinet/fil.c
3819
if (fp == NULL)
sys/netpfil/ipfilter/netinet/fil.c
3822
for (rn = 0, fp = *listp; fp && (fp != rp); fp = fp->fr_next, rn++)
sys/netpfil/ipfilter/netinet/fil.c
3823
if (FR_ISSKIP(fp->fr_flags) && (rn + fp->fr_arg >= rules))
sys/netpfil/ipfilter/netinet/fil.c
3824
fp->fr_arg += addremove;
sys/netpfil/ipfilter/netinet/fil.c
4431
frentry_t frd, *fp, *f, **fprev, **ftail;
sys/netpfil/ipfilter/netinet/fil.c
4439
fp = &frd;
sys/netpfil/ipfilter/netinet/fil.c
4441
bzero(fp, sizeof(frd));
sys/netpfil/ipfilter/netinet/fil.c
4442
error = ipf_inobj(softc, data, NULL, fp, IPFOBJ_FRENTRY);
sys/netpfil/ipfilter/netinet/fil.c
4446
if ((fp->fr_type & FR_T_BUILTIN) != 0) {
sys/netpfil/ipfilter/netinet/fil.c
4450
if (fp->fr_size < sizeof(frd)) {
sys/netpfil/ipfilter/netinet/fil.c
4453
if (sizeof(frd) + fp->fr_namelen != fp->fr_size ) {
sys/netpfil/ipfilter/netinet/fil.c
4457
if (fp->fr_namelen < 0 || fp->fr_namelen > softc->ipf_max_namelen) {
sys/netpfil/ipfilter/netinet/fil.c
4461
KMALLOCS(f, frentry_t *, fp->fr_size);
sys/netpfil/ipfilter/netinet/fil.c
4466
bzero(f, fp->fr_size);
sys/netpfil/ipfilter/netinet/fil.c
4468
fp->fr_size);
sys/netpfil/ipfilter/netinet/fil.c
4470
KFREES(f, fp->fr_size);
sys/netpfil/ipfilter/netinet/fil.c
4474
fp = f;
sys/netpfil/ipfilter/netinet/fil.c
4476
fp->fr_next = NULL;
sys/netpfil/ipfilter/netinet/fil.c
4477
fp->fr_dnext = NULL;
sys/netpfil/ipfilter/netinet/fil.c
4478
fp->fr_pnext = NULL;
sys/netpfil/ipfilter/netinet/fil.c
4479
fp->fr_pdnext = NULL;
sys/netpfil/ipfilter/netinet/fil.c
4480
fp->fr_grp = NULL;
sys/netpfil/ipfilter/netinet/fil.c
4481
fp->fr_grphead = NULL;
sys/netpfil/ipfilter/netinet/fil.c
4482
fp->fr_icmpgrp = NULL;
sys/netpfil/ipfilter/netinet/fil.c
4483
fp->fr_isc = (void *)-1;
sys/netpfil/ipfilter/netinet/fil.c
4484
fp->fr_ptr = NULL;
sys/netpfil/ipfilter/netinet/fil.c
4485
fp->fr_ref = 0;
sys/netpfil/ipfilter/netinet/fil.c
4486
fp->fr_flags |= FR_COPIED;
sys/netpfil/ipfilter/netinet/fil.c
4489
if ((interr = ipf_check_names_string(fp->fr_names, fp->fr_namelen, fp->fr_ifnames[i])) != 0) {
sys/netpfil/ipfilter/netinet/fil.c
4495
if ((interr = ipf_check_names_string(fp->fr_names, fp->fr_namelen, fp->fr_comment)) != 0) {
sys/netpfil/ipfilter/netinet/fil.c
4500
if ((interr = ipf_check_names_string(fp->fr_names, fp->fr_namelen, fp->fr_group)) != 0) {
sys/netpfil/ipfilter/netinet/fil.c
4505
if ((interr = ipf_check_names_string(fp->fr_names, fp->fr_namelen, fp->fr_grhead)) != 0) {
sys/netpfil/ipfilter/netinet/fil.c
4510
if ((interr = ipf_check_names_string(fp->fr_names, fp->fr_namelen, fp->fr_tif.fd_name)) != 0) {
sys/netpfil/ipfilter/netinet/fil.c
4515
if ((interr = ipf_check_names_string(fp->fr_names, fp->fr_namelen, fp->fr_rif.fd_name)) != 0) {
sys/netpfil/ipfilter/netinet/fil.c
4520
if ((interr = ipf_check_names_string(fp->fr_names, fp->fr_namelen, fp->fr_dif.fd_name)) != 0) {
sys/netpfil/ipfilter/netinet/fil.c
4526
fp = (frentry_t *)data;
sys/netpfil/ipfilter/netinet/fil.c
4527
if ((fp->fr_type & FR_T_BUILTIN) == 0) {
sys/netpfil/ipfilter/netinet/fil.c
4531
fp->fr_flags &= ~FR_COPIED;
sys/netpfil/ipfilter/netinet/fil.c
4534
if (((fp->fr_dsize == 0) && (fp->fr_data != NULL)) ||
sys/netpfil/ipfilter/netinet/fil.c
4535
((fp->fr_dsize != 0) && (fp->fr_data == NULL))) {
sys/netpfil/ipfilter/netinet/fil.c
4541
family = fp->fr_family;
sys/netpfil/ipfilter/netinet/fil.c
4542
uptr = fp->fr_data;
sys/netpfil/ipfilter/netinet/fil.c
4577
if ((makecopy == 1) && (fp->fr_func != NULL)) {
sys/netpfil/ipfilter/netinet/fil.c
4578
if (ipf_findfunc(fp->fr_func) == NULL) {
sys/netpfil/ipfilter/netinet/fil.c
4585
error = ipf_funcinit(softc, fp);
sys/netpfil/ipfilter/netinet/fil.c
4590
if ((fp->fr_flags & FR_CALLNOW) &&
sys/netpfil/ipfilter/netinet/fil.c
4591
((fp->fr_func == NULL) || (fp->fr_func == (ipfunc_t)-1))) {
sys/netpfil/ipfilter/netinet/fil.c
4596
if (((fp->fr_flags & FR_CMDMASK) == FR_CALL) &&
sys/netpfil/ipfilter/netinet/fil.c
4597
((fp->fr_func == NULL) || (fp->fr_func == (ipfunc_t)-1))) {
sys/netpfil/ipfilter/netinet/fil.c
4605
if (FR_ISACCOUNT(fp->fr_flags))
sys/netpfil/ipfilter/netinet/fil.c
4612
if (fp->fr_icmphead != -1) {
sys/netpfil/ipfilter/netinet/fil.c
4613
if ((fp->fr_icmphead < 0) ||
sys/netpfil/ipfilter/netinet/fil.c
4614
(fp->fr_icmphead >= fp->fr_namelen)) {
sys/netpfil/ipfilter/netinet/fil.c
4619
if (!strcmp(FR_NAME(fp, fr_icmphead), "0"))
sys/netpfil/ipfilter/netinet/fil.c
4620
fp->fr_names[fp->fr_icmphead] = '\0';
sys/netpfil/ipfilter/netinet/fil.c
4623
if (fp->fr_grhead != -1) {
sys/netpfil/ipfilter/netinet/fil.c
4624
if ((fp->fr_grhead < 0) ||
sys/netpfil/ipfilter/netinet/fil.c
4625
(fp->fr_grhead >= fp->fr_namelen)) {
sys/netpfil/ipfilter/netinet/fil.c
4630
if (!strcmp(FR_NAME(fp, fr_grhead), "0"))
sys/netpfil/ipfilter/netinet/fil.c
4631
fp->fr_names[fp->fr_grhead] = '\0';
sys/netpfil/ipfilter/netinet/fil.c
4634
if (fp->fr_group != -1) {
sys/netpfil/ipfilter/netinet/fil.c
4635
if ((fp->fr_group < 0) ||
sys/netpfil/ipfilter/netinet/fil.c
4636
(fp->fr_group >= fp->fr_namelen)) {
sys/netpfil/ipfilter/netinet/fil.c
4641
if ((req != (int)SIOCZRLST) && (fp->fr_group != -1)) {
sys/netpfil/ipfilter/netinet/fil.c
4646
group = FR_NAME(fp, fr_group);
sys/netpfil/ipfilter/netinet/fil.c
4649
fp->fr_flags, unit, set);
sys/netpfil/ipfilter/netinet/fil.c
4650
fp->fr_grp = fg;
sys/netpfil/ipfilter/netinet/fil.c
4662
fg->fg_flags = fp->fr_flags & FR_INOUT;
sys/netpfil/ipfilter/netinet/fil.c
4663
} else if (fg->fg_flags != (fp->fr_flags & FR_INOUT)) {
sys/netpfil/ipfilter/netinet/fil.c
4675
if ((fp->fr_flags & (FR_INQUE|FR_OUTQUE)) == 0) {
sys/netpfil/ipfilter/netinet/fil.c
4681
in = (fp->fr_flags & FR_INQUE) ? 0 : 1;
sys/netpfil/ipfilter/netinet/fil.c
4689
if ((fp->fr_tifs[0].fd_ptr != NULL) ||
sys/netpfil/ipfilter/netinet/fil.c
4690
(fp->fr_tifs[1].fd_ptr != NULL) ||
sys/netpfil/ipfilter/netinet/fil.c
4691
(fp->fr_dif.fd_ptr != NULL) ||
sys/netpfil/ipfilter/netinet/fil.c
4692
(fp->fr_flags & FR_FASTROUTE)) {
sys/netpfil/ipfilter/netinet/fil.c
4699
if (FR_ISACCOUNT(fp->fr_flags))
sys/netpfil/ipfilter/netinet/fil.c
4701
else if ((fp->fr_flags & (FR_OUTQUE|FR_INQUE)) != 0)
sys/netpfil/ipfilter/netinet/fil.c
4716
if (fp->fr_dsize != 0) {
sys/netpfil/ipfilter/netinet/fil.c
4718
KMALLOCS(ptr, void *, fp->fr_dsize);
sys/netpfil/ipfilter/netinet/fil.c
4729
if (uptr >= (void *)fp &&
sys/netpfil/ipfilter/netinet/fil.c
4730
uptr < (void *)((char *)fp + fp->fr_size)) {
sys/netpfil/ipfilter/netinet/fil.c
4731
bcopy(uptr, ptr, fp->fr_dsize);
sys/netpfil/ipfilter/netinet/fil.c
4734
error = COPYIN(uptr, ptr, fp->fr_dsize);
sys/netpfil/ipfilter/netinet/fil.c
4744
fp->fr_data = ptr;
sys/netpfil/ipfilter/netinet/fil.c
4746
fp->fr_data = NULL;
sys/netpfil/ipfilter/netinet/fil.c
4754
switch (fp->fr_type & ~FR_T_BUILTIN)
sys/netpfil/ipfilter/netinet/fil.c
4758
if (fp->fr_dsize == 0) {
sys/netpfil/ipfilter/netinet/fil.c
4763
if (!bpf_validate(ptr, fp->fr_dsize/sizeof(struct bpf_insn))) {
sys/netpfil/ipfilter/netinet/fil.c
4774
if (fp->fr_datype == FRI_LOOKUP)
sys/netpfil/ipfilter/netinet/fil.c
4775
fp->fr_dstptr = NULL;
sys/netpfil/ipfilter/netinet/fil.c
4776
if (fp->fr_satype == FRI_LOOKUP)
sys/netpfil/ipfilter/netinet/fil.c
4777
fp->fr_srcptr = NULL;
sys/netpfil/ipfilter/netinet/fil.c
4779
if (fp->fr_dsize != sizeof(fripf_t)) {
sys/netpfil/ipfilter/netinet/fil.c
4790
if ((fp->fr_flags & FR_KEEPSTATE) && (fp->fr_flx & FI_OOW)) {
sys/netpfil/ipfilter/netinet/fil.c
4796
switch (fp->fr_satype)
sys/netpfil/ipfilter/netinet/fil.c
4803
if (fp->fr_sifpidx < 0) {
sys/netpfil/ipfilter/netinet/fil.c
4809
fp->fr_srcptr = ipf_findlookup(softc, unit, fp,
sys/netpfil/ipfilter/netinet/fil.c
4810
&fp->fr_src6,
sys/netpfil/ipfilter/netinet/fil.c
4811
&fp->fr_smsk6);
sys/netpfil/ipfilter/netinet/fil.c
4812
if (fp->fr_srcfunc == NULL) {
sys/netpfil/ipfilter/netinet/fil.c
4828
switch (fp->fr_datype)
sys/netpfil/ipfilter/netinet/fil.c
4835
if (fp->fr_difpidx < 0) {
sys/netpfil/ipfilter/netinet/fil.c
4841
fp->fr_dstptr = ipf_findlookup(softc, unit, fp,
sys/netpfil/ipfilter/netinet/fil.c
4842
&fp->fr_dst6,
sys/netpfil/ipfilter/netinet/fil.c
4843
&fp->fr_dmsk6);
sys/netpfil/ipfilter/netinet/fil.c
4844
if (fp->fr_dstfunc == NULL) {
sys/netpfil/ipfilter/netinet/fil.c
4863
if (ipf_matcharray_verify(fp->fr_data, fp->fr_dsize) == -1) {
sys/netpfil/ipfilter/netinet/fil.c
4877
if (fp->fr_tif.fd_name != -1) {
sys/netpfil/ipfilter/netinet/fil.c
4878
if ((fp->fr_tif.fd_name < 0) ||
sys/netpfil/ipfilter/netinet/fil.c
4879
(fp->fr_tif.fd_name >= fp->fr_namelen)) {
sys/netpfil/ipfilter/netinet/fil.c
4886
if (fp->fr_dif.fd_name != -1) {
sys/netpfil/ipfilter/netinet/fil.c
4887
if ((fp->fr_dif.fd_name < 0) ||
sys/netpfil/ipfilter/netinet/fil.c
4888
(fp->fr_dif.fd_name >= fp->fr_namelen)) {
sys/netpfil/ipfilter/netinet/fil.c
4895
if (fp->fr_rif.fd_name != -1) {
sys/netpfil/ipfilter/netinet/fil.c
4896
if ((fp->fr_rif.fd_name < 0) ||
sys/netpfil/ipfilter/netinet/fil.c
4897
(fp->fr_rif.fd_name >= fp->fr_namelen)) {
sys/netpfil/ipfilter/netinet/fil.c
4907
error = ipf_synclist(softc, fp, NULL);
sys/netpfil/ipfilter/netinet/fil.c
4910
fp->fr_statecnt = 0;
sys/netpfil/ipfilter/netinet/fil.c
4911
if (fp->fr_srctrack.ht_max_nodes != 0)
sys/netpfil/ipfilter/netinet/fil.c
4912
ipf_rb_ht_init(&fp->fr_srctrack);
sys/netpfil/ipfilter/netinet/fil.c
4921
pp = (u_int *)(fp->fr_caddr + fp->fr_dsize);
sys/netpfil/ipfilter/netinet/fil.c
4922
for (fp->fr_cksum = 0, p = (u_int *)fp->fr_data; p < pp; p++)
sys/netpfil/ipfilter/netinet/fil.c
4923
fp->fr_cksum += *p;
sys/netpfil/ipfilter/netinet/fil.c
4933
if (fp->fr_collect <= f->fr_collect) {
sys/netpfil/ipfilter/netinet/fil.c
4942
if (ipf_rule_compare(fp, f) == 0)
sys/netpfil/ipfilter/netinet/fil.c
4962
bcopy((char *)f, (char *)fp, f->fr_size);
sys/netpfil/ipfilter/netinet/fil.c
4969
fp->fr_data = uptr;
sys/netpfil/ipfilter/netinet/fil.c
4970
error = ipf_outobj(softc, data, fp, IPFOBJ_FRENTRY);
sys/netpfil/ipfilter/netinet/fil.c
4989
KFREES(ptr, fp->fr_dsize);
sys/netpfil/ipfilter/netinet/fil.c
4991
KFREES(fp, fp->fr_size);
sys/netpfil/ipfilter/netinet/fil.c
5009
if (f->fr_collect > fp->fr_collect)
sys/netpfil/ipfilter/netinet/fil.c
5020
if (f->fr_collect >= fp->fr_collect)
sys/netpfil/ipfilter/netinet/fil.c
5025
if (fp->fr_hits != 0) {
sys/netpfil/ipfilter/netinet/fil.c
5026
while (fp->fr_hits && (f = *ftail)) {
sys/netpfil/ipfilter/netinet/fil.c
5027
if (f->fr_collect != fp->fr_collect)
sys/netpfil/ipfilter/netinet/fil.c
5031
fp->fr_hits--;
sys/netpfil/ipfilter/netinet/fil.c
5091
error = ipf_auth_precmd(softc, req, fp, ftail);
sys/netpfil/ipfilter/netinet/fil.c
5095
MUTEX_NUKE(&fp->fr_lock);
sys/netpfil/ipfilter/netinet/fil.c
5096
MUTEX_INIT(&fp->fr_lock, "filter rule lock");
sys/netpfil/ipfilter/netinet/fil.c
5097
if (fp->fr_die != 0)
sys/netpfil/ipfilter/netinet/fil.c
5098
ipf_rule_expire_insert(softc, fp, set);
sys/netpfil/ipfilter/netinet/fil.c
5100
fp->fr_hits = 0;
sys/netpfil/ipfilter/netinet/fil.c
5102
fp->fr_ref = 1;
sys/netpfil/ipfilter/netinet/fil.c
5103
fp->fr_pnext = ftail;
sys/netpfil/ipfilter/netinet/fil.c
5104
fp->fr_next = *ftail;
sys/netpfil/ipfilter/netinet/fil.c
5105
if (fp->fr_next != NULL)
sys/netpfil/ipfilter/netinet/fil.c
5106
fp->fr_next->fr_pnext = &fp->fr_next;
sys/netpfil/ipfilter/netinet/fil.c
5107
*ftail = fp;
sys/netpfil/ipfilter/netinet/fil.c
5108
ipf_fixskip(ftail, fp, 1);
sys/netpfil/ipfilter/netinet/fil.c
5110
fp->fr_icmpgrp = NULL;
sys/netpfil/ipfilter/netinet/fil.c
5111
if (fp->fr_icmphead != -1) {
sys/netpfil/ipfilter/netinet/fil.c
5112
group = FR_NAME(fp, fr_icmphead);
sys/netpfil/ipfilter/netinet/fil.c
5113
fg = ipf_group_add(softc, group, fp, 0, unit, set);
sys/netpfil/ipfilter/netinet/fil.c
5114
fp->fr_icmpgrp = fg;
sys/netpfil/ipfilter/netinet/fil.c
5117
fp->fr_grphead = NULL;
sys/netpfil/ipfilter/netinet/fil.c
5118
if (fp->fr_grhead != -1) {
sys/netpfil/ipfilter/netinet/fil.c
5119
group = FR_NAME(fp, fr_grhead);
sys/netpfil/ipfilter/netinet/fil.c
5120
fg = ipf_group_add(softc, group, fp, fp->fr_flags,
sys/netpfil/ipfilter/netinet/fil.c
5122
fp->fr_grphead = fg;
sys/netpfil/ipfilter/netinet/fil.c
5129
if ((fp->fr_type & ~FR_T_BUILTIN) == FR_T_IPF) {
sys/netpfil/ipfilter/netinet/fil.c
5130
if ((fp->fr_satype == FRI_LOOKUP) &&
sys/netpfil/ipfilter/netinet/fil.c
5131
(fp->fr_srcptr != NULL))
sys/netpfil/ipfilter/netinet/fil.c
5132
ipf_lookup_deref(softc, fp->fr_srctype,
sys/netpfil/ipfilter/netinet/fil.c
5133
fp->fr_srcptr);
sys/netpfil/ipfilter/netinet/fil.c
5134
if ((fp->fr_datype == FRI_LOOKUP) &&
sys/netpfil/ipfilter/netinet/fil.c
5135
(fp->fr_dstptr != NULL))
sys/netpfil/ipfilter/netinet/fil.c
5136
ipf_lookup_deref(softc, fp->fr_dsttype,
sys/netpfil/ipfilter/netinet/fil.c
5137
fp->fr_dstptr);
sys/netpfil/ipfilter/netinet/fil.c
5139
if (fp->fr_grp != NULL) {
sys/netpfil/ipfilter/netinet/fil.c
5141
ipf_group_del(softc, fp->fr_grp, fp);
sys/netpfil/ipfilter/netinet/fil.c
5145
KFREES(ptr, fp->fr_dsize);
sys/netpfil/ipfilter/netinet/fil.c
5147
KFREES(fp, fp->fr_size);
sys/netpfil/ipfilter/netinet/ip_frag.c
1031
ipfr_t **fp, *fra;
sys/netpfil/ipfilter/netinet/ip_frag.c
1044
for (fp = &softf->ipfr_list; ((fra = *fp) != NULL); ) {
sys/netpfil/ipfilter/netinet/ip_frag.c
1053
for (fp = &softf->ipfr_ipidlist; ((fra = *fp) != NULL); ) {
sys/netpfil/ipfilter/netinet/ip_frag.c
1074
for (fp = &softf->ipfr_natlist; ((fra = *fp) != NULL); ) {
sys/netpfil/ipfilter/netinet/ip_frag.c
705
ipfr_t **fp;
sys/netpfil/ipfilter/netinet/ip_frag.c
711
fp = f->ipfr_hprev;
sys/netpfil/ipfilter/netinet/ip_frag.c
712
(*fp) = f->ipfr_hnext;
sys/netpfil/ipfilter/netinet/ip_frag.c
714
f->ipfr_hnext->ipfr_hprev = fp;
sys/netpfil/ipfilter/netinet/ip_pool.c
1068
ipf_pool_flush(ipf_main_softc_t *softc, void *arg, iplookupflush_t *fp)
sys/netpfil/ipfilter/netinet/ip_pool.c
1074
unit = fp->iplf_unit;
sys/netpfil/ipfilter/netinet/ip_rules.c
109
frentry_t *fp;
sys/netpfil/ipfilter/netinet/ip_rules.c
113
fp = ipf_rules_out_[i];
sys/netpfil/ipfilter/netinet/ip_rules.c
114
fp->fr_next = NULL;
sys/netpfil/ipfilter/netinet/ip_rules.c
116
if (strncmp(fp->fr_names + fp->fr_group,
sys/netpfil/ipfilter/netinet/ip_rules.c
122
&fp->fr_next;
sys/netpfil/ipfilter/netinet/ip_rules.c
123
fp->fr_pnext = &ipf_rules_out_[j];
sys/netpfil/ipfilter/netinet/ip_rules.c
124
fp->fr_next = ipf_rules_out_[j];
sys/netpfil/ipfilter/netinet/ip_rules.c
129
fp = &ipfrule_out_;
sys/netpfil/ipfilter/netinet/ip_rules.c
130
bzero((char *)fp, sizeof(*fp));
sys/netpfil/ipfilter/netinet/ip_rules.c
131
fp->fr_type = FR_T_CALLFUNC_BUILTIN;
sys/netpfil/ipfilter/netinet/ip_rules.c
132
fp->fr_flags = FR_OUTQUE|FR_NOMATCH;
sys/netpfil/ipfilter/netinet/ip_rules.c
133
fp->fr_data = (void *)ipf_rules_out_[0];
sys/netpfil/ipfilter/netinet/ip_rules.c
134
fp->fr_dsize = sizeof(ipf_rules_out_[0]);
sys/netpfil/ipfilter/netinet/ip_rules.c
135
fp->fr_family = AF_INET;
sys/netpfil/ipfilter/netinet/ip_rules.c
136
fp->fr_func = (ipfunc_t)ipfrule_match_out_;
sys/netpfil/ipfilter/netinet/ip_rules.c
137
err = frrequest(&V_ipfmain, IPL_LOGIPF, SIOCADDFR, (caddr_t)fp,
sys/netpfil/ipfilter/netinet/ip_rules.c
146
frentry_t *fp;
sys/netpfil/ipfilter/netinet/ip_rules.c
156
fp = ipf_rules_out_[i];
sys/netpfil/ipfilter/netinet/ip_rules.c
157
if (fp->fr_ref > 1) {
sys/netpfil/ipfilter/netinet/ip_rules.c
178
frentry_t *fp;
sys/netpfil/ipfilter/netinet/ip_rules.c
182
fp = ipf_rules_in_[i];
sys/netpfil/ipfilter/netinet/ip_rules.c
183
fp->fr_next = NULL;
sys/netpfil/ipfilter/netinet/ip_rules.c
185
if (strncmp(fp->fr_names + fp->fr_group,
sys/netpfil/ipfilter/netinet/ip_rules.c
191
&fp->fr_next;
sys/netpfil/ipfilter/netinet/ip_rules.c
192
fp->fr_pnext = &ipf_rules_in_[j];
sys/netpfil/ipfilter/netinet/ip_rules.c
193
fp->fr_next = ipf_rules_in_[j];
sys/netpfil/ipfilter/netinet/ip_rules.c
198
fp = &ipfrule_in_;
sys/netpfil/ipfilter/netinet/ip_rules.c
199
bzero((char *)fp, sizeof(*fp));
sys/netpfil/ipfilter/netinet/ip_rules.c
200
fp->fr_type = FR_T_CALLFUNC_BUILTIN;
sys/netpfil/ipfilter/netinet/ip_rules.c
201
fp->fr_flags = FR_INQUE|FR_NOMATCH;
sys/netpfil/ipfilter/netinet/ip_rules.c
202
fp->fr_data = (void *)ipf_rules_in_[0];
sys/netpfil/ipfilter/netinet/ip_rules.c
203
fp->fr_dsize = sizeof(ipf_rules_in_[0]);
sys/netpfil/ipfilter/netinet/ip_rules.c
204
fp->fr_family = AF_INET;
sys/netpfil/ipfilter/netinet/ip_rules.c
205
fp->fr_func = (ipfunc_t)ipfrule_match_in_;
sys/netpfil/ipfilter/netinet/ip_rules.c
206
err = frrequest(&V_ipfmain, IPL_LOGIPF, SIOCADDFR, (caddr_t)fp,
sys/netpfil/ipfilter/netinet/ip_rules.c
215
frentry_t *fp;
sys/netpfil/ipfilter/netinet/ip_rules.c
225
fp = ipf_rules_in_[i];
sys/netpfil/ipfilter/netinet/ip_rules.c
226
if (fp->fr_ref > 1) {
sys/netpfil/ipfilter/netinet/radix_ipf.c
1144
FILE *fp;
sys/netpfil/ipfilter/netinet/radix_ipf.c
1147
fp = fopen("hosts", "r");
sys/netpfil/ipfilter/netinet/radix_ipf.c
1149
while (fgets(line, sizeof(line), fp) != NULL) {
sys/netpfil/ipfilter/netinet/radix_ipf.c
1164
fclose(fp);
sys/netpfil/ipfw/ip_dn_io.c
641
while (si->credit >= 0 && (m = s->fp->dequeue(si)) != NULL) {
sys/netpfil/ipfw/ip_dn_io.c
944
if (fs->sched->fp->flags & DN_MULTIQUEUE) {
sys/netpfil/ipfw/ip_dn_io.c
949
if (fs->sched->fp->enqueue(si, q, m)) {
sys/netpfil/ipfw/ip_dn_private.h
278
struct dn_alg *fp; /* Pointer to scheduler functions */
sys/netpfil/ipfw/ip_dummynet.c
1304
if (s->fp->new_fsk)
sys/netpfil/ipfw/ip_dummynet.c
1305
s->fp->new_fsk(fs);
sys/netpfil/ipfw/ip_dummynet.c
1447
if (schk->fp && schk->fp->getconfig) {
sys/netpfil/ipfw/ip_dummynet.c
1448
if(schk->fp->getconfig(schk, ep)) {
sys/netpfil/ipfw/ip_dummynet.c
1774
a.fp = find_sched_type(a.sch->oid.subtype, a.sch->name);
sys/netpfil/ipfw/ip_dummynet.c
1775
if (a.fp != NULL) {
sys/netpfil/ipfw/ip_dummynet.c
1782
a.fp = s->fp;
sys/netpfil/ipfw/ip_dummynet.c
1808
a.sch->oid.subtype = a.fp->type;
sys/netpfil/ipfw/ip_dummynet.c
1810
strlcpy(a.sch->name, a.fp->name, sizeof(a.sch->name));
sys/netpfil/ipfw/ip_dummynet.c
1831
if (s->fp == NULL) {
sys/netpfil/ipfw/ip_dummynet.c
1832
DX(2, "sched %d new type %s", i, a.fp->name);
sys/netpfil/ipfw/ip_dummynet.c
1833
} else if (s->fp != a.fp ||
sys/netpfil/ipfw/ip_dummynet.c
1837
i, s->fp->name, a.fp->name);
sys/netpfil/ipfw/ip_dummynet.c
1859
DX(4, "sched %d unchanged type %s", i, a.fp->name);
sys/netpfil/ipfw/ip_dummynet.c
1863
s->fp = a.fp;
sys/netpfil/ipfw/ip_dummynet.c
1869
if (!(s->fp->flags & DN_MULTIQUEUE) && !s->fs) {
sys/netpfil/ipfw/ip_dummynet.c
1886
if (s->fp->config)
sys/netpfil/ipfw/ip_dummynet.c
1887
s->fp->config(s);
sys/netpfil/ipfw/ip_dummynet.c
2369
if (si->sched->fp->flags & DN_MULTIQUEUE) {
sys/netpfil/ipfw/ip_dummynet.c
357
int size = sizeof(*q) + fs->sched->fp->q_datalen;
sys/netpfil/ipfw/ip_dummynet.c
372
if (fs->sched->fp->new_queue)
sys/netpfil/ipfw/ip_dummynet.c
373
fs->sched->fp->new_queue(q);
sys/netpfil/ipfw/ip_dummynet.c
405
if (fs && fs->sched->fp->free_queue)
sys/netpfil/ipfw/ip_dummynet.c
406
fs->sched->fp->free_queue(q);
sys/netpfil/ipfw/ip_dummynet.c
521
int l = sizeof(*si) + s->fp->si_datalen;
sys/netpfil/ipfw/ip_dummynet.c
537
if (s->fp->new_sched && s->fp->new_sched(si)) {
sys/netpfil/ipfw/ip_dummynet.c
546
if (!(s->fp->flags & DN_MULTIQUEUE))
sys/netpfil/ipfw/ip_dummynet.c
590
if (!(s->fp->flags & DN_MULTIQUEUE)) {
sys/netpfil/ipfw/ip_dummynet.c
597
if (s->fp->free_sched)
sys/netpfil/ipfw/ip_dummynet.c
598
s->fp->free_sched(si);
sys/netpfil/ipfw/ip_dummynet.c
694
if (!(si->sched->fp->flags & DN_MULTIQUEUE)) {
sys/netpfil/ipfw/ip_dummynet.c
720
if (fs->sched && !(fs->sched->fp->flags & DN_MULTIQUEUE)) {
sys/netpfil/ipfw/ip_dummynet.c
733
if (fs->sched && fs->sched->fp->flags & DN_MULTIQUEUE && fs->qht) {
sys/netpfil/ipfw/ip_dummynet.c
777
if (fs->sched && fs->sched->fp->free_fsk)
sys/netpfil/ipfw/ip_dummynet.c
778
fs->sched->fp->free_fsk(fs);
sys/netpfil/ipfw/ip_dummynet.c
84
struct dn_alg *fp;
sys/netpfil/ipfw/ip_dummynet.c
870
int l = sizeof(*s) +a->fp->schk_datalen;
sys/netpfil/ipfw/ip_dummynet.c
880
s->fp = a->fp; /* si_new needs this */
sys/netpfil/ipfw/ip_dummynet.c
891
s->fp = NULL; /* mark as a new scheduler */
sys/netpfil/ipfw/ip_dummynet.c
926
if (s->fp->destroy)
sys/netpfil/ipfw/ip_dummynet.c
927
s->fp->destroy(s);
sys/netpfil/ipfw/ip_fw_table_algo.c
3227
uint64_t *fp, *idp;
sys/netpfil/ipfw/ip_fw_table_algo.c
3233
fp = (uint64_t *)&f.dip6;
sys/netpfil/ipfw/ip_fw_table_algo.c
3236
*fp++ &= *idp++;
sys/netpfil/ipfw/ip_fw_table_algo.c
3237
*fp++ &= *idp++;
sys/netpfil/ipfw/ip_fw_table_algo.c
3238
*fp++ &= *idp++;
sys/netpfil/ipfw/ip_fw_table_algo.c
3239
*fp &= *idp;
sys/netpfil/pf/pf_osfp.c
110
memset(&fp, 0, sizeof(fp));
sys/netpfil/pf/pf_osfp.c
113
fp.fp_psize = ntohs(ip->ip_len);
sys/netpfil/pf/pf_osfp.c
114
fp.fp_ttl = ip->ip_ttl;
sys/netpfil/pf/pf_osfp.c
116
fp.fp_flags |= PF_OSFP_DF;
sys/netpfil/pf/pf_osfp.c
122
fp.fp_psize = sizeof(struct ip6_hdr) + ntohs(ip6->ip6_plen);
sys/netpfil/pf/pf_osfp.c
123
fp.fp_ttl = ip6->ip6_hlim;
sys/netpfil/pf/pf_osfp.c
124
fp.fp_flags |= PF_OSFP_DF;
sys/netpfil/pf/pf_osfp.c
125
fp.fp_flags |= PF_OSFP_INET6;
sys/netpfil/pf/pf_osfp.c
131
fp.fp_wsize = ntohs(tcp->th_win);
sys/netpfil/pf/pf_osfp.c
139
fp.fp_optcnt++;
sys/netpfil/pf/pf_osfp.c
141
fp.fp_tcpopts = (fp.fp_tcpopts << PF_OSFP_TCPOPT_BITS) |
sys/netpfil/pf/pf_osfp.c
153
memcpy(&fp.fp_mss, &optp[2],
sys/netpfil/pf/pf_osfp.c
154
sizeof(fp.fp_mss));
sys/netpfil/pf/pf_osfp.c
155
fp.fp_tcpopts = (fp.fp_tcpopts <<
sys/netpfil/pf/pf_osfp.c
157
fp.fp_mss = ntohs(fp.fp_mss);
sys/netpfil/pf/pf_osfp.c
161
memcpy(&fp.fp_wscale, &optp[2],
sys/netpfil/pf/pf_osfp.c
162
sizeof(fp.fp_wscale));
sys/netpfil/pf/pf_osfp.c
163
fp.fp_wscale = ntohs(fp.fp_wscale);
sys/netpfil/pf/pf_osfp.c
164
fp.fp_tcpopts = (fp.fp_tcpopts <<
sys/netpfil/pf/pf_osfp.c
169
fp.fp_tcpopts = (fp.fp_tcpopts <<
sys/netpfil/pf/pf_osfp.c
177
fp.fp_flags |= PF_OSFP_TS0;
sys/netpfil/pf/pf_osfp.c
179
fp.fp_tcpopts = (fp.fp_tcpopts <<
sys/netpfil/pf/pf_osfp.c
192
fp.fp_wsize, fp.fp_ttl, (fp.fp_flags & PF_OSFP_DF) != 0,
sys/netpfil/pf/pf_osfp.c
193
fp.fp_psize, (long long int)fp.fp_tcpopts, fp.fp_optcnt,
sys/netpfil/pf/pf_osfp.c
194
(fp.fp_flags & PF_OSFP_TS0) ? "0" : "",
sys/netpfil/pf/pf_osfp.c
195
(fp.fp_flags & PF_OSFP_MSS_MOD) ? "%" :
sys/netpfil/pf/pf_osfp.c
196
(fp.fp_flags & PF_OSFP_MSS_DC) ? "*" : "",
sys/netpfil/pf/pf_osfp.c
197
fp.fp_mss,
sys/netpfil/pf/pf_osfp.c
198
(fp.fp_flags & PF_OSFP_WSCALE_MOD) ? "%" :
sys/netpfil/pf/pf_osfp.c
199
(fp.fp_flags & PF_OSFP_WSCALE_DC) ? "*" : "",
sys/netpfil/pf/pf_osfp.c
200
fp.fp_wscale);
sys/netpfil/pf/pf_osfp.c
202
if ((fpresult = pf_osfp_find(&V_pf_osfp_list, &fp,
sys/netpfil/pf/pf_osfp.c
242
struct pf_os_fingerprint *fp;
sys/netpfil/pf/pf_osfp.c
245
while ((fp = SLIST_FIRST(&V_pf_osfp_list))) {
sys/netpfil/pf/pf_osfp.c
247
while ((entry = SLIST_FIRST(&fp->fp_oses))) {
sys/netpfil/pf/pf_osfp.c
248
SLIST_REMOVE_HEAD(&fp->fp_oses, fp_entry);
sys/netpfil/pf/pf_osfp.c
251
free(fp, M_PFOSFP);
sys/netpfil/pf/pf_osfp.c
259
struct pf_os_fingerprint *fp, fpadd;
sys/netpfil/pf/pf_osfp.c
300
if ((fp = pf_osfp_find_exact(&V_pf_osfp_list, &fpadd))) {
sys/netpfil/pf/pf_osfp.c
301
SLIST_FOREACH(entry, &fp->fp_oses, fp_entry) {
sys/netpfil/pf/pf_osfp.c
309
if ((fp = malloc(sizeof(*fp), M_PFOSFP, M_ZERO | M_NOWAIT))
sys/netpfil/pf/pf_osfp.c
312
fp->fp_tcpopts = fpioc->fp_tcpopts;
sys/netpfil/pf/pf_osfp.c
313
fp->fp_wsize = fpioc->fp_wsize;
sys/netpfil/pf/pf_osfp.c
314
fp->fp_psize = fpioc->fp_psize;
sys/netpfil/pf/pf_osfp.c
315
fp->fp_mss = fpioc->fp_mss;
sys/netpfil/pf/pf_osfp.c
316
fp->fp_flags = fpioc->fp_flags;
sys/netpfil/pf/pf_osfp.c
317
fp->fp_optcnt = fpioc->fp_optcnt;
sys/netpfil/pf/pf_osfp.c
318
fp->fp_wscale = fpioc->fp_wscale;
sys/netpfil/pf/pf_osfp.c
319
fp->fp_ttl = fpioc->fp_ttl;
sys/netpfil/pf/pf_osfp.c
320
SLIST_INIT(&fp->fp_oses);
sys/netpfil/pf/pf_osfp.c
323
free(fp, M_PFOSFP);
sys/netpfil/pf/pf_osfp.c
326
pf_osfp_insert(&V_pf_osfp_list, fp);
sys/netpfil/pf/pf_osfp.c
335
SLIST_INSERT_HEAD(&fp->fp_oses, entry, fp_entry);
sys/netpfil/pf/pf_osfp.c
338
if ((fp = pf_osfp_validate()))
sys/netpfil/pf/pf_osfp.c
460
struct pf_os_fingerprint *fp;
sys/netpfil/pf/pf_osfp.c
466
SLIST_FOREACH(fp, &V_pf_osfp_list, fp_next) {
sys/netpfil/pf/pf_osfp.c
467
SLIST_FOREACH(entry, &fp->fp_oses, fp_entry) {
sys/netpfil/pf/pf_osfp.c
469
fpioc->fp_mss = fp->fp_mss;
sys/netpfil/pf/pf_osfp.c
470
fpioc->fp_wsize = fp->fp_wsize;
sys/netpfil/pf/pf_osfp.c
471
fpioc->fp_flags = fp->fp_flags;
sys/netpfil/pf/pf_osfp.c
472
fpioc->fp_psize = fp->fp_psize;
sys/netpfil/pf/pf_osfp.c
473
fpioc->fp_ttl = fp->fp_ttl;
sys/netpfil/pf/pf_osfp.c
474
fpioc->fp_wscale = fp->fp_wscale;
sys/netpfil/pf/pf_osfp.c
94
struct pf_os_fingerprint fp, *fpresult;
sys/netsmb/smb_dev.c
378
struct file *fp, *fptmp;
sys/netsmb/smb_dev.c
385
error = fget(td, fd, &cap_read_rights, &fp);
sys/netsmb/smb_dev.c
389
td->td_fpop = fp;
sys/netsmb/smb_dev.c
392
fdrop(fp, td);
sys/powerpc/fpu/fpu_emu.c
156
fpu_dumpfpn(struct fpn *fp)
sys/powerpc/fpu/fpu_emu.c
162
printf("%s %c.%x %x %x %xE%d", class[fp->fp_class + 2],
sys/powerpc/fpu/fpu_emu.c
163
fp->fp_sign ? '-' : ' ',
sys/powerpc/fpu/fpu_emu.c
164
fp->fp_mant[0], fp->fp_mant[1],
sys/powerpc/fpu/fpu_emu.c
165
fp->fp_mant[2], fp->fp_mant[3],
sys/powerpc/fpu/fpu_emu.c
166
fp->fp_exp);
sys/powerpc/fpu/fpu_emu.c
261
struct fpn *fp;
sys/powerpc/fpu/fpu_emu.c
270
fp = NULL;
sys/powerpc/fpu/fpu_emu.c
385
fpu_explode(fe, fp = &fe->fe_f1, FTYPE_DBL, rt);
sys/powerpc/fpu/fpu_emu.c
386
fpu_implode(fe, fp, type, (void *)&buf);
sys/powerpc/fpu/fpu_emu.c
406
fpu_explode(fe, fp = &fe->fe_f1, type, rt);
sys/powerpc/fpu/fpu_emu.c
407
fpu_implode(fe, fp, FTYPE_DBL,
sys/powerpc/fpu/fpu_emu.c
456
fpu_explode(fe, fp = &fe->fe_f1, FTYPE_DBL, rb);
sys/powerpc/fpu/fpu_emu.c
457
fpu_implode(fe, fp, FTYPE_SNG,
sys/powerpc/fpu/fpu_emu.c
459
fpu_explode(fe, fp = &fe->fe_f1, FTYPE_SNG, rt);
sys/powerpc/fpu/fpu_emu.c
466
fpu_explode(fe, fp = &fe->fe_f1, type, rb);
sys/powerpc/fpu/fpu_emu.c
579
fpu_explode(fe, fp = &fe->fe_f1, type, rb);
sys/powerpc/fpu/fpu_emu.c
586
fpu_explode(fe, fp = &fe->fe_f1, type, rb);
sys/powerpc/fpu/fpu_emu.c
611
fp = fpu_div(fe);
sys/powerpc/fpu/fpu_emu.c
618
fp = fpu_sub(fe);
sys/powerpc/fpu/fpu_emu.c
625
fp = fpu_add(fe);
sys/powerpc/fpu/fpu_emu.c
631
fp = fpu_sqrt(fe);
sys/powerpc/fpu/fpu_emu.c
648
fp = fpu_sqrt(fe);
sys/powerpc/fpu/fpu_emu.c
659
fp = fpu_mul(fe);
sys/powerpc/fpu/fpu_emu.c
666
fp = fpu_sqrt(fe);
sys/powerpc/fpu/fpu_emu.c
667
fe->fe_f2 = *fp;
sys/powerpc/fpu/fpu_emu.c
678
fp = fpu_mul(fe);
sys/powerpc/fpu/fpu_emu.c
679
fe->fe_f1 = *fp;
sys/powerpc/fpu/fpu_emu.c
681
fp = fpu_sub(fe);
sys/powerpc/fpu/fpu_emu.c
688
fp = fpu_mul(fe);
sys/powerpc/fpu/fpu_emu.c
689
fe->fe_f1 = *fp;
sys/powerpc/fpu/fpu_emu.c
691
fp = fpu_add(fe);
sys/powerpc/fpu/fpu_emu.c
698
fp = fpu_mul(fe);
sys/powerpc/fpu/fpu_emu.c
699
fe->fe_f1 = *fp;
sys/powerpc/fpu/fpu_emu.c
701
fp = fpu_sub(fe);
sys/powerpc/fpu/fpu_emu.c
703
fp->fp_sign ^= 1;
sys/powerpc/fpu/fpu_emu.c
710
fp = fpu_mul(fe);
sys/powerpc/fpu/fpu_emu.c
711
fe->fe_f1 = *fp;
sys/powerpc/fpu/fpu_emu.c
713
fp = fpu_add(fe);
sys/powerpc/fpu/fpu_emu.c
715
fp->fp_sign ^= 1;
sys/powerpc/fpu/fpu_emu.c
724
fpu_implode(fe, fp, FTYPE_SNG,
sys/powerpc/fpu/fpu_emu.c
726
fpu_explode(fe, fp = &fe->fe_f1, FTYPE_SNG, rt);
sys/powerpc/fpu/fpu_emu.c
739
if (fp)
sys/powerpc/fpu/fpu_emu.c
740
fpu_implode(fe, fp, type, (u_int *)&fs->fpr[rt].fpr);
sys/powerpc/fpu/fpu_emu.h
106
#define ISSNAN(fp) ((fp)->fp_class == FPC_SNAN)
sys/powerpc/fpu/fpu_emu.h
107
#define ISQNAN(fp) ((fp)->fp_class == FPC_QNAN)
sys/powerpc/fpu/fpu_emu.h
108
#define ISNAN(fp) ((fp)->fp_class < 0)
sys/powerpc/fpu/fpu_emu.h
109
#define ISZERO(fp) ((fp)->fp_class == 0)
sys/powerpc/fpu/fpu_emu.h
110
#define ISINF(fp) ((fp)->fp_class == FPC_INF)
sys/powerpc/fpu/fpu_explode.c
107
fpu_xtof(struct fpn *fp, u_int64_t i)
sys/powerpc/fpu/fpu_explode.c
118
fp->fp_exp = FP_LG2;
sys/powerpc/fpu/fpu_explode.c
119
*((int64_t*)fp->fp_mant) = (int64_t)i < 0 ? -i : i;
sys/powerpc/fpu/fpu_explode.c
120
fp->fp_mant[2] = 0;
sys/powerpc/fpu/fpu_explode.c
121
fp->fp_mant[3] = 0;
sys/powerpc/fpu/fpu_explode.c
122
fpu_norm(fp);
sys/powerpc/fpu/fpu_explode.c
136
fp->fp_exp = 1 - expbias; \
sys/powerpc/fpu/fpu_explode.c
137
fp->fp_mant[0] = f0; \
sys/powerpc/fpu/fpu_explode.c
138
fp->fp_mant[1] = f1; \
sys/powerpc/fpu/fpu_explode.c
139
fp->fp_mant[2] = f2; \
sys/powerpc/fpu/fpu_explode.c
140
fp->fp_mant[3] = f3; \
sys/powerpc/fpu/fpu_explode.c
141
fpu_norm(fp); \
sys/powerpc/fpu/fpu_explode.c
147
fp->fp_mant[0] = f0; \
sys/powerpc/fpu/fpu_explode.c
148
fp->fp_mant[1] = f1; \
sys/powerpc/fpu/fpu_explode.c
149
fp->fp_mant[2] = f2; \
sys/powerpc/fpu/fpu_explode.c
150
fp->fp_mant[3] = f3; \
sys/powerpc/fpu/fpu_explode.c
153
fp->fp_exp = exp - expbias; \
sys/powerpc/fpu/fpu_explode.c
154
fp->fp_mant[0] = FP_1 | f0; \
sys/powerpc/fpu/fpu_explode.c
155
fp->fp_mant[1] = f1; \
sys/powerpc/fpu/fpu_explode.c
156
fp->fp_mant[2] = f2; \
sys/powerpc/fpu/fpu_explode.c
157
fp->fp_mant[3] = f3; \
sys/powerpc/fpu/fpu_explode.c
166
fpu_stof(struct fpn *fp, u_int i)
sys/powerpc/fpu/fpu_explode.c
184
fpu_dtof(struct fpn *fp, u_int i, u_int j)
sys/powerpc/fpu/fpu_explode.c
206
fpu_explode(struct fpemu *fe, struct fpn *fp, int type, int reg)
sys/powerpc/fpu/fpu_explode.c
215
fp->fp_sign = s >> 31;
sys/powerpc/fpu/fpu_explode.c
216
fp->fp_sticky = 0;
sys/powerpc/fpu/fpu_explode.c
219
s = fpu_xtof(fp, l);
sys/powerpc/fpu/fpu_explode.c
223
s = fpu_itof(fp, space[1]);
sys/powerpc/fpu/fpu_explode.c
227
s = fpu_stof(fp, s);
sys/powerpc/fpu/fpu_explode.c
231
s = fpu_dtof(fp, s, space[1]);
sys/powerpc/fpu/fpu_explode.c
239
if (s == FPC_QNAN && (fp->fp_mant[0] & FP_QUIETBIT) == 0) {
sys/powerpc/fpu/fpu_explode.c
247
fp->fp_mant[0] |= FP_QUIETBIT;
sys/powerpc/fpu/fpu_explode.c
251
fp->fp_class = s;
sys/powerpc/fpu/fpu_explode.c
257
DUMPFPN(FPE_REG, fp);
sys/powerpc/fpu/fpu_explode.c
83
fpu_itof(struct fpn *fp, u_int i)
sys/powerpc/fpu/fpu_explode.c
94
fp->fp_exp = FP_LG;
sys/powerpc/fpu/fpu_explode.c
95
fp->fp_mant[0] = (int)i < 0 ? -i : i;
sys/powerpc/fpu/fpu_explode.c
96
fp->fp_mant[1] = 0;
sys/powerpc/fpu/fpu_explode.c
97
fp->fp_mant[2] = 0;
sys/powerpc/fpu/fpu_explode.c
98
fp->fp_mant[3] = 0;
sys/powerpc/fpu/fpu_explode.c
99
fpu_norm(fp);
sys/powerpc/fpu/fpu_implode.c
111
if ((gr & 1) || fp->fp_sticky || (m3 & 1))
sys/powerpc/fpu/fpu_implode.c
121
if (fp->fp_sign)
sys/powerpc/fpu/fpu_implode.c
127
if (!fp->fp_sign)
sys/powerpc/fpu/fpu_implode.c
139
fp->fp_mant[0] = m0;
sys/powerpc/fpu/fpu_implode.c
140
fp->fp_mant[1] = m1;
sys/powerpc/fpu/fpu_implode.c
141
fp->fp_mant[2] = m2;
sys/powerpc/fpu/fpu_implode.c
142
fp->fp_mant[3] = m3;
sys/powerpc/fpu/fpu_implode.c
146
fp->fp_mant[0] = m0;
sys/powerpc/fpu/fpu_implode.c
147
fp->fp_mant[1] = m1;
sys/powerpc/fpu/fpu_implode.c
148
fp->fp_mant[2] = m2;
sys/powerpc/fpu/fpu_implode.c
149
fp->fp_mant[3] = m3;
sys/powerpc/fpu/fpu_implode.c
194
fpu_ftoi(struct fpemu *fe, struct fpn *fp)
sys/powerpc/fpu/fpu_implode.c
199
sign = fp->fp_sign;
sys/powerpc/fpu/fpu_implode.c
200
switch (fp->fp_class) {
sys/powerpc/fpu/fpu_implode.c
215
if ((exp = fp->fp_exp) >= 32)
sys/powerpc/fpu/fpu_implode.c
218
if (fpu_shr(fp, FP_NMANT - 1 - exp) != 0)
sys/powerpc/fpu/fpu_implode.c
220
i = fp->fp_mant[3];
sys/powerpc/fpu/fpu_implode.c
240
fpu_ftox(struct fpemu *fe, struct fpn *fp, u_int *res)
sys/powerpc/fpu/fpu_implode.c
245
sign = fp->fp_sign;
sys/powerpc/fpu/fpu_implode.c
246
switch (fp->fp_class) {
sys/powerpc/fpu/fpu_implode.c
262
if ((exp = fp->fp_exp) >= 64)
sys/powerpc/fpu/fpu_implode.c
265
if (fpu_shr(fp, FP_NMANT - 1 - exp) != 0)
sys/powerpc/fpu/fpu_implode.c
267
i = ((u_int64_t)fp->fp_mant[2]<<32)|fp->fp_mant[3];
sys/powerpc/fpu/fpu_implode.c
285
fpu_ftos(struct fpemu *fe, struct fpn *fp)
sys/powerpc/fpu/fpu_implode.c
287
u_int sign = fp->fp_sign << 31;
sys/powerpc/fpu/fpu_implode.c
294
if (ISNAN(fp)) {
sys/powerpc/fpu/fpu_implode.c
300
(void) fpu_shr(fp, FP_NMANT - 1 - SNG_FRACBITS);
sys/powerpc/fpu/fpu_implode.c
304
if (ISINF(fp))
sys/powerpc/fpu/fpu_implode.c
306
if (ISZERO(fp))
sys/powerpc/fpu/fpu_implode.c
330
if ((exp = fp->fp_exp + SNG_EXP_BIAS) <= 0) { /* subnormal */
sys/powerpc/fpu/fpu_implode.c
332
(void) fpu_shr(fp, FP_NMANT - FP_NG - SNG_FRACBITS - exp);
sys/powerpc/fpu/fpu_implode.c
333
if (round(fe, fp) && fp->fp_mant[3] == SNG_EXP(1))
sys/powerpc/fpu/fpu_implode.c
338
return (sign | SNG_EXP(0) | fp->fp_mant[3]);
sys/powerpc/fpu/fpu_implode.c
341
(void) fpu_shr(fp, FP_NMANT - FP_NG - 1 - SNG_FRACBITS);
sys/powerpc/fpu/fpu_implode.c
343
if ((fp->fp_mant[3] & SNG_EXP(1 << FP_NG)) == 0)
sys/powerpc/fpu/fpu_implode.c
346
if (round(fe, fp) && fp->fp_mant[3] == SNG_EXP(2))
sys/powerpc/fpu/fpu_implode.c
356
return (sign | SNG_EXP(exp) | (fp->fp_mant[3] & SNG_MASK));
sys/powerpc/fpu/fpu_implode.c
366
fpu_ftod(struct fpemu *fe, struct fpn *fp, u_int *res)
sys/powerpc/fpu/fpu_implode.c
368
u_int sign = fp->fp_sign << 31;
sys/powerpc/fpu/fpu_implode.c
374
if (ISNAN(fp)) {
sys/powerpc/fpu/fpu_implode.c
375
(void) fpu_shr(fp, FP_NMANT - 1 - DBL_FRACBITS);
sys/powerpc/fpu/fpu_implode.c
379
if (ISINF(fp)) {
sys/powerpc/fpu/fpu_implode.c
383
if (ISZERO(fp)) {
sys/powerpc/fpu/fpu_implode.c
388
if ((exp = fp->fp_exp + DBL_EXP_BIAS) <= 0) {
sys/powerpc/fpu/fpu_implode.c
389
(void) fpu_shr(fp, FP_NMANT - FP_NG - DBL_FRACBITS - exp);
sys/powerpc/fpu/fpu_implode.c
390
if (round(fe, fp) && fp->fp_mant[2] == DBL_EXP(1)) {
sys/powerpc/fpu/fpu_implode.c
400
(void) fpu_shr(fp, FP_NMANT - FP_NG - 1 - DBL_FRACBITS);
sys/powerpc/fpu/fpu_implode.c
401
if (round(fe, fp) && fp->fp_mant[2] == DBL_EXP(2))
sys/powerpc/fpu/fpu_implode.c
413
res[1] = fp->fp_mant[3];
sys/powerpc/fpu/fpu_implode.c
414
return (sign | DBL_EXP(exp) | (fp->fp_mant[2] & DBL_MASK));
sys/powerpc/fpu/fpu_implode.c
421
fpu_implode(struct fpemu *fe, struct fpn *fp, int type, u_int *space)
sys/powerpc/fpu/fpu_implode.c
426
space[0] = fpu_ftox(fe, fp, space);
sys/powerpc/fpu/fpu_implode.c
433
space[1] = fpu_ftoi(fe, fp);
sys/powerpc/fpu/fpu_implode.c
439
space[0] = fpu_ftos(fe, fp);
sys/powerpc/fpu/fpu_implode.c
445
space[0] = fpu_ftod(fe, fp, space);
sys/powerpc/fpu/fpu_implode.c
76
round(struct fpemu *fe, struct fpn *fp)
sys/powerpc/fpu/fpu_implode.c
82
m0 = fp->fp_mant[0];
sys/powerpc/fpu/fpu_implode.c
83
m1 = fp->fp_mant[1];
sys/powerpc/fpu/fpu_implode.c
84
m2 = fp->fp_mant[2];
sys/powerpc/fpu/fpu_implode.c
85
m3 = fp->fp_mant[3];
sys/powerpc/fpu/fpu_implode.c
87
s = fp->fp_sticky;
sys/powerpc/fpu/fpu_subr.c
118
fp->fp_mant[0] = m0;
sys/powerpc/fpu/fpu_subr.c
119
fp->fp_mant[1] = m1;
sys/powerpc/fpu/fpu_subr.c
120
fp->fp_mant[2] = m2;
sys/powerpc/fpu/fpu_subr.c
121
fp->fp_mant[3] = m3;
sys/powerpc/fpu/fpu_subr.c
122
fp->fp_sticky = s;
sys/powerpc/fpu/fpu_subr.c
136
fpu_norm(struct fpn *fp)
sys/powerpc/fpu/fpu_subr.c
141
exp = fp->fp_exp;
sys/powerpc/fpu/fpu_subr.c
142
m0 = fp->fp_mant[0];
sys/powerpc/fpu/fpu_subr.c
143
m1 = fp->fp_mant[1];
sys/powerpc/fpu/fpu_subr.c
144
m2 = fp->fp_mant[2];
sys/powerpc/fpu/fpu_subr.c
145
m3 = fp->fp_mant[3];
sys/powerpc/fpu/fpu_subr.c
156
fp->fp_class = FPC_ZERO;
sys/powerpc/fpu/fpu_subr.c
192
fp->fp_exp = exp;
sys/powerpc/fpu/fpu_subr.c
193
fp->fp_mant[0] = m0;
sys/powerpc/fpu/fpu_subr.c
194
fp->fp_mant[1] = m1;
sys/powerpc/fpu/fpu_subr.c
195
fp->fp_mant[2] = m2;
sys/powerpc/fpu/fpu_subr.c
196
fp->fp_mant[3] = m3;
sys/powerpc/fpu/fpu_subr.c
206
struct fpn *fp;
sys/powerpc/fpu/fpu_subr.c
209
fp = &fe->fe_f3;
sys/powerpc/fpu/fpu_subr.c
210
fp->fp_class = FPC_QNAN;
sys/powerpc/fpu/fpu_subr.c
211
fp->fp_sign = 0;
sys/powerpc/fpu/fpu_subr.c
212
fp->fp_mant[0] = FP_1 - 1;
sys/powerpc/fpu/fpu_subr.c
213
fp->fp_mant[1] = fp->fp_mant[2] = fp->fp_mant[3] = ~0;
sys/powerpc/fpu/fpu_subr.c
214
DUMPFPN(FPE_REG, fp);
sys/powerpc/fpu/fpu_subr.c
215
return (fp);
sys/powerpc/fpu/fpu_subr.c
62
fpu_shr(struct fpn *fp, int rsh)
sys/powerpc/fpu/fpu_subr.c
68
if (rsh <= 0 || (fp->fp_class != FPC_NUM && !ISNAN(fp)))
sys/powerpc/fpu/fpu_subr.c
72
m0 = fp->fp_mant[0];
sys/powerpc/fpu/fpu_subr.c
73
m1 = fp->fp_mant[1];
sys/powerpc/fpu/fpu_subr.c
74
m2 = fp->fp_mant[2];
sys/powerpc/fpu/fpu_subr.c
75
m3 = fp->fp_mant[3];
sys/powerpc/fpu/fpu_subr.c
83
fp->fp_mant[0] = 0;
sys/powerpc/fpu/fpu_subr.c
84
fp->fp_mant[1] = 0;
sys/powerpc/fpu/fpu_subr.c
85
fp->fp_mant[2] = 0;
sys/powerpc/fpu/fpu_subr.c
86
fp->fp_mant[3] = 0;
sys/powerpc/fpu/fpu_subr.c
89
fp->fp_class = FPC_ZERO;
sys/powerpc/fpu/fpu_subr.c
92
fp->fp_sticky = 1;
sys/powerpc/fpu/fpu_subr.c
97
s = fp->fp_sticky;
sys/powerpc/powerpc/db_trace.c
132
db_backtrace(struct thread *td, db_addr_t fp, int count)
sys/powerpc/powerpc/db_trace.c
154
stackframe = fp;
sys/riscv/include/stack.h
42
uintptr_t fp;
sys/riscv/riscv/db_trace.c
106
frame->fp = tf->tf_s[0];
sys/riscv/riscv/db_trace.c
108
if (!INKERNEL(frame->fp))
sys/riscv/riscv/db_trace.c
130
frame.fp = ctx->pcb_s[0];
sys/riscv/riscv/db_trace.c
145
frame.fp = (uintptr_t)__builtin_frame_address(0);
sys/riscv/riscv/exec_machdep.c
339
struct sigframe *fp, frame;
sys/riscv/riscv/exec_machdep.c
365
fp = (struct sigframe *)((uintptr_t)td->td_sigstk.ss_sp +
sys/riscv/riscv/exec_machdep.c
368
fp = (struct sigframe *)td->td_frame->tf_sp;
sys/riscv/riscv/exec_machdep.c
372
fp--;
sys/riscv/riscv/exec_machdep.c
373
fp = STACKALIGN(fp);
sys/riscv/riscv/exec_machdep.c
387
if (copyout(&frame, fp, sizeof(*fp)) != 0) {
sys/riscv/riscv/exec_machdep.c
389
CTR2(KTR_SIG, "sendsig: sigexit td=%p fp=%p", td, fp);
sys/riscv/riscv/exec_machdep.c
395
tf->tf_a[1] = (register_t)&fp->sf_si;
sys/riscv/riscv/exec_machdep.c
396
tf->tf_a[2] = (register_t)&fp->sf_uc;
sys/riscv/riscv/exec_machdep.c
399
tf->tf_sp = (register_t)fp;
sys/riscv/riscv/stack_machdep.c
73
frame.fp = td->td_pcb->pcb_s[0];
sys/riscv/riscv/stack_machdep.c
89
frame.fp = (uintptr_t)__builtin_frame_address(0);
sys/riscv/riscv/unwind.c
44
uintptr_t fp;
sys/riscv/riscv/unwind.c
46
fp = frame->fp;
sys/riscv/riscv/unwind.c
48
if (!__is_aligned(fp, sizeof(fp)) ||
sys/riscv/riscv/unwind.c
49
!kstack_contains(td, fp - sizeof(fp) * 2, sizeof(fp) * 2))
sys/riscv/riscv/unwind.c
52
frame->sp = fp;
sys/riscv/riscv/unwind.c
53
frame->fp = ((uintptr_t *)fp)[-2];
sys/riscv/riscv/unwind.c
54
frame->pc = ((uintptr_t *)fp)[-1] - 4;
sys/rpc/rpcsec_tls/rpctls_impl.c
154
struct file *fp;
sys/rpc/rpcsec_tls/rpctls_impl.c
183
if ((error = falloc(td, &fp, &fd, 0)) != 0) {
sys/rpc/rpcsec_tls/rpctls_impl.c
211
finit(fp, FREAD | FWRITE, DTYPE_SOCKET, ups.so, &socketops);
sys/rpc/rpcsec_tls/rpctls_impl.c
212
fdrop(fp, td); /* Drop fp reference. */
sys/security/audit/audit.h
136
void audit_arg_file(struct proc *p, struct file *fp);
sys/security/audit/audit.h
141
void audit_sysclose(struct thread *td, int fd, struct file *fp);
sys/security/audit/audit.h
217
#define AUDIT_ARG_FILE(p, fp) do { \
sys/security/audit/audit.h
219
audit_arg_file((p), (fp)); \
sys/security/audit/audit.h
435
#define AUDIT_ARG_FILE(p, fp)
sys/security/audit/audit_arg.c
1009
vp = fp->f_vnode;
sys/security/audit/audit_arg.c
670
audit_arg_file(struct proc *p, struct file *fp)
sys/security/audit/audit_arg.c
681
switch (fp->f_type) {
sys/security/audit/audit_arg.c
687
vp = fp->f_vnode;
sys/security/audit/audit_arg.c
694
so = (struct socket *)fp->f_data;
sys/security/audit/audit_arg.c
996
audit_sysclose(struct thread *td, int fd, struct file *fp)
sys/security/mac/mac_syscalls.c
502
struct file *fp;
sys/security/mac/mac_syscalls.c
517
&fp);
sys/security/mac/mac_syscalls.c
521
switch (fp->f_type) {
sys/security/mac/mac_syscalls.c
528
vp = fp->f_vnode;
sys/security/mac/mac_syscalls.c
543
pipe = fp->f_data;
sys/security/mac/mac_syscalls.c
558
so = fp->f_data;
sys/security/mac/mac_syscalls.c
574
error = jaildesc_get_prison(fp, &pr);
sys/security/mac/mac_syscalls.c
593
fdrop(fp, td);
sys/security/mac/mac_syscalls.c
662
struct file *fp;
sys/security/mac/mac_syscalls.c
674
&fp);
sys/security/mac/mac_syscalls.c
678
switch (fp->f_type) {
sys/security/mac/mac_syscalls.c
691
vp = fp->f_vnode;
sys/security/mac/mac_syscalls.c
712
pipe = fp->f_data;
sys/security/mac/mac_syscalls.c
729
so = fp->f_data;
sys/security/mac/mac_syscalls.c
746
error = jaildesc_get_prison(fp, &pr);
sys/security/mac/mac_syscalls.c
761
fdrop(fp, td);
sys/security/mac_grantbylabel/mac_grantbylabel.c
363
struct file *fp;
sys/security/mac_grantbylabel/mac_grantbylabel.c
384
cap_rights_init(&rights), &fp);
sys/security/mac_grantbylabel/mac_grantbylabel.c
388
if (fp->f_type != DTYPE_VNODE) {
sys/security/mac_grantbylabel/mac_grantbylabel.c
393
vn_lock(fp->f_vnode, LK_SHARED | LK_RETRY);
sys/security/mac_grantbylabel/mac_grantbylabel.c
394
gbl_args.gbl = gbl_get_vlabel(fp->f_vnode, td->td_ucred);
sys/security/mac_grantbylabel/mac_grantbylabel.c
399
VOP_UNLOCK(fp->f_vnode);
sys/security/mac_grantbylabel/mac_grantbylabel.c
401
fdrop(fp, td);
sys/security/mac_veriexec/mac_veriexec.c
846
struct file *fp;
sys/security/mac_veriexec/mac_veriexec.c
891
cap_rights_init_one(&rights, CAP_READ), &fp);
sys/security/mac_veriexec/mac_veriexec.c
894
if (fp->f_type != DTYPE_VNODE) {
sys/security/mac_veriexec/mac_veriexec.c
897
fp->f_type);
sys/security/mac_veriexec/mac_veriexec.c
908
img.vp = fp->f_vnode;
sys/security/mac_veriexec/mac_veriexec.c
916
error = VOP_GETATTR(fp->f_vnode, &va, td->td_ucred);
sys/security/mac_veriexec/mac_veriexec.c
929
fdrop(fp, td);
sys/sys/conf.h
112
typedef int d_fdopen_t(struct cdev *dev, int oflags, struct thread *td, struct file *fp);
sys/sys/eventfd.h
43
int eventfd_create_file(struct thread *td, struct file *fp, uint32_t initval,
sys/sys/eventfd.h
45
struct eventfd *eventfd_get(struct file *fp);
sys/sys/fail.h
118
bool fail_point_is_off(struct fail_point *fp);
sys/sys/fail.h
126
fail_point_sleep_set_pre_func(struct fail_point *fp, void (*sleep_fn)(void *))
sys/sys/fail.h
128
fp->fp_pre_sleep_fn = sleep_fn;
sys/sys/fail.h
132
fail_point_sleep_set_pre_arg(struct fail_point *fp, void *sleep_arg)
sys/sys/fail.h
134
fp->fp_pre_sleep_arg = sleep_arg;
sys/sys/fail.h
142
fail_point_sleep_set_post_func(struct fail_point *fp, void (*sleep_fn)(void *))
sys/sys/fail.h
144
fp->fp_post_sleep_fn = sleep_fn;
sys/sys/fail.h
148
fail_point_sleep_set_post_arg(struct fail_point *fp, void *sleep_arg)
sys/sys/fail.h
150
fp->fp_post_sleep_arg = sleep_arg;
sys/sys/fail.h
162
fail_point_use_timeout_path(struct fail_point *fp, bool use_timeout,
sys/sys/fail.h
166
(post_sleep_fn == NULL && fp->fp_post_sleep_fn != NULL),
sys/sys/fail.h
170
fail_point_alloc_callout(fp);
sys/sys/fail.h
171
fp->fp_flags |= FAIL_POINT_USE_TIMEOUT_PATH;
sys/sys/fail.h
173
fp->fp_flags &= ~FAIL_POINT_USE_TIMEOUT_PATH;
sys/sys/fail.h
176
fp->fp_post_sleep_fn = post_sleep_fn;
sys/sys/fail.h
188
fail_point_eval(struct fail_point *fp, int *ret)
sys/sys/fail.h
190
if (__predict_true(fp->fp_setting == NULL))
sys/sys/fail.h
192
return (fail_point_eval_nontrivial(fp, ret));
sys/sys/fail.h
96
#define FAIL_POINT_IS_OFF(fp) (__predict_true((fp)->fp_setting == NULL) || \
sys/sys/fail.h
97
__predict_true(fail_point_is_off(fp)))
sys/sys/file.h
100
foffset_get(struct file *fp)
sys/sys/file.h
103
return (foffset_lock(fp, FOF_NOLOCK));
sys/sys/file.h
106
typedef int fo_rdwr_t(struct file *fp, struct uio *uio,
sys/sys/file.h
109
typedef int fo_truncate_t(struct file *fp, off_t length,
sys/sys/file.h
111
typedef int fo_ioctl_t(struct file *fp, u_long com, void *data,
sys/sys/file.h
113
typedef int fo_poll_t(struct file *fp, int events,
sys/sys/file.h
115
typedef int fo_kqfilter_t(struct file *fp, struct knote *kn);
sys/sys/file.h
116
typedef int fo_stat_t(struct file *fp, struct stat *sb,
sys/sys/file.h
118
typedef int fo_close_t(struct file *fp, struct thread *td);
sys/sys/file.h
119
typedef void fo_fdclose_t(struct file *fp, int fd, struct thread *td);
sys/sys/file.h
120
typedef int fo_chmod_t(struct file *fp, mode_t mode,
sys/sys/file.h
122
typedef int fo_chown_t(struct file *fp, uid_t uid, gid_t gid,
sys/sys/file.h
124
typedef int fo_sendfile_t(struct file *fp, int sockfd, struct uio *hdr_uio,
sys/sys/file.h
127
typedef int fo_seek_t(struct file *fp, off_t offset, int whence,
sys/sys/file.h
129
typedef int fo_fill_kinfo_t(struct file *fp, struct kinfo_file *kif,
sys/sys/file.h
131
typedef int fo_mmap_t(struct file *fp, vm_map_t map, vm_offset_t *addr,
sys/sys/file.h
134
typedef int fo_aio_queue_t(struct file *fp, struct kaiocb *job);
sys/sys/file.h
135
typedef int fo_add_seals_t(struct file *fp, int flags);
sys/sys/file.h
136
typedef int fo_get_seals_t(struct file *fp, int *flags);
sys/sys/file.h
137
typedef int fo_fallocate_t(struct file *fp, off_t offset, off_t len,
sys/sys/file.h
139
typedef int fo_fspacectl_t(struct file *fp, int cmd,
sys/sys/file.h
142
typedef int fo_cmp_t(struct file *fp, struct file *fp1, struct thread *td);
sys/sys/file.h
143
typedef int fo_fork_t(struct filedesc *fdp, struct file *fp, struct file **fp1,
sys/sys/file.h
145
typedef int fo_spare_t(struct file *fp);
sys/sys/file.h
283
int _fdrop(struct file *fp, struct thread *td);
sys/sys/file.h
320
fhold(struct file *fp)
sys/sys/file.h
322
return (refcount_acquire_checked(&fp->f_count));
sys/sys/file.h
325
#define fdrop(fp, td) ({ \
sys/sys/file.h
330
_fp = (fp); \
sys/sys/file.h
336
#define fdrop_close(fp, td) ({ \
sys/sys/file.h
341
_fp = (fp); \
sys/sys/file.h
360
fo_read(struct file *fp, struct uio *uio, struct ucred *active_cred,
sys/sys/file.h
364
return ((*fp->f_ops->fo_read)(fp, uio, active_cred, flags, td));
sys/sys/file.h
368
fo_write(struct file *fp, struct uio *uio, struct ucred *active_cred,
sys/sys/file.h
372
return ((*fp->f_ops->fo_write)(fp, uio, active_cred, flags, td));
sys/sys/file.h
376
fo_truncate(struct file *fp, off_t length, struct ucred *active_cred,
sys/sys/file.h
380
return ((*fp->f_ops->fo_truncate)(fp, length, active_cred, td));
sys/sys/file.h
384
fo_ioctl(struct file *fp, u_long com, void *data, struct ucred *active_cred,
sys/sys/file.h
388
return ((*fp->f_ops->fo_ioctl)(fp, com, data, active_cred, td));
sys/sys/file.h
392
fo_poll(struct file *fp, int events, struct ucred *active_cred,
sys/sys/file.h
396
return ((*fp->f_ops->fo_poll)(fp, events, active_cred, td));
sys/sys/file.h
400
fo_stat(struct file *fp, struct stat *sb, struct ucred *active_cred)
sys/sys/file.h
403
return ((*fp->f_ops->fo_stat)(fp, sb, active_cred));
sys/sys/file.h
407
fo_close(struct file *fp, struct thread *td)
sys/sys/file.h
410
return ((*fp->f_ops->fo_close)(fp, td));
sys/sys/file.h
414
fo_kqfilter(struct file *fp, struct knote *kn)
sys/sys/file.h
417
return ((*fp->f_ops->fo_kqfilter)(fp, kn));
sys/sys/file.h
421
fo_chmod(struct file *fp, mode_t mode, struct ucred *active_cred,
sys/sys/file.h
425
return ((*fp->f_ops->fo_chmod)(fp, mode, active_cred, td));
sys/sys/file.h
429
fo_chown(struct file *fp, uid_t uid, gid_t gid, struct ucred *active_cred,
sys/sys/file.h
433
return ((*fp->f_ops->fo_chown)(fp, uid, gid, active_cred, td));
sys/sys/file.h
437
fo_sendfile(struct file *fp, int sockfd, struct uio *hdr_uio,
sys/sys/file.h
442
return ((*fp->f_ops->fo_sendfile)(fp, sockfd, hdr_uio, trl_uio, offset,
sys/sys/file.h
447
fo_seek(struct file *fp, off_t offset, int whence, struct thread *td)
sys/sys/file.h
450
return ((*fp->f_ops->fo_seek)(fp, offset, whence, td));
sys/sys/file.h
454
fo_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp)
sys/sys/file.h
457
return ((*fp->f_ops->fo_fill_kinfo)(fp, kif, fdp));
sys/sys/file.h
461
fo_mmap(struct file *fp, vm_map_t map, vm_offset_t *addr, vm_size_t size,
sys/sys/file.h
466
if (fp->f_ops->fo_mmap == NULL)
sys/sys/file.h
468
return ((*fp->f_ops->fo_mmap)(fp, map, addr, size, prot, cap_maxprot,
sys/sys/file.h
473
fo_aio_queue(struct file *fp, struct kaiocb *job)
sys/sys/file.h
476
return ((*fp->f_ops->fo_aio_queue)(fp, job));
sys/sys/file.h
480
fo_add_seals(struct file *fp, int seals)
sys/sys/file.h
483
if (fp->f_ops->fo_add_seals == NULL)
sys/sys/file.h
485
return ((*fp->f_ops->fo_add_seals)(fp, seals));
sys/sys/file.h
489
fo_get_seals(struct file *fp, int *seals)
sys/sys/file.h
492
if (fp->f_ops->fo_get_seals == NULL)
sys/sys/file.h
494
return ((*fp->f_ops->fo_get_seals)(fp, seals));
sys/sys/file.h
498
fo_fallocate(struct file *fp, off_t offset, off_t len, struct thread *td)
sys/sys/file.h
501
if (fp->f_ops->fo_fallocate == NULL)
sys/sys/file.h
503
return ((*fp->f_ops->fo_fallocate)(fp, offset, len, td));
sys/sys/file.h
507
fo_fspacectl(struct file *fp, int cmd, off_t *offset, off_t *length,
sys/sys/file.h
511
if (fp->f_ops->fo_fspacectl == NULL)
sys/sys/file.h
513
return ((*fp->f_ops->fo_fspacectl)(fp, cmd, offset, length, flags,
sys/sys/file.h
90
off_t foffset_lock(struct file *fp, int flags);
sys/sys/file.h
93
void foffset_lock_uio(struct file *fp, struct uio *uio, int flags);
sys/sys/file.h
94
void foffset_unlock(struct file *fp, off_t val, int flags);
sys/sys/file.h
95
void foffset_unlock_uio(struct file *fp, struct uio *uio, int flags);
sys/sys/file.h
96
void fsetfl_lock(struct file *fp);
sys/sys/file.h
97
void fsetfl_unlock(struct file *fp);
sys/sys/filedesc.h
248
int closef(struct file *fp, struct thread *td);
sys/sys/filedesc.h
249
void closef_nothread(struct file *fp);
sys/sys/filedesc.h
255
void falloc_abort(struct thread *td, struct file *fp);
sys/sys/filedesc.h
258
void _finstall(struct filedesc *fdp, struct file *fp, int fd, int flags,
sys/sys/filedesc.h
260
int finstall(struct thread *td, struct file *fp, int *resultfd, int flags,
sys/sys/filedesc.h
262
int finstall_refed(struct thread *td, struct file *fp, int *resultfd, int flags,
sys/sys/filedesc.h
267
void fdclose(struct thread *td, struct file *fp, int idx);
sys/sys/filedesc.h
303
#define fput_only_user(fdp, fp) ({ \
sys/sys/filedesc.h
305
MPASS(refcount_load(&fp->f_count) > 0); \
sys/sys/mman.h
305
int shm_map(struct file *fp, size_t size, off_t offset, void **memp);
sys/sys/mman.h
306
int shm_unmap(struct file *fp, void *mem, size_t size);
sys/sys/nv.h
90
void nvlist_fdump(const nvlist_t *nvl, FILE *fp);
sys/sys/syscallsubr.h
208
int kern_kevent_fp(struct thread *td, struct file *fp, int nchanges,
sys/sys/syscallsubr.h
91
struct file **fp);
sys/sys/syscallsubr.h
93
int flags, struct file **fp);
sys/sys/tty.h
225
int pts_alloc(int fflags, struct thread *td, struct file *fp);
sys/sys/tty.h
226
int pts_alloc_external(int fd, struct thread *td, struct file *fp,
sys/sys/vnode.h
1185
int vn_chmod(struct file *fp, mode_t mode, struct ucred *active_cred,
sys/sys/vnode.h
1187
int vn_chown(struct file *fp, uid_t uid, gid_t gid, struct ucred *active_cred,
sys/sys/vnode.h
790
int vn_open(struct nameidata *ndp, int *flagp, int cmode, struct file *fp);
sys/sys/vnode.h
792
u_int vn_open_flags, struct ucred *cred, struct file *fp);
sys/sys/vnode.h
794
struct thread *td, struct file *fp);
sys/ufs/ffs/ffs_alloc.c
3292
struct file *fp;
sys/ufs/ffs/ffs_alloc.c
3303
cap_rights_init_one(&rights, CAP_FSCK), &fp)) != 0)
sys/ufs/ffs/ffs_alloc.c
3305
vp = fp->f_vnode;
sys/ufs/ffs/ffs_alloc.c
3307
fdrop(fp, td);
sys/ufs/ffs/ffs_alloc.c
3314
fdrop(fp, td);
sys/ufs/ffs/ffs_alloc.c
3320
fdrop(fp, td);
sys/ufs/ffs/ffs_alloc.c
3617
fdrop(fp, td);
sys/vm/vm_mmap.c
181
struct file *fp;
sys/vm/vm_mmap.c
220
fp = NULL;
sys/vm/vm_mmap.c
399
error = fget_mmap(td, fd, &rights, &cap_maxprot, &fp);
sys/vm/vm_mmap.c
409
error = check_fp_fn(fp, prot, max_prot & cap_maxprot,
sys/vm/vm_mmap.c
414
if (fp->f_ops == &shm_ops && shm_largepage(fp->f_data))
sys/vm/vm_mmap.c
417
error = fo_mmap(fp, &vms->vm_map, &addr, size, prot,
sys/vm/vm_mmap.c
424
if (fp)
sys/vm/vm_mmap.c
425
fdrop(fp, td);
sys/vm/vm_phys.c
1086
vm_page_t fp;
sys/vm/vm_phys.c
1103
fp = &vm_page_array[pi - first_page];
sys/vm/vm_phys.c
1114
vm_phys_fictitious_init_range(fp, start, dpage_count,
sys/vm/vm_phys.c
1124
vm_phys_fictitious_init_range(fp, start, page_count, memattr);
sys/vm/vm_phys.c
1131
fp = &vm_page_array[0];
sys/vm/vm_phys.c
1133
vm_phys_fictitious_init_range(fp, ptoa(first_page), dpage_count,
sys/vm/vm_phys.c
1147
fp = malloc(page_count * sizeof(struct vm_page), M_FICT_PAGES,
sys/vm/vm_phys.c
1152
vm_phys_fictitious_init_range(fp, start, page_count, memattr);
sys/vm/vm_phys.c
1157
seg->first_page = fp;
sys/x86/cpufreq/est.c
1174
freq_info *fp;
sys/x86/cpufreq/est.c
1201
fp = malloc(sizeof(freq_info) * 2, M_DEVBUF, M_WAITOK | M_ZERO);
sys/x86/cpufreq/est.c
1209
fp[0].freq = freq;
sys/x86/cpufreq/est.c
1210
fp[0].volts = volts;
sys/x86/cpufreq/est.c
1211
fp[0].id16 = id;
sys/x86/cpufreq/est.c
1212
fp[0].power = CPUFREQ_VAL_UNKNOWN;
sys/x86/cpufreq/est.c
1224
fp[1].freq = freq;
sys/x86/cpufreq/est.c
1225
fp[1].volts = volts;
sys/x86/cpufreq/est.c
1226
fp[1].id16 = id;
sys/x86/cpufreq/est.c
1227
fp[1].power = CPUFREQ_VAL_UNKNOWN;
sys/x86/cpufreq/est.c
1233
*freqs = fp;
sys/x86/x86/stack_machdep.c
164
register_t fp;
sys/x86/x86/stack_machdep.c
167
__asm __volatile("movl %%ebp,%0" : "=g" (fp));
sys/x86/x86/stack_machdep.c
169
__asm __volatile("movq %%rbp,%0" : "=g" (fp));
sys/x86/x86/stack_machdep.c
171
stack_capture(curthread, st, fp);
sys/x86/x86/stack_machdep.c
72
stack_capture(struct thread *td, struct stack *st, register_t fp)
sys/x86/x86/stack_machdep.c
78
frame = (x86_frame_t)fp;
tests/sys/file/closefrom_test.c
65
FILE *fp;
tests/sys/file/closefrom_test.c
68
fp = fmemopen(shared_page, PAGE_SIZE - 1, "w");
tests/sys/file/closefrom_test.c
69
if (fp == NULL)
tests/sys/file/closefrom_test.c
72
fprintf(fp, "%s:%d: ", file, line);
tests/sys/file/closefrom_test.c
74
vfprintf(fp, fmt, ap);
tests/sys/file/closefrom_test.c
76
fclose(fp);
tests/sys/net/bpf/pcap-test.c
100
if (pcap_compile(p, &fp, "", 0, PCAP_NETMASK_UNKNOWN) != 0)
tests/sys/net/bpf/pcap-test.c
102
if (pcap_setfilter(p, &fp) != 0)
tests/sys/net/bpf/pcap-test.c
104
pcap_freecode(&fp);
tests/sys/net/bpf/pcap-test.c
97
struct bpf_program fp;
tests/sys/net/routing/rtsock_common.h
318
FILE *fp;
tests/sys/net/routing/rtsock_common.h
323
fp = popen(cmd, "r");
tests/sys/net/routing/rtsock_common.h
324
line = fgets(buf, sizeof(buf), fp);
tests/sys/net/routing/rtsock_common.h
344
FILE *fp;
tests/sys/net/routing/rtsock_common.h
356
fp = popen(cmd, "r");
tests/sys/net/routing/rtsock_common.h
357
if (fp == NULL)
tests/sys/net/routing/rtsock_common.h
359
line = fgets(buf, sizeof(buf), fp);
tests/sys/net/routing/rtsock_print.h
390
FILE *fp = popen(cmd, "r");
tests/sys/net/routing/rtsock_print.h
391
if (fp != NULL) {
tests/sys/net/routing/rtsock_print.h
392
while (fgets(line, sizeof(line), fp) != NULL)
tests/sys/net/routing/rtsock_print.h
394
pclose(fp);
tools/build/cross-build/fgetln_fallback.c
38
FILE *fp;
tools/build/cross-build/fgetln_fallback.c
59
if (fb->fp != stream && fb->fp != NULL) {
tools/build/cross-build/fgetln_fallback.c
64
fb->fp = stream;
tools/build/cross-build/fgetwln_fallback.c
36
FILE *fp;
tools/build/cross-build/fgetwln_fallback.c
57
if (fb->fp != stream && fb->fp != NULL) {
tools/build/cross-build/fgetwln_fallback.c
62
fb->fp = stream;
tools/regression/gaithrstress/gaithrstress.c
151
FILE *fp;
tools/regression/gaithrstress/gaithrstress.c
155
fp = fopen(fname, "r");
tools/regression/gaithrstress/gaithrstress.c
156
if (fp == NULL)
tools/regression/gaithrstress/gaithrstress.c
159
while (fgets(newword, sizeof(newword), fp) != NULL)
tools/regression/gaithrstress/gaithrstress.c
161
if (ferror(fp) || fseek(fp, 0, SEEK_SET) != 0)
tools/regression/gaithrstress/gaithrstress.c
168
while (fgets(newword, sizeof(newword), fp) != NULL) {
tools/regression/gaithrstress/gaithrstress.c
177
fclose(fp);
tools/regression/gaithrstress/gaithrstress.c
180
fclose(fp);
tools/tools/ath/ath_ee_9287_print/eeprom.c
40
FILE *fp;
tools/tools/ath/ath_ee_9287_print/eeprom.c
44
fp = fopen(file, "r");
tools/tools/ath/ath_ee_9287_print/eeprom.c
45
if (!fp)
tools/tools/ath/ath_ee_9287_print/eeprom.c
48
while (!feof(fp)) {
tools/tools/ath/ath_ee_9287_print/eeprom.c
49
if (fgets(b, 1024, fp) == NULL)
tools/tools/ath/ath_ee_9287_print/eeprom.c
51
if (feof(fp))
tools/tools/ath/ath_ee_9287_print/eeprom.c
69
fclose(fp);
tools/tools/ath/ath_ee_9300_print/main.c
428
FILE *fp;
tools/tools/ath/ath_ee_9300_print/main.c
432
fp = fopen(file, "r");
tools/tools/ath/ath_ee_9300_print/main.c
433
if (!fp)
tools/tools/ath/ath_ee_9300_print/main.c
436
while (!feof(fp)) {
tools/tools/ath/ath_ee_9300_print/main.c
437
if (fgets(b, 1024, fp) == NULL)
tools/tools/ath/ath_ee_9300_print/main.c
439
if (feof(fp))
tools/tools/ath/ath_ee_9300_print/main.c
457
fclose(fp);
tools/tools/ath/ath_ee_v14_print/ath_ee_v14_print.c
51
FILE *fp;
tools/tools/ath/ath_ee_v14_print/ath_ee_v14_print.c
55
fp = fopen(file, "r");
tools/tools/ath/ath_ee_v14_print/ath_ee_v14_print.c
56
if (!fp)
tools/tools/ath/ath_ee_v14_print/ath_ee_v14_print.c
59
while (!feof(fp)) {
tools/tools/ath/ath_ee_v14_print/ath_ee_v14_print.c
60
if (fgets(b, 1024, fp) == NULL)
tools/tools/ath/ath_ee_v14_print/ath_ee_v14_print.c
62
if (feof(fp))
tools/tools/ath/ath_ee_v14_print/ath_ee_v14_print.c
80
fclose(fp);
tools/tools/ath/ath_ee_v4k_print/eeprom.c
40
FILE *fp;
tools/tools/ath/ath_ee_v4k_print/eeprom.c
44
fp = fopen(file, "r");
tools/tools/ath/ath_ee_v4k_print/eeprom.c
45
if (!fp)
tools/tools/ath/ath_ee_v4k_print/eeprom.c
48
while (!feof(fp)) {
tools/tools/ath/ath_ee_v4k_print/eeprom.c
49
if (fgets(b, 1024, fp) == NULL)
tools/tools/ath/ath_ee_v4k_print/eeprom.c
51
if (feof(fp))
tools/tools/ath/ath_ee_v4k_print/eeprom.c
69
fclose(fp);
tools/tools/ath/ath_prom_read/ath_prom_read.c
63
FILE *fp;
tools/tools/ath/ath_prom_read/ath_prom_read.c
66
fp = fopen(dumpfile, "w");
tools/tools/ath/ath_prom_read/ath_prom_read.c
67
if (!fp) {
tools/tools/ath/ath_prom_read/ath_prom_read.c
74
fprintf(fp, "%.4x: ", i);
tools/tools/ath/ath_prom_read/ath_prom_read.c
75
fprintf(fp, "%.4x%s", (int32_t)(eebuf[i]), i % NUM_PER_LINE == (NUM_PER_LINE - 1) ? "\n" : " ");
tools/tools/ath/ath_prom_read/ath_prom_read.c
77
fprintf(fp, "\n");
tools/tools/ath/ath_prom_read/ath_prom_read.c
78
fclose(fp);
tools/tools/cxgbtool/cxgbtool.c
122
exit(fp == stderr ? 1 : 0);
tools/tools/cxgbtool/cxgbtool.c
87
usage(FILE *fp)
tools/tools/cxgbtool/cxgbtool.c
89
fprintf(fp, "Usage: %s <interface> [operation]\n", progname);
tools/tools/cxgbtool/cxgbtool.c
90
fprintf(fp,
tools/tools/kttcp/sys/kttcp.c
150
struct file *fp;
tools/tools/kttcp/sys/kttcp.c
162
error = fget(td, kio->kio_socket, &fp);
tools/tools/kttcp/sys/kttcp.c
166
if ((fp->f_flag & FWRITE) == 0) {
tools/tools/kttcp/sys/kttcp.c
167
fdrop(fp, td);
tools/tools/kttcp/sys/kttcp.c
170
if (fp->f_type == DTYPE_SOCKET) {
tools/tools/kttcp/sys/kttcp.c
178
error = sosend((struct socket *)fp->f_data, NULL,
tools/tools/kttcp/sys/kttcp.c
185
fdrop(fp, td);
tools/tools/kttcp/sys/kttcp.c
198
struct file *fp;
tools/tools/kttcp/sys/kttcp.c
210
error = fget(td, kio->kio_socket, &fp);
tools/tools/kttcp/sys/kttcp.c
214
if ((fp->f_flag & FWRITE) == 0) {
tools/tools/kttcp/sys/kttcp.c
215
fdrop(fp, td);
tools/tools/kttcp/sys/kttcp.c
218
if (fp->f_type == DTYPE_SOCKET) {
tools/tools/kttcp/sys/kttcp.c
226
error = soreceive((struct socket *)fp->f_data,
tools/tools/kttcp/sys/kttcp.c
235
fdrop(fp, td);
tools/tools/net80211/wlanwatch/wlanwatch.c
100
bprintf(FILE *fp, int b, char *s)
tools/tools/net80211/wlanwatch/wlanwatch.c
113
(void) putc(i, fp);
tools/tools/net80211/wlanwatch/wlanwatch.c
116
(void) putc(i, fp);
tools/tools/net80211/wlanwatch/wlanwatch.c
122
putc('>', fp);
tools/tools/netmap/pkt-gen.c
1299
char *fp = p;
tools/tools/netmap/pkt-gen.c
1301
memcpy(fp, f, frag_size);
tools/tools/netmap/pkt-gen.c
1305
dump_payload(fp, frag_size, ring, head);
tools/tools/netmap/pkt-gen.c
1310
fp = NETMAP_BUF(ring, slot->buf_idx);
tools/tools/netmap/pkt-gen.c
1313
p = fp;
tools/tools/nvmf/nvmfd/io.c
127
if (len != sizeof(ioc->fp))
tools/tools/nvmf/nvmfd/io.c
130
nvmf_send_controller_data(nc, &ioc->fp, sizeof(ioc->fp));
tools/tools/nvmf/nvmfd/io.c
28
struct nvme_firmware_page fp;
tools/tools/nvmf/nvmfd/io.c
506
ioc->fp.afi = NVMEF(NVME_FIRMWARE_PAGE_AFI_SLOT, 1);
tools/tools/nvmf/nvmfd/io.c
507
memcpy(ioc->fp.revision[0], cdata.fr, sizeof(cdata.fr));
usr.bin/asa/asa.c
48
FILE *fp;
usr.bin/asa/asa.c
67
} else if ((fp = fopen(*argv, "r")) == NULL) {
usr.bin/asa/asa.c
71
asa(fp);
usr.bin/asa/asa.c
72
fclose(fp);
usr.bin/at/at.c
215
FILE *fp, *fpin;
usr.bin/at/at.c
312
if((fp = fdopen(fdes, "w")) == NULL)
usr.bin/at/at.c
336
fprintf(fp, "#!/bin/sh\n# atrun uid=%ld gid=%ld\n# mail %*s %d\n",
usr.bin/at/at.c
342
fprintf(fp, "umask %lo\n", (unsigned long) cmask);
usr.bin/at/at.c
371
(void)fputs("export ", fp);
usr.bin/at/at.c
372
fwrite(*atenv, sizeof(char), eqp-*atenv, fp);
usr.bin/at/at.c
376
fprintf(fp, "\"\n\"");
usr.bin/at/at.c
387
fputc('\\', fp);
usr.bin/at/at.c
391
fputc(*ap, fp);
usr.bin/at/at.c
394
fputc('\n', fp);
usr.bin/at/at.c
401
fprintf(fp, "cd ");
usr.bin/at/at.c
405
fprintf(fp, "\"\n\"");
usr.bin/at/at.c
409
fputc('\\', fp);
usr.bin/at/at.c
411
fputc(*ap, fp);
usr.bin/at/at.c
417
fprintf(fp, " || {\n\t echo 'Execution directory "
usr.bin/at/at.c
421
fputc(ch, fp);
usr.bin/at/at.c
423
fprintf(fp, "\n");
usr.bin/at/at.c
424
if (ferror(fp))
usr.bin/at/at.c
430
fclose(fp);
usr.bin/at/at.c
599
FILE *fp;
usr.bin/at/at.c
604
fp = fopen(dirent->d_name,"r");
usr.bin/at/at.c
608
if (!fp) {
usr.bin/at/at.c
611
while((ch = getc(fp)) != EOF) {
usr.bin/at/at.c
614
fclose(fp);
usr.bin/at/perm.c
102
if (fp != NULL)
usr.bin/at/perm.c
104
return check_for_user(fp, pentry->pw_name);
usr.bin/at/perm.c
111
fp=fopen(PERM_PATH "at.deny", "r");
usr.bin/at/perm.c
115
if (fp != NULL)
usr.bin/at/perm.c
117
return !check_for_user(fp, pentry->pw_name);
usr.bin/at/perm.c
56
static int check_for_user(FILE *fp,const char *name);
usr.bin/at/perm.c
60
static int check_for_user(FILE *fp,const char *name)
usr.bin/at/perm.c
70
while(fgets(buffer, len+2, fp) != NULL)
usr.bin/at/perm.c
79
fclose(fp);
usr.bin/at/perm.c
86
FILE *fp;
usr.bin/at/perm.c
98
fp=fopen(PERM_PATH "at.allow","r");
usr.bin/bintrans/qp.c
147
qp(FILE *fp, FILE *fpo, bool encode, bool rfc2047)
usr.bin/bintrans/qp.c
155
while (getline(&line, &linecap, fp) > 0)
usr.bin/bintrans/qp.c
173
FILE *fp = stdin;
usr.bin/bintrans/qp.c
209
fp = fopen(argv[0], "r");
usr.bin/bintrans/qp.c
210
if (fp == NULL) {
usr.bin/bintrans/qp.c
215
qp(fp, fpo, encode, rfc2047);
usr.bin/calendar/calendar.h
125
void event_print_all(FILE *fp);
usr.bin/calendar/events.c
198
event_print_all(FILE *fp)
usr.bin/calendar/events.c
225
(void)fprintf(fp, "%s%c%s%s%s%s\n", dbuf,
usr.bin/calendar/io.c
107
FILE *fp;
usr.bin/calendar/io.c
136
if ((fp = fdopen(fd, "r")) == NULL)
usr.bin/calendar/io.c
142
return (fp);
usr.bin/calendar/io.c
161
if ((fp = fopen(file, "r")) != NULL) {
usr.bin/calendar/io.c
165
return (fp);
usr.bin/calendar/io.c
680
closecal(FILE *fp)
usr.bin/calendar/io.c
689
rewind(fp);
usr.bin/calendar/io.c
690
if (fstat(fileno(fp), &sbuf) || !sbuf.st_size)
usr.bin/calendar/io.c
722
while ((nread = read(fileno(fp), buf, sizeof(buf))) > 0)
usr.bin/calendar/io.c
725
done: (void)fclose(fp);
usr.bin/chpass/edit.c
104
FILE *fp;
usr.bin/chpass/edit.c
107
if ((fp = fopen(tfn, "w")) == NULL) {
usr.bin/chpass/edit.c
112
(void)fprintf(fp,
usr.bin/chpass/edit.c
115
(void)fprintf(fp, "Login: %s\n", pw->pw_name);
usr.bin/chpass/edit.c
116
(void)fprintf(fp, "Password: %s\n", pw->pw_passwd);
usr.bin/chpass/edit.c
117
(void)fprintf(fp, "Uid [#]: %lu\n", (unsigned long)pw->pw_uid);
usr.bin/chpass/edit.c
118
(void)fprintf(fp, "Gid [# or name]: %lu\n",
usr.bin/chpass/edit.c
120
(void)fprintf(fp, "Change [month day year]: %s\n",
usr.bin/chpass/edit.c
122
(void)fprintf(fp, "Expire [month day year]: %s\n",
usr.bin/chpass/edit.c
124
(void)fprintf(fp, "Class: %s\n", pw->pw_class);
usr.bin/chpass/edit.c
125
(void)fprintf(fp, "Home directory: %s\n", pw->pw_dir);
usr.bin/chpass/edit.c
126
(void)fprintf(fp, "Shell: %s\n",
usr.bin/chpass/edit.c
144
(void)fprintf(fp, "Shell: %s\n",
usr.bin/chpass/edit.c
151
fclose(fp);
usr.bin/chpass/edit.c
159
(void)fprintf(fp, "Full Name: %s\n", p);
usr.bin/chpass/edit.c
165
(void)fprintf(fp, "Office Location: %s\n", p);
usr.bin/chpass/edit.c
171
(void)fprintf(fp, "Office Phone: %s\n", p);
usr.bin/chpass/edit.c
177
(void)fprintf(fp, "Home Phone: %s\n", p);
usr.bin/chpass/edit.c
182
(void)fprintf(fp, "Other information: %s\n", bp);
usr.bin/chpass/edit.c
186
(void)fchown(fileno(fp), getuid(), getgid());
usr.bin/chpass/edit.c
187
(void)fclose(fp);
usr.bin/chpass/edit.c
198
FILE *fp;
usr.bin/chpass/edit.c
204
if ((fp = fopen(tfn, "r")) == NULL ||
usr.bin/chpass/edit.c
205
fstat(fileno(fp), &sb) == -1) {
usr.bin/chpass/edit.c
212
fclose(fp);
usr.bin/chpass/edit.c
217
for (line = 1; (buf = fgetln(fp, &len)) != NULL; ++line) {
usr.bin/chpass/edit.c
260
fclose(fp);
usr.bin/chpass/edit.c
287
fclose(fp);
usr.bin/column/column.c
129
if ((fp = fopen(*argv, "r"))) {
usr.bin/column/column.c
130
input(fp);
usr.bin/column/column.c
131
(void)fclose(fp);
usr.bin/column/column.c
295
input(FILE *fp)
usr.bin/column/column.c
305
while (fgetws(buf, MAXLINELEN, fp)) {
usr.bin/column/column.c
69
FILE *fp;
usr.bin/comm/comm.c
204
show(FILE *fp, const char *fn, const char *offset, char **bufp, size_t *buflenp)
usr.bin/comm/comm.c
212
if ((n = getline(bufp, buflenp, fp)) < 0)
usr.bin/comm/comm.c
217
if (ferror(fp))
usr.bin/comm/comm.c
224
FILE *fp;
usr.bin/comm/comm.c
228
if ((fp = fopen(name, "r")) == NULL) {
usr.bin/comm/comm.c
231
return (fp);
usr.bin/compress/zopen.c
253
sizeof(char), sizeof(magic_header), fp) != sizeof(magic_header))
usr.bin/compress/zopen.c
256
if (fwrite(&tmp, sizeof(char), sizeof(tmp), fp) != sizeof(tmp))
usr.bin/compress/zopen.c
328
(void)fclose(fp);
usr.bin/compress/zopen.c
334
(void)fclose(fp);
usr.bin/compress/zopen.c
339
rval = fclose(fp) == EOF ? -1 : 0;
usr.bin/compress/zopen.c
400
if (fwrite(bp, sizeof(char), bits, fp) != bits)
usr.bin/compress/zopen.c
416
if (fwrite(buf, 1, n_bits, fp) != n_bits)
usr.bin/compress/zopen.c
437
if (fwrite(buf, 1, offset, fp) != offset)
usr.bin/compress/zopen.c
477
sizeof(char), sizeof(header), fp) != sizeof(header) ||
usr.bin/compress/zopen.c
596
size = fread(gbuf, 1, n_bits, fp);
usr.bin/compress/zopen.c
722
if ((fp = fopen(fname, mode)) == NULL) {
usr.bin/csplit/csplit.c
234
FILE *fp;
usr.bin/csplit/csplit.c
239
if ((fp = fopen(currfile, "w+")) == NULL)
usr.bin/csplit/csplit.c
243
return (fp);
usr.bin/ctags/tree.c
52
char *fp;
usr.bin/ctags/tree.c
65
if (!(fp = strrchr(curfile, '/')))
usr.bin/ctags/tree.c
66
fp = curfile;
usr.bin/ctags/tree.c
68
++fp;
usr.bin/ctags/tree.c
69
(void)snprintf(nbuf, sizeof(nbuf), "M%s", fp);
usr.bin/ctags/tree.c
70
fp = strrchr(nbuf, '.');
usr.bin/ctags/tree.c
71
if (fp && !fp[2])
usr.bin/ctags/tree.c
72
*fp = EOS;
usr.bin/cut/cut.c
140
if (!(fp = fopen(*argv, "r"))) {
usr.bin/cut/cut.c
145
fcn(fp, *argv);
usr.bin/cut/cut.c
146
(void)fclose(fp);
usr.bin/cut/cut.c
235
b_cut(FILE *fp, const char *fname __unused)
usr.bin/cut/cut.c
244
if ((ch = getc(fp)) == EOF)
usr.bin/cut/cut.c
253
while ((ch = getc(fp)) != EOF && ch != '\n')
usr.bin/cut/cut.c
256
while ((ch = getc(fp)) != EOF && ch != '\n');
usr.bin/cut/cut.c
269
b_n_cut(FILE *fp, const char *fname)
usr.bin/cut/cut.c
279
while ((lbuflen = getline(&lbuf, &bufsize, fp)) >= 0) {
usr.bin/cut/cut.c
333
c_cut(FILE *fp, const char *fname)
usr.bin/cut/cut.c
343
if ((ch = getwc(fp)) == WEOF)
usr.bin/cut/cut.c
352
while ((ch = getwc(fp)) != WEOF && ch != '\n')
usr.bin/cut/cut.c
355
while ((ch = getwc(fp)) != WEOF && ch != '\n');
usr.bin/cut/cut.c
360
if (ferror(fp)) {
usr.bin/cut/cut.c
381
f_cut(FILE *fp, const char *fname)
usr.bin/cut/cut.c
391
while ((lbuflen = getline(&lbuf, &bufsize, fp)) >= 0) {
usr.bin/cut/cut.c
71
FILE *fp;
usr.bin/diff/diff.c
527
FILE *fp;
usr.bin/diff/diff.c
533
fp = stdin;
usr.bin/diff/diff.c
534
else if ((fp = fopen(file, "r")) == NULL)
usr.bin/diff/diff.c
536
while ((len = getline(&pattern, &blen, fp)) >= 0) {
usr.bin/diff/diff.c
546
fclose(fp);
usr.bin/diff/diffreg.c
1461
match_function(const long *f, int pos, FILE *fp)
usr.bin/diff/diffreg.c
1470
fseek(fp, f[pos - 1], SEEK_SET);
usr.bin/diff/diffreg.c
1474
nc = fread(buf, 1, nc, fp);
usr.bin/diff3/diff3.c
1067
fp[0] = fopen(file1, "r");
usr.bin/diff3/diff3.c
1068
if (fp[0] == NULL)
usr.bin/diff3/diff3.c
1070
if (caph_rights_limit(fileno(fp[0]), &rights_ro) < 0)
usr.bin/diff3/diff3.c
1073
fp[1] = fopen(file2, "r");
usr.bin/diff3/diff3.c
1074
if (fp[1] == NULL)
usr.bin/diff3/diff3.c
1076
if (caph_rights_limit(fileno(fp[1]), &rights_ro) < 0)
usr.bin/diff3/diff3.c
1079
fp[2] = fopen(file3, "r");
usr.bin/diff3/diff3.c
1080
if (fp[2] == NULL)
usr.bin/diff3/diff3.c
1082
if (caph_rights_limit(fileno(fp[2]), &rights_ro) < 0)
usr.bin/diff3/diff3.c
130
static FILE *fp[3];
usr.bin/diff3/diff3.c
575
if ((line = get_line(fp[i], &j)) == NULL)
usr.bin/diff3/diff3.c
602
c = getc(fp[0]);
usr.bin/diff3/diff3.c
603
d = getc(fp[1]);
usr.bin/diff3/diff3.c
625
(void)fseek(fp[i], (long)-nchar, SEEK_CUR);
usr.bin/diff3/diff3.c
698
printrange(fp[2], old);
usr.bin/diff3/diff3.c
709
printrange(fp[2], new);
usr.bin/diff3/diff3.c
750
printrange(fp[2], new);
usr.bin/diff3/diff3.c
763
printrange(fp[1], old);
usr.bin/diff3/diff3.c
772
printrange(fp[2], new);
usr.bin/diff3/diff3.c
781
printrange(fp[1], &r);
usr.bin/diff3/diff3.c
783
printrange(fp[1], old);
usr.bin/diff3/diff3.c
786
printrange(fp[2], new);
usr.bin/diff3/diff3.c
840
printrange(fp[0], &r);
usr.bin/diff3/diff3.c
847
printrange(fp[1], old);
usr.bin/diff3/diff3.c
849
printrange(fp[2], new);
usr.bin/diff3/diff3.c
854
printrange(fp[2], new);
usr.bin/diff3/diff3.c
858
printrange(fp[0], old);
usr.bin/diff3/diff3.c
866
printrange(fp[1], &or);
usr.bin/diff3/diff3.c
868
printrange(fp[1], old);
usr.bin/diff3/diff3.c
874
printrange(fp[2], new);
usr.bin/diff3/diff3.c
894
printrange(fp[2], &r);
usr.bin/factor/factor.c
301
BN_print_dec_fp(FILE *fp, const BIGNUM *num)
usr.bin/factor/factor.c
308
fprintf(fp, "%s", buf);
usr.bin/factor/factor.c
315
BN_print_fp(FILE *fp, const BIGNUM *num)
usr.bin/factor/factor.c
317
fprintf(fp, "%lx", (unsigned long)*num);
usr.bin/factor/factor.c
321
BN_print_dec_fp(FILE *fp, const BIGNUM *num)
usr.bin/factor/factor.c
323
fprintf(fp, "%lu", (unsigned long)*num);
usr.bin/find/printf.c
111
putc(c, fp);
usr.bin/find/printf.c
113
fclose(fp);
usr.bin/find/printf.c
119
fp_ctime(FILE *fp, time_t t)
usr.bin/find/printf.c
125
fputs(s, fp);
usr.bin/find/printf.c
136
fp_strftime(FILE *fp, time_t t, char mod)
usr.bin/find/printf.c
147
fprintf(fp, "%ju", (uintmax_t)t);
usr.bin/find/printf.c
155
fputs(buffer, fp);
usr.bin/find/printf.c
45
FILE *fp;
usr.bin/find/printf.c
47
fp = open_memstream(&tmpstr, &tmplen);
usr.bin/find/printf.c
56
putc(c, fp);
usr.bin/find/printf.c
65
putc('\\', fp);
usr.bin/find/printf.c
89
putc((char)value, fp);
usr.bin/find/printf.c
98
putc(esc[c - 'a'], fp);
usr.bin/finger/lprint.c
289
FILE *fp;
usr.bin/finger/lprint.c
325
if ((fp = fdopen(fd, "r")) == NULL)
usr.bin/finger/lprint.c
329
while ((ch = getc(fp)) != EOF)
usr.bin/finger/lprint.c
334
(void)fclose(fp);
usr.bin/finger/net.c
104
FILE *fp;
usr.bin/finger/net.c
162
if ((fp = fdopen(s, "r")) != NULL) {
usr.bin/finger/net.c
165
while ((c = getwc(fp)) != EOF) {
usr.bin/finger/net.c
197
if (ferror(fp)) {
usr.bin/finger/net.c
206
fclose(fp);
usr.bin/fortune/fortune/fortune.c
1003
FILEDESC *fp;
usr.bin/fortune/fortune/fortune.c
1010
for (fp = parent->child; choice--; fp = fp->next)
usr.bin/fortune/fortune/fortune.c
1012
DPRINTF(1, (stderr, " using %s\n", fp->name));
usr.bin/fortune/fortune/fortune.c
1013
return (fp);
usr.bin/fortune/fortune/fortune.c
1020
for (fp = parent->child; (unsigned)choice >= fp->tbl.str_numstr;
usr.bin/fortune/fortune/fortune.c
1021
fp = fp->next) {
usr.bin/fortune/fortune/fortune.c
1022
choice -= fp->tbl.str_numstr;
usr.bin/fortune/fortune/fortune.c
1024
fp->name, fp->tbl.str_numstr, choice));
usr.bin/fortune/fortune/fortune.c
1026
DPRINTF(1, (stderr, " using %s, %u\n", fp->name,
usr.bin/fortune/fortune/fortune.c
1027
fp->tbl.str_numstr));
usr.bin/fortune/fortune/fortune.c
1028
return (fp);
usr.bin/fortune/fortune/fortune.c
1037
sum_noprobs(FILEDESC *fp)
usr.bin/fortune/fortune/fortune.c
1044
while (fp != NULL) {
usr.bin/fortune/fortune/fortune.c
1045
get_tbl(fp);
usr.bin/fortune/fortune/fortune.c
1046
sum_tbl(&Noprob_tbl, &fp->tbl);
usr.bin/fortune/fortune/fortune.c
1047
fp = fp->next;
usr.bin/fortune/fortune/fortune.c
1063
open_fp(FILEDESC *fp)
usr.bin/fortune/fortune/fortune.c
1065
if (fp->inf == NULL && (fp->inf = fdopen(fp->fd, "r")) == NULL) {
usr.bin/fortune/fortune/fortune.c
1066
perror(fp->path);
usr.bin/fortune/fortune/fortune.c
1076
open_dat(FILEDESC *fp)
usr.bin/fortune/fortune/fortune.c
1078
if (fp->datfd < 0 && (fp->datfd = open(fp->datfile, O_RDONLY)) < 0) {
usr.bin/fortune/fortune/fortune.c
1079
perror(fp->datfile);
usr.bin/fortune/fortune/fortune.c
1090
get_pos(FILEDESC *fp)
usr.bin/fortune/fortune/fortune.c
1094
assert(fp->read_tbl);
usr.bin/fortune/fortune/fortune.c
1095
if (fp->pos == POS_UNKNOWN) {
usr.bin/fortune/fortune/fortune.c
1097
if ((fd = open(fp->posfile, O_RDONLY)) < 0 ||
usr.bin/fortune/fortune/fortune.c
1098
read(fd, &fp->pos, sizeof fp->pos) != sizeof fp->pos)
usr.bin/fortune/fortune/fortune.c
1099
fp->pos = arc4random_uniform(fp->tbl.str_numstr);
usr.bin/fortune/fortune/fortune.c
1100
else if (fp->pos >= fp->tbl.str_numstr)
usr.bin/fortune/fortune/fortune.c
1101
fp->pos %= fp->tbl.str_numstr;
usr.bin/fortune/fortune/fortune.c
1106
fp->pos = arc4random_uniform(fp->tbl.str_numstr);
usr.bin/fortune/fortune/fortune.c
1108
if (++(fp->pos) >= fp->tbl.str_numstr)
usr.bin/fortune/fortune/fortune.c
1109
fp->pos -= fp->tbl.str_numstr;
usr.bin/fortune/fortune/fortune.c
1110
DPRINTF(1, (stderr, "pos for %s is %ld\n", fp->name, (long)fp->pos));
usr.bin/fortune/fortune/fortune.c
1118
get_tbl(FILEDESC *fp)
usr.bin/fortune/fortune/fortune.c
1123
if (fp->read_tbl)
usr.bin/fortune/fortune/fortune.c
1125
if (fp->child == NULL) {
usr.bin/fortune/fortune/fortune.c
1126
if ((fd = open(fp->datfile, O_RDONLY)) < 0) {
usr.bin/fortune/fortune/fortune.c
1127
perror(fp->datfile);
usr.bin/fortune/fortune/fortune.c
1130
if (read(fd, (char *) &fp->tbl, sizeof fp->tbl) != sizeof fp->tbl) {
usr.bin/fortune/fortune/fortune.c
1132
"fortune: %s corrupted\n", fp->path);
usr.bin/fortune/fortune/fortune.c
1136
fp->tbl.str_numstr = be32toh(fp->tbl.str_numstr);
usr.bin/fortune/fortune/fortune.c
1137
fp->tbl.str_longlen = be32toh(fp->tbl.str_longlen);
usr.bin/fortune/fortune/fortune.c
1138
fp->tbl.str_shortlen = be32toh(fp->tbl.str_shortlen);
usr.bin/fortune/fortune/fortune.c
1139
fp->tbl.str_flags = be32toh(fp->tbl.str_flags);
usr.bin/fortune/fortune/fortune.c
1143
zero_tbl(&fp->tbl);
usr.bin/fortune/fortune/fortune.c
1144
for (child = fp->child; child != NULL; child = child->next) {
usr.bin/fortune/fortune/fortune.c
1146
sum_tbl(&fp->tbl, &child->tbl);
usr.bin/fortune/fortune/fortune.c
1149
fp->read_tbl = TRUE;
usr.bin/fortune/fortune/fortune.c
1281
FILEDESC *fp;
usr.bin/fortune/fortune/fortune.c
1285
for (fp = list; fp != NULL; fp = fp->next) {
usr.bin/fortune/fortune/fortune.c
1286
if (fp->child != NULL) {
usr.bin/fortune/fortune/fortune.c
1287
if ((len = maxlen_in_list(fp->child)) > maxlen)
usr.bin/fortune/fortune/fortune.c
1291
get_tbl(fp);
usr.bin/fortune/fortune/fortune.c
1292
if (fp->tbl.str_longlen > (unsigned int)maxlen)
usr.bin/fortune/fortune/fortune.c
1293
maxlen = fp->tbl.str_longlen;
usr.bin/fortune/fortune/fortune.c
1308
FILEDESC *fp;
usr.bin/fortune/fortune/fortune.c
1312
for (fp = list; fp != NULL; fp = fp->next) {
usr.bin/fortune/fortune/fortune.c
1313
if (fp->child != NULL) {
usr.bin/fortune/fortune/fortune.c
1314
matches_in_list(fp->child);
usr.bin/fortune/fortune/fortune.c
1317
DPRINTF(1, (stderr, "searching in %s\n", fp->path));
usr.bin/fortune/fortune/fortune.c
1318
open_fp(fp);
usr.bin/fortune/fortune/fortune.c
1321
while (fgets(sp, Fort_len, fp->inf) != NULL)
usr.bin/fortune/fortune/fortune.c
1322
if (fp->tbl.str_flags & STR_COMMENTS
usr.bin/fortune/fortune/fortune.c
1323
&& sp[0] == fp->tbl.str_delim
usr.bin/fortune/fortune/fortune.c
1324
&& sp[1] == fp->tbl.str_delim)
usr.bin/fortune/fortune/fortune.c
1326
else if (!STR_ENDSTRING(sp, fp->tbl))
usr.bin/fortune/fortune/fortune.c
1330
if (fp->tbl.str_flags & STR_ROTATED)
usr.bin/fortune/fortune/fortune.c
1340
printf("%c%c", fp->tbl.str_delim,
usr.bin/fortune/fortune/fortune.c
1341
fp->tbl.str_delim);
usr.bin/fortune/fortune/fortune.c
1343
printf(" (%s)", fp->name);
usr.bin/fortune/fortune/fortune.c
205
display(FILEDESC *fp)
usr.bin/fortune/fortune/fortune.c
211
open_fp(fp);
usr.bin/fortune/fortune/fortune.c
212
fseeko(fp->inf, Seekpts[0], SEEK_SET);
usr.bin/fortune/fortune/fortune.c
213
for (Fort_len = 0; fgets(line, sizeof line, fp->inf) != NULL &&
usr.bin/fortune/fortune/fortune.c
214
!STR_ENDSTRING(line, fp->tbl); Fort_len++) {
usr.bin/fortune/fortune/fortune.c
215
if (fp->tbl.str_flags & STR_ROTATED)
usr.bin/fortune/fortune/fortune.c
224
if (fp->tbl.str_flags & STR_COMMENTS
usr.bin/fortune/fortune/fortune.c
225
&& line[0] == fp->tbl.str_delim
usr.bin/fortune/fortune/fortune.c
226
&& line[1] == fp->tbl.str_delim)
usr.bin/fortune/fortune/fortune.c
446
FILEDESC *fp;
usr.bin/fortune/fortune/fortune.c
530
fp = new_fp();
usr.bin/fortune/fortune/fortune.c
531
fp->fd = fd;
usr.bin/fortune/fortune/fortune.c
532
fp->percent = percent;
usr.bin/fortune/fortune/fortune.c
533
fp->name = file;
usr.bin/fortune/fortune/fortune.c
534
fp->path = path;
usr.bin/fortune/fortune/fortune.c
535
fp->parent = parent;
usr.bin/fortune/fortune/fortune.c
537
if ((isdir && !add_dir(fp)) ||
usr.bin/fortune/fortune/fortune.c
539
!is_fortfile(path, &fp->datfile, &fp->posfile, (parent != NULL))))
usr.bin/fortune/fortune/fortune.c
547
do_free(fp->datfile);
usr.bin/fortune/fortune/fortune.c
548
do_free(fp->posfile);
usr.bin/fortune/fortune/fortune.c
549
free(fp);
usr.bin/fortune/fortune/fortune.c
560
all_forts(fp, offensive);
usr.bin/fortune/fortune/fortune.c
562
*head = *tail = fp;
usr.bin/fortune/fortune/fortune.c
563
else if (fp->percent == NO_PROB) {
usr.bin/fortune/fortune/fortune.c
564
(*tail)->next = fp;
usr.bin/fortune/fortune/fortune.c
565
fp->prev = *tail;
usr.bin/fortune/fortune/fortune.c
566
*tail = fp;
usr.bin/fortune/fortune/fortune.c
569
(*head)->prev = fp;
usr.bin/fortune/fortune/fortune.c
570
fp->next = *head;
usr.bin/fortune/fortune/fortune.c
571
*head = fp;
usr.bin/fortune/fortune/fortune.c
574
fp->was_pos_file = (access(fp->posfile, W_OK) >= 0);
usr.bin/fortune/fortune/fortune.c
586
FILEDESC *fp;
usr.bin/fortune/fortune/fortune.c
588
fp = do_malloc(sizeof(*fp));
usr.bin/fortune/fortune/fortune.c
589
fp->datfd = -1;
usr.bin/fortune/fortune/fortune.c
590
fp->pos = POS_UNKNOWN;
usr.bin/fortune/fortune/fortune.c
591
fp->inf = NULL;
usr.bin/fortune/fortune/fortune.c
592
fp->fd = -1;
usr.bin/fortune/fortune/fortune.c
593
fp->percent = NO_PROB;
usr.bin/fortune/fortune/fortune.c
594
fp->read_tbl = FALSE;
usr.bin/fortune/fortune/fortune.c
595
fp->next = NULL;
usr.bin/fortune/fortune/fortune.c
596
fp->prev = NULL;
usr.bin/fortune/fortune/fortune.c
597
fp->child = NULL;
usr.bin/fortune/fortune/fortune.c
598
fp->parent = NULL;
usr.bin/fortune/fortune/fortune.c
599
fp->datfile = NULL;
usr.bin/fortune/fortune/fortune.c
600
fp->posfile = NULL;
usr.bin/fortune/fortune/fortune.c
602
return (fp);
usr.bin/fortune/fortune/fortune.c
639
all_forts(FILEDESC *fp, char *offensive)
usr.bin/fortune/fortune/fortune.c
646
if (fp->child != NULL) /* this is a directory, not a file */
usr.bin/fortune/fortune/fortune.c
655
*scene = *fp;
usr.bin/fortune/fortune/fortune.c
657
fp->num_children = 2;
usr.bin/fortune/fortune/fortune.c
658
fp->child = scene;
usr.bin/fortune/fortune/fortune.c
662
scene->parent = obscene->parent = fp;
usr.bin/fortune/fortune/fortune.c
664
fp->fd = -1;
usr.bin/fortune/fortune/fortune.c
686
add_dir(FILEDESC *fp)
usr.bin/fortune/fortune/fortune.c
693
(void) close(fp->fd);
usr.bin/fortune/fortune/fortune.c
694
fp->fd = -1;
usr.bin/fortune/fortune/fortune.c
695
if ((dir = opendir(fp->path)) == NULL) {
usr.bin/fortune/fortune/fortune.c
696
perror(fp->path);
usr.bin/fortune/fortune/fortune.c
700
DPRINTF(1, (stderr, "adding dir \"%s\"\n", fp->path));
usr.bin/fortune/fortune/fortune.c
701
fp->num_children = 0;
usr.bin/fortune/fortune/fortune.c
706
if (add_file(NO_PROB, name, fp->path, &fp->child, &tailp, fp))
usr.bin/fortune/fortune/fortune.c
707
fp->num_children++;
usr.bin/fortune/fortune/fortune.c
711
if (fp->num_children == 0) {
usr.bin/fortune/fortune/fortune.c
713
"fortune: %s: No fortune files in directory.\n", fp->path);
usr.bin/fortune/fortune/fortune.c
870
FILEDESC *fp, *last = NULL;
usr.bin/fortune/fortune/fortune.c
881
for (fp = File_tail; fp != NULL; fp = fp->prev)
usr.bin/fortune/fortune/fortune.c
882
if (fp->percent == NO_PROB) {
usr.bin/fortune/fortune/fortune.c
885
last = fp;
usr.bin/fortune/fortune/fortune.c
887
percent += fp->percent;
usr.bin/fortune/fortune/fortune.c
910
for (fp = File_tail; fp != last; fp = fp->prev)
usr.bin/fortune/fortune/fortune.c
911
if (fp->percent == NO_PROB) {
usr.bin/fortune/fortune/fortune.c
912
fp->percent = frac;
usr.bin/fortune/fortune/fortune.c
939
FILEDESC *fp;
usr.bin/fortune/fortune/fortune.c
943
fp = File_list;
usr.bin/fortune/fortune/fortune.c
947
for (fp = File_list; fp->percent != NO_PROB; fp = fp->next) {
usr.bin/fortune/fortune/fortune.c
948
if (choice < fp->percent)
usr.bin/fortune/fortune/fortune.c
951
choice -= fp->percent;
usr.bin/fortune/fortune/fortune.c
954
fp->name, fp->percent, choice));
usr.bin/fortune/fortune/fortune.c
959
fp->name, fp->percent, choice));
usr.bin/fortune/fortune/fortune.c
961
if (fp->percent != NO_PROB)
usr.bin/fortune/fortune/fortune.c
962
get_tbl(fp);
usr.bin/fortune/fortune/fortune.c
964
if (fp->next != NULL) {
usr.bin/fortune/fortune/fortune.c
965
sum_noprobs(fp);
usr.bin/fortune/fortune/fortune.c
969
while ((unsigned int)choice >= fp->tbl.str_numstr) {
usr.bin/fortune/fortune/fortune.c
970
choice -= fp->tbl.str_numstr;
usr.bin/fortune/fortune/fortune.c
971
fp = fp->next;
usr.bin/fortune/fortune/fortune.c
974
fp->name, fp->tbl.str_numstr,
usr.bin/fortune/fortune/fortune.c
977
DPRINTF(1, (stderr, "using \"%s\", %u\n", fp->name,
usr.bin/fortune/fortune/fortune.c
978
fp->tbl.str_numstr));
usr.bin/fortune/fortune/fortune.c
980
get_tbl(fp);
usr.bin/fortune/fortune/fortune.c
982
if (fp->child != NULL) {
usr.bin/fortune/fortune/fortune.c
984
fp = pick_child(fp);
usr.bin/fortune/fortune/fortune.c
986
Fortfile = fp;
usr.bin/fortune/fortune/fortune.c
987
get_pos(fp);
usr.bin/fortune/fortune/fortune.c
988
open_dat(fp);
usr.bin/fortune/fortune/fortune.c
989
lseek(fp->datfd,
usr.bin/fortune/fortune/fortune.c
990
(off_t) (sizeof fp->tbl + fp->pos * sizeof Seekpts[0]), SEEK_SET);
usr.bin/fortune/fortune/fortune.c
991
read(fp->datfd, Seekpts, sizeof Seekpts);
usr.bin/fortune/strfile/strfile.c
135
STR *fp;
usr.bin/fortune/strfile/strfile.c
185
fp = &Firstch[Num_pts - 1];
usr.bin/fortune/strfile/strfile.c
187
fp->first = tolower((unsigned char)*nsp);
usr.bin/fortune/strfile/strfile.c
189
fp->first = *nsp;
usr.bin/fortune/strfile/strfile.c
190
fp->pos = Seekpts[Num_pts - 1];
usr.bin/fortune/strfile/strfile.c
320
add_offset(FILE *fp, off_t off)
usr.bin/fortune/strfile/strfile.c
326
fwrite(&beoff, 1, sizeof(beoff), fp);
usr.bin/fortune/strfile/strfile.c
343
STR *fp;
usr.bin/fortune/strfile/strfile.c
350
fp = Firstch;
usr.bin/fortune/strfile/strfile.c
352
*lp++ = fp++->pos;
usr.bin/gzip/unlz.c
156
FILE *fp;
usr.bin/gzip/unlz.c
162
lz_rd_create(struct lz_range_decoder *rd, FILE *fp)
usr.bin/gzip/unlz.c
164
rd->fp = fp;
usr.bin/gzip/unlz.c
168
rd->code = (rd->code << 8) | (uint8_t)getc(rd->fp);
usr.bin/gzip/unlz.c
169
return ferror(rd->fp) ? -1 : 0;
usr.bin/gzip/unlz.c
186
rd->code = (rd->code << 8) | (uint8_t)getc(rd->fp);
usr.bin/gzip/unlz.c
213
rd->code = (rd->code << 8) | (uint8_t)getc(rd->fp);
usr.bin/head/head.c
131
if ((fp = fileargs_fopen(fa, *argv, "r")) == NULL) {
usr.bin/head/head.c
142
head(fp, linecnt);
usr.bin/head/head.c
144
head_bytes(fp, bytecnt);
usr.bin/head/head.c
145
(void)fclose(fp);
usr.bin/head/head.c
157
head(FILE *fp, intmax_t cnt)
usr.bin/head/head.c
163
while (cnt != 0 && (readlen = getline(&cp, &bufsize, fp)) >= 0) {
usr.bin/head/head.c
172
head_bytes(FILE *fp, off_t cnt)
usr.bin/head/head.c
182
readlen = fread(buf, sizeof(char), readlen, fp);
usr.bin/head/head.c
75
FILE *fp;
usr.bin/hexdump/parse.c
48
FILE *fp;
usr.bin/hexdump/parse.c
52
if ((fp = fopen(name, "r")) == NULL)
usr.bin/hexdump/parse.c
54
while (fgets(buf, sizeof(buf), fp)) {
usr.bin/hexdump/parse.c
66
(void)fclose(fp);
usr.bin/iconv/iconv.c
110
INBUFSIZE - inbytes, fp);
usr.bin/iconv/iconv.c
113
if (feof(fp))
usr.bin/iconv/iconv.c
160
FILE *fp;
usr.bin/iconv/iconv.c
230
fp = (strcmp(argv[i], "-") != 0) ?
usr.bin/iconv/iconv.c
232
if (fp == NULL)
usr.bin/iconv/iconv.c
239
res |= do_conv(fp, cd, opt_s, opt_c);
usr.bin/iconv/iconv.c
240
(void)fclose(fp);
usr.bin/iconv/iconv.c
72
do_conv(FILE *fp, iconv_t cd, bool silent, bool hide_invalid)
usr.bin/iconv/iconv.c
90
while ((inbytes = fread(inbuf, 1, INBUFSIZE, fp)) > 0) {
usr.bin/ident/ident.c
218
FILE *fp;
usr.bin/ident/ident.c
274
fp = fdopen(fds[i], "r");
usr.bin/ident/ident.c
275
if (fp == NULL) {
usr.bin/ident/ident.c
280
if (scan(fp, argc == 0 ? NULL : argv[i], quiet) != EXIT_SUCCESS)
usr.bin/ident/ident.c
282
fclose(fp);
usr.bin/ident/ident.c
53
scan(FILE *fp, const char *name, bool quiet)
usr.bin/ident/ident.c
74
while ((c = fgetc(fp)) != EOF) {
usr.bin/join/join.c
210
F1->fp = stdin;
usr.bin/join/join.c
211
else if ((F1->fp = fopen(*argv, "r")) == NULL)
usr.bin/join/join.c
215
F2->fp = stdin;
usr.bin/join/join.c
216
else if ((F2->fp = fopen(*argv, "r")) == NULL)
usr.bin/join/join.c
218
if (F1->fp == stdin && F2->fp == stdin)
usr.bin/join/join.c
311
if ((len = getline(&buf, &blen, F->fp)) < 0) {
usr.bin/join/join.c
63
FILE *fp; /* file descriptor */
usr.bin/killall/killall.c
65
printsig(FILE *fp)
usr.bin/killall/killall.c
72
offset += fprintf(fp, "%s ", *p);
usr.bin/killall/killall.c
75
fprintf(fp, "\n");
usr.bin/killall/killall.c
78
fprintf(fp, "\n");
usr.bin/lam/lam.c
122
ip->fp = stdin;
usr.bin/lam/lam.c
123
else if ((ip->fp = fopen(p, "r")) == NULL) {
usr.bin/lam/lam.c
126
if (caph_rights_limit(fileno(ip->fp), &rights_ro) < 0)
usr.bin/lam/lam.c
180
ip->fp = NULL;
usr.bin/lam/lam.c
210
for (p = s; (c = fgetc(ip->fp)) != EOF && p < end; p++)
usr.bin/lam/lam.c
216
if (ferror(ip->fp))
usr.bin/lam/lam.c
53
FILE *fp; /* file pointer */
usr.bin/lam/lam.c
94
for (ip = input; ip->fp != NULL; ip++)
usr.bin/lastcomm/lastcomm.c
127
fp = stdin;
usr.bin/lastcomm/lastcomm.c
131
if ((fp = fopen(acctfile, "r")) == NULL)
usr.bin/lastcomm/lastcomm.c
133
if (fseek(fp, 0l, SEEK_END) == -1)
usr.bin/lastcomm/lastcomm.c
138
while ((rv = readrec(fp, &ab)) == 1) {
usr.bin/lastcomm/lastcomm.c
70
FILE *fp;
usr.bin/locate/code/locate.code.c
107
FILE *fp;
usr.bin/locate/code/locate.code.c
120
if ((fp = fopen(argv[0], "r")) == NULL)
usr.bin/locate/code/locate.code.c
124
if (fgets(bigrams, BGBUFSIZE + 1, fp) == NULL) {
usr.bin/locate/code/locate.code.c
125
if (!feof(fp) || ferror(fp))
usr.bin/locate/code/locate.code.c
131
(void)fclose(fp);
usr.bin/locate/locate/fastfind.c
139
(FILE *fp, char *pathpart, char *database)
usr.bin/locate/locate/fastfind.c
166
p[c] = check_bigram_char(getc(fp));
usr.bin/locate/locate/fastfind.c
167
s[c] = check_bigram_char(getc(fp));
usr.bin/locate/locate/fastfind.c
205
c = getc(fp);
usr.bin/locate/locate/fastfind.c
219
count += getwf(fp) - OFFSET;
usr.bin/locate/locate/fastfind.c
238
c = getc(fp);
usr.bin/locate/locate/fastfind.c
255
c = getc(fp);
usr.bin/locate/locate/fastfind.c
41
statistic (FILE *fp, char *path_fcodes)
usr.bin/locate/locate/fastfind.c
51
p[c] = check_bigram_char(getc(fp));
usr.bin/locate/locate/fastfind.c
52
s[c] = check_bigram_char(getc(fp));
usr.bin/locate/locate/fastfind.c
58
for (c = getc(fp), count = 0; c != EOF; size++) {
usr.bin/locate/locate/fastfind.c
60
count += getwf(fp) - OFFSET;
usr.bin/locate/locate/fastfind.c
73
for (p = path + count; (c = getc(fp)) > SWITCH; size++)
usr.bin/locate/locate/fastfind.c
76
c = getc(fp);
usr.bin/locate/locate/locate.c
214
FILE *fp;
usr.bin/locate/locate/locate.c
218
fp = stdin;
usr.bin/locate/locate/locate.c
228
if ((fp = fopen(db, "r")) == NULL) {
usr.bin/locate/locate/locate.c
237
statistic(fp, db);
usr.bin/locate/locate/locate.c
238
(void)fclose(fp);
usr.bin/locate/locate/locate.c
245
fseek(fp, (long)0, SEEK_SET) == -1)
usr.bin/locate/locate/locate.c
249
fastfind_icase(fp, *s, db);
usr.bin/locate/locate/locate.c
251
fastfind(fp, *s, db);
usr.bin/locate/locate/locate.c
254
(void)fclose(fp);
usr.bin/locate/locate/util.c
249
getwf(FILE *fp)
usr.bin/locate/locate/util.c
255
word = getw(fp);
usr.bin/login/login_fbtab.c
114
fclose(fp);
usr.bin/login/login_fbtab.c
82
FILE *fp;
usr.bin/login/login_fbtab.c
89
if ((fp = fopen(table = _PATH_FBTAB, "r")) == NULL
usr.bin/login/login_fbtab.c
90
&& (fp = fopen(table = _PATH_LOGINDEVPERM, "r")) == NULL)
usr.bin/login/login_fbtab.c
93
while (fgets(buf, sizeof(buf), fp)) {
usr.bin/m4/extern.h
158
extern int fp; /* m4 call frame pointer */
usr.bin/m4/main.c
266
fp = 0; /* frame pointer initialized */
usr.bin/m4/main.c
278
fp = 0;
usr.bin/m4/main.c
416
pushf(fp); /* previous call frm */
usr.bin/m4/main.c
420
fp = sp; /* new frame pointer */
usr.bin/m4/main.c
434
eval((const char **) mstack+fp+1, 2,
usr.bin/m4/main.c
439
fp = PREVFP; /* rewind stack...*/
usr.bin/m4/main.c
480
eval((const char **) mstack+fp+1, sp-fp,
usr.bin/m4/main.c
485
fp = PREVFP; /* rewind stack...*/
usr.bin/m4/main.c
82
int fp; /* m4 call frame pointer */
usr.bin/m4/mdef.h
232
#define PARLEV (mstack[fp].sfra)
usr.bin/m4/mdef.h
233
#define CALTYP (mstack[fp-2].sfra)
usr.bin/m4/mdef.h
234
#define TRACESTATUS (mstack[fp-1].sfra)
usr.bin/m4/mdef.h
235
#define PREVEP (mstack[fp+3].sstr)
usr.bin/m4/mdef.h
236
#define PREVSP (fp-4)
usr.bin/m4/mdef.h
237
#define PREVFP (mstack[fp-3].sfra)
usr.bin/m4/trace.c
128
for (framep = fp, level = 0; framep != 0;
usr.bin/mail/collect.c
496
exwrite(char name[], FILE *fp, int f)
usr.bin/mail/collect.c
519
while ((c = getc(fp)) != EOF) {
usr.bin/mail/collect.c
541
mesedit(FILE *fp, int c)
usr.bin/mail/collect.c
544
FILE *nf = run_editor(fp, (off_t)-1, c, 0);
usr.bin/mail/collect.c
549
(void)Fclose(fp);
usr.bin/mail/collect.c
561
mespipe(FILE *fp, char cmd[])
usr.bin/mail/collect.c
583
0, fileno(fp), fileno(nf), "-c", cmd, NULL) < 0) {
usr.bin/mail/collect.c
597
(void)Fclose(fp);
usr.bin/mail/collect.c
611
forward(char ms[], FILE *fp, char *fn, int f)
usr.bin/mail/collect.c
641
if (sendmessage(mp, fp, ig, tabst) < 0) {
usr.bin/mail/collect.c
715
savedeadletter(FILE *fp)
usr.bin/mail/collect.c
721
if (fsize(fp) == 0)
usr.bin/mail/collect.c
729
while ((c = getc(fp)) != EOF)
usr.bin/mail/collect.c
732
rewind(fp);
usr.bin/mail/edit.c
104
mp->m_size = (long)fsize(fp);
usr.bin/mail/edit.c
107
rewind(fp);
usr.bin/mail/edit.c
108
while ((c = getc(fp)) != EOF) {
usr.bin/mail/edit.c
116
(void)Fclose(fp);
usr.bin/mail/edit.c
130
run_editor(FILE *fp, off_t size, int type, int readonly)
usr.bin/mail/edit.c
151
while (--size >= 0 && (t = getc(fp)) != EOF)
usr.bin/mail/edit.c
154
while ((t = getc(fp)) != EOF)
usr.bin/mail/edit.c
71
FILE *fp;
usr.bin/mail/edit.c
98
fp = run_editor(setinput(mp), mp->m_size, type, readonly);
usr.bin/mail/edit.c
99
if (fp != NULL) {
usr.bin/mail/popen.c
102
FILE *fp;
usr.bin/mail/popen.c
124
if ((fp = fdopen(myside, mode)) != NULL)
usr.bin/mail/popen.c
125
register_file(fp, 1, pid);
usr.bin/mail/popen.c
126
return (fp);
usr.bin/mail/popen.c
153
(void)Pclose(fp_head->fp);
usr.bin/mail/popen.c
155
(void)Fclose(fp_head->fp);
usr.bin/mail/popen.c
159
register_file(FILE *fp, int pipe, pid_t pid)
usr.bin/mail/popen.c
161
struct fp *fpp;
usr.bin/mail/popen.c
165
fpp->fp = fp;
usr.bin/mail/popen.c
173
unregister_file(FILE *fp)
usr.bin/mail/popen.c
175
struct fp **pp, *p;
usr.bin/mail/popen.c
178
if (p->fp == fp) {
usr.bin/mail/popen.c
188
file_pid(FILE *fp)
usr.bin/mail/popen.c
190
struct fp *p;
usr.bin/mail/popen.c
193
if (p->fp == fp)
usr.bin/mail/popen.c
43
FILE *fp;
usr.bin/mail/popen.c
46
struct fp *link;
usr.bin/mail/popen.c
48
static struct fp *fp_head;
usr.bin/mail/popen.c
66
FILE *fp;
usr.bin/mail/popen.c
68
if ((fp = fopen(path, mode)) != NULL) {
usr.bin/mail/popen.c
69
register_file(fp, 0, 0);
usr.bin/mail/popen.c
70
(void)fcntl(fileno(fp), F_SETFD, 1);
usr.bin/mail/popen.c
72
return (fp);
usr.bin/mail/popen.c
78
FILE *fp;
usr.bin/mail/popen.c
80
if ((fp = fdopen(fd, mode)) != NULL) {
usr.bin/mail/popen.c
81
register_file(fp, 0, 0);
usr.bin/mail/popen.c
82
(void)fcntl(fileno(fp), F_SETFD, 1);
usr.bin/mail/popen.c
84
return (fp);
usr.bin/mail/popen.c
88
Fclose(FILE *fp)
usr.bin/mail/popen.c
91
unregister_file(fp);
usr.bin/mail/popen.c
92
return (fclose(fp));
usr.bin/mkcsmapper/yacc.y
363
FILE *fp;
usr.bin/mkcsmapper/yacc.y
394
fp = output ? fopen(output, "wb") : stdout;
usr.bin/mkcsmapper/yacc.y
396
if (fp == NULL) {
usr.bin/mkcsmapper/yacc.y
407
if (fwrite(serialized, size, 1, fp) != 1)
usr.bin/mkcsmapper/yacc.y
410
fclose(fp);
usr.bin/mkesdb/yacc.y
134
FILE *fp;
usr.bin/mkesdb/yacc.y
193
fp = output ? fopen(output, "wb") : stdout;
usr.bin/mkesdb/yacc.y
194
if (fp == NULL) {
usr.bin/mkesdb/yacc.y
204
if (fwrite(serialized, size, 1, fp) != 1)
usr.bin/mkesdb/yacc.y
207
fclose(fp);
usr.bin/mkimg/mkimg.c
447
FILE *fp;
usr.bin/mkimg/mkimg.c
513
fp = popen(part->contents, "r");
usr.bin/mkimg/mkimg.c
514
if (fp != NULL) {
usr.bin/mkimg/mkimg.c
515
fd = fileno(fp);
usr.bin/mkimg/mkimg.c
517
pclose(fp);
usr.bin/paste/paste.c
127
FILE *fp;
usr.bin/paste/paste.c
150
lp->fp = stdin;
usr.bin/paste/paste.c
151
else if (!(lp->fp = fileargs_fopen(fa, p, "r")))
usr.bin/paste/paste.c
162
if (!lp->fp) {
usr.bin/paste/paste.c
168
if ((ich = getwc(lp->fp)) == WEOF) {
usr.bin/paste/paste.c
171
lp->fp = NULL;
usr.bin/paste/paste.c
192
} while ((ich = getwc(lp->fp)) != WEOF && ich != '\n');
usr.bin/paste/paste.c
204
FILE *fp;
usr.bin/paste/paste.c
212
fp = stdin;
usr.bin/paste/paste.c
213
else if (!(fp = fileargs_fopen(fa, p, "r"))) {
usr.bin/paste/paste.c
219
while ((ch = getwc(fp)) != WEOF) {
usr.bin/paste/paste.c
234
if (fp != stdin)
usr.bin/paste/paste.c
235
(void)fclose(fp);
usr.bin/rev/rev.c
50
FILE *fp;
usr.bin/rev/rev.c
66
fp = stdin;
usr.bin/rev/rev.c
71
if ((fp = fopen(*argv, "r")) == NULL) {
usr.bin/rev/rev.c
79
while ((p = fgetwln(fp, &len)) != NULL) {
usr.bin/rev/rev.c
86
if (ferror(fp)) {
usr.bin/rev/rev.c
88
clearerr(fp);
usr.bin/rev/rev.c
91
(void)fclose(fp);
usr.bin/rwall/rwall.c
120
FILE *fp;
usr.bin/rwall/rwall.c
127
if ((fd = mkstemp(tmpname)) == -1 || (fp = fdopen(fd, "r+")) == NULL)
usr.bin/rwall/rwall.c
147
fprintf(fp, "Remote Broadcast Message from %s@%s\n",
usr.bin/rwall/rwall.c
152
fprintf(fp, " (%s) at %d:%02d ...\n", tty,
usr.bin/rwall/rwall.c
155
putc('\n', fp);
usr.bin/rwall/rwall.c
160
fputs(lbuf, fp);
usr.bin/rwall/rwall.c
161
rewind(fp);
usr.bin/rwall/rwall.c
169
if (fread(mbuf, sizeof(*mbuf), mbufsize, fp) != (u_int)mbufsize)
usr.bin/script/script.c
478
record(FILE *fp, char *buf, size_t cc, int direction)
usr.bin/script/script.c
493
if (writev(fileno(fp), &iov[0], 2) == -1)
usr.bin/script/script.c
498
consume(FILE *fp, off_t len, char *buf, int reg)
usr.bin/script/script.c
503
if (fseeko(fp, len, SEEK_CUR) == -1)
usr.bin/script/script.c
508
if (fread(buf, sizeof(char), l, fp) != l)
usr.bin/script/script.c
551
playback(FILE *fp)
usr.bin/script/script.c
563
if (fstat(fileno(fp), &pst) == -1)
usr.bin/script/script.c
570
if (fread(&stamp, sizeof(stamp), 1, fp) != 1) {
usr.bin/script/script.c
596
(void)consume(fp, stamp.scr_len, buf, reg);
usr.bin/script/script.c
605
(void)consume(fp, stamp.scr_len, buf, reg);
usr.bin/script/script.c
609
(void)consume(fp, stamp.scr_len, buf, reg);
usr.bin/script/script.c
634
if (fread(buf, sizeof(char), l, fp) != l)
usr.bin/script/script.c
645
(void)fclose(fp);
usr.bin/sed/compile.c
157
struct s_format *fp;
usr.bin/sed/compile.c
212
for (fp = cmd_fmts; fp->code; fp++)
usr.bin/sed/compile.c
213
if (fp->code == *p)
usr.bin/sed/compile.c
215
if (!fp->code)
usr.bin/sed/compile.c
217
if (naddr > fp->naddr)
usr.bin/sed/compile.c
220
linenum, fname, *p, fp->naddr, naddr);
usr.bin/sed/compile.c
221
switch (fp->args) {
usr.bin/sed/main.c
489
struct s_flist *fp;
usr.bin/sed/main.c
491
if ((fp = malloc(sizeof(struct s_flist))) == NULL)
usr.bin/sed/main.c
493
fp->next = NULL;
usr.bin/sed/main.c
494
*fl_nextp = fp;
usr.bin/sed/main.c
495
fp->fname = s;
usr.bin/sed/main.c
496
fl_nextp = &fp->next;
usr.bin/tail/extern.h
54
FILE *fp;
usr.bin/tail/forward.c
108
if (fseeko(fp, off, SEEK_SET) == -1) {
usr.bin/tail/forward.c
113
if ((ch = getc(fp)) == EOF) {
usr.bin/tail/forward.c
114
if (ferror(fp)) {
usr.bin/tail/forward.c
125
if ((ch = getc(fp)) == EOF) {
usr.bin/tail/forward.c
126
if (ferror(fp)) {
usr.bin/tail/forward.c
139
fseeko(fp, -off, SEEK_END) == -1) {
usr.bin/tail/forward.c
144
while (getc(fp) != EOF);
usr.bin/tail/forward.c
145
if (ferror(fp)) {
usr.bin/tail/forward.c
150
if (bytes(fp, fn, off))
usr.bin/tail/forward.c
156
if (fseeko(fp, (off_t)0, SEEK_END) == -1) {
usr.bin/tail/forward.c
161
rlines(fp, fn, off, sbp);
usr.bin/tail/forward.c
163
while (getc(fp) != EOF);
usr.bin/tail/forward.c
164
if (ferror(fp)) {
usr.bin/tail/forward.c
169
if (lines(fp, fn, off))
usr.bin/tail/forward.c
176
while ((ch = getc(fp)) != EOF)
usr.bin/tail/forward.c
179
if (ferror(fp)) {
usr.bin/tail/forward.c
190
rlines(FILE *fp, const char *fn, off_t off, struct stat *sbp)
usr.bin/tail/forward.c
199
map.fd = fileno(fp);
usr.bin/tail/forward.c
227
if (fseeko(fp, sbp->st_size, SEEK_SET) == -1) {
usr.bin/tail/forward.c
242
while ((ch = getc(file->fp)) != EOF) {
usr.bin/tail/forward.c
252
if (ferror(file->fp)) {
usr.bin/tail/forward.c
253
fclose(file->fp);
usr.bin/tail/forward.c
254
file->fp = NULL;
usr.bin/tail/forward.c
258
clearerr(file->fp);
usr.bin/tail/forward.c
275
if (!file->fp)
usr.bin/tail/forward.c
278
if (fstatfs(fileno(file->fp), &sf) == 0 &&
usr.bin/tail/forward.c
284
if (Fflag && fileno(file->fp) != STDIN_FILENO) {
usr.bin/tail/forward.c
285
EV_SET(&ev[n], fileno(file->fp), EVFILT_VNODE,
usr.bin/tail/forward.c
290
EV_SET(&ev[n], fileno(file->fp), EVFILT_READ,
usr.bin/tail/forward.c
316
if (!file->fp)
usr.bin/tail/forward.c
321
forward(file->fp, file->file_name, style, off, &file->st);
usr.bin/tail/forward.c
345
if (!file->fp) {
usr.bin/tail/forward.c
346
file->fp =
usr.bin/tail/forward.c
349
if (file->fp != NULL &&
usr.bin/tail/forward.c
350
fstat(fileno(file->fp), &file->st)
usr.bin/tail/forward.c
352
fclose(file->fp);
usr.bin/tail/forward.c
353
file->fp = NULL;
usr.bin/tail/forward.c
355
if (file->fp != NULL)
usr.bin/tail/forward.c
359
if (fileno(file->fp) == STDIN_FILENO)
usr.bin/tail/forward.c
367
if (file->fp != NULL) {
usr.bin/tail/forward.c
368
fclose(file->fp);
usr.bin/tail/forward.c
369
file->fp = NULL;
usr.bin/tail/forward.c
382
if (file->fp != NULL)
usr.bin/tail/forward.c
383
fclose(file->fp);
usr.bin/tail/forward.c
384
file->fp = ftmp;
usr.bin/tail/forward.c
395
if (file->fp && !show(file))
usr.bin/tail/forward.c
97
forward(FILE *fp, const char *fn, enum STYLE style, off_t off, struct stat *sbp)
usr.bin/tail/read.c
134
lines(FILE *fp, const char *fn, off_t off)
usr.bin/tail/read.c
151
while ((ch = getc(fp)) != EOF) {
usr.bin/tail/read.c
174
if (ferror(fp)) {
usr.bin/tail/read.c
64
bytes(FILE *fp, const char *fn, off_t off)
usr.bin/tail/read.c
74
for (wrap = 0, ep = p + off; (ch = getc(fp)) != EOF;) {
usr.bin/tail/read.c
81
if (ferror(fp)) {
usr.bin/tail/reverse.c
105
r_reg(FILE *fp, const char *fn, enum STYLE style, off_t off, struct stat *sbp)
usr.bin/tail/reverse.c
116
map.fd = fileno(fp);
usr.bin/tail/reverse.c
187
r_buf(FILE *fp, const char *fn)
usr.bin/tail/reverse.c
197
while (!feof(fp)) {
usr.bin/tail/reverse.c
217
while ((!feof(fp)) && len < BSZ) {
usr.bin/tail/reverse.c
219
len += fread(p, 1, BSZ - len, fp);
usr.bin/tail/reverse.c
220
if (ferror(fp)) {
usr.bin/tail/reverse.c
76
reverse(FILE *fp, const char *fn, enum STYLE style, off_t off, struct stat *sbp)
usr.bin/tail/reverse.c
82
r_reg(fp, fn, style, off, sbp);
usr.bin/tail/reverse.c
87
bytes(fp, fn, off);
usr.bin/tail/reverse.c
91
lines(fp, fn, off);
usr.bin/tail/reverse.c
94
r_buf(fp, fn);
usr.bin/tail/tail.c
212
filep->fp = fileargs_fopen(fa, filep->file_name, "r");
usr.bin/tail/tail.c
213
if (filep->fp == NULL ||
usr.bin/tail/tail.c
214
fstat(fileno(filep->fp), &filep->st)) {
usr.bin/tail/tail.c
215
if (filep->fp != NULL) {
usr.bin/tail/tail.c
216
fclose(filep->fp);
usr.bin/tail/tail.c
217
filep->fp = NULL;
usr.bin/tail/tail.c
227
if ((fp = fileargs_fopen(fa, fn, "r")) == NULL ||
usr.bin/tail/tail.c
228
fstat(fileno(fp), &sb)) {
usr.bin/tail/tail.c
238
reverse(fp, fn, style, off, &sb);
usr.bin/tail/tail.c
240
forward(fp, fn, style, off, &sb);
usr.bin/tail/tail.c
264
file.fp = stdin;
usr.bin/tail/tail.c
78
FILE *fp;
usr.bin/tip/tip/cmds.c
267
FILE *fp;
usr.bin/tip/tip/cmds.c
281
if ((fp = fopen(fnamex, "r")) == NULL) {
usr.bin/tip/tip/cmds.c
285
transmit(fp, value(EOFWRITE), NULL);
usr.bin/tip/tip/cmds.c
295
transmit(FILE *fp, char *eofchars, char *command)
usr.bin/tip/tip/cmds.c
323
c = getc(fp);
usr.bin/tip/tip/cmds.c
375
fclose(fp);
usr.bin/tip/tip/cmds.c
394
FILE *fp;
usr.bin/tip/tip/cmds.c
409
if ((fp = fopen(copynamex, "r")) == NULL) {
usr.bin/tip/tip/cmds.c
418
transmit(fp, "\04", line);
usr.bin/tip/tip/value.c
102
fclose(fp);
usr.bin/tip/tip/value.c
56
FILE *fp;
usr.bin/tip/tip/value.c
92
if ((fp = fopen(file, "r")) != NULL) {
usr.bin/tip/tip/value.c
95
while (fgets(file, sizeof(file)-1, fp) != NULL) {
usr.bin/top/machine.c
1003
dump_sort_names(FILE *fp)
usr.bin/top/machine.c
1011
fprintf(fp, " %s", info->si_name);
usr.bin/top/machine.h
101
void dump_sort_names(FILE *fp);
usr.bin/truss/setup.c
674
decode_siginfo(FILE *fp, siginfo_t *si)
usr.bin/truss/setup.c
678
fprintf(fp, " code=");
usr.bin/truss/setup.c
681
fprintf(fp, "%d", si->si_code);
usr.bin/truss/setup.c
683
fprintf(fp, "%s", str);
usr.bin/truss/setup.c
688
fprintf(fp, " value=%p", si->si_value.sival_ptr);
usr.bin/truss/setup.c
692
fprintf(fp, " pid=%jd uid=%jd", (intmax_t)si->si_pid,
usr.bin/truss/setup.c
696
fprintf(fp, " value=%p", si->si_value.sival_ptr);
usr.bin/truss/setup.c
697
fprintf(fp, " timerid=%d", si->si_timerid);
usr.bin/truss/setup.c
698
fprintf(fp, " overrun=%d", si->si_overrun);
usr.bin/truss/setup.c
700
fprintf(fp, " errno=%d", si->si_errno);
usr.bin/truss/setup.c
703
fprintf(fp, " value=%p", si->si_value.sival_ptr);
usr.bin/truss/setup.c
706
fprintf(fp, " value=%p", si->si_value.sival_ptr);
usr.bin/truss/setup.c
707
fprintf(fp, " mqd=%d", si->si_mqd);
usr.bin/truss/setup.c
715
fprintf(fp, " trapno=%d", si->si_trapno);
usr.bin/truss/setup.c
716
fprintf(fp, " addr=%p", si->si_addr);
usr.bin/truss/setup.c
719
fprintf(fp, " pid=%jd uid=%jd", (intmax_t)si->si_pid,
usr.bin/truss/setup.c
721
fprintf(fp, " status=%d", si->si_status);
usr.bin/truss/syscalls.c
1036
print_kevent(FILE *fp, struct kevent *ke)
usr.bin/truss/syscalls.c
1047
fprintf(fp, "%ju", (uintmax_t)ke->ident);
usr.bin/truss/syscalls.c
1050
fputs(strsig2(ke->ident), fp);
usr.bin/truss/syscalls.c
1053
fprintf(fp, "%p", (void *)ke->ident);
usr.bin/truss/syscalls.c
1055
fprintf(fp, ",");
usr.bin/truss/syscalls.c
1056
print_integer_arg(sysdecode_kevent_filter, fp, ke->filter);
usr.bin/truss/syscalls.c
1057
fprintf(fp, ",");
usr.bin/truss/syscalls.c
1058
print_mask_arg(sysdecode_kevent_flags, fp, ke->flags);
usr.bin/truss/syscalls.c
1059
fprintf(fp, ",");
usr.bin/truss/syscalls.c
1060
sysdecode_kevent_fflags(fp, ke->filter, ke->fflags, 16);
usr.bin/truss/syscalls.c
1061
fprintf(fp, ",%#jx,%p", (uintmax_t)ke->data, ke->udata);
usr.bin/truss/syscalls.c
1065
print_utrace(FILE *fp, void *utrace_addr, size_t len)
usr.bin/truss/syscalls.c
1069
fprintf(fp, "{ ");
usr.bin/truss/syscalls.c
1070
if (sysdecode_utrace(fp, utrace_addr, len)) {
usr.bin/truss/syscalls.c
1071
fprintf(fp, " }");
usr.bin/truss/syscalls.c
1076
fprintf(fp, "%zu:", len);
usr.bin/truss/syscalls.c
1078
fprintf(fp, " %02x", *utrace_buffer++);
usr.bin/truss/syscalls.c
1079
fprintf(fp, " }");
usr.bin/truss/syscalls.c
1083
print_pointer(FILE *fp, uintptr_t arg)
usr.bin/truss/syscalls.c
1086
fprintf(fp, "%p", (void *)arg);
usr.bin/truss/syscalls.c
1090
print_sockaddr(FILE *fp, struct trussinfo *trussinfo, uintptr_t arg,
usr.bin/truss/syscalls.c
1102
fputs("NULL", fp);
usr.bin/truss/syscalls.c
1107
print_pointer(fp, arg);
usr.bin/truss/syscalls.c
1114
print_pointer(fp, arg);
usr.bin/truss/syscalls.c
1124
fprintf(fp, "{ AF_INET %s:%d }", addr,
usr.bin/truss/syscalls.c
1133
fprintf(fp, "{ AF_INET6 [%s]:%d }", addr,
usr.bin/truss/syscalls.c
1138
fprintf(fp, "{ AF_UNIX \"%.*s\" }",
usr.bin/truss/syscalls.c
1144
fprintf(fp,
usr.bin/truss/syscalls.c
1149
fprintf(fp, "%s 0x%02x",
usr.bin/truss/syscalls.c
1152
fputs(" } }", fp);
usr.bin/truss/syscalls.c
1160
print_iovec(FILE *fp, struct trussinfo *trussinfo, uintptr_t arg, int iovcnt)
usr.bin/truss/syscalls.c
1171
print_pointer(fp, arg);
usr.bin/truss/syscalls.c
1181
print_pointer(fp, arg);
usr.bin/truss/syscalls.c
1185
fputs("[", fp);
usr.bin/truss/syscalls.c
1194
fprintf(fp, "%s{", (i > 0) ? "," : "");
usr.bin/truss/syscalls.c
1205
fprintf(fp, "\"%s\"%s", tmp3,
usr.bin/truss/syscalls.c
1209
print_pointer(fp, (uintptr_t)iov[i].iov_base);
usr.bin/truss/syscalls.c
1211
fprintf(fp, ",%zu}", iov[i].iov_len);
usr.bin/truss/syscalls.c
1213
fprintf(fp, "%s%s", iov_truncated ? ",..." : "", "]");
usr.bin/truss/syscalls.c
1217
print_sigval(FILE *fp, union sigval *sv)
usr.bin/truss/syscalls.c
1219
fprintf(fp, "{ %d, %p }", sv->sival_int, sv->sival_ptr);
usr.bin/truss/syscalls.c
1223
print_sigevent(FILE *fp, struct sigevent *se)
usr.bin/truss/syscalls.c
1225
fputs("{ sigev_notify=", fp);
usr.bin/truss/syscalls.c
1228
fputs("SIGEV_NONE", fp);
usr.bin/truss/syscalls.c
1231
fprintf(fp, "SIGEV_SIGNAL, sigev_signo=%s, sigev_value=",
usr.bin/truss/syscalls.c
1233
print_sigval(fp, &se->sigev_value);
usr.bin/truss/syscalls.c
1236
fputs("SIGEV_THREAD, sigev_value=", fp);
usr.bin/truss/syscalls.c
1237
print_sigval(fp, &se->sigev_value);
usr.bin/truss/syscalls.c
1240
fprintf(fp, "SIGEV_KEVENT, sigev_notify_kqueue=%d, sigev_notify_kevent_flags=",
usr.bin/truss/syscalls.c
1242
print_mask_arg(sysdecode_kevent_flags, fp, se->sigev_notify_kevent_flags);
usr.bin/truss/syscalls.c
1245
fprintf(fp, "SIGEV_THREAD_ID, sigev_notify_thread_id=%d, sigev_signo=%s, sigev_value=",
usr.bin/truss/syscalls.c
1247
print_sigval(fp, &se->sigev_value);
usr.bin/truss/syscalls.c
1250
fprintf(fp, "%d", se->sigev_notify);
usr.bin/truss/syscalls.c
1253
fputs(" }", fp);
usr.bin/truss/syscalls.c
1257
print_aiocb(FILE *fp, struct aiocb *cb)
usr.bin/truss/syscalls.c
1259
fprintf(fp, "{ %d,%jd,%p,%zu,%s,",
usr.bin/truss/syscalls.c
1265
print_sigevent(fp, &cb->aio_sigevent);
usr.bin/truss/syscalls.c
1266
fputs(" }", fp);
usr.bin/truss/syscalls.c
1270
print_gen_cmsg(FILE *fp, struct cmsghdr *cmsghdr)
usr.bin/truss/syscalls.c
1274
fputs("{", fp);
usr.bin/truss/syscalls.c
1277
fprintf(fp, "%s0x%02x", q == CMSG_DATA(cmsghdr) ? "" : ",", *q);
usr.bin/truss/syscalls.c
1279
fputs("}", fp);
usr.bin/truss/syscalls.c
1283
print_sctp_initmsg(FILE *fp, struct sctp_initmsg *init)
usr.bin/truss/syscalls.c
1285
fprintf(fp, "{out=%u,", init->sinit_num_ostreams);
usr.bin/truss/syscalls.c
1286
fprintf(fp, "in=%u,", init->sinit_max_instreams);
usr.bin/truss/syscalls.c
1287
fprintf(fp, "max_rtx=%u,", init->sinit_max_attempts);
usr.bin/truss/syscalls.c
1288
fprintf(fp, "max_rto=%u}", init->sinit_max_init_timeo);
usr.bin/truss/syscalls.c
1292
print_sctp_sndrcvinfo(FILE *fp, bool receive, struct sctp_sndrcvinfo *info)
usr.bin/truss/syscalls.c
1294
fprintf(fp, "{sid=%u,", info->sinfo_stream);
usr.bin/truss/syscalls.c
1296
fprintf(fp, "ssn=%u,", info->sinfo_ssn);
usr.bin/truss/syscalls.c
1298
fputs("flgs=", fp);
usr.bin/truss/syscalls.c
1299
sysdecode_sctp_sinfo_flags(fp, info->sinfo_flags);
usr.bin/truss/syscalls.c
1300
fprintf(fp, ",ppid=%u,", ntohl(info->sinfo_ppid));
usr.bin/truss/syscalls.c
1302
fprintf(fp, "ctx=%u,", info->sinfo_context);
usr.bin/truss/syscalls.c
1303
fprintf(fp, "ttl=%u,", info->sinfo_timetolive);
usr.bin/truss/syscalls.c
1306
fprintf(fp, "tsn=%u,", info->sinfo_tsn);
usr.bin/truss/syscalls.c
1307
fprintf(fp, "cumtsn=%u,", info->sinfo_cumtsn);
usr.bin/truss/syscalls.c
1309
fprintf(fp, "id=%u}", info->sinfo_assoc_id);
usr.bin/truss/syscalls.c
1313
print_sctp_sndinfo(FILE *fp, struct sctp_sndinfo *info)
usr.bin/truss/syscalls.c
1315
fprintf(fp, "{sid=%u,", info->snd_sid);
usr.bin/truss/syscalls.c
1316
fputs("flgs=", fp);
usr.bin/truss/syscalls.c
1317
print_mask_arg(sysdecode_sctp_snd_flags, fp, info->snd_flags);
usr.bin/truss/syscalls.c
1318
fprintf(fp, ",ppid=%u,", ntohl(info->snd_ppid));
usr.bin/truss/syscalls.c
1319
fprintf(fp, "ctx=%u,", info->snd_context);
usr.bin/truss/syscalls.c
1320
fprintf(fp, "id=%u}", info->snd_assoc_id);
usr.bin/truss/syscalls.c
1324
print_sctp_rcvinfo(FILE *fp, struct sctp_rcvinfo *info)
usr.bin/truss/syscalls.c
1326
fprintf(fp, "{sid=%u,", info->rcv_sid);
usr.bin/truss/syscalls.c
1327
fprintf(fp, "ssn=%u,", info->rcv_ssn);
usr.bin/truss/syscalls.c
1328
fputs("flgs=", fp);
usr.bin/truss/syscalls.c
1329
print_mask_arg(sysdecode_sctp_rcv_flags, fp, info->rcv_flags);
usr.bin/truss/syscalls.c
1330
fprintf(fp, ",ppid=%u,", ntohl(info->rcv_ppid));
usr.bin/truss/syscalls.c
1331
fprintf(fp, "tsn=%u,", info->rcv_tsn);
usr.bin/truss/syscalls.c
1332
fprintf(fp, "cumtsn=%u,", info->rcv_cumtsn);
usr.bin/truss/syscalls.c
1333
fprintf(fp, "ctx=%u,", info->rcv_context);
usr.bin/truss/syscalls.c
1334
fprintf(fp, "id=%u}", info->rcv_assoc_id);
usr.bin/truss/syscalls.c
1338
print_sctp_nxtinfo(FILE *fp, struct sctp_nxtinfo *info)
usr.bin/truss/syscalls.c
1340
fprintf(fp, "{sid=%u,", info->nxt_sid);
usr.bin/truss/syscalls.c
1341
fputs("flgs=", fp);
usr.bin/truss/syscalls.c
1342
print_mask_arg(sysdecode_sctp_nxt_flags, fp, info->nxt_flags);
usr.bin/truss/syscalls.c
1343
fprintf(fp, ",ppid=%u,", ntohl(info->nxt_ppid));
usr.bin/truss/syscalls.c
1344
fprintf(fp, "len=%u,", info->nxt_length);
usr.bin/truss/syscalls.c
1345
fprintf(fp, "id=%u}", info->nxt_assoc_id);
usr.bin/truss/syscalls.c
1349
print_sctp_prinfo(FILE *fp, struct sctp_prinfo *info)
usr.bin/truss/syscalls.c
1351
fputs("{pol=", fp);
usr.bin/truss/syscalls.c
1352
print_integer_arg(sysdecode_sctp_pr_policy, fp, info->pr_policy);
usr.bin/truss/syscalls.c
1353
fprintf(fp, ",val=%u}", info->pr_value);
usr.bin/truss/syscalls.c
1357
print_sctp_authinfo(FILE *fp, struct sctp_authinfo *info)
usr.bin/truss/syscalls.c
1359
fprintf(fp, "{num=%u}", info->auth_keynumber);
usr.bin/truss/syscalls.c
1363
print_sctp_ipv4_addr(FILE *fp, struct in_addr *addr)
usr.bin/truss/syscalls.c
1370
fprintf(fp, "{addr=%s}", s);
usr.bin/truss/syscalls.c
1372
fputs("{addr=???}", fp);
usr.bin/truss/syscalls.c
1376
print_sctp_ipv6_addr(FILE *fp, struct in6_addr *addr)
usr.bin/truss/syscalls.c
1383
fprintf(fp, "{addr=%s}", s);
usr.bin/truss/syscalls.c
1385
fputs("{addr=???}", fp);
usr.bin/truss/syscalls.c
1389
print_sctp_cmsg(FILE *fp, bool receive, struct cmsghdr *cmsghdr)
usr.bin/truss/syscalls.c
1399
print_sctp_initmsg(fp, (struct sctp_initmsg *)data);
usr.bin/truss/syscalls.c
1401
print_gen_cmsg(fp, cmsghdr);
usr.bin/truss/syscalls.c
1405
print_sctp_sndrcvinfo(fp, receive,
usr.bin/truss/syscalls.c
1408
print_gen_cmsg(fp, cmsghdr);
usr.bin/truss/syscalls.c
1413
print_sctp_extrcvinfo(fp,
usr.bin/truss/syscalls.c
1416
print_gen_cmsg(fp, cmsghdr);
usr.bin/truss/syscalls.c
1421
print_sctp_sndinfo(fp, (struct sctp_sndinfo *)data);
usr.bin/truss/syscalls.c
1423
print_gen_cmsg(fp, cmsghdr);
usr.bin/truss/syscalls.c
1427
print_sctp_rcvinfo(fp, (struct sctp_rcvinfo *)data);
usr.bin/truss/syscalls.c
1429
print_gen_cmsg(fp, cmsghdr);
usr.bin/truss/syscalls.c
1433
print_sctp_nxtinfo(fp, (struct sctp_nxtinfo *)data);
usr.bin/truss/syscalls.c
1435
print_gen_cmsg(fp, cmsghdr);
usr.bin/truss/syscalls.c
1439
print_sctp_prinfo(fp, (struct sctp_prinfo *)data);
usr.bin/truss/syscalls.c
1441
print_gen_cmsg(fp, cmsghdr);
usr.bin/truss/syscalls.c
1445
print_sctp_authinfo(fp, (struct sctp_authinfo *)data);
usr.bin/truss/syscalls.c
1447
print_gen_cmsg(fp, cmsghdr);
usr.bin/truss/syscalls.c
1451
print_sctp_ipv4_addr(fp, (struct in_addr *)data);
usr.bin/truss/syscalls.c
1453
print_gen_cmsg(fp, cmsghdr);
usr.bin/truss/syscalls.c
1457
print_sctp_ipv6_addr(fp, (struct in6_addr *)data);
usr.bin/truss/syscalls.c
1459
print_gen_cmsg(fp, cmsghdr);
usr.bin/truss/syscalls.c
1462
print_gen_cmsg(fp, cmsghdr);
usr.bin/truss/syscalls.c
1467
print_cmsgs(FILE *fp, pid_t pid, bool receive, struct msghdr *msghdr)
usr.bin/truss/syscalls.c
1478
fputs("{}", fp);
usr.bin/truss/syscalls.c
1483
print_pointer(fp, (uintptr_t)msghdr->msg_control);
usr.bin/truss/syscalls.c
1489
fputs("{", fp);
usr.bin/truss/syscalls.c
1494
fprintf(fp, "{<invalid cmsg, len=%u>}",
usr.bin/truss/syscalls.c
1506
fprintf(fp, "%s{level=", first ? "" : ",");
usr.bin/truss/syscalls.c
1507
print_integer_arg(sysdecode_sockopt_level, fp, level);
usr.bin/truss/syscalls.c
1508
fputs(",type=", fp);
usr.bin/truss/syscalls.c
1511
fputs(temp, fp);
usr.bin/truss/syscalls.c
1513
fprintf(fp, "%d", type);
usr.bin/truss/syscalls.c
1515
fputs(",data=", fp);
usr.bin/truss/syscalls.c
1518
print_sctp_cmsg(fp, receive, cmsghdr);
usr.bin/truss/syscalls.c
1521
print_gen_cmsg(fp, cmsghdr);
usr.bin/truss/syscalls.c
1524
fputs("}", fp);
usr.bin/truss/syscalls.c
1527
fputs("}", fp);
usr.bin/truss/syscalls.c
1532
print_sysctl_oid(FILE *fp, int *oid, size_t len)
usr.bin/truss/syscalls.c
1538
fprintf(fp, "{ ");
usr.bin/truss/syscalls.c
1540
fprintf(fp, "%s%d", first ? "" : ".", oid[i]);
usr.bin/truss/syscalls.c
1543
fprintf(fp, " }");
usr.bin/truss/syscalls.c
1547
print_sysctl(FILE *fp, int *oid, size_t len)
usr.bin/truss/syscalls.c
1558
print_sysctl_oid(fp, oid, len);
usr.bin/truss/syscalls.c
1560
fprintf(fp, "%s", name);
usr.bin/truss/syscalls.c
1579
print_netlink(FILE *fp, struct trussinfo *trussinfo, struct msghdr *msg)
usr.bin/truss/syscalls.c
1624
if (sysdecode_netlink(fp, buf, read_len)) {
usr.bin/truss/syscalls.c
1642
FILE *fp;
usr.bin/truss/syscalls.c
1647
fp = open_memstream(&tmp, &tmplen);
usr.bin/truss/syscalls.c
1651
fprintf(fp, "0x%x", (int)args[sc->offset]);
usr.bin/truss/syscalls.c
1654
fprintf(fp, "0%o", (int)args[sc->offset]);
usr.bin/truss/syscalls.c
1657
fprintf(fp, "%d", (int)args[sc->offset]);
usr.bin/truss/syscalls.c
1660
fprintf(fp, "%u", (unsigned int)args[sc->offset]);
usr.bin/truss/syscalls.c
1667
fprintf(fp, "{ %u }", val);
usr.bin/truss/syscalls.c
1669
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
1673
fprintf(fp, "0x%lx", (long)args[sc->offset]);
usr.bin/truss/syscalls.c
1676
fprintf(fp, "%ld", (long)args[sc->offset]);
usr.bin/truss/syscalls.c
1679
fprintf(fp, "%zu", (size_t)args[sc->offset]);
usr.bin/truss/syscalls.c
1684
fprintf(fp, "SHM_ANON");
usr.bin/truss/syscalls.c
1693
fprintf(fp, "\"%s\"", tmp2);
usr.bin/truss/syscalls.c
1732
fprintf(fp, "\"%s\"%s", tmp3, truncated ?
usr.bin/truss/syscalls.c
1736
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
1763
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
1774
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
1780
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
1785
fputc('[', fp);
usr.bin/truss/syscalls.c
1803
fprintf(fp, "%s \"%s\"", first ? "" : ",", string);
usr.bin/truss/syscalls.c
1812
fprintf(fp, ", <inval>");
usr.bin/truss/syscalls.c
1818
fputs(" ]", fp);
usr.bin/truss/syscalls.c
1839
fprintf(fp, "%jd", (intmax_t)value);
usr.bin/truss/syscalls.c
1841
fprintf(fp, "0x%jx", (intmax_t)value);
usr.bin/truss/syscalls.c
1849
fprintf(fp, "{ 0x%jx }", (uintmax_t)val);
usr.bin/truss/syscalls.c
1851
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
1855
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
1863
fprintf(fp, "\"%s\"", tmp2);
usr.bin/truss/syscalls.c
1874
fputs(temp, fp);
usr.bin/truss/syscalls.c
1876
fprintf(fp, "0x%lx { IO%s%s 0x%lx('%c'), %lu, %lu }",
usr.bin/truss/syscalls.c
1888
fprintf(fp, "{ %jd.%09ld }", (intmax_t)ts.tv_sec,
usr.bin/truss/syscalls.c
1891
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
1900
fputs("{ ", fp);
usr.bin/truss/syscalls.c
1903
fputs(sep, fp);
usr.bin/truss/syscalls.c
1907
fprintf(fp, "UTIME_NOW");
usr.bin/truss/syscalls.c
1910
fprintf(fp, "UTIME_OMIT");
usr.bin/truss/syscalls.c
1913
fprintf(fp, "%jd.%09ld",
usr.bin/truss/syscalls.c
1919
fputs(" }", fp);
usr.bin/truss/syscalls.c
1921
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
1928
fprintf(fp, "{ %jd.%06ld }", (intmax_t)tv.tv_sec,
usr.bin/truss/syscalls.c
1931
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
1938
fprintf(fp, "{ %jd.%06ld, %jd.%06ld }",
usr.bin/truss/syscalls.c
1942
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
1949
fprintf(fp, "{ %jd.%06ld, %jd.%06ld }",
usr.bin/truss/syscalls.c
1955
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
1964
fprintf(fp, "{ %s, 0x%lx }",
usr.bin/truss/syscalls.c
1968
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
1986
fputs("{", fp);
usr.bin/truss/syscalls.c
1988
fprintf(fp, " %d/%s", pfd[i].fd,
usr.bin/truss/syscalls.c
1991
fputs(" }", fp);
usr.bin/truss/syscalls.c
1993
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2013
fputs("{", fp);
usr.bin/truss/syscalls.c
2016
fprintf(fp, " %d", i);
usr.bin/truss/syscalls.c
2018
fputs(" }", fp);
usr.bin/truss/syscalls.c
2020
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2025
fputs(strsig2(args[sc->offset]), fp);
usr.bin/truss/syscalls.c
2033
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2036
fputs("{ ", fp);
usr.bin/truss/syscalls.c
2040
fprintf(fp, "%s%s", !first ? "|" : "",
usr.bin/truss/syscalls.c
2046
fputc(' ', fp);
usr.bin/truss/syscalls.c
2047
fputc('}', fp);
usr.bin/truss/syscalls.c
2051
print_integer_arg(sysdecode_sigprocmask_how, fp,
usr.bin/truss/syscalls.c
2057
sysdecode_fcntl_arg(fp, args[sc->offset - 1],
usr.bin/truss/syscalls.c
2061
print_mask_arg(sysdecode_open_flags, fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2064
print_integer_arg(sysdecode_fcntl_cmd, fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2067
print_mask_arg(sysdecode_close_range_flags, fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2070
print_mask_arg(sysdecode_mmap_prot, fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2073
print_mask_arg(sysdecode_mmap_flags, fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2076
print_integer_arg(sysdecode_whence, fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2079
print_mask_arg(sysdecode_shmflags, fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2082
print_integer_arg(sysdecode_socketdomain, fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2085
print_mask_arg(sysdecode_socket_type, fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2088
print_integer_arg(sysdecode_shutdown_how, fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2091
print_integer_arg(sysdecode_rlimit, fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2094
print_integer_arg(sysdecode_getrusage_who, fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2097
print_integer_arg(sysdecode_pathconf_name, fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2100
print_mask_arg(sysdecode_rfork_flags, fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2106
fputs("NULL", fp);
usr.bin/truss/syscalls.c
2119
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2125
print_sockaddr(fp, trussinfo, args[sc->offset], len);
usr.bin/truss/syscalls.c
2132
fputs("{ ", fp);
usr.bin/truss/syscalls.c
2134
fputs("SIG_DFL", fp);
usr.bin/truss/syscalls.c
2136
fputs("SIG_IGN", fp);
usr.bin/truss/syscalls.c
2138
fprintf(fp, "%p", sa.sa_handler);
usr.bin/truss/syscalls.c
2139
fprintf(fp, " %s ss_t }",
usr.bin/truss/syscalls.c
2142
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2149
print_sigevent(fp, &se);
usr.bin/truss/syscalls.c
2151
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2182
fputc('{', fp);
usr.bin/truss/syscalls.c
2184
fputc(' ', fp);
usr.bin/truss/syscalls.c
2185
print_kevent(fp, &ke[i]);
usr.bin/truss/syscalls.c
2187
fputs(" }", fp);
usr.bin/truss/syscalls.c
2189
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2217
fputc('{', fp);
usr.bin/truss/syscalls.c
2219
fputc(' ', fp);
usr.bin/truss/syscalls.c
2226
print_kevent(fp, &ke);
usr.bin/truss/syscalls.c
2228
fputs(" }", fp);
usr.bin/truss/syscalls.c
2230
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2243
fprintf(fp,
usr.bin/truss/syscalls.c
2248
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2260
fprintf(fp,
usr.bin/truss/syscalls.c
2265
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2284
fprintf(fp,
usr.bin/truss/syscalls.c
2289
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2298
fprintf(fp,
usr.bin/truss/syscalls.c
2304
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2312
fprintf(fp, "{ cur=%ju,max=%ju }",
usr.bin/truss/syscalls.c
2315
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2323
fputs("{ ", fp);
usr.bin/truss/syscalls.c
2325
fputs("CONTINUED", fp);
usr.bin/truss/syscalls.c
2327
fprintf(fp, "EXITED,val=%d",
usr.bin/truss/syscalls.c
2330
fprintf(fp, "SIGNALED,sig=%s%s",
usr.bin/truss/syscalls.c
2334
fprintf(fp, "STOPPED,sig=%s",
usr.bin/truss/syscalls.c
2336
fputs(" }", fp);
usr.bin/truss/syscalls.c
2338
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2342
print_mask_arg(sysdecode_wait6_options, fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2345
print_integer_arg(sysdecode_idtype, fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2348
print_integer_arg(sysdecode_procctl_cmd, fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2353
if (print_mask_arg_part(sysdecode_umtx_op_flags, fp,
usr.bin/truss/syscalls.c
2355
fprintf(fp, "|");
usr.bin/truss/syscalls.c
2356
print_integer_arg(sysdecode_umtx_op, fp, rem);
usr.bin/truss/syscalls.c
2360
print_integer_arg(sysdecode_atfd, fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2363
print_mask_arg(sysdecode_atflags, fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2366
print_mask_arg(sysdecode_access_mode, fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2369
print_integer_arg(sysdecode_sysarch_number, fp,
usr.bin/truss/syscalls.c
2381
fprintf(fp, "\"");
usr.bin/truss/syscalls.c
2383
fprintf(fp, "sysctl.");
usr.bin/truss/syscalls.c
2386
fprintf(fp, "debug");
usr.bin/truss/syscalls.c
2389
fprintf(fp, "name ");
usr.bin/truss/syscalls.c
2390
print_sysctl_oid(fp, oid + 2, len - 2);
usr.bin/truss/syscalls.c
2393
fprintf(fp, "next");
usr.bin/truss/syscalls.c
2396
fprintf(fp, "name2oid %s",
usr.bin/truss/syscalls.c
2402
fprintf(fp, "oidfmt ");
usr.bin/truss/syscalls.c
2403
print_sysctl(fp, oid + 2, len - 2);
usr.bin/truss/syscalls.c
2406
fprintf(fp, "oiddescr ");
usr.bin/truss/syscalls.c
2407
print_sysctl(fp, oid + 2, len - 2);
usr.bin/truss/syscalls.c
2410
fprintf(fp, "oidlabel ");
usr.bin/truss/syscalls.c
2411
print_sysctl(fp, oid + 2, len - 2);
usr.bin/truss/syscalls.c
2414
fprintf(fp, "nextnoskip");
usr.bin/truss/syscalls.c
2417
print_sysctl(fp, oid + 1, len - 1);
usr.bin/truss/syscalls.c
2420
print_sysctl(fp, oid, len);
usr.bin/truss/syscalls.c
2422
fprintf(fp, "\"");
usr.bin/truss/syscalls.c
2438
fprintf(fp, "{ %d, %d }", (int)retval[0], (int)retval[1]);
usr.bin/truss/syscalls.c
2449
print_utrace(fp, utrace_addr, len);
usr.bin/truss/syscalls.c
2451
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2468
fprintf(fp, "{");
usr.bin/truss/syscalls.c
2470
fprintf(fp, i == 0 ? " %d" : ", %d",
usr.bin/truss/syscalls.c
2472
fprintf(fp, truncated ? ", ... }" : " }");
usr.bin/truss/syscalls.c
2474
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2478
print_mask_arg(sysdecode_pipe2_flags, fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2486
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2491
print_mask_arg32(sysdecode_cap_fcntlrights, fp, rights);
usr.bin/truss/syscalls.c
2495
print_integer_arg(sysdecode_fadvice, fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2500
if (!sysdecode_fileflags(fp, args[sc->offset], &rem))
usr.bin/truss/syscalls.c
2501
fprintf(fp, "0x%x", rem);
usr.bin/truss/syscalls.c
2503
fprintf(fp, "|0x%x", rem);
usr.bin/truss/syscalls.c
2507
print_mask_arg(sysdecode_flock_operation, fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2510
print_integer_arg(sysdecode_getfsstat_mode, fp,
usr.bin/truss/syscalls.c
2514
print_mask_arg(sysdecode_inotifyflags, fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2517
print_integer_arg(sysdecode_itimer, fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2520
print_integer_arg(sysdecode_kldsym_cmd, fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2523
print_integer_arg(sysdecode_kldunload_flags, fp,
usr.bin/truss/syscalls.c
2527
fputs(xlookup(aio_fsync_ops, args[sc->offset]), fp);
usr.bin/truss/syscalls.c
2530
fputs(xlookup(lio_modes, args[sc->offset]), fp);
usr.bin/truss/syscalls.c
2533
print_integer_arg(sysdecode_madvice, fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2536
fprintf(fp, "%u", (socklen_t)args[sc->offset]);
usr.bin/truss/syscalls.c
2545
fputs("0", fp);
usr.bin/truss/syscalls.c
2549
fputs(temp, fp);
usr.bin/truss/syscalls.c
2551
fprintf(fp, "%d", protocol);
usr.bin/truss/syscalls.c
2557
print_integer_arg(sysdecode_sockopt_level, fp,
usr.bin/truss/syscalls.c
2568
fputs(temp, fp);
usr.bin/truss/syscalls.c
2570
fprintf(fp, "%d", name);
usr.bin/truss/syscalls.c
2575
print_mask_arg(sysdecode_msg_flags, fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2582
fputs("{ ", fp);
usr.bin/truss/syscalls.c
2583
sysdecode_cap_rights(fp, &rights);
usr.bin/truss/syscalls.c
2584
fputs(" }", fp);
usr.bin/truss/syscalls.c
2586
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2590
print_integer_arg(sysdecode_acltype, fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2593
print_integer_arg(sysdecode_extattrnamespace, fp,
usr.bin/truss/syscalls.c
2597
print_integer_arg(sysdecode_minherit_inherit, fp,
usr.bin/truss/syscalls.c
2601
print_mask_arg(sysdecode_mlockall_flags, fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2604
print_mask_arg(sysdecode_mount_flags, fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2607
print_mask_arg(sysdecode_msync_flags, fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2610
print_integer_arg(sysdecode_prio_which, fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2613
print_integer_arg(sysdecode_ptrace_request, fp,
usr.bin/truss/syscalls.c
2617
print_mask_arg(sysdecode_sendfile_flags, fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2624
fprintf(fp, "{");
usr.bin/truss/syscalls.c
2625
print_iovec(fp, trussinfo, (uintptr_t)hdtr.headers,
usr.bin/truss/syscalls.c
2627
print_iovec(fp, trussinfo, (uintptr_t)hdtr.trailers,
usr.bin/truss/syscalls.c
2629
fprintf(fp, "}");
usr.bin/truss/syscalls.c
2631
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2635
if (!sysdecode_quotactl_cmd(fp, args[sc->offset]))
usr.bin/truss/syscalls.c
2636
fprintf(fp, "%#x", (int)args[sc->offset]);
usr.bin/truss/syscalls.c
2639
print_mask_arg(sysdecode_reboot_howto, fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2642
print_integer_arg(sysdecode_rtprio_function, fp,
usr.bin/truss/syscalls.c
2646
print_integer_arg(sysdecode_scheduler_policy, fp,
usr.bin/truss/syscalls.c
2653
fprintf(fp, "{ %d }", sp.sched_priority);
usr.bin/truss/syscalls.c
2655
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2662
fprintf(fp, "{ %s }", strsig2(sig));
usr.bin/truss/syscalls.c
2664
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2671
fprintf(fp, "{ signo=%s", strsig2(si.si_signo));
usr.bin/truss/syscalls.c
2672
decode_siginfo(fp, &si);
usr.bin/truss/syscalls.c
2673
fprintf(fp, " }");
usr.bin/truss/syscalls.c
2675
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2684
print_iovec(fp, trussinfo, args[sc->offset],
usr.bin/truss/syscalls.c
2691
print_aiocb(fp, &cb);
usr.bin/truss/syscalls.c
2693
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2714
fputs("[", fp);
usr.bin/truss/syscalls.c
2718
fputc(',', fp);
usr.bin/truss/syscalls.c
2720
print_aiocb(fp, &cb);
usr.bin/truss/syscalls.c
2722
print_pointer(fp, cbs[i]);
usr.bin/truss/syscalls.c
2725
fputs(",...", fp);
usr.bin/truss/syscalls.c
2726
fputs("]", fp);
usr.bin/truss/syscalls.c
2728
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2741
print_aiocb(fp, &cb);
usr.bin/truss/syscalls.c
2743
print_pointer(fp, cbp);
usr.bin/truss/syscalls.c
2745
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2753
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2756
print_sctp_sndrcvinfo(fp, sc->type & OUT, &info);
usr.bin/truss/syscalls.c
2764
print_pointer(fp, args[sc->offset]);
usr.bin/truss/syscalls.c
2767
fputs("{", fp);
usr.bin/truss/syscalls.c
2768
print_sockaddr(fp, trussinfo, (uintptr_t)msghdr.msg_name, msghdr.msg_namelen);
usr.bin/truss/syscalls.c
2769
fprintf(fp, ",%d,", msghdr.msg_namelen);
usr.bin/truss/syscalls.c
2771
if (!print_netlink(fp, trussinfo, &msghdr)) {
usr.bin/truss/syscalls.c
2772
print_iovec(fp, trussinfo, (uintptr_t)msghdr.msg_iov,
usr.bin/truss/syscalls.c
2775
fprintf(fp, ",%d,", msghdr.msg_iovlen);
usr.bin/truss/syscalls.c
2776
print_cmsgs(fp, pid, sc->type & OUT, &msghdr);
usr.bin/truss/syscalls.c
2777
fprintf(fp, ",%u,", msghdr.msg_controllen);
usr.bin/truss/syscalls.c
2778
print_mask_arg(sysdecode_msg_flags, fp, msghdr.msg_flags);
usr.bin/truss/syscalls.c
2779
fputs("}", fp);
usr.bin/truss/syscalls.c
2786
fclose(fp);
usr.bin/truss/syscalls.c
760
print_integer_arg(const char *(*decoder)(int), FILE *fp, int value)
usr.bin/truss/syscalls.c
766
fputs(str, fp);
usr.bin/truss/syscalls.c
768
fprintf(fp, "%d", value);
usr.bin/truss/syscalls.c
772
print_mask_arg_part(bool (*decoder)(FILE *, int, int *), FILE *fp, int value,
usr.bin/truss/syscalls.c
776
return (decoder(fp, value, rem));
usr.bin/truss/syscalls.c
780
print_mask_arg(bool (*decoder)(FILE *, int, int *), FILE *fp, int value)
usr.bin/truss/syscalls.c
784
if (!print_mask_arg_part(decoder, fp, value, &rem))
usr.bin/truss/syscalls.c
785
fprintf(fp, "0x%x", rem);
usr.bin/truss/syscalls.c
787
fprintf(fp, "|0x%x", rem);
usr.bin/truss/syscalls.c
791
print_mask_arg32(bool (*decoder)(FILE *, uint32_t, uint32_t *), FILE *fp,
usr.bin/truss/syscalls.c
796
if (!decoder(fp, value, &rem))
usr.bin/truss/syscalls.c
797
fprintf(fp, "0x%x", rem);
usr.bin/truss/syscalls.c
799
fprintf(fp, "|0x%x", rem);
usr.bin/tsort/tsort.c
106
FILE *fp;
usr.bin/tsort/tsort.c
110
fp = NULL;
usr.bin/tsort/tsort.c
131
fp = stdin;
usr.bin/tsort/tsort.c
134
if ((fp = fopen(*argv, "r")) == NULL)
usr.bin/tsort/tsort.c
145
for (n = 0, c = getc(fp);;) {
usr.bin/tsort/tsort.c
147
c = getc(fp);
usr.bin/tsort/tsort.c
158
c = getc(fp);
usr.bin/tsort/tsort.c
167
(void)fclose(fp);
usr.bin/uniq/uniq.c
335
FILE *fp;
usr.bin/uniq/uniq.c
337
if ((fp = fopen(name, mode)) == NULL)
usr.bin/uniq/uniq.c
339
return(fp);
usr.bin/usbhidaction/usbhidaction.c
169
fp = open(pidfile, O_WRONLY|O_CREAT, S_IRUSR|S_IRGRP|S_IROTH);
usr.bin/usbhidaction/usbhidaction.c
170
if (fp < 0)
usr.bin/usbhidaction/usbhidaction.c
176
if (write(fp, buf, sz1) < 0)
usr.bin/usbhidaction/usbhidaction.c
178
close(fp);
usr.bin/usbhidaction/usbhidaction.c
89
int fd, fp, ch, n, val, i;
usr.bin/vtfontcvt/vtfontcvt.c
400
parse_bdf(FILE *fp, unsigned int map_idx)
usr.bin/vtfontcvt/vtfontcvt.c
416
while ((ln = fgetln(fp, &length)) != NULL) {
usr.bin/vtfontcvt/vtfontcvt.c
447
while ((ln = fgetln(fp, &length)) != NULL) {
usr.bin/vtfontcvt/vtfontcvt.c
464
rewind(fp);
usr.bin/vtfontcvt/vtfontcvt.c
470
while ((ln = fgetln(fp, &length)) != NULL) {
usr.bin/vtfontcvt/vtfontcvt.c
504
if ((ln = fgetln(fp, &length)) == NULL)
usr.bin/vtfontcvt/vtfontcvt.c
548
parse_hex(FILE *fp, unsigned int map_idx)
usr.bin/vtfontcvt/vtfontcvt.c
556
while ((ln = fgetln(fp, &length)) != NULL) {
usr.bin/vtfontcvt/vtfontcvt.c
619
FILE *fp;
usr.bin/vtfontcvt/vtfontcvt.c
623
fp = fopen(filename, "r");
usr.bin/vtfontcvt/vtfontcvt.c
624
if (fp == NULL) {
usr.bin/vtfontcvt/vtfontcvt.c
630
rv = parse_hex(fp, map_idx);
usr.bin/vtfontcvt/vtfontcvt.c
632
rv = parse_bdf(fp, map_idx);
usr.bin/vtfontcvt/vtfontcvt.c
633
fclose(fp);
usr.bin/vtfontcvt/vtfontcvt.c
685
write_glyphs(FILE *fp, vt_write cb)
usr.bin/vtfontcvt/vtfontcvt.c
692
if (cb(gl->g_data, wbytes * height, 1, fp) != 1)
usr.bin/vtfontcvt/vtfontcvt.c
717
write_mappings(FILE *fp, unsigned int map_idx)
usr.bin/vtfontcvt/vtfontcvt.c
731
if (fwrite(&fm, sizeof fm, 1, fp) != 1)
usr.bin/vtfontcvt/vtfontcvt.c
740
write_source_mappings(FILE *fp, unsigned int map_idx)
usr.bin/vtfontcvt/vtfontcvt.c
750
if (fprintf(fp, "\t{ 0x%08x, 0x%04x, 0x%04x },\n",
usr.bin/vtfontcvt/vtfontcvt.c
763
FILE *fp;
usr.bin/vtfontcvt/vtfontcvt.c
768
fp = fopen(filename, "wb");
usr.bin/vtfontcvt/vtfontcvt.c
769
if (fp == NULL) {
usr.bin/vtfontcvt/vtfontcvt.c
781
if (fwrite(&fh, sizeof(fh), 1, fp) != 1) {
usr.bin/vtfontcvt/vtfontcvt.c
783
fclose(fp);
usr.bin/vtfontcvt/vtfontcvt.c
787
if (write_glyphs(fp, &fwrite) != 0 ||
usr.bin/vtfontcvt/vtfontcvt.c
788
write_mappings(fp, VFNT_MAP_NORMAL) != 0 ||
usr.bin/vtfontcvt/vtfontcvt.c
789
write_mappings(fp, VFNT_MAP_NORMAL_RIGHT) != 0 ||
usr.bin/vtfontcvt/vtfontcvt.c
790
write_mappings(fp, VFNT_MAP_BOLD) != 0 ||
usr.bin/vtfontcvt/vtfontcvt.c
791
write_mappings(fp, VFNT_MAP_BOLD_RIGHT) != 0) {
usr.bin/vtfontcvt/vtfontcvt.c
793
fclose(fp);
usr.bin/vtfontcvt/vtfontcvt.c
797
fclose(fp);
usr.bin/vtfontcvt/vtfontcvt.c
804
FILE *fp;
usr.bin/vtfontcvt/vtfontcvt.c
810
fp = fopen(filename, "w");
usr.bin/vtfontcvt/vtfontcvt.c
811
if (fp == NULL) {
usr.bin/vtfontcvt/vtfontcvt.c
820
if (fprintf(fp, "/* Generated %ux%u console font source. */\n\n",
usr.bin/vtfontcvt/vtfontcvt.c
823
if (fprintf(fp, "#include <sys/types.h>\n") < 0)
usr.bin/vtfontcvt/vtfontcvt.c
825
if (fprintf(fp, "#include <sys/param.h>\n") < 0)
usr.bin/vtfontcvt/vtfontcvt.c
827
if (fprintf(fp, "#include <sys/font.h>\n\n") < 0)
usr.bin/vtfontcvt/vtfontcvt.c
831
if (fprintf(fp, "static uint8_t FONTDATA_%ux%u[] = {\n",
usr.bin/vtfontcvt/vtfontcvt.c
835
if (write_glyphs(fp, &write_glyph_buf) != 0)
usr.bin/vtfontcvt/vtfontcvt.c
839
if (write_glyph_source(compressed, compressed_size, 1, fp) != 1)
usr.bin/vtfontcvt/vtfontcvt.c
844
if (write_glyphs(fp, &write_glyph_source) != 0)
usr.bin/vtfontcvt/vtfontcvt.c
847
if (fprintf(fp, "};\n\n") < 0)
usr.bin/vtfontcvt/vtfontcvt.c
852
if (fprintf(fp, "static vfnt_map_t "
usr.bin/vtfontcvt/vtfontcvt.c
855
if (write_source_mappings(fp, VFNT_MAP_NORMAL) != 0)
usr.bin/vtfontcvt/vtfontcvt.c
857
if (fprintf(fp, "};\n\n") < 0)
usr.bin/vtfontcvt/vtfontcvt.c
861
if (fprintf(fp, "static vfnt_map_t "
usr.bin/vtfontcvt/vtfontcvt.c
864
if (write_source_mappings(fp, VFNT_MAP_NORMAL_RIGHT) != 0)
usr.bin/vtfontcvt/vtfontcvt.c
866
if (fprintf(fp, "};\n\n") < 0)
usr.bin/vtfontcvt/vtfontcvt.c
870
if (fprintf(fp, "static vfnt_map_t "
usr.bin/vtfontcvt/vtfontcvt.c
873
if (write_source_mappings(fp, VFNT_MAP_BOLD) != 0)
usr.bin/vtfontcvt/vtfontcvt.c
875
if (fprintf(fp, "};\n\n") < 0)
usr.bin/vtfontcvt/vtfontcvt.c
879
if (fprintf(fp, "static vfnt_map_t "
usr.bin/vtfontcvt/vtfontcvt.c
882
if (write_source_mappings(fp, VFNT_MAP_BOLD_RIGHT) != 0)
usr.bin/vtfontcvt/vtfontcvt.c
884
if (fprintf(fp, "};\n\n") < 0)
usr.bin/vtfontcvt/vtfontcvt.c
889
if (fprintf(fp, "struct vt_font font_%ux%u = {\n",
usr.bin/vtfontcvt/vtfontcvt.c
892
if (fprintf(fp, "\t.vf_map\t= {\n") < 0)
usr.bin/vtfontcvt/vtfontcvt.c
895
if (fprintf(fp, "\t\t\tNULL,\n") < 0)
usr.bin/vtfontcvt/vtfontcvt.c
898
if (fprintf(fp, "\t\t\tFONTMAP_NORMAL_%ux%u,\n",
usr.bin/vtfontcvt/vtfontcvt.c
903
if (fprintf(fp, "\t\t\tNULL,\n") < 0)
usr.bin/vtfontcvt/vtfontcvt.c
906
if (fprintf(fp, "\t\t\tFONTMAP_NORMAL_RH_%ux%u,\n",
usr.bin/vtfontcvt/vtfontcvt.c
911
if (fprintf(fp, "\t\t\tNULL,\n") < 0)
usr.bin/vtfontcvt/vtfontcvt.c
914
if (fprintf(fp, "\t\t\tFONTMAP_BOLD_%ux%u,\n",
usr.bin/vtfontcvt/vtfontcvt.c
919
if (fprintf(fp, "\t\t\tNULL\n") < 0)
usr.bin/vtfontcvt/vtfontcvt.c
922
if (fprintf(fp, "\t\t\tFONTMAP_BOLD_RH_%ux%u\n",
usr.bin/vtfontcvt/vtfontcvt.c
926
if (fprintf(fp, "\t\t},\n") < 0)
usr.bin/vtfontcvt/vtfontcvt.c
929
if (fprintf(fp, "\t.vf_bytes\t= NULL,\n") < 0)
usr.bin/vtfontcvt/vtfontcvt.c
932
if (fprintf(fp, "\t.vf_bytes\t= FONTDATA_%ux%u,\n",
usr.bin/vtfontcvt/vtfontcvt.c
937
if (fprintf(fp, "\t.vf_width\t= %u,\n", width) < 0)
usr.bin/vtfontcvt/vtfontcvt.c
939
if (fprintf(fp, "\t.vf_height\t= %u,\n", height) < 0)
usr.bin/vtfontcvt/vtfontcvt.c
941
if (fprintf(fp, "\t.vf_map_count\t= { %u, %u, %u, %u }\n",
usr.bin/vtfontcvt/vtfontcvt.c
946
if (fprintf(fp, "};\n\n") < 0)
usr.bin/vtfontcvt/vtfontcvt.c
950
if (fprintf(fp, "vt_font_bitmap_data_t font_data_%ux%u = {\n",
usr.bin/vtfontcvt/vtfontcvt.c
953
if (fprintf(fp, "\t.vfbd_width\t= %u,\n", width) < 0)
usr.bin/vtfontcvt/vtfontcvt.c
955
if (fprintf(fp, "\t.vfbd_height\t= %u,\n", height) < 0)
usr.bin/vtfontcvt/vtfontcvt.c
958
if (fprintf(fp, "\t.vfbd_compressed_size\t= %zu,\n",
usr.bin/vtfontcvt/vtfontcvt.c
962
if (fprintf(fp, "\t.vfbd_uncompressed_size\t= %zu,\n",
usr.bin/vtfontcvt/vtfontcvt.c
966
if (fprintf(fp, "\t.vfbd_compressed_data\t= FONTDATA_%ux%u,\n",
usr.bin/vtfontcvt/vtfontcvt.c
971
if (fprintf(fp, "\t.vfbd_compressed_size\t= 0,\n") < 0)
usr.bin/vtfontcvt/vtfontcvt.c
973
if (fprintf(fp, "\t.vfbd_uncompressed_size\t= %zu,\n",
usr.bin/vtfontcvt/vtfontcvt.c
977
if (fprintf(fp, "\t.vfbd_compressed_data\t= NULL,\n") < 0)
usr.bin/vtfontcvt/vtfontcvt.c
980
if (fprintf(fp, "\t.vfbd_font = &font_%ux%u\n", width, height) < 0)
usr.bin/vtfontcvt/vtfontcvt.c
982
if (fprintf(fp, "};\n") < 0)
usr.bin/vtfontcvt/vtfontcvt.c
989
fclose(fp);
usr.bin/wall/wall.c
183
FILE *fp;
usr.bin/wall/wall.c
192
if ((fd = mkstemp(tmpname)) == -1 || !(fp = fdopen(fd, "r+")))
usr.bin/wall/wall.c
214
(void)fwprintf(fp, L"\r%79s\r\n", " ");
usr.bin/wall/wall.c
218
(void)fwprintf(fp, L"%-79.79S\007\007\r\n", lbuf);
usr.bin/wall/wall.c
222
(void)fwprintf(fp, L"%-79.79S\r\n", lbuf);
usr.bin/wall/wall.c
224
(void)fwprintf(fp, L"%79s\r\n", " ");
usr.bin/wall/wall.c
238
putwc(L'\r', fp);
usr.bin/wall/wall.c
243
putwc(L' ', fp);
usr.bin/wall/wall.c
244
putwc(L'\r', fp);
usr.bin/wall/wall.c
245
putwc(L'\n', fp);
usr.bin/wall/wall.c
249
putwc(L'\r', fp);
usr.bin/wall/wall.c
250
putwc(L'\n', fp);
usr.bin/wall/wall.c
254
putwc(ch, fp);
usr.bin/wall/wall.c
258
putwc(*tmp, fp);
usr.bin/wall/wall.c
260
putwc(L'\r', fp);
usr.bin/wall/wall.c
261
putwc(L'\n', fp);
usr.bin/wall/wall.c
269
(void)fwprintf(fp, L"%79s\r\n", " ");
usr.bin/wall/wall.c
270
rewind(fp);
usr.bin/wall/wall.c
277
if ((int)fread(mbuf, sizeof(*mbuf), mbufsize, fp) != mbufsize)
usr.bin/wall/wall.c
279
fclose(fp);
usr.bin/whois/whois.c
435
FILE *fp;
usr.bin/whois/whois.c
453
fp = fdopen(s, "r+");
usr.bin/whois/whois.c
454
if (fp == NULL)
usr.bin/whois/whois.c
465
fprintf(fp, "-T dn%s %s\r\n", idn ? "" : ",ace", query);
usr.bin/whois/whois.c
469
fprintf(fp, "--show-handles %s\r\n", query);
usr.bin/whois/whois.c
472
fprintf(fp, "%s\r\n", query);
usr.bin/whois/whois.c
476
fprintf(fp, "+ a %s\r\n", query+2);
usr.bin/whois/whois.c
478
fprintf(fp, "+ %s\r\n", query);
usr.bin/whois/whois.c
480
fprintf(fp, "domain %s\r\n", query);
usr.bin/whois/whois.c
482
fprintf(fp, "%s\r\n", query);
usr.bin/whois/whois.c
483
fflush(fp);
usr.bin/whois/whois.c
493
while ((buf = fgetln(fp, &len)) != NULL) {
usr.bin/whois/whois.c
563
fclose(fp);
usr.sbin/acpi/acpidb/acpidb.c
226
FILE *fp;
usr.sbin/acpi/acpidb/acpidb.c
232
if ((fp = fopen(dumpfile, "r")) == NULL) {
usr.sbin/acpi/acpidb/acpidb.c
236
while (fgets(buf, sizeof buf, fp) != NULL) {
usr.sbin/acpi/acpidb/acpidb.c
260
fclose(fp);
usr.sbin/acpi/acpidb/acpidb.c
267
FILE *fp;
usr.sbin/acpi/acpidb/acpidb.c
272
if ((fp = fopen(dumpfile, "w")) == NULL) {
usr.sbin/acpi/acpidb/acpidb.c
278
fprintf(fp, "%d 0x%jx 0x%x\n",
usr.sbin/acpi/acpidb/acpidb.c
284
fclose(fp);
usr.sbin/acpi/acpidump/acpi.c
2910
FILE *fp;
usr.sbin/acpi/acpidump/acpi.c
2966
fp = fopen(tmpstr, "r");
usr.sbin/acpi/acpidump/acpi.c
2971
if (fp == NULL) {
usr.sbin/acpi/acpidump/acpi.c
2975
while ((len = fread(buf, 1, sizeof(buf), fp)) > 0)
usr.sbin/acpi/acpidump/acpi.c
2977
fclose(fp);
usr.sbin/apmd/apmd.c
133
event_cmd_exec_dump(void *this, FILE *fp)
usr.sbin/apmd/apmd.c
135
fprintf(fp, " \"%s\"", ((struct event_cmd_exec *)this)->line);
usr.sbin/apmd/apmd.c
432
FILE *fp = fopen(apmd_pidfile, "w");
usr.sbin/apmd/apmd.c
434
if (fp) {
usr.sbin/apmd/apmd.c
435
fprintf(fp, "%ld\n", (long)getpid());
usr.sbin/apmd/apmd.c
436
fclose(fp);
usr.sbin/apmd/apmd.h
57
void (* dump)(void *this, FILE * fp);
usr.sbin/arp/arp.c
218
FILE *fp;
usr.sbin/arp/arp.c
222
if ((fp = fopen(name, "r")) == NULL)
usr.sbin/arp/arp.c
230
while(fgets(line, sizeof(line), fp) != NULL) {
usr.sbin/arp/arp.c
246
fclose(fp);
usr.sbin/bhyve/acpi.c
111
FILE *fp;
usr.sbin/bhyve/acpi.c
245
basl_fwrite_dsdt(FILE *fp)
usr.sbin/bhyve/acpi.c
247
dsdt_fp = fp;
usr.sbin/bhyve/acpi.c
295
EFFLUSH(fp);
usr.sbin/bhyve/acpi.c
319
bf->fp = fdopen(bf->fd, "w+");
usr.sbin/bhyve/acpi.c
320
if (bf->fp == NULL) {
usr.sbin/bhyve/acpi.c
337
fclose(bf->fp);
usr.sbin/bhyve/acpi.c
401
err = (*fwrite_section)(io[0].fp);
usr.sbin/bhyve/bhyverun.c
746
FILE *fp;
usr.sbin/bhyve/bhyverun.c
751
fp = fopen(path, "r");
usr.sbin/bhyve/bhyverun.c
752
if (fp == NULL)
usr.sbin/bhyve/bhyverun.c
757
for (lineno = 1; getline(&line, &linecap, fp) > 0; lineno++) {
usr.sbin/bhyve/bhyverun.c
768
fclose(fp);
usr.sbin/bhyve/pci_emul.c
1497
FILE *fp;
usr.sbin/bhyve/pci_emul.c
1504
fp = open_memstream(&bootorder, &bootorder_len);
usr.sbin/bhyve/pci_emul.c
1506
fprintf(fp, "/pci@i0cf8/pci@%d,%d\n",
usr.sbin/bhyve/pci_emul.c
1509
fclose(fp);
usr.sbin/bsdinstall/partedit/gpart_ops.c
126
fputs("newfs ", fp);
usr.sbin/bsdinstall/partedit/gpart_ops.c
131
fputs("-O1 ", fp);
usr.sbin/bsdinstall/partedit/gpart_ops.c
133
fputs("-U ", fp);
usr.sbin/bsdinstall/partedit/gpart_ops.c
135
fputs("-j ", fp);
usr.sbin/bsdinstall/partedit/gpart_ops.c
137
fputs("-t ", fp);
usr.sbin/bsdinstall/partedit/gpart_ops.c
164
fputs("zpool create -f -m none ", fp);
usr.sbin/bsdinstall/partedit/gpart_ops.c
172
fprintf(fp, " -o cachefile=%s/zpool.cache ",
usr.sbin/bsdinstall/partedit/gpart_ops.c
179
fputs("-O checksum=fletcher4 ", fp);
usr.sbin/bsdinstall/partedit/gpart_ops.c
181
fputs("-O checksum=fletcher2 ", fp);
usr.sbin/bsdinstall/partedit/gpart_ops.c
183
fputs("-O checksum=sha256 ", fp);
usr.sbin/bsdinstall/partedit/gpart_ops.c
185
fputs("-O atime=off ", fp);
usr.sbin/bsdinstall/partedit/gpart_ops.c
208
fputs("newfs_msdos ", fp);
usr.sbin/bsdinstall/partedit/gpart_ops.c
213
fputs("-F 32 -c 1", fp);
usr.sbin/bsdinstall/partedit/gpart_ops.c
215
fputs("-F 16 ", fp);
usr.sbin/bsdinstall/partedit/gpart_ops.c
217
fputs("-F 12 ", fp);
usr.sbin/bsdinstall/partedit/gpart_ops.c
228
fclose(fp);
usr.sbin/bsdinstall/partedit/gpart_ops.c
94
FILE *fp;
usr.sbin/bsdinstall/partedit/gpart_ops.c
99
fp = open_memstream(&buf, &len);
usr.sbin/bsdinstall/partedit/scripted.c
210
FILE *fp;
usr.sbin/bsdinstall/partedit/scripted.c
215
fp = open_memstream(&input, &len);
usr.sbin/bsdinstall/partedit/scripted.c
216
fputs(argv[1], fp);
usr.sbin/bsdinstall/partedit/scripted.c
218
fprintf(fp, " %s", argv[i]);
usr.sbin/bsdinstall/partedit/scripted.c
220
fclose(fp);
usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpimport.c
135
FILE *fp;
usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpimport.c
155
input_new(FILE *fp, const char *path, const char *fname)
usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpimport.c
160
ip->fp = fp;
usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpimport.c
175
fclose(input->fp);
usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpimport.c
188
FILE *fp;
usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpimport.c
196
fp = fopen(fn, "r");
usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpimport.c
198
return (fp);
usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpimport.c
204
FILE *fp;
usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpimport.c
208
if ((fp = tryopen(NULL, fname)) != NULL) {
usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpimport.c
209
input_new(fp, NULL, fname);
usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpimport.c
216
if ((fp = tryopen(paths[p], fname)) != NULL) {
usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpimport.c
217
input_new(fp, paths[p], fname);
usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpimport.c
241
if ((c = getc(input->fp)) != EOF)
usr.sbin/ckdist/ckdist.c
183
FILE *fp;
usr.sbin/ckdist/ckdist.c
188
fp = stdin;
usr.sbin/ckdist/ckdist.c
189
} else if ((fp = fopen(path, "r")) == NULL)
usr.sbin/ckdist/ckdist.c
192
if (fp != stdin)
usr.sbin/ckdist/ckdist.c
195
if ((c = fgetc(fp)) != EOF) {
usr.sbin/ckdist/ckdist.c
197
(void)ungetc(c, fp);
usr.sbin/ckdist/ckdist.c
202
rval = chkmd5(fp, path);
usr.sbin/ckdist/ckdist.c
205
rval = chkinf(fp, path);
usr.sbin/ckdist/ckdist.c
210
if (ferror(fp))
usr.sbin/ckdist/ckdist.c
212
if (fp != stdin && fclose(fp))
usr.sbin/ckdist/ckdist.c
218
chkmd5(FILE * fp, const char *path)
usr.sbin/ckdist/ckdist.c
229
while (fgets(buf, sizeof(buf), fp)) {
usr.sbin/ckdist/ckdist.c
233
&ch)) != 3 && (!feof(fp) || c != 2)) ||
usr.sbin/ckdist/ckdist.c
263
chkinf(FILE * fp, const char *path)
usr.sbin/ckdist/ckdist.c
277
for (cnt = -1; fgets(buf, sizeof(buf), fp); cnt++) {
usr.sbin/ckdist/ckdist.c
287
(!feof(fp) || c != 3)) || (c == 4 && ch != '\n') ||
usr.sbin/ckdist/ckdist.c
290
else if ((dname = distname(fp == stdin ? NULL : path, NULL,
usr.sbin/ckdist/ckdist.c
75
static int chkmd5(FILE * fp, const char *path);
usr.sbin/ckdist/ckdist.c
76
static int chkinf(FILE * fp, const char *path);
usr.sbin/config/main.cc
333
get_word(FILE *fp)
usr.sbin/config/main.cc
340
while ((ch = getc(fp)) != EOF)
usr.sbin/config/main.cc
362
while ((ch = getc(fp)) != EOF) {
usr.sbin/config/main.cc
369
(void) ungetc(ch, fp);
usr.sbin/config/main.cc
379
get_quoted_word(FILE *fp)
usr.sbin/config/main.cc
386
while ((ch = getc(fp)) != EOF)
usr.sbin/config/main.cc
407
while ((ch = getc(fp)) != EOF) {
usr.sbin/config/main.cc
426
while ((ch = getc(fp)) != EOF) {
usr.sbin/config/main.cc
432
(void) ungetc(ch, fp);
usr.sbin/config/main.cc
728
FILE *fp, *pp;
usr.sbin/config/main.cc
741
fp = fdopen(r, "r");
usr.sbin/config/main.cc
742
if (fp == NULL)
usr.sbin/config/main.cc
767
r = fseek(fp, off, SEEK_CUR);
usr.sbin/config/main.cc
771
r = fgetc(fp);
usr.sbin/config/main.cc
781
fclose(fp);
usr.sbin/config/mkmakefile.cc
100
struct file_list *fp;
usr.sbin/config/mkmakefile.cc
102
fp = (struct file_list *) calloc(1, sizeof *fp);
usr.sbin/config/mkmakefile.cc
103
if (fp == NULL)
usr.sbin/config/mkmakefile.cc
105
STAILQ_INSERT_TAIL(&ftab, fp, f_next);
usr.sbin/config/mkmakefile.cc
106
return (fp);
usr.sbin/config/mkmakefile.cc
383
FILE *fp;
usr.sbin/config/mkmakefile.cc
394
fp = fopen(fname, "r");
usr.sbin/config/mkmakefile.cc
395
if (fp == NULL) {
usr.sbin/config/mkmakefile.cc
399
fp = fopen(fnamebuf, "r");
usr.sbin/config/mkmakefile.cc
400
if (fp != NULL)
usr.sbin/config/mkmakefile.cc
406
if (fp == NULL)
usr.sbin/config/mkmakefile.cc
419
wd = get_word(fp);
usr.sbin/config/mkmakefile.cc
421
(void) fclose(fp);
usr.sbin/config/mkmakefile.cc
428
while (!(wd = get_word(fp)).eof() && !wd.eol())
usr.sbin/config/mkmakefile.cc
433
wd = get_quoted_word(fp);
usr.sbin/config/mkmakefile.cc
439
while (!(wd = get_word(fp)).eof() && !wd.eol())
usr.sbin/config/mkmakefile.cc
444
wd = get_word(fp);
usr.sbin/config/mkmakefile.cc
471
for (wd = get_word(fp); !wd.eol(); wd = get_word(fp)) {
usr.sbin/config/mkmakefile.cc
509
wd = get_quoted_word(fp);
usr.sbin/config/mkmakefile.cc
517
wd = get_quoted_word(fp);
usr.sbin/config/mkmakefile.cc
525
wd = get_quoted_word(fp);
usr.sbin/config/mkmakefile.cc
533
wd = get_quoted_word(fp);
usr.sbin/config/mkmakefile.cc
541
wd = get_quoted_word(fp);
usr.sbin/config/mkmakefile.cc
638
do_before_depend(FILE *fp)
usr.sbin/config/mkmakefile.cc
643
fputs("BEFORE_DEPEND=", fp);
usr.sbin/config/mkmakefile.cc
650
fputs("\\\n\t", fp);
usr.sbin/config/mkmakefile.cc
653
lpos += fprintf(fp, "%s ", tp->f_fn);
usr.sbin/config/mkmakefile.cc
655
lpos += fprintf(fp, "%s%s ", tp->f_srcprefix,
usr.sbin/config/mkmakefile.cc
659
putc('\n', fp);
usr.sbin/config/mkmakefile.cc
663
do_objs(FILE *fp)
usr.sbin/config/mkmakefile.cc
669
fprintf(fp, "OBJS=");
usr.sbin/config/mkmakefile.cc
681
fprintf(fp, "\\\n\t");
usr.sbin/config/mkmakefile.cc
683
fprintf(fp, "%s%s ", tp->f_objprefix, sp);
usr.sbin/config/mkmakefile.cc
688
putc('\n', fp);
usr.sbin/config/mkmakefile.cc
692
do_xxfiles(char *tag, FILE *fp)
usr.sbin/config/mkmakefile.cc
706
fprintf(fp, "%sFILES=", SUFF);
usr.sbin/config/mkmakefile.cc
718
fputs("\\\n\t", fp);
usr.sbin/config/mkmakefile.cc
720
lpos += fprintf(fp, "%s%s ", tp->f_srcprefix, tp->f_fn);
usr.sbin/config/mkmakefile.cc
724
putc('\n', fp);
usr.sbin/config/mkmakefile.cc
816
do_clean(FILE *fp)
usr.sbin/config/mkmakefile.cc
821
fputs("CLEAN=", fp);
usr.sbin/config/mkmakefile.cc
828
fputs("\\\n\t", fp);
usr.sbin/config/mkmakefile.cc
830
fprintf(fp, "%s ", tp->f_clean);
usr.sbin/config/mkmakefile.cc
834
putc('\n', fp);
usr.sbin/config/mkmakefile.cc
85
struct file_list *fp;
usr.sbin/config/mkmakefile.cc
87
STAILQ_FOREACH(fp, &ftab, f_next) {
usr.sbin/config/mkmakefile.cc
88
if (eq(fp->f_fn, file))
usr.sbin/config/mkmakefile.cc
89
return (fp);
usr.sbin/config/mkoptions.cc
363
FILE *fp;
usr.sbin/config/mkoptions.cc
368
fp = fopen(fname, "r");
usr.sbin/config/mkoptions.cc
369
if (fp == NULL) {
usr.sbin/config/mkoptions.cc
378
while (!(wd = get_word(fp)).eof()) {
usr.sbin/config/mkoptions.cc
382
while (!(wd = get_word(fp)).eof() && !wd.eol())
usr.sbin/config/mkoptions.cc
387
wd = get_word(fp);
usr.sbin/config/mkoptions.cc
419
(void)fclose(fp);
usr.sbin/ctld/conf.cc
460
freebsd::FILE_up fp(fopen(path, "r"));
usr.sbin/ctld/conf.cc
461
if (fp == nullptr) {
usr.sbin/ctld/conf.cc
468
parsed = yyparse_conf(fp.get());
usr.sbin/ctld/conf.h
112
bool yyparse_conf(FILE *fp);
usr.sbin/ctld/parse.y
1117
yyparse_conf(FILE *fp)
usr.sbin/ctld/parse.y
1121
yyin = fp;
usr.sbin/cxgbetool/cxgbetool.c
100
fprintf(fp, "Usage: %s <nexus> [operation]\n", g.progname);
usr.sbin/cxgbetool/cxgbetool.c
101
fprintf(fp,
usr.sbin/cxgbetool/cxgbetool.c
3572
FILE *fp;
usr.sbin/cxgbetool/cxgbetool.c
3579
fp = fopen(fname, "r");
usr.sbin/cxgbetool/cxgbetool.c
3580
if (fp == NULL) {
usr.sbin/cxgbetool/cxgbetool.c
3587
fclose(fp);
usr.sbin/cxgbetool/cxgbetool.c
3599
while ((llen = getline(&line, &lcap, fp)) != -1) {
usr.sbin/cxgbetool/cxgbetool.c
3630
if (!feof(fp)) {
usr.sbin/cxgbetool/cxgbetool.c
3643
fclose(fp);
usr.sbin/cxgbetool/cxgbetool.c
98
usage(FILE *fp)
usr.sbin/fstyp/apfs.c
84
fstyp_apfs(FILE *fp, char *label, size_t size)
usr.sbin/fstyp/apfs.c
90
csb = read_buf(fp, 0, sizeof(*csb));
usr.sbin/fstyp/befs.c
48
fstyp_befs(FILE *fp, char *label, size_t size)
usr.sbin/fstyp/befs.c
52
volume = read_buf(fp, BEFS_BLOCK_OFFSET, sizeof(*volume));
usr.sbin/fstyp/cd9660.c
45
fstyp_cd9660(FILE *fp, char *label, size_t size)
usr.sbin/fstyp/cd9660.c
49
sector = read_buf(fp, ISO9660_OFFSET, 512);
usr.sbin/fstyp/exfat.c
139
read_sectn(FILE *fp, off_t sect, unsigned count, unsigned bytespersec)
usr.sbin/fstyp/exfat.c
141
return (read_buf(fp, sect * bytespersec, bytespersec * count));
usr.sbin/fstyp/exfat.c
145
read_sect(FILE *fp, off_t sect, unsigned bytespersec)
usr.sbin/fstyp/exfat.c
147
return (read_sectn(fp, sect, 1, bytespersec));
usr.sbin/fstyp/exfat.c
157
exfat_compute_boot_chksum(FILE *fp, unsigned region, unsigned bytespersec,
usr.sbin/fstyp/exfat.c
166
sector = read_sect(fp, region + sect, bytespersec);
usr.sbin/fstyp/exfat.c
246
exfat_fat_next(FILE *fp, const struct exfat_vbr *ev, unsigned BPS,
usr.sbin/fstyp/exfat.c
257
fatsect = read_sect(fp, clsect, BPS);
usr.sbin/fstyp/exfat.c
265
exfat_find_label(FILE *fp, const struct exfat_vbr *ev, unsigned BPS,
usr.sbin/fstyp/exfat.c
284
rootdir_cluster = exfat_fat_next(fp, ev, BPS, rootdir_cluster)) {
usr.sbin/fstyp/exfat.c
293
declust = read_sectn(fp, rootdir_sect, sects_per_clust, BPS);
usr.sbin/fstyp/exfat.c
324
fstyp_exfat(FILE *fp, char *label, size_t size)
usr.sbin/fstyp/exfat.c
334
ev = (struct exfat_vbr *)read_buf(fp, 0, 512);
usr.sbin/fstyp/exfat.c
345
error = exfat_compute_boot_chksum(fp, MAIN_BOOT_REGION_SECT,
usr.sbin/fstyp/exfat.c
350
cksect = read_sect(fp, MAIN_BOOT_REGION_SECT + SUBREGION_CHKSUM_SECT,
usr.sbin/fstyp/exfat.c
366
exfat_find_label(fp, ev, bytespersec, label, size);
usr.sbin/fstyp/ext2fs.c
55
fstyp_ext2fs(FILE *fp, char *label, size_t size)
usr.sbin/fstyp/ext2fs.c
60
fs = (e2sb_t *)read_buf(fp, EXT2FS_SB_OFFSET, 512);
usr.sbin/fstyp/fstyp.c
114
read_buf(FILE *fp, off_t off, size_t len)
usr.sbin/fstyp/fstyp.c
120
error = fseek(fp, off, SEEK_SET);
usr.sbin/fstyp/fstyp.c
132
nread = fread(buf, len, 1, fp);
usr.sbin/fstyp/fstyp.c
135
if (feof(fp) == 0)
usr.sbin/fstyp/fstyp.c
178
type_check(const char *path, FILE *fp)
usr.sbin/fstyp/fstyp.c
184
fd = fileno(fp);
usr.sbin/fstyp/fstyp.c
205
FILE *fp;
usr.sbin/fstyp/fstyp.c
253
fp = fopen(path, "r");
usr.sbin/fstyp/fstyp.c
254
if (fp == NULL)
usr.sbin/fstyp/fstyp.c
261
type_check(path, fp);
usr.sbin/fstyp/fstyp.c
272
error = fstyp_f(fp, label, sizeof(label));
usr.sbin/fstyp/fstyp.h
48
void *read_buf(FILE *fp, off_t off, size_t len);
usr.sbin/fstyp/fstyp.h
52
int fstyp_apfs(FILE *fp, char *label, size_t size);
usr.sbin/fstyp/fstyp.h
53
int fstyp_befs(FILE *fp, char *label, size_t size);
usr.sbin/fstyp/fstyp.h
54
int fstyp_cd9660(FILE *fp, char *label, size_t size);
usr.sbin/fstyp/fstyp.h
55
int fstyp_exfat(FILE *fp, char *label, size_t size);
usr.sbin/fstyp/fstyp.h
56
int fstyp_ext2fs(FILE *fp, char *label, size_t size);
usr.sbin/fstyp/fstyp.h
57
int fstyp_geli(FILE *fp, char *label, size_t size);
usr.sbin/fstyp/fstyp.h
58
int fstyp_hammer(FILE *fp, char *label, size_t size);
usr.sbin/fstyp/fstyp.h
59
int fstyp_hammer2(FILE *fp, char *label, size_t size);
usr.sbin/fstyp/fstyp.h
60
int fstyp_hfsp(FILE *fp, char *label, size_t size);
usr.sbin/fstyp/fstyp.h
61
int fstyp_msdosfs(FILE *fp, char *label, size_t size);
usr.sbin/fstyp/fstyp.h
62
int fstyp_ntfs(FILE *fp, char *label, size_t size);
usr.sbin/fstyp/fstyp.h
63
int fstyp_ufs(FILE *fp, char *label, size_t size);
usr.sbin/fstyp/fstyp.h
65
int fstyp_zfs(FILE *fp, char *label, size_t size);
usr.sbin/fstyp/geli.c
41
fstyp_geli(FILE *fp, char *label __unused, size_t labelsize __unused)
usr.sbin/fstyp/geli.c
49
error = ioctl(fileno(fp), DIOCGMEDIASIZE, &mediasize);
usr.sbin/fstyp/geli.c
52
error = ioctl(fileno(fp), DIOCGSECTORSIZE, §orsize);
usr.sbin/fstyp/geli.c
55
buf = (u_char *)read_buf(fp, mediasize - sectorsize, sectorsize);
usr.sbin/fstyp/hammer.c
104
ondisk = read_ondisk(fp);
usr.sbin/fstyp/hammer.c
123
FILE *fp;
usr.sbin/fstyp/hammer.c
126
if ((fp = fopen(volpath, "r")) == NULL)
usr.sbin/fstyp/hammer.c
129
ondisk = read_ondisk(fp);
usr.sbin/fstyp/hammer.c
130
fclose(fp);
usr.sbin/fstyp/hammer.c
144
FILE *fp;
usr.sbin/fstyp/hammer.c
170
if ((fp = fopen(volpath, "r")) == NULL)
usr.sbin/fstyp/hammer.c
172
ondisk = read_ondisk(fp);
usr.sbin/fstyp/hammer.c
173
fclose(fp);
usr.sbin/fstyp/hammer.c
50
read_ondisk(FILE *fp)
usr.sbin/fstyp/hammer.c
54
ondisk = read_buf(fp, 0, sizeof(*ondisk));
usr.sbin/fstyp/hammer.c
99
fstyp_hammer(FILE *fp, char *label, size_t size)
usr.sbin/fstyp/hammer2.c
103
media = read_buf(fp, io_base, io_bytes);
usr.sbin/fstyp/hammer2.c
115
find_pfs(FILE *fp, const hammer2_blockref_t *bref, const char *pfs, bool *res)
usr.sbin/fstyp/hammer2.c
123
media = read_media(fp, bref, &bytes);
usr.sbin/fstyp/hammer2.c
164
if (find_pfs(fp, &bscan[i], pfs, res) == -1) {
usr.sbin/fstyp/hammer2.c
206
read_label(FILE *fp, char *label, size_t size)
usr.sbin/fstyp/hammer2.c
223
vols[i] = read_buf(fp, broot.data_off & ~HAMMER2_OFF_MASK_RADIX,
usr.sbin/fstyp/hammer2.c
240
media = read_media(fp, bref, &bytes);
usr.sbin/fstyp/hammer2.c
250
if (find_pfs(fp, bref, pfs, &res) == 0 && res) {
usr.sbin/fstyp/hammer2.c
276
fstyp_hammer2(FILE *fp, char *label, size_t size)
usr.sbin/fstyp/hammer2.c
281
voldata = read_voldata(fp);
usr.sbin/fstyp/hammer2.c
285
error = read_label(fp, label, size);
usr.sbin/fstyp/hammer2.c
48
read_voldata(FILE *fp)
usr.sbin/fstyp/hammer2.c
52
voldata = read_buf(fp, 0, sizeof(*voldata));
usr.sbin/fstyp/hammer2.c
70
read_media(FILE *fp, const hammer2_blockref_t *bref, size_t *media_bytes)
usr.sbin/fstyp/hammer2.c
99
if (fseek(fp, io_base, SEEK_SET) == -1) {
usr.sbin/fstyp/hfsplus.c
102
fstyp_hfsp(FILE *fp, char *label, size_t size)
usr.sbin/fstyp/hfsplus.c
108
hdr = read_buf(fp, VOL_HDR_OFF, sizeof(*hdr));
usr.sbin/fstyp/msdosfs.c
145
sector = (uint8_t *)read_buf(fp, offset, fat_BytesPerSector);
usr.sbin/fstyp/msdosfs.c
63
fstyp_msdosfs(FILE *fp, char *label, size_t size)
usr.sbin/fstyp/msdosfs.c
75
sector0 = (uint8_t *)read_buf(fp, 0, 512);
usr.sbin/fstyp/ntfs.c
134
fstyp_ntfs(FILE *fp, char *label, size_t size)
usr.sbin/fstyp/ntfs.c
148
bf = (struct ntfs_bootfile *)read_buf(fp, 0, 512);
usr.sbin/fstyp/ntfs.c
162
filerecp = read_buf(fp, voloff, recsize);
usr.sbin/fstyp/ufs.c
48
fstyp_ufs(FILE *fp, char *label, size_t labelsize)
usr.sbin/fstyp/ufs.c
52
switch (sbget(fileno(fp), &fs, UFS_STDSB, UFS_NOCSUM)) {
usr.sbin/fstyp/zfs.c
43
fstyp_zfs(FILE *fp, char *label, size_t labelsize)
usr.sbin/fstyp/zfs.c
57
vdev_label = (vdev_label_t *)read_buf(fp, 0, sizeof(*vdev_label));
usr.sbin/gssd/gssd.c
208
FILE *fp;
usr.sbin/gssd/gssd.c
213
fp = fopen(_PATH_GSS_MECH, "r");
usr.sbin/gssd/gssd.c
214
if (!fp)
usr.sbin/gssd/gssd.c
217
while (fgets(buf, sizeof(buf), fp)) {
usr.sbin/gssd/gssd.c
245
fclose(fp);
usr.sbin/ip6addrctl/ip6addrctl.c
256
FILE *fp;
usr.sbin/ip6addrctl/ip6addrctl.c
261
if ((fp = fopen(conf, "r")) == NULL)
usr.sbin/ip6addrctl/ip6addrctl.c
264
while(fgets(line, sizeof(line), fp)) {
usr.sbin/ip6addrctl/ip6addrctl.c
298
fclose(fp);
usr.sbin/jail/config.c
57
extern int yyset_in(FILE *fp, void *scanner);
usr.sbin/jail/jail.c
1015
print_param(FILE *fp, const struct cfparam *p, int sep, int doname)
usr.sbin/jail/jail.c
1020
fputs(p->name, fp);
usr.sbin/jail/jail.c
1024
putc('=', fp);
usr.sbin/jail/jail.c
1026
quoted_print(fp, s->s);
usr.sbin/jail/jail.c
1028
putc(sep, fp);
usr.sbin/jail/jail.c
1036
quoted_print(FILE *fp, char *str)
usr.sbin/jail/jail.c
1047
putc(qc, fp);
usr.sbin/jail/jail.c
1050
putc('\\', fp);
usr.sbin/jail/jail.c
1051
putc(c, fp);
usr.sbin/jail/jail.c
1054
putc(qc, fp);
usr.sbin/jail/jail.c
69
static void print_jail(FILE *fp, struct cfjail *j, int oldcl, int running);
usr.sbin/jail/jail.c
70
static void print_param(FILE *fp, const struct cfparam *p, int sep, int doname);
usr.sbin/jail/jail.c
72
static void quoted_print(FILE *fp, char *str);
usr.sbin/jail/jail.c
954
print_jail(FILE *fp, struct cfjail *j, int oldcl, int running)
usr.sbin/jail/jail.c
961
fprintf(fp, "%d%s", j->jid, separator);
usr.sbin/jail/jail.c
962
print_param(fp, j->intparams[KP_PATH], ',', 0);
usr.sbin/jail/jail.c
963
fputs(separator, fp);
usr.sbin/jail/jail.c
964
print_param(fp, j->intparams[KP_HOST_HOSTNAME], ',', 0);
usr.sbin/jail/jail.c
965
fputs(separator, fp);
usr.sbin/jail/jail.c
967
print_param(fp, j->intparams[KP_IP4_ADDR], ',', 0);
usr.sbin/jail/jail.c
973
putc(',', fp);
usr.sbin/jail/jail.c
977
print_param(fp, j->intparams[KP_IP6_ADDR], ',', 0);
usr.sbin/jail/jail.c
979
fputs(separator, fp);
usr.sbin/jail/jail.c
980
print_param(fp, j->intparams[IP_COMMAND], ' ', 0);
usr.sbin/jail/jail.c
984
fprintf(fp, "jid=%d", j->jid);
usr.sbin/jail/jail.c
990
fputs(separator, fp);
usr.sbin/jail/jail.c
993
print_param(fp, p, ',', 1);
usr.sbin/jail/jail.c
996
putc('\n', fp);
usr.sbin/kbdcontrol/kbdcontrol.c
124
static void print_accent_definition_line(FILE *fp, int accent,
usr.sbin/kbdcontrol/kbdcontrol.c
126
static void print_entry(FILE *fp, int value);
usr.sbin/kbdcontrol/kbdcontrol.c
127
static void print_key_definition_line(FILE *fp, int scancode,
usr.sbin/kbdcontrol/kbdcontrol.c
407
print_entry(FILE *fp, int value)
usr.sbin/kbdcontrol/kbdcontrol.c
413
fprintf(fp, " nop ");
usr.sbin/kbdcontrol/kbdcontrol.c
416
fprintf(fp, " lshift");
usr.sbin/kbdcontrol/kbdcontrol.c
419
fprintf(fp, " rshift");
usr.sbin/kbdcontrol/kbdcontrol.c
422
fprintf(fp, " clock ");
usr.sbin/kbdcontrol/kbdcontrol.c
425
fprintf(fp, " nlock ");
usr.sbin/kbdcontrol/kbdcontrol.c
428
fprintf(fp, " slock ");
usr.sbin/kbdcontrol/kbdcontrol.c
431
fprintf(fp, " btab ");
usr.sbin/kbdcontrol/kbdcontrol.c
434
fprintf(fp, " lalt ");
usr.sbin/kbdcontrol/kbdcontrol.c
437
fprintf(fp, " lctrl ");
usr.sbin/kbdcontrol/kbdcontrol.c
440
fprintf(fp, " nscr ");
usr.sbin/kbdcontrol/kbdcontrol.c
443
fprintf(fp, " pscr ");
usr.sbin/kbdcontrol/kbdcontrol.c
446
fprintf(fp, " rctrl ");
usr.sbin/kbdcontrol/kbdcontrol.c
449
fprintf(fp, " ralt ");
usr.sbin/kbdcontrol/kbdcontrol.c
452
fprintf(fp, " alock ");
usr.sbin/kbdcontrol/kbdcontrol.c
455
fprintf(fp, " ashift");
usr.sbin/kbdcontrol/kbdcontrol.c
458
fprintf(fp, " meta ");
usr.sbin/kbdcontrol/kbdcontrol.c
461
fprintf(fp, " boot ");
usr.sbin/kbdcontrol/kbdcontrol.c
464
fprintf(fp, " debug ");
usr.sbin/kbdcontrol/kbdcontrol.c
467
fprintf(fp, " susp ");
usr.sbin/kbdcontrol/kbdcontrol.c
470
fprintf(fp, " saver ");
usr.sbin/kbdcontrol/kbdcontrol.c
473
fprintf(fp, " panic ");
usr.sbin/kbdcontrol/kbdcontrol.c
476
fprintf(fp, " lshifta");
usr.sbin/kbdcontrol/kbdcontrol.c
479
fprintf(fp, " rshifta");
usr.sbin/kbdcontrol/kbdcontrol.c
482
fprintf(fp, " lctrla");
usr.sbin/kbdcontrol/kbdcontrol.c
485
fprintf(fp, " rctrla");
usr.sbin/kbdcontrol/kbdcontrol.c
488
fprintf(fp, " lalta ");
usr.sbin/kbdcontrol/kbdcontrol.c
491
fprintf(fp, " ralta ");
usr.sbin/kbdcontrol/kbdcontrol.c
494
fprintf(fp, " halt ");
usr.sbin/kbdcontrol/kbdcontrol.c
497
fprintf(fp, " pdwn ");
usr.sbin/kbdcontrol/kbdcontrol.c
500
fprintf(fp, " paste ");
usr.sbin/kbdcontrol/kbdcontrol.c
505
fprintf(fp, " fkey%02d", val - F_FN + 1);
usr.sbin/kbdcontrol/kbdcontrol.c
507
fprintf(fp, " scr%02d ", val - F_SCR + 1);
usr.sbin/kbdcontrol/kbdcontrol.c
509
fprintf(fp, " %-6s", acc_names[val - F_ACC]);
usr.sbin/kbdcontrol/kbdcontrol.c
511
fprintf(fp, " 0x%02x ", val);
usr.sbin/kbdcontrol/kbdcontrol.c
513
fprintf(fp, " %3d ", val);
usr.sbin/kbdcontrol/kbdcontrol.c
517
fprintf(fp, " %s ", ctrl_names[val]);
usr.sbin/kbdcontrol/kbdcontrol.c
519
fprintf(fp, " del ");
usr.sbin/kbdcontrol/kbdcontrol.c
521
fprintf(fp, " '%c' ", val);
usr.sbin/kbdcontrol/kbdcontrol.c
523
fprintf(fp, " 0x%02x ", val);
usr.sbin/kbdcontrol/kbdcontrol.c
525
fprintf(fp, " %3d ", val);
usr.sbin/kbdcontrol/kbdcontrol.c
531
print_key_definition_line(FILE *fp, int scancode, struct keyent_t *key)
usr.sbin/kbdcontrol/kbdcontrol.c
537
fprintf(fp, " 0x%02x ", scancode);
usr.sbin/kbdcontrol/kbdcontrol.c
539
fprintf(fp, " %03d ", scancode);
usr.sbin/kbdcontrol/kbdcontrol.c
544
print_entry(fp, key->map[i] | SPECIAL);
usr.sbin/kbdcontrol/kbdcontrol.c
546
print_entry(fp, key->map[i]);
usr.sbin/kbdcontrol/kbdcontrol.c
552
fprintf(fp, " O\n");
usr.sbin/kbdcontrol/kbdcontrol.c
555
fprintf(fp, " C\n");
usr.sbin/kbdcontrol/kbdcontrol.c
558
fprintf(fp, " N\n");
usr.sbin/kbdcontrol/kbdcontrol.c
561
fprintf(fp, " B\n");
usr.sbin/kbdcontrol/kbdcontrol.c
567
print_accent_definition_line(FILE *fp, int accent, struct acc_t *key)
usr.sbin/kbdcontrol/kbdcontrol.c
576
fprintf(fp, " %-6s", acc_names[accent]);
usr.sbin/kbdcontrol/kbdcontrol.c
578
fprintf(fp, "'%c' ", key->accchar);
usr.sbin/kbdcontrol/kbdcontrol.c
580
fprintf(fp, "0x%02x ", key->accchar);
usr.sbin/kbdcontrol/kbdcontrol.c
582
fprintf(fp, "%03d ", key->accchar);
usr.sbin/kbdcontrol/kbdcontrol.c
589
fprintf(fp, "\n ");
usr.sbin/kbdcontrol/kbdcontrol.c
591
fprintf(fp, "( '%c' ", c);
usr.sbin/kbdcontrol/kbdcontrol.c
593
fprintf(fp, "(0x%02x ", c);
usr.sbin/kbdcontrol/kbdcontrol.c
595
fprintf(fp, "( %03d ", c);
usr.sbin/kbdcontrol/kbdcontrol.c
598
fprintf(fp, "'%c' ) ", c);
usr.sbin/kbdcontrol/kbdcontrol.c
600
fprintf(fp, "0x%02x) ", c);
usr.sbin/kbdcontrol/kbdcontrol.c
602
fprintf(fp, "%03d ) ", c);
usr.sbin/kbdcontrol/kbdcontrol.c
604
fprintf(fp, "\n");
usr.sbin/kbdmap/kbdmap.c
228
FILE *fp = fopen(sysconfig, "r");
usr.sbin/kbdmap/kbdmap.c
229
if (fp) {
usr.sbin/kbdmap/kbdmap.c
230
while (fgets(line, sizeof(line), fp)) {
usr.sbin/kbdmap/kbdmap.c
247
fclose(fp);
usr.sbin/kbdmap/kbdmap.c
570
FILE *fp;
usr.sbin/kbdmap/kbdmap.c
594
fp = fopen(filename, "r");
usr.sbin/kbdmap/kbdmap.c
595
if (fp) {
usr.sbin/kbdmap/kbdmap.c
597
while (fgets(buffer, sizeof(buffer), fp)) {
usr.sbin/kbdmap/kbdmap.c
676
fclose(fp);
usr.sbin/kldxref/kldxref.c
272
FILE *fp;
usr.sbin/kldxref/kldxref.c
278
fp = open_memstream(new_desc, &new_desc_size);
usr.sbin/kldxref/kldxref.c
279
if (fp == NULL)
usr.sbin/kldxref/kldxref.c
379
fprintf(fp, "%c:%s;", newtype, word);
usr.sbin/kldxref/kldxref.c
403
fprintf(fp, "%c:%s;", newtype, key);
usr.sbin/kldxref/kldxref.c
406
if (ferror(fp) != 0) {
usr.sbin/kldxref/kldxref.c
407
fclose(fp);
usr.sbin/kldxref/kldxref.c
410
if (fclose(fp) != 0)
usr.sbin/lpr/common_source/displayq.c
150
fp = fopen(pp->lock_file, "r");
usr.sbin/lpr/common_source/displayq.c
152
if (fp == NULL)
usr.sbin/lpr/common_source/displayq.c
158
while ((i = getc(fp)) != EOF && i != '\n') {
usr.sbin/lpr/common_source/displayq.c
177
while ((i = getc(fp)) != EOF && i != '\n') {
usr.sbin/lpr/common_source/displayq.c
198
(void) fclose(fp);
usr.sbin/lpr/common_source/displayq.c
99
FILE *fp;
usr.sbin/lpr/common_source/rmjob.c
149
register FILE *fp;
usr.sbin/lpr/common_source/rmjob.c
153
if ((fp = fopen(slockf, "r")) == NULL) {
usr.sbin/lpr/common_source/rmjob.c
160
if (!get_line(fp)) {
usr.sbin/lpr/common_source/rmjob.c
161
(void) fclose(fp);
usr.sbin/lpr/common_source/rmjob.c
166
(void) fclose(fp);
usr.sbin/lpr/common_source/rmjob.c
169
for (i = 1; (n = fread(current, sizeof(char), sizeof(current), fp)) <= 0; i++) {
usr.sbin/lpr/common_source/rmjob.c
177
(void) fclose(fp);
usr.sbin/lpr/lpc/cmds.c
1232
FILE *fp;
usr.sbin/lpr/lpc/cmds.c
1275
fp = fopen((*qq)->job_cfname, "r");
usr.sbin/lpr/lpc/cmds.c
1277
if (fp == NULL)
usr.sbin/lpr/lpc/cmds.c
1279
while (get_line(fp) > 0)
usr.sbin/lpr/lpc/cmds.c
1282
(void) fclose(fp);
usr.sbin/lpr/lpc/cmds.c
276
FILE *fp;
usr.sbin/lpr/lpc/cmds.c
281
fp = fopen(lf, "r");
usr.sbin/lpr/lpc/cmds.c
285
if (fp == NULL) {
usr.sbin/lpr/lpc/cmds.c
297
if (get_line(fp) == 0)
usr.sbin/lpr/lpc/cmds.c
306
lockres = flock(fileno(fp), LOCK_SH|LOCK_NB);
usr.sbin/lpr/lpc/cmds.c
307
(void) fclose(fp);
usr.sbin/lpr/lpd/printjob.c
1553
FILE *fp;
usr.sbin/lpr/lpd/printjob.c
1594
|| (fp = fopen(tempstderr, "r")) == NULL) {
usr.sbin/lpr/lpd/printjob.c
1599
while ((i = getc(fp)) != EOF)
usr.sbin/lpr/lpd/printjob.c
1601
(void) fclose(fp);
usr.sbin/lpr/lpd/printjob.c
609
FILE *fp;
usr.sbin/lpr/lpd/printjob.c
851
if ((fp = fopen(tempstderr, "r"))) {
usr.sbin/lpr/lpd/printjob.c
852
while (fgets(buf, sizeof(buf), fp))
usr.sbin/lpr/lpd/printjob.c
854
fclose(fp);
usr.sbin/lpr/lpd/recvjob.c
407
FILE *fp;
usr.sbin/lpr/lpd/recvjob.c
411
if ((fp = fopen("minfree", "r")) != NULL) {
usr.sbin/lpr/lpd/recvjob.c
412
if (fscanf(fp, "%zu", &minfree) != 1)
usr.sbin/lpr/lpd/recvjob.c
414
fclose(fp);
usr.sbin/makefs/msdos/msdosfs_vfsops.c
261
struct fsinfo *fp;
usr.sbin/makefs/msdos/msdosfs_vfsops.c
271
fp = (struct fsinfo *)bp->b_data;
usr.sbin/makefs/msdos/msdosfs_vfsops.c
272
if (!memcmp(fp->fsisig1, "RRaA", 4)
usr.sbin/makefs/msdos/msdosfs_vfsops.c
273
&& !memcmp(fp->fsisig2, "rrAa", 4)
usr.sbin/makefs/msdos/msdosfs_vfsops.c
274
&& !memcmp(fp->fsisig3, "\0\0\125\252", 4))
usr.sbin/makefs/msdos/msdosfs_vfsops.c
275
pmp->pm_nxtfree = getulong(fp->fsinxtfree);
usr.sbin/makefs/msdos/msdosfs_vfsops.c
362
struct fsinfo *fp;
usr.sbin/makefs/msdos/msdosfs_vfsops.c
376
fp = (struct fsinfo *)bp->b_data;
usr.sbin/makefs/msdos/msdosfs_vfsops.c
377
putulong(fp->fsinfree, pmp->pm_freeclustercount);
usr.sbin/makefs/msdos/msdosfs_vfsops.c
378
putulong(fp->fsinxtfree, pmp->pm_nxtfree);
usr.sbin/makefs/mtree.c
1009
error = read_mtree_spec1(fp, false, pathspec);
usr.sbin/makefs/mtree.c
1024
error = read_mtree_spec1(fp, true, pathspec);
usr.sbin/makefs/mtree.c
1027
skip_to(fp, "\n");
usr.sbin/makefs/mtree.c
1028
(void)getc(fp);
usr.sbin/makefs/mtree.c
1036
FILE *fp;
usr.sbin/makefs/mtree.c
1043
fp = stdin;
usr.sbin/makefs/mtree.c
1045
fp = fopen(fname, "r");
usr.sbin/makefs/mtree.c
1046
if (fp == NULL)
usr.sbin/makefs/mtree.c
1050
error = mtree_file_push(fname, fp);
usr.sbin/makefs/mtree.c
1081
error = skip_over(fp, " \t");
usr.sbin/makefs/mtree.c
1085
c = getc(fp);
usr.sbin/makefs/mtree.c
1087
error = ferror(fp) ? errno : -1;
usr.sbin/makefs/mtree.c
1096
error = skip_to(fp, "\n");
usr.sbin/makefs/mtree.c
1098
(void)getc(fp);
usr.sbin/makefs/mtree.c
1101
error = read_mtree_command(fp);
usr.sbin/makefs/mtree.c
1104
ungetc(c, fp);
usr.sbin/makefs/mtree.c
1105
error = read_mtree_spec(fp);
usr.sbin/makefs/mtree.c
1124
if (fp != stdin)
usr.sbin/makefs/mtree.c
1125
fclose(fp);
usr.sbin/makefs/mtree.c
300
skip_over(FILE *fp, const char *cs)
usr.sbin/makefs/mtree.c
304
c = getc(fp);
usr.sbin/makefs/mtree.c
306
c = getc(fp);
usr.sbin/makefs/mtree.c
308
ungetc(c, fp);
usr.sbin/makefs/mtree.c
311
return (ferror(fp) ? errno : -1);
usr.sbin/makefs/mtree.c
315
skip_to(FILE *fp, const char *cs)
usr.sbin/makefs/mtree.c
319
c = getc(fp);
usr.sbin/makefs/mtree.c
321
c = getc(fp);
usr.sbin/makefs/mtree.c
323
ungetc(c, fp);
usr.sbin/makefs/mtree.c
326
return (ferror(fp) ? errno : -1);
usr.sbin/makefs/mtree.c
330
read_word(FILE *fp, char *buf, size_t bufsz)
usr.sbin/makefs/mtree.c
345
c = getc(fp);
usr.sbin/makefs/mtree.c
349
error = ferror(fp) ? errno : -1;
usr.sbin/makefs/mtree.c
355
error = skip_to(fp, "\n");
usr.sbin/makefs/mtree.c
390
ungetc(c, fp);
usr.sbin/makefs/mtree.c
418
skip_to(fp, " \t\n");
usr.sbin/makefs/mtree.c
477
read_mtree_keywords(FILE *fp, fsnode *node)
usr.sbin/makefs/mtree.c
491
error = skip_over(fp, " \t");
usr.sbin/makefs/mtree.c
495
error = read_word(fp, keyword, sizeof(keyword));
usr.sbin/makefs/mtree.c
66
FILE *fp;
usr.sbin/makefs/mtree.c
807
read_mtree_command(FILE *fp)
usr.sbin/makefs/mtree.c
812
error = read_word(fp, cmd, sizeof(cmd));
usr.sbin/makefs/mtree.c
816
error = read_mtree_keywords(fp, &mtree_global);
usr.sbin/makefs/mtree.c
819
skip_to(fp, "\n");
usr.sbin/makefs/mtree.c
820
(void)getc(fp);
usr.sbin/makefs/mtree.c
825
read_mtree_spec1(FILE *fp, bool def, const char *name)
usr.sbin/makefs/mtree.c
84
mtree_file_push(const char *name, FILE *fp)
usr.sbin/makefs/mtree.c
881
error = read_mtree_spec1(fp, false, ".");
usr.sbin/makefs/mtree.c
938
error = read_mtree_keywords(fp, node);
usr.sbin/makefs/mtree.c
977
read_mtree_spec(FILE *fp)
usr.sbin/makefs/mtree.c
98
fi->fp = fp;
usr.sbin/makefs/mtree.c
983
error = read_word(fp, pathtmp, sizeof(pathtmp));
usr.sbin/makefs/walk.c
315
FILE *fp;
usr.sbin/makefs/walk.c
325
if ((fp = fopen(specfile, "r")) == NULL)
usr.sbin/makefs/walk.c
328
root = spec(fp);
usr.sbin/makefs/walk.c
330
if (fclose(fp) == EOF)
usr.sbin/mfiutil/mfi_bbu.c
43
mfi_autolearn_period(FILE *fp, uint32_t period)
usr.sbin/mfiutil/mfi_bbu.c
51
fprintf(fp, "%u day%s", d, d == 1 ? "" : "s");
usr.sbin/mfiutil/mfi_bbu.c
53
fprintf(fp, ", ");
usr.sbin/mfiutil/mfi_bbu.c
56
fprintf(fp, "%u hour%s", h, h == 1 ? "" : "s");
usr.sbin/mfiutil/mfi_bbu.c
59
fprintf(fp, "less than 1 hour");
usr.sbin/mfiutil/mfi_bbu.c
81
mfi_autolearn_mode(FILE *fp, uint8_t mode)
usr.sbin/mfiutil/mfi_bbu.c
86
fprintf(fp, "enabled");
usr.sbin/mfiutil/mfi_bbu.c
89
fprintf(fp, "disabled");
usr.sbin/mfiutil/mfi_bbu.c
92
fprintf(fp, "warn via event");
usr.sbin/mfiutil/mfi_bbu.c
95
fprintf(fp, "mode 0x%02x", mode);
usr.sbin/moused/moused/quirks.c
1197
FILE *fp;
usr.sbin/moused/moused/quirks.c
1209
fp = fopen(path, "r");
usr.sbin/moused/moused/quirks.c
1210
if (!fp) {
usr.sbin/moused/moused/quirks.c
1222
while (fgets(line, sizeof(line), fp)) {
usr.sbin/moused/moused/quirks.c
1350
if (fp)
usr.sbin/moused/moused/quirks.c
1351
fclose(fp);
usr.sbin/moused/moused/quirks.c
467
FILE *fp;
usr.sbin/moused/moused/quirks.c
472
fp = fopen(syspath, "r");
usr.sbin/moused/moused/quirks.c
473
if (!fp)
usr.sbin/moused/moused/quirks.c
478
if (fgets(compatible, sizeof(compatible), fp)) {
usr.sbin/moused/moused/quirks.c
482
fclose(fp);
usr.sbin/mtest/mtest.c
254
FILE *fp;
usr.sbin/mtest/mtest.c
257
fp = fopen(fname, "r");
usr.sbin/mtest/mtest.c
258
if (fp == NULL) {
usr.sbin/mtest/mtest.c
264
while (fgets(line, sizeof(line), fp) != NULL) {
usr.sbin/mtest/mtest.c
269
process_cmd(lineptr, s, s6, fp);
usr.sbin/mtest/mtest.c
272
fclose(fp);
usr.sbin/mtest/mtest.c
375
process_cmd(char *cmd, int s, int s6, FILE *fp __unused)
usr.sbin/mtest/mtest.c
562
fgets(str1, sizeof(str1), fp);
usr.sbin/ndp/ndp.c
363
FILE *fp;
usr.sbin/ndp/ndp.c
367
if ((fp = fopen(name, "r")) == NULL)
usr.sbin/ndp/ndp.c
375
while (fgets(line, sizeof(line), fp) != NULL) {
usr.sbin/ndp/ndp.c
391
fclose(fp);
usr.sbin/ngctl/main.c
146
FILE *fp = NULL;
usr.sbin/ngctl/main.c
164
fp = stdin;
usr.sbin/ngctl/main.c
165
else if ((fp = fopen(optarg, "r")) == NULL)
usr.sbin/ngctl/main.c
208
if (fp != NULL) {
usr.sbin/ngctl/main.c
209
rtn = ReadFile(fp);
usr.sbin/ngctl/main.c
238
ReadFile(FILE *fp)
usr.sbin/ngctl/main.c
246
while ((len = getline(&line, &sz, fp)) >= 0) {
usr.sbin/ngctl/main.c
255
if (ferror(fp))
usr.sbin/ngctl/main.c
548
FILE *fp;
usr.sbin/ngctl/main.c
554
if ((fp = fopen(av[1], "r")) == NULL) {
usr.sbin/ngctl/main.c
564
rtn = ReadFile(fp);
usr.sbin/ngctl/main.c
565
if (ferror(fp))
usr.sbin/ngctl/main.c
567
fclose(fp);
usr.sbin/ngctl/main.c
72
static int ReadFile(FILE *fp);
usr.sbin/ngctl/write.c
102
fclose(fp);
usr.sbin/ngctl/write.c
68
FILE *fp;
usr.sbin/ngctl/write.c
90
if ((fp = fopen(av[3], "r")) == NULL) {
usr.sbin/ngctl/write.c
94
if ((len = fread(buf, 1, sizeof(buf), fp)) == 0) {
usr.sbin/ngctl/write.c
95
if (ferror(fp))
usr.sbin/ngctl/write.c
99
fclose(fp);
usr.sbin/pkg/pkg.c
354
const char *function, *fp, *key;
usr.sbin/pkg/pkg.c
358
function = fp = NULL;
usr.sbin/pkg/pkg.c
369
fp = ucl_object_tostring(cur);
usr.sbin/pkg/pkg.c
374
if (fp == NULL || function == NULL)
usr.sbin/pkg/pkg.c
387
strlcpy(f->hash, fp, sizeof(f->hash));
usr.sbin/pkg/pkg.c
479
FILE *fp;
usr.sbin/pkg/pkg.c
484
fp = open_memstream(&obuf, osz);
usr.sbin/pkg/pkg.c
485
if (fp == NULL)
usr.sbin/pkg/pkg.c
489
fwrite(buf, 1, r, fp);
usr.sbin/pkg/pkg.c
492
if (ferror(fp))
usr.sbin/pkg/pkg.c
495
fclose(fp);
usr.sbin/pkg/pkg.c
559
FILE *fp, *sigfp, *certfp, *tmpfp, *typefp;
usr.sbin/pkg/pkg.c
583
if ((fp = fdopen(my_fd, "rb")) == NULL) {
usr.sbin/pkg/pkg.c
601
while ((linelen = getline(&line, &linecap, fp)) > 0) {
usr.sbin/pkg/pkg.c
619
fclose(fp);
usr.sbin/pmcannotate/pmcannotate.c
102
static void general_printasm(FILE *fp, struct aggent *agg);
usr.sbin/pmcannotate/pmcannotate.c
103
static int general_printc(FILE *fp, struct aggent *agg);
usr.sbin/pmcannotate/pmcannotate.c
104
static int printblock(FILE *fp, struct aggent *agg);
usr.sbin/pmcannotate/pmcannotate.c
195
asmparse(FILE *fp)
usr.sbin/pmcannotate/pmcannotate.c
201
while (fgets(buffer, LNBUFF, fp) != NULL) {
usr.sbin/pmcannotate/pmcannotate.c
209
agg->ag_offset = ftell(fp);
usr.sbin/pmcannotate/pmcannotate.c
213
if (fseek(fp, agg->ag_offset, SEEK_SET) == -1)
usr.sbin/pmcannotate/pmcannotate.c
217
general_printasm(fp, agg);
usr.sbin/pmcannotate/pmcannotate.c
234
cparse(FILE *fp)
usr.sbin/pmcannotate/pmcannotate.c
240
while (fgets(buffer, LNBUFF, fp) != NULL) {
usr.sbin/pmcannotate/pmcannotate.c
248
agg->ag_offset = ftell(fp);
usr.sbin/pmcannotate/pmcannotate.c
252
if (fseek(fp, agg->ag_offset, SEEK_SET) == -1)
usr.sbin/pmcannotate/pmcannotate.c
256
if (general_printc(fp, agg) == -1)
usr.sbin/pmcannotate/pmcannotate.c
540
general_printasm(FILE *fp, struct aggent *agg)
usr.sbin/pmcannotate/pmcannotate.c
547
while (fgets(buffer, LNBUFF, fp) != NULL) {
usr.sbin/pmcannotate/pmcannotate.c
549
fseek(fp, nbytes * -1, SEEK_CUR);
usr.sbin/pmcannotate/pmcannotate.c
575
general_printc(FILE *fp, struct aggent *agg)
usr.sbin/pmcannotate/pmcannotate.c
579
while (fgets(buffer, LNBUFF, fp) != NULL) {
usr.sbin/pmcannotate/pmcannotate.c
580
fseek(fp, strlen(buffer) * -1, SEEK_CUR);
usr.sbin/pmcannotate/pmcannotate.c
583
if (printblock(fp, agg) == -1)
usr.sbin/pmcannotate/pmcannotate.c
598
printblock(FILE *fp, struct aggent *agg)
usr.sbin/pmcannotate/pmcannotate.c
611
lstart = ftell(fp);
usr.sbin/pmcannotate/pmcannotate.c
614
if (fgets(buffer, LNBUFF, fp) == NULL)
usr.sbin/pmcannotate/pmcannotate.c
621
if (fseek(fp, nbytes * -1, SEEK_CUR) == -1)
usr.sbin/pmcannotate/pmcannotate.c
641
} while (fgets(buffer, LNBUFF, fp) != NULL && isasminline(buffer) != 0);
usr.sbin/pmcannotate/pmcannotate.c
644
if (fseek(fp, lstart, SEEK_SET) == -1)
usr.sbin/pmcannotate/pmcannotate.c
649
while (fgets(buffer, LNBUFF, fp) != NULL && isasminline(buffer) == 0) {
usr.sbin/pmcannotate/pmcannotate.c
664
if (fgets(buffer, LNBUFF, fp) == NULL)
usr.sbin/pmcannotate/pmcannotate.c
670
if (fseek(fp, nbytes * -1, SEEK_CUR) == -1)
usr.sbin/pmcannotate/pmcannotate.c
675
if (fseek(fp, strlen(buffer) * -1, SEEK_CUR) == -1)
usr.sbin/pmcannotate/pmcannotate.c
87
static void asmparse(FILE *fp);
usr.sbin/pmcannotate/pmcannotate.c
88
static int cparse(FILE *fp);
usr.sbin/pmcstudy/pmcstudy.c
1520
struct counters *fp;
usr.sbin/pmcstudy/pmcstudy.c
1525
fp = find_counter(cpu, "FP_ASSIST.ANY");
usr.sbin/pmcstudy/pmcstudy.c
1527
fpd = fp->vals[pos] * 1.0;
usr.sbin/pmcstudy/pmcstudy.c
1530
fpd = fp->sum * 1.0;
usr.sbin/ppp/auth.c
172
FILE *fp;
usr.sbin/ppp/auth.c
177
fp = OpenSecret(SECRETFILE);
usr.sbin/ppp/auth.c
178
if (fp != NULL) {
usr.sbin/ppp/auth.c
181
while (fgets(buff, sizeof buff, fp)) {
usr.sbin/ppp/auth.c
192
CloseSecret(fp);
usr.sbin/ppp/auth.c
204
rewind(fp);
usr.sbin/ppp/auth.c
208
CloseSecret(fp);
usr.sbin/ppp/auth.c
217
FILE *fp;
usr.sbin/ppp/auth.c
238
fp = OpenSecret(SECRETFILE);
usr.sbin/ppp/auth.c
239
if (fp != NULL) {
usr.sbin/ppp/auth.c
242
while (fgets(buff, sizeof buff, fp)) {
usr.sbin/ppp/auth.c
253
CloseSecret(fp);
usr.sbin/ppp/auth.c
273
rewind(fp);
usr.sbin/ppp/auth.c
277
CloseSecret(fp);
usr.sbin/ppp/auth.c
300
FILE *fp;
usr.sbin/ppp/auth.c
305
fp = OpenSecret(SECRETFILE);
usr.sbin/ppp/auth.c
308
if (fp != NULL) {
usr.sbin/ppp/auth.c
309
while (fgets(buff, sizeof buff, fp)) {
usr.sbin/ppp/auth.c
320
CloseSecret(fp);
usr.sbin/ppp/auth.c
329
if (fp != NULL) {
usr.sbin/ppp/auth.c
330
rewind(fp);
usr.sbin/ppp/auth.c
335
if (fp != NULL)
usr.sbin/ppp/auth.c
336
CloseSecret(fp);
usr.sbin/ppp/auth.c
351
FILE *fp;
usr.sbin/ppp/auth.c
357
fp = OpenSecret(SECRETFILE);
usr.sbin/ppp/auth.c
358
if (fp == NULL)
usr.sbin/ppp/auth.c
363
while (fgets(buff, sizeof buff, fp)) {
usr.sbin/ppp/auth.c
376
CloseSecret(fp);
usr.sbin/ppp/auth.c
385
rewind(fp);
usr.sbin/ppp/auth.c
389
CloseSecret(fp);
usr.sbin/ppp/bundle.c
167
bundle_LayerStart(void *v __unused, struct fsm *fp __unused)
usr.sbin/ppp/bundle.c
267
bundle_LayerUp(void *v, struct fsm *fp)
usr.sbin/ppp/bundle.c
281
if (fp->proto == PROTO_LCP) {
usr.sbin/ppp/bundle.c
282
struct physical *p = link2physical(fp->link);
usr.sbin/ppp/bundle.c
286
} else if (isncp(fp->proto)) {
usr.sbin/ppp/bundle.c
287
if (ncp_LayersOpen(&fp->bundle->ncp) == 1) {
usr.sbin/ppp/bundle.c
288
bundle_CalculateBandwidth(fp->bundle);
usr.sbin/ppp/bundle.c
295
mp_CheckAutoloadTimer(&fp->bundle->ncp.mp);
usr.sbin/ppp/bundle.c
298
} else if (fp->proto == PROTO_CCP)
usr.sbin/ppp/bundle.c
299
bundle_CalculateBandwidth(fp->bundle); /* Against ccp_MTUOverhead */
usr.sbin/ppp/bundle.c
303
bundle_LayerDown(void *v, struct fsm *fp)
usr.sbin/ppp/bundle.c
318
if (isncp(fp->proto)) {
usr.sbin/ppp/bundle.c
319
if (ncp_LayersOpen(&fp->bundle->ncp) == 0) {
usr.sbin/ppp/bundle.c
328
} else if (fp->proto == PROTO_LCP) {
usr.sbin/ppp/bundle.c
338
if (fp == &dl->physical->link.lcp.fsm)
usr.sbin/ppp/bundle.c
351
fp->link->name);
usr.sbin/ppp/bundle.c
363
bundle_LayerFinish(void *v, struct fsm *fp)
usr.sbin/ppp/bundle.c
374
if (isncp(fp->proto) && !ncp_LayersUnfinished(&bundle->ncp)) {
usr.sbin/ppp/bundle.c
380
fsm2initial(fp);
usr.sbin/ppp/ccp.c
324
CcpInitRestartCounter(struct fsm *fp, int what)
usr.sbin/ppp/ccp.c
327
struct ccp *ccp = fsm2ccp(fp);
usr.sbin/ppp/ccp.c
329
fp->FsmTimer.load = ccp->cfg.fsm.timeout * SECTICKS;
usr.sbin/ppp/ccp.c
332
fp->restart = ccp->cfg.fsm.maxreq;
usr.sbin/ppp/ccp.c
335
fp->restart = ccp->cfg.fsm.maxtrm;
usr.sbin/ppp/ccp.c
338
fp->restart = 1;
usr.sbin/ppp/ccp.c
344
CcpSendConfigReq(struct fsm *fp)
usr.sbin/ppp/ccp.c
347
struct ccp *ccp = fsm2ccp(fp);
usr.sbin/ppp/ccp.c
361
(*algorithm[f]->Usable)(fp)) {
usr.sbin/ppp/ccp.c
371
fp->link->name);
usr.sbin/ppp/ccp.c
378
(*algorithm[f]->o.OptInit)(fp->bundle, &(*o)->val, &ccp->cfg);
usr.sbin/ppp/ccp.c
382
log_Printf(LogERROR, "%s: CCP REQ buffer overrun !\n", fp->link->name);
usr.sbin/ppp/ccp.c
395
fsm_Output(fp, CODE_CONFIGREQ, fp->reqid, buff, cp - buff, MB_CCPOUT);
usr.sbin/ppp/ccp.c
399
ccp_SendResetReq(struct fsm *fp)
usr.sbin/ppp/ccp.c
402
struct ccp *ccp = fsm2ccp(fp);
usr.sbin/ppp/ccp.c
404
ccp->reset_sent = fp->reqid;
usr.sbin/ppp/ccp.c
406
fsm_Output(fp, CODE_RESETREQ, fp->reqid, NULL, 0, MB_CCPOUT);
usr.sbin/ppp/ccp.c
410
CcpSentTerminateReq(struct fsm *fp __unused)
usr.sbin/ppp/ccp.c
416
CcpSendTerminateAck(struct fsm *fp, u_char id)
usr.sbin/ppp/ccp.c
419
fsm_Output(fp, CODE_TERMACK, id, NULL, 0, MB_CCPOUT);
usr.sbin/ppp/ccp.c
423
CcpRecvResetReq(struct fsm *fp)
usr.sbin/ppp/ccp.c
426
struct ccp *ccp = fsm2ccp(fp);
usr.sbin/ppp/ccp.c
433
CcpLayerStart(struct fsm *fp)
usr.sbin/ppp/ccp.c
436
struct ccp *ccp = fsm2ccp(fp);
usr.sbin/ppp/ccp.c
438
log_Printf(LogCCP, "%s: LayerStart.\n", fp->link->name);
usr.sbin/ppp/ccp.c
439
fp->more.reqs = fp->more.naks = fp->more.rejs = ccp->cfg.fsm.maxreq * 3;
usr.sbin/ppp/ccp.c
443
CcpLayerDown(struct fsm *fp)
usr.sbin/ppp/ccp.c
446
struct ccp *ccp = fsm2ccp(fp);
usr.sbin/ppp/ccp.c
449
log_Printf(LogCCP, "%s: LayerDown.\n", fp->link->name);
usr.sbin/ppp/ccp.c
471
CcpLayerFinish(struct fsm *fp)
usr.sbin/ppp/ccp.c
474
struct ccp *ccp = fsm2ccp(fp);
usr.sbin/ppp/ccp.c
477
log_Printf(LogCCP, "%s: LayerFinish.\n", fp->link->name);
usr.sbin/ppp/ccp.c
490
if (fp->link->lcp.fsm.state == ST_OPENED)
usr.sbin/ppp/ccp.c
491
log_Printf(LogLCP, "%s: Closing due to CCP completion\n", fp->link->name);
usr.sbin/ppp/ccp.c
492
fsm_Close(&fp->link->lcp.fsm);
usr.sbin/ppp/ccp.c
498
CcpLayerUp(struct fsm *fp)
usr.sbin/ppp/ccp.c
501
struct ccp *ccp = fsm2ccp(fp);
usr.sbin/ppp/ccp.c
511
fp->link->name, protoname(algorithm[f]->id));
usr.sbin/ppp/ccp.c
517
fsm_Close(fp);
usr.sbin/ppp/ccp.c
518
fsm_Close(&fp->link->lcp.fsm);
usr.sbin/ppp/ccp.c
522
log_Printf(LogCCP, "%s: LayerUp.\n", fp->link->name);
usr.sbin/ppp/ccp.c
527
(fp->bundle, &ccp->in.opt);
usr.sbin/ppp/ccp.c
530
fp->link->name, protoname(ccp->his_proto));
usr.sbin/ppp/ccp.c
532
fsm_Close(fp);
usr.sbin/ppp/ccp.c
546
(fp->bundle, &(*o)->val);
usr.sbin/ppp/ccp.c
549
fp->link->name, protoname(ccp->my_proto));
usr.sbin/ppp/ccp.c
551
fsm_Close(fp);
usr.sbin/ppp/ccp.c
556
fp->more.reqs = fp->more.naks = fp->more.rejs = ccp->cfg.fsm.maxreq * 3;
usr.sbin/ppp/ccp.c
559
fp->link->name, protoname(ccp->my_proto), ccp->my_proto,
usr.sbin/ppp/ccp.c
566
CcpDecodeConfig(struct fsm *fp, u_char *cp, u_char *end, int mode_type,
usr.sbin/ppp/ccp.c
570
struct ccp *ccp = fsm2ccp(fp);
usr.sbin/ppp/ccp.c
605
(*algorithm[f]->Usable)(fp) &&
usr.sbin/ppp/ccp.c
608
switch ((*algorithm[f]->i.Set)(fp->bundle, &ccp->in.opt, &ccp->cfg)) {
usr.sbin/ppp/ccp.c
631
" option\n", fp->link->name);
usr.sbin/ppp/ccp.c
634
if ((*algorithm[f]->o.Set)(fp->bundle, &o->val, &ccp->cfg) ==
usr.sbin/ppp/ccp.c
640
if (algorithm[f]->Required(fp)) {
usr.sbin/ppp/ccp.c
642
" %s negotiation\n", fp->link->name,
usr.sbin/ppp/ccp.c
644
fsm_Close(&fp->link->lcp.fsm);
usr.sbin/ppp/ccp.c
652
if (algorithm[f]->Required(fp)) {
usr.sbin/ppp/ccp.c
654
fp->link->name, protoname(algorithm[f]->id));
usr.sbin/ppp/ccp.c
655
fsm_Close(&fp->link->lcp.fsm);
usr.sbin/ppp/ccp.c
690
CcpRecvResetAck(struct fsm *fp, u_char id)
usr.sbin/ppp/ccp.c
693
struct ccp *ccp = fsm2ccp(fp);
usr.sbin/ppp/ccp.c
698
" ignored\n", fp->link->name, id, ccp->reset_sent);
usr.sbin/ppp/ccp.c
704
fp->link->name);
usr.sbin/ppp/ccp.c
707
fp->link->name, id);
usr.sbin/ppp/ccp.c
815
ccp_DefaultUsable(struct fsm *fp __unused)
usr.sbin/ppp/ccp.c
821
ccp_DefaultRequired(struct fsm *fp __unused)
usr.sbin/ppp/ccp.h
121
#define fsm2ccp(fp) (fp->proto == PROTO_CCP ? (struct ccp *)fp : NULL)
usr.sbin/ppp/command.c
1303
struct fsm *fp;
usr.sbin/ppp/command.c
1305
fp = &command_ChooseLink(arg)->ccp.fsm;
usr.sbin/ppp/command.c
1306
if (fp->link->lcp.fsm.state != ST_OPENED)
usr.sbin/ppp/command.c
1308
else if (fp->state == ST_OPENED)
usr.sbin/ppp/command.c
1309
fsm_Reopen(fp);
usr.sbin/ppp/command.c
1311
fp->open_mode = 0; /* Not passive any more */
usr.sbin/ppp/command.c
1312
if (fp->state == ST_STOPPED) {
usr.sbin/ppp/command.c
1313
fsm_Down(fp);
usr.sbin/ppp/command.c
1314
fsm_Up(fp);
usr.sbin/ppp/command.c
1316
fsm_Up(fp);
usr.sbin/ppp/command.c
1317
fsm_Open(fp);
usr.sbin/ppp/command.c
1345
struct fsm *fp;
usr.sbin/ppp/command.c
1347
fp = &command_ChooseLink(arg)->ccp.fsm;
usr.sbin/ppp/command.c
1348
if (fp->state == ST_OPENED) {
usr.sbin/ppp/command.c
1349
fsm_Close(fp);
usr.sbin/ppp/command.c
1351
fp->open_mode = 0; /* Stay ST_CLOSED */
usr.sbin/ppp/command.c
1353
fp->open_mode = OPEN_PASSIVE; /* Wait for the peer to start */
usr.sbin/ppp/command.c
1378
struct fsm *fp = arg->cx ? &arg->cx->physical->link.ccp.fsm :
usr.sbin/ppp/command.c
1380
fsm2initial(fp);
usr.sbin/ppp/datalink.c
560
datalink_LayerStart(void *v, struct fsm *fp)
usr.sbin/ppp/datalink.c
565
if (fp->proto == PROTO_LCP)
usr.sbin/ppp/datalink.c
566
(*dl->parent->LayerStart)(dl->parent->object, fp);
usr.sbin/ppp/datalink.c
570
datalink_LayerUp(void *v, struct fsm *fp)
usr.sbin/ppp/datalink.c
576
if (fp->proto == PROTO_LCP) {
usr.sbin/ppp/datalink.c
592
} else if (fp->proto == PROTO_CCP)
usr.sbin/ppp/datalink.c
749
datalink_LayerDown(void *v, struct fsm *fp)
usr.sbin/ppp/datalink.c
754
if (fp->proto == PROTO_LCP) {
usr.sbin/ppp/datalink.c
760
(*dl->parent->LayerDown)(dl->parent->object, fp);
usr.sbin/ppp/datalink.c
778
datalink_LayerFinish(void *v, struct fsm *fp)
usr.sbin/ppp/datalink.c
783
if (fp->proto == PROTO_LCP) {
usr.sbin/ppp/datalink.c
784
fsm2initial(fp);
usr.sbin/ppp/datalink.c
785
(*dl->parent->LayerFinish)(dl->parent->object, fp);
usr.sbin/ppp/datalink.c
787
} else if (fp->state == ST_CLOSED && fp->open_mode == OPEN_PASSIVE)
usr.sbin/ppp/datalink.c
788
fsm_Open(fp); /* CCP goes to ST_STOPPED */
usr.sbin/ppp/filter.c
451
doShowFilter(struct filterent *fp, struct prompt *prompt)
usr.sbin/ppp/filter.c
456
for (n = 0; n < MAXFILTERS; n++, fp++) {
usr.sbin/ppp/filter.c
457
if (fp->f_action != A_NONE) {
usr.sbin/ppp/filter.c
458
prompt_Printf(prompt, " %2d %s", n, filter_Action2Nam(fp->f_action));
usr.sbin/ppp/filter.c
459
prompt_Printf(prompt, "%c ", fp->f_invert ? '!' : ' ');
usr.sbin/ppp/filter.c
461
if (ncprange_isset(&fp->f_src))
usr.sbin/ppp/filter.c
462
prompt_Printf(prompt, "%s ", addrstr(&fp->f_src, fp->f_srctype));
usr.sbin/ppp/filter.c
466
if (ncprange_isset(&fp->f_dst))
usr.sbin/ppp/filter.c
467
prompt_Printf(prompt, "%s ", addrstr(&fp->f_dst, fp->f_dsttype));
usr.sbin/ppp/filter.c
471
if (fp->f_proto) {
usr.sbin/ppp/filter.c
472
if ((pe = getprotobynumber(fp->f_proto)) == NULL)
usr.sbin/ppp/filter.c
473
prompt_Printf(prompt, "P:%d", fp->f_proto);
usr.sbin/ppp/filter.c
477
if (fp->f_srcop)
usr.sbin/ppp/filter.c
478
prompt_Printf(prompt, " src %s %d", filter_Op2Nam(fp->f_srcop),
usr.sbin/ppp/filter.c
479
fp->f_srcport);
usr.sbin/ppp/filter.c
480
if (fp->f_dstop)
usr.sbin/ppp/filter.c
481
prompt_Printf(prompt, " dst %s %d", filter_Op2Nam(fp->f_dstop),
usr.sbin/ppp/filter.c
482
fp->f_dstport);
usr.sbin/ppp/filter.c
483
if (fp->f_estab)
usr.sbin/ppp/filter.c
485
if (fp->f_syn)
usr.sbin/ppp/filter.c
487
if (fp->f_finrst)
usr.sbin/ppp/filter.c
491
if (fp->timeout != 0)
usr.sbin/ppp/filter.c
492
prompt_Printf(prompt, " timeout %u", fp->timeout);
usr.sbin/ppp/filter.c
564
struct filterent *fp;
usr.sbin/ppp/filter.c
567
for (fp = filter->rule, n = 0; n < MAXFILTERS; fp++, n++)
usr.sbin/ppp/filter.c
568
if (fp->f_action != A_NONE) {
usr.sbin/ppp/filter.c
570
if (fp->f_srctype == T_MYADDR && ncpaddr_family(local) == AF_INET)
usr.sbin/ppp/filter.c
571
ncprange_sethost(&fp->f_src, local);
usr.sbin/ppp/filter.c
572
if (fp->f_dsttype == T_MYADDR && ncpaddr_family(local) == AF_INET)
usr.sbin/ppp/filter.c
573
ncprange_sethost(&fp->f_dst, local);
usr.sbin/ppp/filter.c
575
if (fp->f_srctype == T_MYADDR6 && ncpaddr_family(local) == AF_INET6)
usr.sbin/ppp/filter.c
576
ncprange_sethost(&fp->f_src, local);
usr.sbin/ppp/filter.c
577
if (fp->f_dsttype == T_MYADDR6 && ncpaddr_family(local) == AF_INET6)
usr.sbin/ppp/filter.c
578
ncprange_sethost(&fp->f_dst, local);
usr.sbin/ppp/filter.c
582
if (fp->f_srctype == T_HISADDR && ncpaddr_family(remote) == AF_INET)
usr.sbin/ppp/filter.c
583
ncprange_sethost(&fp->f_src, remote);
usr.sbin/ppp/filter.c
584
if (fp->f_dsttype == T_HISADDR && ncpaddr_family(remote) == AF_INET)
usr.sbin/ppp/filter.c
585
ncprange_sethost(&fp->f_dst, remote);
usr.sbin/ppp/filter.c
587
if (fp->f_srctype == T_HISADDR6 && ncpaddr_family(remote) == AF_INET6)
usr.sbin/ppp/filter.c
588
ncprange_sethost(&fp->f_src, remote);
usr.sbin/ppp/filter.c
589
if (fp->f_dsttype == T_HISADDR6 && ncpaddr_family(remote) == AF_INET6)
usr.sbin/ppp/filter.c
590
ncprange_sethost(&fp->f_dst, remote);
usr.sbin/ppp/filter.c
594
if (fp->f_srctype == T_DNS0)
usr.sbin/ppp/filter.c
595
ncprange_setip4host(&fp->f_src, dns[0]);
usr.sbin/ppp/filter.c
596
if (fp->f_dsttype == T_DNS0)
usr.sbin/ppp/filter.c
597
ncprange_setip4host(&fp->f_dst, dns[0]);
usr.sbin/ppp/filter.c
598
if (fp->f_srctype == T_DNS1)
usr.sbin/ppp/filter.c
599
ncprange_setip4host(&fp->f_src, dns[1]);
usr.sbin/ppp/filter.c
600
if (fp->f_dsttype == T_DNS1)
usr.sbin/ppp/filter.c
601
ncprange_setip4host(&fp->f_dst, dns[1]);
usr.sbin/ppp/fsm.c
1004
if (magic != fp->link->lcp.his_magic)
usr.sbin/ppp/fsm.c
1005
log_Printf(fp->LogLevel, "%s: RecvIdent: magic 0x%08lx is wrong,"
usr.sbin/ppp/fsm.c
1006
" expecting 0x%08lx\n", fp->link->name, (u_long)magic,
usr.sbin/ppp/fsm.c
1007
(u_long)fp->link->lcp.his_magic);
usr.sbin/ppp/fsm.c
1009
lcp_RecvIdentification(&fp->link->lcp, cp + 4);
usr.sbin/ppp/fsm.c
1015
FsmRecvTimeRemain(struct fsm *fp __unused, struct fsmheader *lhp __unused,
usr.sbin/ppp/fsm.c
1022
FsmRecvResetReq(struct fsm *fp, struct fsmheader *lhp, struct mbuf *bp)
usr.sbin/ppp/fsm.c
1024
if ((*fp->fn->RecvResetReq)(fp)) {
usr.sbin/ppp/fsm.c
1030
link_SequenceQueue(fp->link);
usr.sbin/ppp/fsm.c
1031
fsm_Output(fp, CODE_RESETACK, lhp->id, NULL, 0, MB_CCPOUT);
usr.sbin/ppp/fsm.c
1037
FsmRecvResetAck(struct fsm *fp, struct fsmheader *lhp, struct mbuf *bp)
usr.sbin/ppp/fsm.c
1039
(*fp->fn->RecvResetAck)(fp, lhp->id);
usr.sbin/ppp/fsm.c
1044
fsm_Input(struct fsm *fp, struct mbuf *bp)
usr.sbin/ppp/fsm.c
1059
"- dropped\n", fp->link->name, len, (int)ntohs(lh.length));
usr.sbin/ppp/fsm.c
1064
if (lh.code < fp->min_code || lh.code > fp->max_code ||
usr.sbin/ppp/fsm.c
1074
fsm_Output(fp, CODE_CODEREJ, id++, MBUF_CTOP(bp), bp->m_len, MB_UNKNOWN);
usr.sbin/ppp/fsm.c
1080
if (lh.id != fp->reqid && codep->check_reqid &&
usr.sbin/ppp/fsm.c
1081
Enabled(fp->bundle, OPT_IDCHECK)) {
usr.sbin/ppp/fsm.c
1082
log_Printf(fp->LogLevel, "%s: Recv%s(%d), dropped (expected %d)\n",
usr.sbin/ppp/fsm.c
1083
fp->link->name, codep->name, lh.id, fp->reqid);
usr.sbin/ppp/fsm.c
1087
log_Printf(fp->LogLevel, "%s: Recv%s(%d) state = %s\n",
usr.sbin/ppp/fsm.c
1088
fp->link->name, codep->name, lh.id, State2Nam(fp->state));
usr.sbin/ppp/fsm.c
1090
if (codep->inc_reqid && (lh.id == fp->reqid ||
usr.sbin/ppp/fsm.c
1091
(!Enabled(fp->bundle, OPT_IDCHECK) && codep->check_reqid)))
usr.sbin/ppp/fsm.c
1092
fp->reqid++; /* That's the end of that ``exchange''.... */
usr.sbin/ppp/fsm.c
1094
(*codep->recv)(fp, &lh, bp);
usr.sbin/ppp/fsm.c
1098
fsm_NullRecvResetReq(struct fsm *fp)
usr.sbin/ppp/fsm.c
1100
log_Printf(fp->LogLevel, "%s: Oops - received unexpected reset req\n",
usr.sbin/ppp/fsm.c
1101
fp->link->name);
usr.sbin/ppp/fsm.c
1106
fsm_NullRecvResetAck(struct fsm *fp, u_char id __unused)
usr.sbin/ppp/fsm.c
1108
log_Printf(fp->LogLevel, "%s: Oops - received unexpected reset ack\n",
usr.sbin/ppp/fsm.c
1109
fp->link->name);
usr.sbin/ppp/fsm.c
1113
fsm_Reopen(struct fsm *fp)
usr.sbin/ppp/fsm.c
1115
if (fp->state == ST_OPENED) {
usr.sbin/ppp/fsm.c
1116
(*fp->fn->LayerDown)(fp);
usr.sbin/ppp/fsm.c
1117
FsmInitRestartCounter(fp, FSM_REQ_TIMER);
usr.sbin/ppp/fsm.c
1118
FsmSendConfigReq(fp);
usr.sbin/ppp/fsm.c
1119
NewState(fp, ST_REQSENT);
usr.sbin/ppp/fsm.c
1120
(*fp->parent->LayerDown)(fp->parent->object, fp);
usr.sbin/ppp/fsm.c
1125
fsm2initial(struct fsm *fp)
usr.sbin/ppp/fsm.c
1127
timer_Stop(&fp->FsmTimer);
usr.sbin/ppp/fsm.c
1128
timer_Stop(&fp->OpenTimer);
usr.sbin/ppp/fsm.c
1129
timer_Stop(&fp->StoppedTimer);
usr.sbin/ppp/fsm.c
1130
if (fp->state == ST_STOPPED)
usr.sbin/ppp/fsm.c
1131
fsm_Close(fp);
usr.sbin/ppp/fsm.c
1132
if (fp->state > ST_INITIAL)
usr.sbin/ppp/fsm.c
1133
fsm_Down(fp);
usr.sbin/ppp/fsm.c
1134
if (fp->state > ST_INITIAL)
usr.sbin/ppp/fsm.c
1135
fsm_Close(fp);
usr.sbin/ppp/fsm.c
129
struct fsm *fp = (struct fsm *)v;
usr.sbin/ppp/fsm.c
131
log_Printf(fp->LogLevel, "%s: Stopped timer expired\n", fp->link->name);
usr.sbin/ppp/fsm.c
132
if (fp->OpenTimer.state == TIMER_RUNNING) {
usr.sbin/ppp/fsm.c
134
fp->link->name, fp->name);
usr.sbin/ppp/fsm.c
135
timer_Stop(&fp->OpenTimer);
usr.sbin/ppp/fsm.c
137
if (fp->state == ST_STOPPED)
usr.sbin/ppp/fsm.c
138
fsm2initial(fp);
usr.sbin/ppp/fsm.c
142
fsm_Init(struct fsm *fp, const char *name, u_short proto, int mincode,
usr.sbin/ppp/fsm.c
147
fp->name = name;
usr.sbin/ppp/fsm.c
148
fp->proto = proto;
usr.sbin/ppp/fsm.c
149
fp->min_code = mincode;
usr.sbin/ppp/fsm.c
150
fp->max_code = maxcode;
usr.sbin/ppp/fsm.c
151
fp->state = fp->min_code > CODE_TERMACK ? ST_OPENED : ST_INITIAL;
usr.sbin/ppp/fsm.c
152
fp->reqid = 1;
usr.sbin/ppp/fsm.c
153
fp->restart = 1;
usr.sbin/ppp/fsm.c
154
fp->more.reqs = fp->more.naks = fp->more.rejs = 3;
usr.sbin/ppp/fsm.c
155
memset(&fp->FsmTimer, '\0', sizeof fp->FsmTimer);
usr.sbin/ppp/fsm.c
156
memset(&fp->OpenTimer, '\0', sizeof fp->OpenTimer);
usr.sbin/ppp/fsm.c
157
memset(&fp->StoppedTimer, '\0', sizeof fp->StoppedTimer);
usr.sbin/ppp/fsm.c
158
fp->LogLevel = LogLevel;
usr.sbin/ppp/fsm.c
159
fp->link = l;
usr.sbin/ppp/fsm.c
160
fp->bundle = bundle;
usr.sbin/ppp/fsm.c
161
fp->parent = parent;
usr.sbin/ppp/fsm.c
162
fp->fn = fn;
usr.sbin/ppp/fsm.c
163
fp->FsmTimer.name = timer_names[0];
usr.sbin/ppp/fsm.c
164
fp->OpenTimer.name = timer_names[1];
usr.sbin/ppp/fsm.c
165
fp->StoppedTimer.name = timer_names[2];
usr.sbin/ppp/fsm.c
169
NewState(struct fsm *fp, int new)
usr.sbin/ppp/fsm.c
171
log_Printf(fp->LogLevel, "%s: State change %s --> %s\n",
usr.sbin/ppp/fsm.c
172
fp->link->name, State2Nam(fp->state), State2Nam(new));
usr.sbin/ppp/fsm.c
173
if (fp->state == ST_STOPPED && fp->StoppedTimer.state == TIMER_RUNNING)
usr.sbin/ppp/fsm.c
174
timer_Stop(&fp->StoppedTimer);
usr.sbin/ppp/fsm.c
175
fp->state = new;
usr.sbin/ppp/fsm.c
177
timer_Stop(&fp->FsmTimer);
usr.sbin/ppp/fsm.c
178
if (new == ST_STOPPED && fp->StoppedTimer.load) {
usr.sbin/ppp/fsm.c
179
timer_Stop(&fp->StoppedTimer);
usr.sbin/ppp/fsm.c
180
fp->StoppedTimer.func = StoppedTimeout;
usr.sbin/ppp/fsm.c
181
fp->StoppedTimer.arg = (void *) fp;
usr.sbin/ppp/fsm.c
182
timer_Start(&fp->StoppedTimer);
usr.sbin/ppp/fsm.c
188
fsm_Output(struct fsm *fp, u_int code, u_int id, u_char *ptr, unsigned count,
usr.sbin/ppp/fsm.c
195
if (log_IsKept(fp->LogLevel)) {
usr.sbin/ppp/fsm.c
196
log_Printf(fp->LogLevel, "%s: Send%s(%d) state = %s\n",
usr.sbin/ppp/fsm.c
197
fp->link->name, Code2Nam(code), id, State2Nam(fp->state));
usr.sbin/ppp/fsm.c
203
(*fp->fn->DecodeConfig)(fp, ptr, ptr + count, MODE_NOP, NULL);
usr.sbin/ppp/fsm.c
205
log_Printf(fp->LogLevel, " [EMPTY]\n");
usr.sbin/ppp/fsm.c
219
link_PushPacket(fp->link, bp, fp->bundle, LINK_QUEUES(fp->link) - 1,
usr.sbin/ppp/fsm.c
220
fp->proto);
usr.sbin/ppp/fsm.c
223
lcp_SendIdentification(&fp->link->lcp);
usr.sbin/ppp/fsm.c
229
struct fsm *fp = (struct fsm *)v;
usr.sbin/ppp/fsm.c
231
timer_Stop(&fp->OpenTimer);
usr.sbin/ppp/fsm.c
232
if (fp->state <= ST_STOPPED) {
usr.sbin/ppp/fsm.c
233
if (fp->state != ST_STARTING) {
usr.sbin/ppp/fsm.c
245
(*fp->fn->LayerStart)(fp);
usr.sbin/ppp/fsm.c
246
(*fp->parent->LayerStart)(fp->parent->object, fp);
usr.sbin/ppp/fsm.c
248
FsmInitRestartCounter(fp, FSM_REQ_TIMER);
usr.sbin/ppp/fsm.c
249
FsmSendConfigReq(fp);
usr.sbin/ppp/fsm.c
250
NewState(fp, ST_REQSENT);
usr.sbin/ppp/fsm.c
255
fsm_Open(struct fsm *fp)
usr.sbin/ppp/fsm.c
257
switch (fp->state) {
usr.sbin/ppp/fsm.c
259
NewState(fp, ST_STARTING);
usr.sbin/ppp/fsm.c
260
(*fp->fn->LayerStart)(fp);
usr.sbin/ppp/fsm.c
261
(*fp->parent->LayerStart)(fp->parent->object, fp);
usr.sbin/ppp/fsm.c
264
if (fp->open_mode == OPEN_PASSIVE) {
usr.sbin/ppp/fsm.c
265
NewState(fp, ST_STOPPED); /* XXX: This is a hack ! */
usr.sbin/ppp/fsm.c
266
} else if (fp->open_mode > 0) {
usr.sbin/ppp/fsm.c
267
if (fp->open_mode > 1)
usr.sbin/ppp/fsm.c
269
fp->link->name, fp->open_mode);
usr.sbin/ppp/fsm.c
270
NewState(fp, ST_STOPPED); /* XXX: This is a not-so-bad hack ! */
usr.sbin/ppp/fsm.c
271
timer_Stop(&fp->OpenTimer);
usr.sbin/ppp/fsm.c
272
fp->OpenTimer.load = fp->open_mode * SECTICKS;
usr.sbin/ppp/fsm.c
273
fp->OpenTimer.func = FsmOpenNow;
usr.sbin/ppp/fsm.c
274
fp->OpenTimer.arg = (void *)fp;
usr.sbin/ppp/fsm.c
275
timer_Start(&fp->OpenTimer);
usr.sbin/ppp/fsm.c
277
FsmOpenNow(fp);
usr.sbin/ppp/fsm.c
287
NewState(fp, ST_STOPPING);
usr.sbin/ppp/fsm.c
293
fsm_Up(struct fsm *fp)
usr.sbin/ppp/fsm.c
295
switch (fp->state) {
usr.sbin/ppp/fsm.c
297
log_Printf(fp->LogLevel, "FSM: Using \"%s\" as a transport\n",
usr.sbin/ppp/fsm.c
298
fp->link->name);
usr.sbin/ppp/fsm.c
299
NewState(fp, ST_CLOSED);
usr.sbin/ppp/fsm.c
302
FsmInitRestartCounter(fp, FSM_REQ_TIMER);
usr.sbin/ppp/fsm.c
303
FsmSendConfigReq(fp);
usr.sbin/ppp/fsm.c
304
NewState(fp, ST_REQSENT);
usr.sbin/ppp/fsm.c
307
log_Printf(fp->LogLevel, "%s: Oops, Up at %s\n",
usr.sbin/ppp/fsm.c
308
fp->link->name, State2Nam(fp->state));
usr.sbin/ppp/fsm.c
314
fsm_Down(struct fsm *fp)
usr.sbin/ppp/fsm.c
316
switch (fp->state) {
usr.sbin/ppp/fsm.c
318
NewState(fp, ST_INITIAL);
usr.sbin/ppp/fsm.c
322
(*fp->fn->LayerFinish)(fp);
usr.sbin/ppp/fsm.c
323
NewState(fp, ST_INITIAL);
usr.sbin/ppp/fsm.c
324
(*fp->parent->LayerFinish)(fp->parent->object, fp);
usr.sbin/ppp/fsm.c
327
NewState(fp, ST_STARTING);
usr.sbin/ppp/fsm.c
328
(*fp->fn->LayerStart)(fp);
usr.sbin/ppp/fsm.c
329
(*fp->parent->LayerStart)(fp->parent->object, fp);
usr.sbin/ppp/fsm.c
335
NewState(fp, ST_STARTING);
usr.sbin/ppp/fsm.c
338
(*fp->fn->LayerDown)(fp);
usr.sbin/ppp/fsm.c
339
NewState(fp, ST_STARTING);
usr.sbin/ppp/fsm.c
340
(*fp->parent->LayerDown)(fp->parent->object, fp);
usr.sbin/ppp/fsm.c
346
fsm_Close(struct fsm *fp)
usr.sbin/ppp/fsm.c
348
switch (fp->state) {
usr.sbin/ppp/fsm.c
350
(*fp->fn->LayerFinish)(fp);
usr.sbin/ppp/fsm.c
351
NewState(fp, ST_INITIAL);
usr.sbin/ppp/fsm.c
352
(*fp->parent->LayerFinish)(fp->parent->object, fp);
usr.sbin/ppp/fsm.c
355
NewState(fp, ST_CLOSED);
usr.sbin/ppp/fsm.c
358
NewState(fp, ST_CLOSING);
usr.sbin/ppp/fsm.c
361
(*fp->fn->LayerDown)(fp);
usr.sbin/ppp/fsm.c
362
if (fp->state == ST_OPENED) {
usr.sbin/ppp/fsm.c
363
FsmInitRestartCounter(fp, FSM_TRM_TIMER);
usr.sbin/ppp/fsm.c
364
FsmSendTerminateReq(fp);
usr.sbin/ppp/fsm.c
365
NewState(fp, ST_CLOSING);
usr.sbin/ppp/fsm.c
366
(*fp->parent->LayerDown)(fp->parent->object, fp);
usr.sbin/ppp/fsm.c
372
FsmInitRestartCounter(fp, FSM_TRM_TIMER);
usr.sbin/ppp/fsm.c
373
FsmSendTerminateReq(fp);
usr.sbin/ppp/fsm.c
374
NewState(fp, ST_CLOSING);
usr.sbin/ppp/fsm.c
383
FsmSendConfigReq(struct fsm *fp)
usr.sbin/ppp/fsm.c
385
if (fp->more.reqs-- > 0 && fp->restart-- > 0) {
usr.sbin/ppp/fsm.c
386
(*fp->fn->SendConfigReq)(fp);
usr.sbin/ppp/fsm.c
387
timer_Start(&fp->FsmTimer); /* Start restart timer */
usr.sbin/ppp/fsm.c
389
if (fp->more.reqs < 0)
usr.sbin/ppp/fsm.c
391
"negotiation\n", fp->link->name, fp->name);
usr.sbin/ppp/fsm.c
392
lcp_SendIdentification(&fp->link->lcp);
usr.sbin/ppp/fsm.c
393
fsm_Close(fp);
usr.sbin/ppp/fsm.c
398
FsmSendTerminateReq(struct fsm *fp)
usr.sbin/ppp/fsm.c
400
fsm_Output(fp, CODE_TERMREQ, fp->reqid, NULL, 0, MB_UNKNOWN);
usr.sbin/ppp/fsm.c
401
(*fp->fn->SentTerminateReq)(fp);
usr.sbin/ppp/fsm.c
402
timer_Start(&fp->FsmTimer); /* Start restart timer */
usr.sbin/ppp/fsm.c
403
fp->restart--; /* Decrement restart counter */
usr.sbin/ppp/fsm.c
412
struct fsm *fp = (struct fsm *)v;
usr.sbin/ppp/fsm.c
414
if (fp->restart) {
usr.sbin/ppp/fsm.c
415
switch (fp->state) {
usr.sbin/ppp/fsm.c
418
FsmSendTerminateReq(fp);
usr.sbin/ppp/fsm.c
422
FsmSendConfigReq(fp);
usr.sbin/ppp/fsm.c
425
FsmSendConfigReq(fp);
usr.sbin/ppp/fsm.c
426
NewState(fp, ST_REQSENT);
usr.sbin/ppp/fsm.c
429
timer_Start(&fp->FsmTimer);
usr.sbin/ppp/fsm.c
431
switch (fp->state) {
usr.sbin/ppp/fsm.c
433
(*fp->fn->LayerFinish)(fp);
usr.sbin/ppp/fsm.c
434
NewState(fp, ST_CLOSED);
usr.sbin/ppp/fsm.c
435
(*fp->parent->LayerFinish)(fp->parent->object, fp);
usr.sbin/ppp/fsm.c
438
(*fp->fn->LayerFinish)(fp);
usr.sbin/ppp/fsm.c
439
NewState(fp, ST_STOPPED);
usr.sbin/ppp/fsm.c
440
(*fp->parent->LayerFinish)(fp->parent->object, fp);
usr.sbin/ppp/fsm.c
445
(*fp->fn->LayerFinish)(fp);
usr.sbin/ppp/fsm.c
446
NewState(fp, ST_STOPPED);
usr.sbin/ppp/fsm.c
447
(*fp->parent->LayerFinish)(fp->parent->object, fp);
usr.sbin/ppp/fsm.c
454
FsmInitRestartCounter(struct fsm *fp, int what)
usr.sbin/ppp/fsm.c
456
timer_Stop(&fp->FsmTimer);
usr.sbin/ppp/fsm.c
457
fp->FsmTimer.func = FsmTimeout;
usr.sbin/ppp/fsm.c
458
fp->FsmTimer.arg = (void *)fp;
usr.sbin/ppp/fsm.c
459
(*fp->fn->InitRestartCounter)(fp, what);
usr.sbin/ppp/fsm.c
466
FsmRecvConfigReq(struct fsm *fp, struct fsmheader *lhp, struct mbuf *bp)
usr.sbin/ppp/fsm.c
479
fp->link->name, plen, flen);
usr.sbin/ppp/fsm.c
485
switch (fp->state) {
usr.sbin/ppp/fsm.c
487
(*fp->fn->LayerDown)(fp);
usr.sbin/ppp/fsm.c
494
(*fp->fn->DecodeConfig)(fp, cp, cp + flen, MODE_REQ, &dec);
usr.sbin/ppp/fsm.c
496
log_Printf(fp->LogLevel, " [EMPTY]\n");
usr.sbin/ppp/fsm.c
502
switch (fp->state) {
usr.sbin/ppp/fsm.c
504
if (fp->proto == PROTO_CCP && fp->link->lcp.fsm.state == ST_OPENED) {
usr.sbin/ppp/fsm.c
510
bp = proto_Prepend(bp, fp->proto, 0, 0);
usr.sbin/ppp/fsm.c
512
lcp_SendProtoRej(&fp->link->lcp, MBUF_CTOP(bp), bp->m_len);
usr.sbin/ppp/fsm.c
518
log_Printf(fp->LogLevel, "%s: Oops, RCR in %s.\n",
usr.sbin/ppp/fsm.c
519
fp->link->name, State2Nam(fp->state));
usr.sbin/ppp/fsm.c
523
(*fp->fn->SendTerminateAck)(fp, lhp->id);
usr.sbin/ppp/fsm.c
527
log_Printf(fp->LogLevel, "%s: Error: Got ConfigReq while state = %s\n",
usr.sbin/ppp/fsm.c
528
fp->link->name, State2Nam(fp->state));
usr.sbin/ppp/fsm.c
533
FsmInitRestartCounter(fp, FSM_REQ_TIMER);
usr.sbin/ppp/fsm.c
536
FsmSendConfigReq(fp);
usr.sbin/ppp/fsm.c
541
fsm_Output(fp, CODE_CONFIGREJ, lhp->id, dec.rej, dec.rejend - dec.rej,
usr.sbin/ppp/fsm.c
544
fsm_Output(fp, CODE_CONFIGNAK, lhp->id, dec.nak, dec.nakend - dec.nak,
usr.sbin/ppp/fsm.c
547
fsm_Output(fp, CODE_CONFIGACK, lhp->id, dec.ack, dec.ackend - dec.ack,
usr.sbin/ppp/fsm.c
550
switch (fp->state) {
usr.sbin/ppp/fsm.c
557
(*fp->fn->LayerStart)(fp);
usr.sbin/ppp/fsm.c
558
(*fp->parent->LayerStart)(fp->parent->object, fp);
usr.sbin/ppp/fsm.c
563
NewState(fp, ST_ACKSENT);
usr.sbin/ppp/fsm.c
565
NewState(fp, ST_REQSENT);
usr.sbin/ppp/fsm.c
566
(*fp->parent->LayerDown)(fp->parent->object, fp);
usr.sbin/ppp/fsm.c
570
NewState(fp, ST_ACKSENT);
usr.sbin/ppp/fsm.c
574
NewState(fp, ST_OPENED);
usr.sbin/ppp/fsm.c
575
if ((*fp->fn->LayerUp)(fp))
usr.sbin/ppp/fsm.c
576
(*fp->parent->LayerUp)(fp->parent->object, fp);
usr.sbin/ppp/fsm.c
578
(*fp->fn->LayerDown)(fp);
usr.sbin/ppp/fsm.c
579
FsmInitRestartCounter(fp, FSM_TRM_TIMER);
usr.sbin/ppp/fsm.c
580
FsmSendTerminateReq(fp);
usr.sbin/ppp/fsm.c
581
NewState(fp, ST_CLOSING);
usr.sbin/ppp/fsm.c
582
lcp_SendIdentification(&fp->link->lcp);
usr.sbin/ppp/fsm.c
588
NewState(fp, ST_REQSENT);
usr.sbin/ppp/fsm.c
593
if (dec.rejend != dec.rej && --fp->more.rejs <= 0) {
usr.sbin/ppp/fsm.c
595
fp->link->name, fp->name);
usr.sbin/ppp/fsm.c
596
lcp_SendIdentification(&fp->link->lcp);
usr.sbin/ppp/fsm.c
597
fsm_Close(fp);
usr.sbin/ppp/fsm.c
600
if (dec.nakend != dec.nak && --fp->more.naks <= 0) {
usr.sbin/ppp/fsm.c
602
fp->link->name, fp->name);
usr.sbin/ppp/fsm.c
603
lcp_SendIdentification(&fp->link->lcp);
usr.sbin/ppp/fsm.c
604
fsm_Close(fp);
usr.sbin/ppp/fsm.c
609
FsmRecvConfigAck(struct fsm *fp, struct fsmheader *lhp, struct mbuf *bp)
usr.sbin/ppp/fsm.c
628
(*fp->fn->DecodeConfig)(fp, cp, cp + flen, MODE_ACK, &dec);
usr.sbin/ppp/fsm.c
630
log_Printf(fp->LogLevel, " [EMPTY]\n");
usr.sbin/ppp/fsm.c
632
switch (fp->state) {
usr.sbin/ppp/fsm.c
635
(*fp->fn->SendTerminateAck)(fp, lhp->id);
usr.sbin/ppp/fsm.c
641
FsmInitRestartCounter(fp, FSM_REQ_TIMER);
usr.sbin/ppp/fsm.c
642
NewState(fp, ST_ACKRCVD);
usr.sbin/ppp/fsm.c
645
FsmSendConfigReq(fp);
usr.sbin/ppp/fsm.c
646
NewState(fp, ST_REQSENT);
usr.sbin/ppp/fsm.c
649
FsmInitRestartCounter(fp, FSM_REQ_TIMER);
usr.sbin/ppp/fsm.c
650
NewState(fp, ST_OPENED);
usr.sbin/ppp/fsm.c
651
if ((*fp->fn->LayerUp)(fp))
usr.sbin/ppp/fsm.c
652
(*fp->parent->LayerUp)(fp->parent->object, fp);
usr.sbin/ppp/fsm.c
654
(*fp->fn->LayerDown)(fp);
usr.sbin/ppp/fsm.c
655
FsmInitRestartCounter(fp, FSM_TRM_TIMER);
usr.sbin/ppp/fsm.c
656
FsmSendTerminateReq(fp);
usr.sbin/ppp/fsm.c
657
NewState(fp, ST_CLOSING);
usr.sbin/ppp/fsm.c
658
lcp_SendIdentification(&fp->link->lcp);
usr.sbin/ppp/fsm.c
662
(*fp->fn->LayerDown)(fp);
usr.sbin/ppp/fsm.c
663
FsmSendConfigReq(fp);
usr.sbin/ppp/fsm.c
664
NewState(fp, ST_REQSENT);
usr.sbin/ppp/fsm.c
665
(*fp->parent->LayerDown)(fp->parent->object, fp);
usr.sbin/ppp/fsm.c
672
FsmRecvConfigNak(struct fsm *fp, struct fsmheader *lhp, struct mbuf *bp)
usr.sbin/ppp/fsm.c
689
switch (fp->state) {
usr.sbin/ppp/fsm.c
692
log_Printf(fp->LogLevel, "%s: Oops, RCN in %s.\n",
usr.sbin/ppp/fsm.c
693
fp->link->name, State2Nam(fp->state));
usr.sbin/ppp/fsm.c
698
(*fp->fn->SendTerminateAck)(fp, lhp->id);
usr.sbin/ppp/fsm.c
712
(*fp->fn->DecodeConfig)(fp, cp, cp + flen, MODE_NAK, &dec);
usr.sbin/ppp/fsm.c
714
log_Printf(fp->LogLevel, " [EMPTY]\n");
usr.sbin/ppp/fsm.c
716
switch (fp->state) {
usr.sbin/ppp/fsm.c
719
FsmInitRestartCounter(fp, FSM_REQ_TIMER);
usr.sbin/ppp/fsm.c
720
FsmSendConfigReq(fp);
usr.sbin/ppp/fsm.c
723
(*fp->fn->LayerDown)(fp);
usr.sbin/ppp/fsm.c
724
FsmSendConfigReq(fp);
usr.sbin/ppp/fsm.c
725
NewState(fp, ST_REQSENT);
usr.sbin/ppp/fsm.c
726
(*fp->parent->LayerDown)(fp->parent->object, fp);
usr.sbin/ppp/fsm.c
729
FsmSendConfigReq(fp);
usr.sbin/ppp/fsm.c
730
NewState(fp, ST_REQSENT);
usr.sbin/ppp/fsm.c
738
FsmRecvTermReq(struct fsm *fp, struct fsmheader *lhp, struct mbuf *bp)
usr.sbin/ppp/fsm.c
741
switch (fp->state) {
usr.sbin/ppp/fsm.c
744
log_Printf(fp->LogLevel, "%s: Oops, RTR in %s\n",
usr.sbin/ppp/fsm.c
745
fp->link->name, State2Nam(fp->state));
usr.sbin/ppp/fsm.c
752
(*fp->fn->SendTerminateAck)(fp, lhp->id);
usr.sbin/ppp/fsm.c
756
(*fp->fn->SendTerminateAck)(fp, lhp->id);
usr.sbin/ppp/fsm.c
757
NewState(fp, ST_REQSENT);
usr.sbin/ppp/fsm.c
760
(*fp->fn->LayerDown)(fp);
usr.sbin/ppp/fsm.c
761
(*fp->fn->SendTerminateAck)(fp, lhp->id);
usr.sbin/ppp/fsm.c
762
FsmInitRestartCounter(fp, FSM_TRM_TIMER);
usr.sbin/ppp/fsm.c
763
timer_Start(&fp->FsmTimer); /* Start restart timer */
usr.sbin/ppp/fsm.c
764
fp->restart = 0;
usr.sbin/ppp/fsm.c
765
NewState(fp, ST_STOPPING);
usr.sbin/ppp/fsm.c
766
(*fp->parent->LayerDown)(fp->parent->object, fp);
usr.sbin/ppp/fsm.c
774
FsmRecvTermAck(struct fsm *fp, struct fsmheader *lhp __unused, struct mbuf *bp)
usr.sbin/ppp/fsm.c
777
switch (fp->state) {
usr.sbin/ppp/fsm.c
779
(*fp->fn->LayerFinish)(fp);
usr.sbin/ppp/fsm.c
780
NewState(fp, ST_CLOSED);
usr.sbin/ppp/fsm.c
781
(*fp->parent->LayerFinish)(fp->parent->object, fp);
usr.sbin/ppp/fsm.c
784
(*fp->fn->LayerFinish)(fp);
usr.sbin/ppp/fsm.c
785
NewState(fp, ST_STOPPED);
usr.sbin/ppp/fsm.c
786
(*fp->parent->LayerFinish)(fp->parent->object, fp);
usr.sbin/ppp/fsm.c
789
NewState(fp, ST_REQSENT);
usr.sbin/ppp/fsm.c
792
(*fp->fn->LayerDown)(fp);
usr.sbin/ppp/fsm.c
793
FsmSendConfigReq(fp);
usr.sbin/ppp/fsm.c
794
NewState(fp, ST_REQSENT);
usr.sbin/ppp/fsm.c
795
(*fp->parent->LayerDown)(fp->parent->object, fp);
usr.sbin/ppp/fsm.c
802
FsmRecvConfigRej(struct fsm *fp, struct fsmheader *lhp, struct mbuf *bp)
usr.sbin/ppp/fsm.c
817
lcp_SendIdentification(&fp->link->lcp);
usr.sbin/ppp/fsm.c
822
switch (fp->state) {
usr.sbin/ppp/fsm.c
825
log_Printf(fp->LogLevel, "%s: Oops, RCJ in %s.\n",
usr.sbin/ppp/fsm.c
826
fp->link->name, State2Nam(fp->state));
usr.sbin/ppp/fsm.c
831
(*fp->fn->SendTerminateAck)(fp, lhp->id);
usr.sbin/ppp/fsm.c
845
(*fp->fn->DecodeConfig)(fp, cp, cp + flen, MODE_REJ, &dec);
usr.sbin/ppp/fsm.c
847
log_Printf(fp->LogLevel, " [EMPTY]\n");
usr.sbin/ppp/fsm.c
849
switch (fp->state) {
usr.sbin/ppp/fsm.c
852
FsmInitRestartCounter(fp, FSM_REQ_TIMER);
usr.sbin/ppp/fsm.c
853
FsmSendConfigReq(fp);
usr.sbin/ppp/fsm.c
856
(*fp->fn->LayerDown)(fp);
usr.sbin/ppp/fsm.c
857
FsmSendConfigReq(fp);
usr.sbin/ppp/fsm.c
858
NewState(fp, ST_REQSENT);
usr.sbin/ppp/fsm.c
859
(*fp->parent->LayerDown)(fp->parent->object, fp);
usr.sbin/ppp/fsm.c
862
FsmSendConfigReq(fp);
usr.sbin/ppp/fsm.c
863
NewState(fp, ST_REQSENT);
usr.sbin/ppp/fsm.c
870
FsmRecvCodeRej(struct fsm *fp __unused, struct fsmheader *lhp __unused,
usr.sbin/ppp/fsm.c
877
FsmRecvProtoRej(struct fsm *fp, struct fsmheader *lhp __unused, struct mbuf *bp)
usr.sbin/ppp/fsm.c
879
struct physical *p = link2physical(fp->link);
usr.sbin/ppp/fsm.c
888
log_Printf(fp->LogLevel, "%s: -- Protocol 0x%04x (%s) was rejected!\n",
usr.sbin/ppp/fsm.c
889
fp->link->name, proto, hdlc_Protocol2Nam(proto));
usr.sbin/ppp/fsm.c
897
fp->link->name);
usr.sbin/ppp/fsm.c
900
if (fp->proto == PROTO_LCP) {
usr.sbin/ppp/fsm.c
901
fp = &fp->link->ccp.fsm;
usr.sbin/ppp/fsm.c
904
switch (fp->state) {
usr.sbin/ppp/fsm.c
907
NewState(fp, ST_CLOSED);
usr.sbin/ppp/fsm.c
910
NewState(fp, ST_STOPPED);
usr.sbin/ppp/fsm.c
918
if (fp->proto == PROTO_LCP) {
usr.sbin/ppp/fsm.c
920
fp->link->name);
usr.sbin/ppp/fsm.c
921
fsm_Close(&fp->bundle->ncp.ipcp.fsm);
usr.sbin/ppp/fsm.c
926
if (fp->proto == PROTO_LCP) {
usr.sbin/ppp/fsm.c
928
fp->link->name);
usr.sbin/ppp/fsm.c
929
fsm_Close(&fp->bundle->ncp.ipv6cp.fsm);
usr.sbin/ppp/fsm.c
934
if (fp->proto == PROTO_LCP) {
usr.sbin/ppp/fsm.c
935
struct lcp *lcp = fsm2lcp(fp);
usr.sbin/ppp/fsm.c
939
fp->link->name);
usr.sbin/ppp/fsm.c
940
fsm_Close(fp);
usr.sbin/ppp/fsm.c
949
FsmRecvEchoReq(struct fsm *fp, struct fsmheader *lhp, struct mbuf *bp)
usr.sbin/ppp/fsm.c
951
struct lcp *lcp = fsm2lcp(fp);
usr.sbin/ppp/fsm.c
962
log_Printf(fp->LogLevel, "%s: RecvEchoReq: magic 0x%08lx is wrong,"
usr.sbin/ppp/fsm.c
963
" expecting 0x%08lx\n", fp->link->name, (u_long)magic,
usr.sbin/ppp/fsm.c
967
if (fp->state == ST_OPENED) {
usr.sbin/ppp/fsm.c
969
fsm_Output(fp, CODE_ECHOREP, lhp->id, cp,
usr.sbin/ppp/fsm.c
977
FsmRecvEchoRep(struct fsm *fp, struct fsmheader *lhp __unused, struct mbuf *bp)
usr.sbin/ppp/fsm.c
979
if (fsm2lcp(fp))
usr.sbin/ppp/fsm.c
980
bp = lqr_RecvEcho(fp, bp);
usr.sbin/ppp/fsm.c
986
FsmRecvDiscReq(struct fsm *fp __unused, struct fsmheader *lhp __unused,
usr.sbin/ppp/fsm.c
993
FsmRecvIdent(struct fsm *fp, struct fsmheader *lhp, struct mbuf *bp)
usr.sbin/ppp/fsm.h
86
int (*RecvResetReq)(struct fsm *fp); /* Reset output */
usr.sbin/ppp/fsm.h
87
void (*RecvResetAck)(struct fsm *fp, u_char); /* Reset input */
usr.sbin/ppp/ip.c
226
const struct filterent *fp = filter->rule;
usr.sbin/ppp/ip.c
232
if (fp->f_action == A_NONE)
usr.sbin/ppp/ip.c
283
if (fp->f_action == A_NONE) {
usr.sbin/ppp/ip.c
285
fp++;
usr.sbin/ppp/ip.c
296
if ((ncprange_family(&fp->f_src) == AF_UNSPEC ||
usr.sbin/ppp/ip.c
297
ncprange_contains(&fp->f_src, &srcaddr)) &&
usr.sbin/ppp/ip.c
298
(ncprange_family(&fp->f_dst) == AF_UNSPEC ||
usr.sbin/ppp/ip.c
299
ncprange_contains(&fp->f_dst, &dstaddr))) {
usr.sbin/ppp/ip.c
300
if (fp->f_proto != 0) {
usr.sbin/ppp/ip.c
410
if (fp->f_srcop != OP_NONE) {
usr.sbin/ppp/ip.c
412
filter_Op2Nam(fp->f_srcop), fp->f_srcport);
usr.sbin/ppp/ip.c
416
if (fp->f_dstop != OP_NONE) {
usr.sbin/ppp/ip.c
418
", dst %s %d", filter_Op2Nam(fp->f_dstop),
usr.sbin/ppp/ip.c
419
fp->f_dstport);
usr.sbin/ppp/ip.c
425
n, fp->f_proto, dbuff, filter_Action2Nam(fp->f_action));
usr.sbin/ppp/ip.c
428
if (cproto == fp->f_proto) {
usr.sbin/ppp/ip.c
429
if ((fp->f_srcop == OP_NONE ||
usr.sbin/ppp/ip.c
430
PortMatch(fp->f_srcop, sport, fp->f_srcport)) &&
usr.sbin/ppp/ip.c
431
(fp->f_dstop == OP_NONE ||
usr.sbin/ppp/ip.c
432
PortMatch(fp->f_dstop, dport, fp->f_dstport)) &&
usr.sbin/ppp/ip.c
433
(fp->f_estab == 0 || estab) &&
usr.sbin/ppp/ip.c
434
(fp->f_syn == 0 || syn) &&
usr.sbin/ppp/ip.c
435
(fp->f_finrst == 0 || finrst)) {
usr.sbin/ppp/ip.c
442
filter_Action2Nam(fp->f_action));
usr.sbin/ppp/ip.c
448
if (match != fp->f_invert) {
usr.sbin/ppp/ip.c
450
if (fp->f_action < A_NONE)
usr.sbin/ppp/ip.c
451
fp = &filter->rule[n = fp->f_action];
usr.sbin/ppp/ip.c
453
if (fp->f_action == A_PERMIT) {
usr.sbin/ppp/ip.c
455
*psecs = fp->timeout;
usr.sbin/ppp/ip.c
480
fp++;
usr.sbin/ppp/ipcp.c
1054
IpcpDecodeConfig(struct fsm *fp, u_char *cp, u_char *end, int mode_type,
usr.sbin/ppp/ipcp.c
1059
struct ipcp *ipcp = fsm2ipcp(fp);
usr.sbin/ppp/ipcp.c
1095
bundle_AdjustFilters(fp->bundle, &ncpaddr, NULL);
usr.sbin/ppp/ipcp.c
1314
bundle_AdjustDNS(fp->bundle);
usr.sbin/ppp/ipcp.c
1317
bundle_AdjustDNS(fp->bundle);
usr.sbin/ppp/ipcp.c
288
FILE *fp;
usr.sbin/ppp/ipcp.c
303
if ((fp = ID0fopen(_PATH_RESCONF, "w")) != NULL) {
usr.sbin/ppp/ipcp.c
306
fputs(ipcp->ns.resolv_nons, fp);
usr.sbin/ppp/ipcp.c
309
fprintf(fp, "\nnameserver %s\n", paddr);
usr.sbin/ppp/ipcp.c
315
fprintf(fp, "nameserver %s\n", paddr);
usr.sbin/ppp/ipcp.c
317
if (fclose(fp) == EOF) {
usr.sbin/ppp/ipcp.c
737
IpcpInitRestartCounter(struct fsm *fp, int what)
usr.sbin/ppp/ipcp.c
740
struct ipcp *ipcp = fsm2ipcp(fp);
usr.sbin/ppp/ipcp.c
742
fp->FsmTimer.load = ipcp->cfg.fsm.timeout * SECTICKS;
usr.sbin/ppp/ipcp.c
745
fp->restart = ipcp->cfg.fsm.maxreq;
usr.sbin/ppp/ipcp.c
748
fp->restart = ipcp->cfg.fsm.maxtrm;
usr.sbin/ppp/ipcp.c
751
fp->restart = 1;
usr.sbin/ppp/ipcp.c
757
IpcpSendConfigReq(struct fsm *fp)
usr.sbin/ppp/ipcp.c
760
struct physical *p = link2physical(fp->link);
usr.sbin/ppp/ipcp.c
761
struct ipcp *ipcp = fsm2ipcp(fp);
usr.sbin/ppp/ipcp.c
801
fsm_Output(fp, CODE_CONFIGREQ, fp->reqid, buff, (u_char *)o - buff,
usr.sbin/ppp/ipcp.c
806
IpcpSentTerminateReq(struct fsm *fp __unused)
usr.sbin/ppp/ipcp.c
812
IpcpSendTerminateAck(struct fsm *fp, u_char id)
usr.sbin/ppp/ipcp.c
815
fsm_Output(fp, CODE_TERMACK, id, NULL, 0, MB_IPCPOUT);
usr.sbin/ppp/ipcp.c
819
IpcpLayerStart(struct fsm *fp)
usr.sbin/ppp/ipcp.c
822
struct ipcp *ipcp = fsm2ipcp(fp);
usr.sbin/ppp/ipcp.c
824
log_Printf(LogIPCP, "%s: LayerStart.\n", fp->link->name);
usr.sbin/ppp/ipcp.c
826
Enabled(fp->bundle, OPT_THROUGHPUT));
usr.sbin/ppp/ipcp.c
827
fp->more.reqs = fp->more.naks = fp->more.rejs = ipcp->cfg.fsm.maxreq * 3;
usr.sbin/ppp/ipcp.c
832
IpcpLayerFinish(struct fsm *fp)
usr.sbin/ppp/ipcp.c
835
struct ipcp *ipcp = fsm2ipcp(fp);
usr.sbin/ppp/ipcp.c
837
log_Printf(LogIPCP, "%s: LayerFinish.\n", fp->link->name);
usr.sbin/ppp/ipcp.c
867
IpcpLayerDown(struct fsm *fp)
usr.sbin/ppp/ipcp.c
870
struct ipcp *ipcp = fsm2ipcp(fp);
usr.sbin/ppp/ipcp.c
876
log_Printf(LogIPCP, "%s: LayerDown: %s\n", fp->link->name, addr);
usr.sbin/ppp/ipcp.c
879
radius_Flush(&fp->bundle->radius);
usr.sbin/ppp/ipcp.c
880
radius_Account(&fp->bundle->radius, &fp->bundle->radacct,
usr.sbin/ppp/ipcp.c
881
fp->bundle->links, RAD_STOP, &ipcp->throughput);
usr.sbin/ppp/ipcp.c
883
if (*fp->bundle->radius.cfg.file && fp->bundle->radius.filterid)
usr.sbin/ppp/ipcp.c
884
system_Select(fp->bundle, fp->bundle->radius.filterid, LINKDOWNFILE,
usr.sbin/ppp/ipcp.c
886
radius_StopTimer(&fp->bundle->radius);
usr.sbin/ppp/ipcp.c
893
if (system_Select(fp->bundle, addr, LINKDOWNFILE, NULL, NULL) < 0) {
usr.sbin/ppp/ipcp.c
894
if (bundle_GetLabel(fp->bundle)) {
usr.sbin/ppp/ipcp.c
895
if (system_Select(fp->bundle, bundle_GetLabel(fp->bundle),
usr.sbin/ppp/ipcp.c
897
system_Select(fp->bundle, "MYADDR", LINKDOWNFILE, NULL, NULL);
usr.sbin/ppp/ipcp.c
899
system_Select(fp->bundle, "MYADDR", LINKDOWNFILE, NULL, NULL);
usr.sbin/ppp/ipcp.c
930
IpcpLayerUp(struct fsm *fp)
usr.sbin/ppp/ipcp.c
933
struct ipcp *ipcp = fsm2ipcp(fp);
usr.sbin/ppp/ipcp.c
936
log_Printf(LogIPCP, "%s: LayerUp.\n", fp->link->name);
usr.sbin/ppp/ipcp.c
948
radius_Account_Set_Ip(&fp->bundle->radacct, &ipcp->peer_ip, &ipcp->ifmask);
usr.sbin/ppp/ipcp.c
949
radius_Account(&fp->bundle->radius, &fp->bundle->radacct, fp->bundle->links,
usr.sbin/ppp/ipcp.c
952
if (*fp->bundle->radius.cfg.file && fp->bundle->radius.filterid)
usr.sbin/ppp/ipcp.c
953
system_Select(fp->bundle, fp->bundle->radius.filterid, LINKUPFILE,
usr.sbin/ppp/ipcp.c
955
radius_StartTimer(fp->bundle);
usr.sbin/ppp/ipcp.c
962
if (system_Select(fp->bundle, tbuff, LINKUPFILE, NULL, NULL) < 0) {
usr.sbin/ppp/ipcp.c
963
if (bundle_GetLabel(fp->bundle)) {
usr.sbin/ppp/ipcp.c
964
if (system_Select(fp->bundle, bundle_GetLabel(fp->bundle),
usr.sbin/ppp/ipcp.c
966
system_Select(fp->bundle, "MYADDR", LINKUPFILE, NULL, NULL);
usr.sbin/ppp/ipcp.c
968
system_Select(fp->bundle, "MYADDR", LINKUPFILE, NULL, NULL);
usr.sbin/ppp/ipcp.c
971
fp->more.reqs = fp->more.naks = fp->more.rejs = ipcp->cfg.fsm.maxreq * 3;
usr.sbin/ppp/ipcp.h
103
#define fsm2ipcp(fp) (fp->proto == PROTO_IPCP ? (struct ipcp *)fp : NULL)
usr.sbin/ppp/ipv6cp.c
464
ipv6cp_LayerUp(struct fsm *fp)
usr.sbin/ppp/ipv6cp.c
467
struct ipv6cp *ipv6cp = fsm2ipv6cp(fp);
usr.sbin/ppp/ipv6cp.c
470
log_Printf(LogIPV6CP, "%s: LayerUp.\n", fp->link->name);
usr.sbin/ppp/ipv6cp.c
479
radius_Account_Set_Ipv6(&fp->bundle->radacct6, ipv6cp->his_ifid);
usr.sbin/ppp/ipv6cp.c
480
radius_Account(&fp->bundle->radius, &fp->bundle->radacct6,
usr.sbin/ppp/ipv6cp.c
481
fp->bundle->links, RAD_START, &ipv6cp->throughput);
usr.sbin/ppp/ipv6cp.c
488
if (!Enabled(fp->bundle, OPT_IPCP)) {
usr.sbin/ppp/ipv6cp.c
489
if (*fp->bundle->radius.cfg.file && fp->bundle->radius.filterid)
usr.sbin/ppp/ipv6cp.c
490
system_Select(fp->bundle, fp->bundle->radius.filterid, LINKUPFILE,
usr.sbin/ppp/ipv6cp.c
499
if (system_Select(fp->bundle, tbuff, LINKUPFILE, NULL, NULL) < 0) {
usr.sbin/ppp/ipv6cp.c
505
if (bundle_GetLabel(fp->bundle) && !Enabled(fp->bundle, OPT_IPCP)) {
usr.sbin/ppp/ipv6cp.c
506
if (system_Select(fp->bundle, bundle_GetLabel(fp->bundle),
usr.sbin/ppp/ipv6cp.c
508
system_Select(fp->bundle, "MYADDR6", LINKUPFILE, NULL, NULL);
usr.sbin/ppp/ipv6cp.c
510
system_Select(fp->bundle, "MYADDR6", LINKUPFILE, NULL, NULL);
usr.sbin/ppp/ipv6cp.c
513
fp->more.reqs = fp->more.naks = fp->more.rejs = ipv6cp->cfg.fsm.maxreq * 3;
usr.sbin/ppp/ipv6cp.c
520
ipv6cp_LayerDown(struct fsm *fp)
usr.sbin/ppp/ipv6cp.c
523
struct ipv6cp *ipv6cp = fsm2ipv6cp(fp);
usr.sbin/ppp/ipv6cp.c
529
log_Printf(LogIPV6CP, "%s: LayerDown: %s\n", fp->link->name, addr);
usr.sbin/ppp/ipv6cp.c
532
radius_Flush(&fp->bundle->radius);
usr.sbin/ppp/ipv6cp.c
533
radius_Account(&fp->bundle->radius, &fp->bundle->radacct6,
usr.sbin/ppp/ipv6cp.c
534
fp->bundle->links, RAD_STOP, &ipv6cp->throughput);
usr.sbin/ppp/ipv6cp.c
541
if (!Enabled(fp->bundle, OPT_IPCP)) {
usr.sbin/ppp/ipv6cp.c
542
if (*fp->bundle->radius.cfg.file && fp->bundle->radius.filterid)
usr.sbin/ppp/ipv6cp.c
543
system_Select(fp->bundle, fp->bundle->radius.filterid, LINKDOWNFILE,
usr.sbin/ppp/ipv6cp.c
552
if (system_Select(fp->bundle, addr, LINKDOWNFILE, NULL, NULL) < 0) {
usr.sbin/ppp/ipv6cp.c
558
if (bundle_GetLabel(fp->bundle) && !Enabled(fp->bundle, OPT_IPCP)) {
usr.sbin/ppp/ipv6cp.c
559
if (system_Select(fp->bundle, bundle_GetLabel(fp->bundle),
usr.sbin/ppp/ipv6cp.c
561
system_Select(fp->bundle, "MYADDR6", LINKDOWNFILE, NULL, NULL);
usr.sbin/ppp/ipv6cp.c
563
system_Select(fp->bundle, "MYADDR6", LINKDOWNFILE, NULL, NULL);
usr.sbin/ppp/ipv6cp.c
572
ipv6cp_LayerStart(struct fsm *fp)
usr.sbin/ppp/ipv6cp.c
575
struct ipv6cp *ipv6cp = fsm2ipv6cp(fp);
usr.sbin/ppp/ipv6cp.c
577
log_Printf(LogIPV6CP, "%s: LayerStart.\n", fp->link->name);
usr.sbin/ppp/ipv6cp.c
579
Enabled(fp->bundle, OPT_THROUGHPUT));
usr.sbin/ppp/ipv6cp.c
580
fp->more.reqs = fp->more.naks = fp->more.rejs = ipv6cp->cfg.fsm.maxreq * 3;
usr.sbin/ppp/ipv6cp.c
585
ipv6cp_LayerFinish(struct fsm *fp)
usr.sbin/ppp/ipv6cp.c
588
struct ipv6cp *ipv6cp = fsm2ipv6cp(fp);
usr.sbin/ppp/ipv6cp.c
590
log_Printf(LogIPV6CP, "%s: LayerFinish.\n", fp->link->name);
usr.sbin/ppp/ipv6cp.c
596
ipv6cp_InitRestartCounter(struct fsm *fp, int what)
usr.sbin/ppp/ipv6cp.c
599
struct ipv6cp *ipv6cp = fsm2ipv6cp(fp);
usr.sbin/ppp/ipv6cp.c
601
fp->FsmTimer.load = ipv6cp->cfg.fsm.timeout * SECTICKS;
usr.sbin/ppp/ipv6cp.c
604
fp->restart = ipv6cp->cfg.fsm.maxreq;
usr.sbin/ppp/ipv6cp.c
607
fp->restart = ipv6cp->cfg.fsm.maxtrm;
usr.sbin/ppp/ipv6cp.c
610
fp->restart = 1;
usr.sbin/ppp/ipv6cp.c
616
ipv6cp_SendConfigReq(struct fsm *fp)
usr.sbin/ppp/ipv6cp.c
619
struct physical *p = link2physical(fp->link);
usr.sbin/ppp/ipv6cp.c
620
struct ipv6cp *ipv6cp = fsm2ipv6cp(fp);
usr.sbin/ppp/ipv6cp.c
631
fsm_Output(fp, CODE_CONFIGREQ, fp->reqid, buff, (u_char *)o - buff,
usr.sbin/ppp/ipv6cp.c
636
ipv6cp_SentTerminateReq(struct fsm *fp __unused)
usr.sbin/ppp/ipv6cp.c
642
ipv6cp_SendTerminateAck(struct fsm *fp, u_char id)
usr.sbin/ppp/ipv6cp.c
645
fsm_Output(fp, CODE_TERMACK, id, NULL, 0, MB_IPV6CPOUT);
usr.sbin/ppp/ipv6cp.c
682
ipv6cp_DecodeConfig(struct fsm *fp, u_char *cp, u_char *end, int mode_type,
usr.sbin/ppp/ipv6cp.c
686
struct ipv6cp *ipv6cp = fsm2ipv6cp(fp);
usr.sbin/ppp/ipv6cp.c
748
bundle_AdjustFilters(fp->bundle, &ipv6cp->myaddr, NULL);
usr.sbin/ppp/ipv6cp.h
59
#define fsm2ipv6cp(fp) (fp->proto == PROTO_IPV6CP ? (struct ipv6cp *)fp : NULL)
usr.sbin/ppp/lcp.c
359
LcpInitRestartCounter(struct fsm *fp, int what)
usr.sbin/ppp/lcp.c
362
struct lcp *lcp = fsm2lcp(fp);
usr.sbin/ppp/lcp.c
364
fp->FsmTimer.load = lcp->cfg.fsm.timeout * SECTICKS;
usr.sbin/ppp/lcp.c
367
fp->restart = lcp->cfg.fsm.maxreq;
usr.sbin/ppp/lcp.c
370
fp->restart = lcp->cfg.fsm.maxtrm;
usr.sbin/ppp/lcp.c
373
fp->restart = 1;
usr.sbin/ppp/lcp.c
379
LcpSendConfigReq(struct fsm *fp)
usr.sbin/ppp/lcp.c
382
struct physical *p = link2physical(fp->link);
usr.sbin/ppp/lcp.c
383
struct lcp *lcp = fsm2lcp(fp);
usr.sbin/ppp/lcp.c
392
fp->link->name);
usr.sbin/ppp/lcp.c
415
fp->link->name, lcp->want_mru, maxmru);
usr.sbin/ppp/lcp.c
487
fsm_Output(fp, CODE_CONFIGREQ, fp->reqid, buff, (u_char *)o - buff,
usr.sbin/ppp/lcp.c
535
LcpSentTerminateReq(struct fsm *fp __unused)
usr.sbin/ppp/lcp.c
541
LcpSendTerminateAck(struct fsm *fp, u_char id)
usr.sbin/ppp/lcp.c
544
struct physical *p = link2physical(fp->link);
usr.sbin/ppp/lcp.c
549
fsm_Output(fp, CODE_TERMACK, id, NULL, 0, MB_LCPOUT);
usr.sbin/ppp/lcp.c
553
LcpLayerStart(struct fsm *fp)
usr.sbin/ppp/lcp.c
556
struct lcp *lcp = fsm2lcp(fp);
usr.sbin/ppp/lcp.c
558
log_Printf(LogLCP, "%s: LayerStart\n", fp->link->name);
usr.sbin/ppp/lcp.c
560
fp->more.reqs = fp->more.naks = fp->more.rejs = lcp->cfg.fsm.maxreq * 3;
usr.sbin/ppp/lcp.c
565
LcpLayerFinish(struct fsm *fp)
usr.sbin/ppp/lcp.c
568
log_Printf(LogLCP, "%s: LayerFinish\n", fp->link->name);
usr.sbin/ppp/lcp.c
572
LcpLayerUp(struct fsm *fp)
usr.sbin/ppp/lcp.c
575
struct physical *p = link2physical(fp->link);
usr.sbin/ppp/lcp.c
576
struct lcp *lcp = fsm2lcp(fp);
usr.sbin/ppp/lcp.c
578
log_Printf(LogLCP, "%s: LayerUp\n", fp->link->name);
usr.sbin/ppp/lcp.c
582
fp->more.reqs = fp->more.naks = fp->more.rejs = lcp->cfg.fsm.maxreq * 3;
usr.sbin/ppp/lcp.c
590
LcpLayerDown(struct fsm *fp)
usr.sbin/ppp/lcp.c
593
struct physical *p = link2physical(fp->link);
usr.sbin/ppp/lcp.c
595
log_Printf(LogLCP, "%s: LayerDown\n", fp->link->name);
usr.sbin/ppp/lcp.c
598
lcp_Setup(fsm2lcp(fp), 0);
usr.sbin/ppp/lcp.c
659
LcpDecodeConfig(struct fsm *fp, u_char *cp, u_char *end, int mode_type,
usr.sbin/ppp/lcp.c
663
struct lcp *lcp = fsm2lcp(fp);
usr.sbin/ppp/lcp.c
671
struct physical *p = link2physical(fp->link);
usr.sbin/ppp/lcp.c
756
fp->link->name, wantmtu, maxmtu);
usr.sbin/ppp/lcp.h
132
#define fsm2lcp(fp) (fp->proto == PROTO_LCP ? (struct lcp *)fp : NULL)
usr.sbin/ppp/lqr.c
105
" got 0x%08x\n", fp->link->name, lcp->his_magic, lqr.magic);
usr.sbin/ppp/lqr.c
88
lqr_RecvEcho(struct fsm *fp, struct mbuf *bp)
usr.sbin/ppp/lqr.c
90
struct hdlc *hdlc = &link2physical(fp->link)->hdlc;
usr.sbin/ppp/lqr.c
91
struct lcp *lcp = fsm2lcp(fp);
usr.sbin/ppp/mp.c
164
mp_LayerStart(void *v __unused, struct fsm *fp __unused)
usr.sbin/ppp/mp.c
170
mp_LayerUp(void *v __unused, struct fsm *fp)
usr.sbin/ppp/mp.c
174
bundle_CalculateBandwidth(fp->bundle); /* Against ccp_MTUOverhead */
usr.sbin/ppp/mp.c
178
mp_LayerDown(void *v __unused, struct fsm *fp __unused)
usr.sbin/ppp/mp.c
184
mp_LayerFinish(void *v __unused, struct fsm *fp)
usr.sbin/ppp/mp.c
187
if (fp->state == ST_CLOSED && fp->open_mode == OPEN_PASSIVE)
usr.sbin/ppp/mp.c
188
fsm_Open(fp); /* CCP goes to ST_STOPPED */
usr.sbin/ppp/mppe.c
430
MPPEUsable(struct fsm *fp)
usr.sbin/ppp/mppe.c
434
struct radius *r = &fp->bundle->radius;
usr.sbin/ppp/mppe.c
447
struct lcp *lcp = &fp->link->lcp;
usr.sbin/ppp/mppe.c
458
MPPERequired(struct fsm *fp)
usr.sbin/ppp/mppe.c
465
if (*fp->bundle->radius.cfg.file && fp->bundle->radius.mppe.policy)
usr.sbin/ppp/mppe.c
466
return fp->bundle->radius.mppe.policy == MPPE_POLICY_REQUIRED ? 1 : 0;
usr.sbin/ppp/mppe.c
469
return fp->link->ccp.cfg.mppe.required;
usr.sbin/ppp/physical.h
116
#define field2phys(fp, name) \
usr.sbin/ppp/physical.h
117
((struct physical *)((char *)fp - (uintptr_t)(&((struct physical *)0)->name)))
usr.sbin/ppp/systems.c
265
xgets(char *buf, int buflen, FILE *fp)
usr.sbin/ppp/systems.c
270
while (fgets(buf, buflen-1, fp)) {
usr.sbin/ppp/systems.c
319
FILE *fp;
usr.sbin/ppp/systems.c
336
fp = ID0fopen(filename, "r");
usr.sbin/ppp/systems.c
337
if (fp == NULL) {
usr.sbin/ppp/systems.c
344
while ((n = xgets(line, sizeof line, fp))) {
usr.sbin/ppp/systems.c
362
fclose(fp);
usr.sbin/ppp/systems.c
379
fclose(fp);
usr.sbin/ppp/systems.c
382
while ((n = xgets(line, sizeof line, fp))) {
usr.sbin/ppp/systems.c
416
fclose(fp); /* everything read - get out */
usr.sbin/ppp/systems.c
422
fclose(fp);
usr.sbin/ppp/systems.c
51
FILE *fp;
usr.sbin/ppp/systems.c
55
fp = ID0fopen(line, "r");
usr.sbin/ppp/systems.c
56
if (fp == NULL)
usr.sbin/ppp/systems.c
58
return (fp);
usr.sbin/ppp/systems.c
62
CloseSecret(FILE *fp)
usr.sbin/ppp/systems.c
64
fclose(fp);
usr.sbin/prometheus_sysctl_exporter/prometheus_sysctl_exporter.c
205
oidvalue_print(const struct oidvalue *ov, FILE *fp)
usr.sbin/prometheus_sysctl_exporter/prometheus_sysctl_exporter.c
210
fprintf(fp, "%jd", ov->value.s);
usr.sbin/prometheus_sysctl_exporter/prometheus_sysctl_exporter.c
213
fprintf(fp, "%ju", ov->value.u);
usr.sbin/prometheus_sysctl_exporter/prometheus_sysctl_exporter.c
219
fprintf(fp, "-Inf");
usr.sbin/prometheus_sysctl_exporter/prometheus_sysctl_exporter.c
221
fprintf(fp, "+Inf");
usr.sbin/prometheus_sysctl_exporter/prometheus_sysctl_exporter.c
224
fprintf(fp, "Nan");
usr.sbin/prometheus_sysctl_exporter/prometheus_sysctl_exporter.c
227
fprintf(fp, "%.6f", ov->value.f);
usr.sbin/prometheus_sysctl_exporter/prometheus_sysctl_exporter.c
483
oiddescription_print(const struct oiddescription *od, FILE *fp)
usr.sbin/prometheus_sysctl_exporter/prometheus_sysctl_exporter.c
486
fprintf(fp, "%s", od->description);
usr.sbin/prometheus_sysctl_exporter/prometheus_sysctl_exporter.c
491
bool exclude, bool include, FILE *fp)
usr.sbin/prometheus_sysctl_exporter/prometheus_sysctl_exporter.c
525
fprintf(fp, "# HELP ");
usr.sbin/prometheus_sysctl_exporter/prometheus_sysctl_exporter.c
526
fprintf(fp, "%s", metric);
usr.sbin/prometheus_sysctl_exporter/prometheus_sysctl_exporter.c
527
fputc(' ', fp);
usr.sbin/prometheus_sysctl_exporter/prometheus_sysctl_exporter.c
528
oiddescription_print(&od, fp);
usr.sbin/prometheus_sysctl_exporter/prometheus_sysctl_exporter.c
529
fputc('\n', fp);
usr.sbin/prometheus_sysctl_exporter/prometheus_sysctl_exporter.c
533
fprintf(fp, "%s", metric);
usr.sbin/prometheus_sysctl_exporter/prometheus_sysctl_exporter.c
534
fputc(' ', fp);
usr.sbin/prometheus_sysctl_exporter/prometheus_sysctl_exporter.c
535
oidvalue_print(&ov, fp);
usr.sbin/prometheus_sysctl_exporter/prometheus_sysctl_exporter.c
536
fputc('\n', fp);
usr.sbin/prometheus_sysctl_exporter/prometheus_sysctl_exporter.c
574
FILE *fp;
usr.sbin/prometheus_sysctl_exporter/prometheus_sysctl_exporter.c
620
fp = open_memstream(&http_buf, &http_buflen);
usr.sbin/prometheus_sysctl_exporter/prometheus_sysctl_exporter.c
621
if (fp == NULL)
usr.sbin/prometheus_sysctl_exporter/prometheus_sysctl_exporter.c
624
fp = stdout;
usr.sbin/prometheus_sysctl_exporter/prometheus_sysctl_exporter.c
634
oid_print(&o, &on, print_descriptions, exclude, include, fp);
usr.sbin/prometheus_sysctl_exporter/prometheus_sysctl_exporter.c
654
oid_print(&o, &on, print_descriptions, exclude, include, fp);
usr.sbin/prometheus_sysctl_exporter/prometheus_sysctl_exporter.c
663
if (ferror(fp) || fclose(fp) != 0)
usr.sbin/pstat/pstat.c
357
struct xfile *fp, *buf;
usr.sbin/pstat/pstat.c
385
openf = len / sizeof *fp;
usr.sbin/pstat/pstat.c
390
for (fp = (struct xfile *)buf, i = 0; i < openf; ++fp, ++i) {
usr.sbin/pstat/pstat.c
391
if ((size_t)fp->xf_type >= nitems(dtypes))
usr.sbin/pstat/pstat.c
393
(void)printf("%*jx", wid, (uintmax_t)(uintptr_t)fp->xf_file);
usr.sbin/pstat/pstat.c
394
(void)printf(" %-6.6s", dtypes[fp->xf_type]);
usr.sbin/pstat/pstat.c
396
if (fp->xf_flag & FREAD)
usr.sbin/pstat/pstat.c
398
if (fp->xf_flag & FWRITE)
usr.sbin/pstat/pstat.c
400
if (fp->xf_flag & FAPPEND)
usr.sbin/pstat/pstat.c
402
if (fp->xf_flag & FASYNC)
usr.sbin/pstat/pstat.c
405
(void)printf(" %4s %3d", flagbuf, fp->xf_count);
usr.sbin/pstat/pstat.c
406
(void)printf(" %3d", fp->xf_msgcount);
usr.sbin/pstat/pstat.c
407
(void)printf(" %*jx", wid, (uintmax_t)(uintptr_t)fp->xf_data);
usr.sbin/pstat/pstat.c
408
(void)printf(" %*jx\n", (int)sizeof(fp->xf_offset) * 2,
usr.sbin/pstat/pstat.c
409
(uintmax_t)fp->xf_offset);
usr.sbin/pw/pw_conf.c
243
FILE *fp;
usr.sbin/pw/pw_conf.c
252
if ((fp = fopen(file, "r")) == NULL)
usr.sbin/pw/pw_conf.c
255
while ((linelen = getline(&buf, &linecap, fp)) > 0) {
usr.sbin/pw/pw_conf.c
398
fclose(fp);
usr.sbin/pw/pw_conf.c
410
FILE *fp;
usr.sbin/pw/pw_conf.c
424
if ((fp = fdopen(fd, "w")) == NULL) {
usr.sbin/pw/pw_conf.c
533
fputs(comments[i], fp);
usr.sbin/pw/pw_conf.c
537
fprintf(fp, "%s = \"%s\"\n", kwds[i], buf);
usr.sbin/pw/pw_conf.c
539
fprintf(fp, "%s = %s\n", kwds[i], buf);
usr.sbin/pw/pw_conf.c
547
return (fclose(fp) != EOF);
usr.sbin/pw/pw_user.c
1206
FILE *pfp, *fp;
usr.sbin/pw/pw_user.c
1505
(fp = fopen(cnf->newmail, "r")) != NULL) {
usr.sbin/pw/pw_user.c
1511
while (fgets(line, sizeof(line), fp) != NULL) {
usr.sbin/pw/pw_user.c
1519
fclose(fp);
usr.sbin/pwd_mkdb/pwd_mkdb.c
176
if (!(fp = fopen(pname, "r")))
usr.sbin/pwd_mkdb/pwd_mkdb.c
178
if (flock(fileno(fp), LOCK_EX|nblock) < 0 && !(dflag && iflag))
usr.sbin/pwd_mkdb/pwd_mkdb.c
180
if (fstat(fileno(fp), &st) < 0)
usr.sbin/pwd_mkdb/pwd_mkdb.c
184
fclose(fp);
usr.sbin/pwd_mkdb/pwd_mkdb.c
185
fp = NULL;
usr.sbin/pwd_mkdb/pwd_mkdb.c
190
while (scan(fp, &pwd))
usr.sbin/pwd_mkdb/pwd_mkdb.c
341
for (cnt = 1; scan(fp, &pwd); ++cnt) {
usr.sbin/pwd_mkdb/pwd_mkdb.c
495
(void)fchmod(fileno(fp), S_IRUSR|S_IWUSR);
usr.sbin/pwd_mkdb/pwd_mkdb.c
521
if (fclose(fp) == EOF)
usr.sbin/pwd_mkdb/pwd_mkdb.c
528
scan(FILE *fp, struct passwd *pw)
usr.sbin/pwd_mkdb/pwd_mkdb.c
534
p = fgetln(fp, &len);
usr.sbin/pwd_mkdb/pwd_mkdb.c
90
FILE *fp, *oldfp;
usr.sbin/quot/quot.c
295
struct fsizes *fp;
usr.sbin/quot/quot.c
298
for (fp = fsizes; fp; fp = fp->fsz_next) {
usr.sbin/quot/quot.c
300
fp->fsz_count[i] = 0;
usr.sbin/quot/quot.c
301
fp->fsz_sz[i] = 0;
usr.sbin/quot/quot.c
312
struct fsizes *fp, **fsp;
usr.sbin/quot/quot.c
321
for (fsp = &fsizes; (fp = *fsp); fsp = &fp->fsz_next) {
usr.sbin/quot/quot.c
322
if (ksz < fp->fsz_last)
usr.sbin/quot/quot.c
325
if (fp == NULL || ksz < fp->fsz_first) {
usr.sbin/quot/quot.c
326
if ((fp = malloc(sizeof(*fp))) == NULL)
usr.sbin/quot/quot.c
328
fp->fsz_next = *fsp;
usr.sbin/quot/quot.c
329
*fsp = fp;
usr.sbin/quot/quot.c
330
fp->fsz_first = rounddown(ksz, FSZCNT);
usr.sbin/quot/quot.c
331
fp->fsz_last = fp->fsz_first + FSZCNT;
usr.sbin/quot/quot.c
333
fp->fsz_count[i] = 0;
usr.sbin/quot/quot.c
334
fp->fsz_sz[i] = 0;
usr.sbin/quot/quot.c
337
fp->fsz_count[ksz % FSZCNT]++;
usr.sbin/quot/quot.c
338
fp->fsz_sz[ksz % FSZCNT] += sz;
usr.sbin/quot/quot.c
342
for (fp = fsizes; fp != NULL; fp = fp->fsz_next) {
usr.sbin/quot/quot.c
344
if (fp->fsz_count[i] != 0) {
usr.sbin/quot/quot.c
346
(intmax_t)(fp->fsz_first + i),
usr.sbin/quot/quot.c
347
(intmax_t)fp->fsz_count[i],
usr.sbin/quot/quot.c
348
SIZE(sz += fp->fsz_sz[i]));
usr.sbin/rarpd/rarpd.c
943
FILE *fp;
usr.sbin/rarpd/rarpd.c
949
fp = stderr;
usr.sbin/rarpd/rarpd.c
951
fp = stdout;
usr.sbin/rarpd/rarpd.c
953
vfprintf(fp, fmt, v);
usr.sbin/rarpd/rarpd.c
955
vfprintf(fp, newfmt, v);
usr.sbin/rarpd/rarpd.c
958
fputs("\n", fp);
usr.sbin/rarpd/rarpd.c
959
fflush(fp);
usr.sbin/rpc.ypxfrd/ypxfrd_server.c
133
if ((fp = open(buf, O_RDONLY)) == -1) {
usr.sbin/rpc.ypxfrd/ypxfrd_server.c
142
close(fp);
usr.sbin/rpc.ypxfrd/ypxfrd_server.c
52
int fp = 0;
usr.sbin/rpc.ypxfrd/ypxfrd_server.c
61
read(fp, &buf, XFRBLOCKSIZE)) != -1) {
usr.sbin/rpcbind/warmstart.c
106
FILE *fp;
usr.sbin/rpcbind/warmstart.c
122
fp = fopen(filename, "r");
usr.sbin/rpcbind/warmstart.c
123
if (fp == NULL) {
usr.sbin/rpcbind/warmstart.c
128
xdrstdio_create(&xdrs, fp, XDR_DECODE);
usr.sbin/rpcbind/warmstart.c
132
fclose(fp);
usr.sbin/rpcbind/warmstart.c
136
fclose(fp);
usr.sbin/rpcbind/warmstart.c
71
FILE *fp;
usr.sbin/rpcbind/warmstart.c
76
fp = fopen(filename, "w");
usr.sbin/rpcbind/warmstart.c
77
if (fp == NULL) {
usr.sbin/rpcbind/warmstart.c
82
fp = fopen(filename, "w");
usr.sbin/rpcbind/warmstart.c
83
if (fp == NULL) {
usr.sbin/rpcbind/warmstart.c
91
xdrstdio_create(&xdrs, fp, XDR_ENCODE);
usr.sbin/rpcbind/warmstart.c
95
fclose(fp);
usr.sbin/rpcbind/warmstart.c
99
fclose(fp);
usr.sbin/rrenumd/rrenumd.c
527
FILE *fp = stdin;
usr.sbin/rrenumd/rrenumd.c
552
if((fp = fopen(optarg, "r")) == NULL) {
usr.sbin/rrenumd/rrenumd.c
560
fp = stdin;
usr.sbin/rrenumd/rrenumd.c
599
config(&fp);
usr.sbin/rtsold/dump.c
104
fprintf(fp, " number of valid RAs: %d\n", ifi->racnt);
usr.sbin/rtsold/dump.c
107
fprintf(fp, " RA from %s\n",
usr.sbin/rtsold/dump.c
111
fprintf(fp, " option: ");
usr.sbin/rtsold/dump.c
114
fprintf(fp, "RDNSS: %s (expire: %s)\n",
usr.sbin/rtsold/dump.c
119
fprintf(fp, "DNSSL: %s (expire: %s)\n",
usr.sbin/rtsold/dump.c
127
fprintf(fp, "\n");
usr.sbin/rtsold/dump.c
130
fflush(fp);
usr.sbin/rtsold/dump.c
137
FILE *fp;
usr.sbin/rtsold/dump.c
139
if ((fp = fopen(dumpfile, "w")) == NULL) {
usr.sbin/rtsold/dump.c
146
if (caph_rights_limit(fileno(fp), &rights) != 0) {
usr.sbin/rtsold/dump.c
149
(void)fclose(fp);
usr.sbin/rtsold/dump.c
152
return (fp);
usr.sbin/rtsold/dump.c
57
rtsold_dump(FILE *fp)
usr.sbin/rtsold/dump.c
65
if (fseek(fp, 0, SEEK_SET) != 0) {
usr.sbin/rtsold/dump.c
69
(void)ftruncate(fileno(fp), 0);
usr.sbin/rtsold/dump.c
74
fprintf(fp, "Interface %s\n", ifi->ifname);
usr.sbin/rtsold/dump.c
75
fprintf(fp, " probe interval: ");
usr.sbin/rtsold/dump.c
77
fprintf(fp, "%d\n", ifi->probeinterval);
usr.sbin/rtsold/dump.c
78
fprintf(fp, " probe timer: %d\n", ifi->probetimer);
usr.sbin/rtsold/dump.c
80
fprintf(fp, "infinity\n");
usr.sbin/rtsold/dump.c
81
fprintf(fp, " no probe timer\n");
usr.sbin/rtsold/dump.c
83
fprintf(fp, " interface status: %s\n",
usr.sbin/rtsold/dump.c
85
fprintf(fp, " managed config: %s\n",
usr.sbin/rtsold/dump.c
87
fprintf(fp, " other config: %s\n",
usr.sbin/rtsold/dump.c
89
fprintf(fp, " rtsold status: %s\n", ifstatstr[ifi->state]);
usr.sbin/rtsold/dump.c
90
fprintf(fp, " carrier detection: %s\n",
usr.sbin/rtsold/dump.c
92
fprintf(fp, " probes: %d, dadcount = %d\n",
usr.sbin/rtsold/dump.c
96
fprintf(fp, " no timer\n");
usr.sbin/rtsold/dump.c
98
fprintf(fp, " timer: interval=%d:%d, expire=%s\n",
usr.sbin/services_mkdb/services_mkdb.c
239
FILE *fp;
usr.sbin/services_mkdb/services_mkdb.c
243
if ((fp = fopen(fname, "r")) == NULL)
usr.sbin/services_mkdb/services_mkdb.c
251
while ((len = getline(&p, &linecap, fp)) != -1) {
usr.sbin/services_mkdb/services_mkdb.c
338
(void)fclose(fp);
usr.sbin/services_mkdb/uniq.c
63
FILE *fp;
usr.sbin/services_mkdb/uniq.c
70
if ((fp = fopen(fname, "r")) == NULL)
usr.sbin/services_mkdb/uniq.c
72
while ((line = fgetln(fp, &len)) != NULL) {
usr.sbin/setfmac/setfmac.c
233
FILE *fp;
usr.sbin/setfmac/setfmac.c
241
fp = fopen(file, "r");
usr.sbin/setfmac/setfmac.c
242
if (fp == NULL)
usr.sbin/setfmac/setfmac.c
244
while ((line = fgetln(fp, &linesize)) != NULL) {
usr.sbin/setfmac/setfmac.c
251
if (ferror(fp))
usr.sbin/setfmac/setfmac.c
253
rewind(fp);
usr.sbin/setfmac/setfmac.c
259
line = fgetln(fp, &linesize);
usr.sbin/setfmac/setfmac.c
261
if (feof(fp))
usr.sbin/setfmac/setfmac.c
276
fclose(fp);
usr.sbin/tzsetup/tzsetup.c
308
FILE *fp;
usr.sbin/tzsetup/tzsetup.c
314
fp = fopen(path_iso3166, "r");
usr.sbin/tzsetup/tzsetup.c
315
if (!fp)
usr.sbin/tzsetup/tzsetup.c
319
while ((s = fgetln(fp, &len)) != NULL) {
usr.sbin/tzsetup/tzsetup.c
357
fclose(fp);
usr.sbin/tzsetup/tzsetup.c
452
FILE *fp;
usr.sbin/tzsetup/tzsetup.c
461
fp = fopen(path_zonetab, "r");
usr.sbin/tzsetup/tzsetup.c
462
if (!fp)
usr.sbin/tzsetup/tzsetup.c
467
while ((line = fgetln(fp, &len)) != NULL) {
usr.sbin/tzsetup/tzsetup.c
546
rewind(fp);
usr.sbin/tzsetup/tzsetup.c
551
fclose(fp);
usr.sbin/uefisign/child.c
212
save(struct executable *x, FILE *fp, const char *path)
usr.sbin/uefisign/child.c
216
assert(fp != NULL);
usr.sbin/uefisign/child.c
219
nwritten = fwrite(x->x_buf, x->x_len, 1, fp);
usr.sbin/uefisign/uefisign.c
73
FILE *fp;
usr.sbin/uefisign/uefisign.c
77
fp = fopen(path, mode);
usr.sbin/uefisign/uefisign.c
78
if (fp == NULL)
usr.sbin/uefisign/uefisign.c
80
return (fp);
usr.sbin/uhsoctl/uhsoctl.c
1318
FILE *fp;
usr.sbin/uhsoctl/uhsoctl.c
1323
fp = fopen(pidfile, "r");
usr.sbin/uhsoctl/uhsoctl.c
1324
if (fp == NULL) {
usr.sbin/uhsoctl/uhsoctl.c
1329
n = fscanf(fp, "%d", &pid);
usr.sbin/uhsoctl/uhsoctl.c
1330
fclose(fp);
usr.sbin/uhsoctl/uhsoctl.c
446
FILE *fp;
usr.sbin/uhsoctl/uhsoctl.c
512
fp = fdopen(fd, "w");
usr.sbin/uhsoctl/uhsoctl.c
525
fprintf(fp, "%s", buf);
usr.sbin/uhsoctl/uhsoctl.c
530
fprintf(fp, "nameserver %s\n", ctx->ns[i]);
usr.sbin/uhsoctl/uhsoctl.c
532
fclose(fp);
usr.sbin/ypserv/yp_access.c
110
FILE *fp;
usr.sbin/ypserv/yp_access.c
128
if ((fp = fopen(path, "r")) == NULL) {
usr.sbin/ypserv/yp_access.c
143
while (fgets(linebuf, LINEBUFSZ, fp)) {
usr.sbin/ypserv/yp_access.c
173
fclose(fp);