bin/cat/cat.c
125
FILE *fp;
bin/cat/cat.c
150
fp = fdopen(fd, "r");
bin/cat/cat.c
151
if (fp == NULL)
bin/cat/cat.c
153
cook_cat(fp);
bin/cat/cat.c
154
fclose(fp);
bin/cat/cat.c
168
cook_cat(FILE *fp)
bin/cat/cat.c
173
if (fp == stdin && feof(stdin))
bin/cat/cat.c
177
for (prev = '\n'; (ch = getc(fp)) != EOF; prev = ch) {
bin/cat/cat.c
225
if (ferror(fp)) {
bin/cat/cat.c
228
clearerr(fp);
bin/ed/cbc.c
108
get_des_char(FILE *fp)
bin/ed/cbc.c
113
des_ct = cbc_decode(des_buf, fp);
bin/ed/cbc.c
117
return (getc(fp));
bin/ed/cbc.c
124
put_des_char(int c, FILE *fp)
bin/ed/cbc.c
128
des_ct = cbc_encode(des_buf, des_n, fp);
bin/ed/cbc.c
133
return (fputc(c, fp));
bin/ed/cbc.c
140
flush_des_file(FILE *fp)
bin/ed/cbc.c
144
des_ct = cbc_encode(des_buf, des_n, fp);
bin/ed/cbc.c
147
return (des_ct >= 0 && cbc_encode(des_buf, des_n, fp) >= 0) ? 0 : EOF;
bin/ed/cbc.c
149
return (fflush(fp));
bin/ed/cbc.c
322
cbc_encode(unsigned char *msgbuf, int n, FILE *fp)
bin/ed/cbc.c
334
return WRITE(msgbuf, 8, fp);
bin/ed/cbc.c
351
return WRITE(msgbuf, 8, fp);
bin/ed/cbc.c
360
cbc_decode(unsigned char *msgbuf, FILE *fp)
bin/ed/cbc.c
367
if ((n = READ(msgbuf, 8, fp)) == 8) {
bin/ed/cbc.c
379
if ((c = fgetc(fp)) == EOF) {
bin/ed/cbc.c
386
ungetc(c, fp);
bin/ed/cbc.c
66
#define READ(buf, n, fp) fread(buf, sizeof(char), n, fp)
bin/ed/cbc.c
67
#define WRITE(buf, n, fp) fwrite(buf, sizeof(char), n, fp)
bin/ed/io.c
117
get_stream_line(FILE *fp)
bin/ed/io.c
122
while (((c = des ? get_des_char(fp) : getc(fp)) != EOF || (!feof(fp) &&
bin/ed/io.c
123
!ferror(fp))) && c != '\n') {
bin/ed/io.c
131
else if (ferror(fp)) {
bin/ed/io.c
148
FILE *fp;
bin/ed/io.c
152
fp = (*fn == '!') ? popen(fn+1, "w") : fopen(strip_escapes(fn), mode);
bin/ed/io.c
153
if (fp == NULL) {
bin/ed/io.c
158
if ((size = write_stream(fp, n, m)) < 0) {
bin/ed/io.c
162
if ((cs = (*fn == '!') ? pclose(fp) : fclose(fp)) < 0) {
bin/ed/io.c
176
write_stream(FILE *fp, long n, long m)
bin/ed/io.c
191
if (put_stream_line(fp, s, len) < 0)
bin/ed/io.c
196
flush_des_file(fp); /* flush buffer */
bin/ed/io.c
205
put_stream_line(FILE *fp, const char *s, int len)
bin/ed/io.c
208
if ((des ? put_des_char(*s++, fp) : 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
81
for (current_addr = n; (len = get_stream_line(fp)) > 0; size += len) {
bin/kill/kill.c
177
printsignals(FILE *fp)
bin/kill/kill.c
182
fprintf(fp, "%s", sys_signame[n]);
bin/kill/kill.c
184
fprintf(fp, "\n");
bin/kill/kill.c
186
fprintf(fp, " ");
bin/pax/gen_subs.c
113
fprintf(fp, "%s%2u %-16s %-6s ", f_mode, sbp->st_nlink,
bin/pax/gen_subs.c
120
fprintf(fp, "%4lu,%4lu ", (unsigned long)MAJOR(sbp->st_rdev),
bin/pax/gen_subs.c
123
fprintf(fp, "%9jd ", (intmax_t)sbp->st_size);
bin/pax/gen_subs.c
129
fprintf(fp, "%s %s", f_date, arcn->name);
bin/pax/gen_subs.c
131
fprintf(fp, " == %s\n", arcn->ln_name);
bin/pax/gen_subs.c
133
fprintf(fp, " => %s\n", arcn->ln_name);
bin/pax/gen_subs.c
135
putc('\n', fp);
bin/pax/gen_subs.c
136
fflush(fp);
bin/pax/gen_subs.c
73
ls_list(ARCHD *arcn, time_t now, FILE *fp)
bin/pax/gen_subs.c
85
fprintf(fp, "%s\n", arcn->name);
bin/pax/gen_subs.c
86
fflush(fp);
bin/pax/options.c
1022
FILE *fp;
bin/pax/options.c
1154
if ((fp = fopen(optarg, "r")) == NULL) {
bin/pax/options.c
1158
while ((str = get_line(fp)) != NULL) {
bin/pax/options.c
1161
fclose(fp);
bin/pax/options.c
864
FILE *fp;
bin/pax/options.c
868
fp = stdin;
bin/pax/options.c
869
else if ((fp = fopen(file, "r")) == NULL) {
bin/pax/options.c
873
while ((str = get_line(fp)) != NULL) {
bin/pax/options.c
879
fclose(fp);
bin/pax/options.c
931
FILE *fp;
bin/pax/options.c
941
fp = stdin;
bin/pax/options.c
942
else if ((fp = fopen(file, "r")) == NULL) {
bin/pax/options.c
946
while ((str = get_line(fp)) != NULL) {
bin/pax/options.c
951
fclose(fp);
bin/sh/mknodes.c
169
struct field *fp;
bin/sh/mknodes.c
177
fp = &curstr->field[curstr->nfields];
bin/sh/mknodes.c
178
fp->name = savestr(name);
bin/sh/mknodes.c
180
fp->type = T_NODE;
bin/sh/mknodes.c
183
fp->type = T_NODELIST;
bin/sh/mknodes.c
186
fp->type = T_STRING;
bin/sh/mknodes.c
189
fp->type = T_INT;
bin/sh/mknodes.c
192
fp->type = T_OTHER;
bin/sh/mknodes.c
194
fp->type = T_TEMP;
bin/sh/mknodes.c
198
if (fp->type == T_OTHER || fp->type == T_TEMP) {
bin/sh/mknodes.c
200
fp->decl = savestr(linep);
bin/sh/mknodes.c
204
fp->decl = savestr(decl);
bin/sh/mknodes.c
224
struct field *fp;
bin/sh/mknodes.c
239
for (i = sp->nfields, fp = sp->field ; --i >= 0 ; fp++) {
bin/sh/mknodes.c
240
fprintf(hfile, " %s;\n", fp->decl);
bin/sh/mknodes.c
302
struct field *fp;
bin/sh/mknodes.c
323
fp = &sp->field[i];
bin/sh/mknodes.c
324
switch (fp->type) {
bin/sh/mknodes.c
329
sp->tag, fp->name);
bin/sh/mknodes.c
333
sp->tag, fp->name, sp->tag, fp->name);
bin/sh/mknodes.c
340
sp->tag, fp->name);
bin/sh/mknodes.c
344
sp->tag, fp->name, sp->tag, fp->name);
bin/sh/mknodes.c
351
sp->tag, fp->name);
bin/sh/mknodes.c
355
sp->tag, fp->name, sp->tag, fp->name);
bin/sh/mknodes.c
363
sp->tag, fp->name, sp->tag, fp->name);
bin/sh/mknodes.c
378
indent(int amount, FILE *fp)
bin/sh/mknodes.c
381
putc('\t', fp);
bin/sh/mknodes.c
385
putc(' ', fp);
bin/sh/output.c
338
FILE *fp;
bin/sh/output.c
340
if ((fp = fwopen(dest, doformat_wr)) != NULL) {
bin/sh/output.c
341
vfprintf(fp, f, ap);
bin/sh/output.c
342
fclose(fp);
bin/sh/show.c
100
putc('\n', fp);
bin/sh/show.c
104
shcmd(lp->n, fp);
bin/sh/show.c
106
fputs(" | ", fp);
bin/sh/show.c
109
fputs(" &", fp);
bin/sh/show.c
111
putc('\n', fp);
bin/sh/show.c
114
fprintf(fp, "<node type %d>", n->type);
bin/sh/show.c
116
putc('\n', fp);
bin/sh/show.c
124
shcmd(union node *cmd, FILE *fp)
bin/sh/show.c
135
sharg(np, fp);
bin/sh/show.c
154
fprintf(fp, "%d", np->nfile.fd);
bin/sh/show.c
155
fputs(s, fp);
bin/sh/show.c
158
fprintf(fp, "%d", np->ndup.dupfd);
bin/sh/show.c
160
fprintf(fp, "-");
bin/sh/show.c
162
fprintf(fp, "HERE");
bin/sh/show.c
164
fprintf(fp, "XHERE");
bin/sh/show.c
166
sharg(np->nfile.fname, fp);
bin/sh/show.c
175
sharg(union node *arg, FILE *fp)
bin/sh/show.c
190
putc(*++p, fp);
bin/sh/show.c
193
putc('$', fp);
bin/sh/show.c
194
putc('{', fp);
bin/sh/show.c
197
putc('#', fp);
bin/sh/show.c
200
putc(*p++, fp);
bin/sh/show.c
203
putc(':', fp);
bin/sh/show.c
207
putc('}', fp);
bin/sh/show.c
210
putc('-', fp);
bin/sh/show.c
213
putc('+', fp);
bin/sh/show.c
216
putc('?', fp);
bin/sh/show.c
219
putc('=', fp);
bin/sh/show.c
222
putc('#', fp);
bin/sh/show.c
225
putc('#', fp);
bin/sh/show.c
226
putc('#', fp);
bin/sh/show.c
229
putc('%', fp);
bin/sh/show.c
232
putc('%', fp);
bin/sh/show.c
233
putc('%', fp);
bin/sh/show.c
242
putc('}', fp);
bin/sh/show.c
246
putc('$', fp);
bin/sh/show.c
247
putc('(', fp);
bin/sh/show.c
248
shtree(bqlist->n, -1, NULL, fp);
bin/sh/show.c
249
putc(')', fp);
bin/sh/show.c
252
putc(*p, fp);
bin/sh/show.c
260
indent(int amount, char *pfx, FILE *fp)
bin/sh/show.c
266
fputs(pfx, fp);
bin/sh/show.c
267
putc('\t', fp);
bin/sh/show.c
73
shtree(union node *n, int ind, char *pfx, FILE *fp)
bin/sh/show.c
81
indent(ind, pfx, fp);
bin/sh/show.c
92
shtree(n->nbinary.ch1, ind, NULL, fp);
bin/sh/show.c
94
fputs(s, fp);
bin/sh/show.c
95
shtree(n->nbinary.ch2, ind, NULL, fp);
bin/sh/show.c
98
shcmd(n, fp);
bin/uuidgen/uuidgen.c
103
fprintf(fp, "%s\n", p);
bin/uuidgen/uuidgen.c
108
if (fp != stdout)
bin/uuidgen/uuidgen.c
109
fclose(fp);
bin/uuidgen/uuidgen.c
45
FILE *fp;
bin/uuidgen/uuidgen.c
51
fp = stdout; /* default output file */
bin/uuidgen/uuidgen.c
66
if (fp != stdout)
bin/uuidgen/uuidgen.c
68
fp = fopen(optarg, "w");
bin/uuidgen/uuidgen.c
69
if (fp == NULL)
crypto/libressl/apps/nc/netcat.c
1728
save_peer_cert(struct tls *tls_ctx, FILE *fp)
crypto/libressl/apps/nc/netcat.c
1735
if (fprintf(fp, "%.*s", (int)plen, pem) < 0)
crypto/libressl/apps/nc/netcat.c
1737
if (fflush(fp) != 0)
crypto/libressl/apps/openssl/openssl.c
392
FUNCTION f, *fp;
crypto/libressl/apps/openssl/openssl.c
462
fp = lh_FUNCTION_retrieve(prog, &f);
crypto/libressl/apps/openssl/openssl.c
463
if (fp != NULL) {
crypto/libressl/apps/openssl/openssl.c
467
ret = fp->func(argc, argv);
crypto/libressl/apps/openssl/openssl.c
558
FUNCTION f, *fp;
crypto/libressl/apps/openssl/openssl.c
566
fp = lh_FUNCTION_retrieve(prog, &f);
crypto/libressl/apps/openssl/openssl.c
567
if (fp == NULL) {
crypto/libressl/apps/openssl/openssl.c
571
fp = &f;
crypto/libressl/apps/openssl/openssl.c
575
fp = &f;
crypto/libressl/apps/openssl/openssl.c
578
if (fp != NULL) {
crypto/libressl/apps/openssl/openssl.c
579
ret = fp->func(argc, argv);
crypto/libressl/apps/openssl/openssl.c
626
for (fp = functions; fp->name != NULL; fp++)
crypto/libressl/apps/openssl/openssl.c
627
if (fp->type == list_type)
crypto/libressl/apps/openssl/openssl.c
629
fp->name);
crypto/libressl/apps/openssl/openssl.c
641
for (fp = functions; fp->name != NULL; fp++) {
crypto/libressl/apps/openssl/openssl.c
652
if (fp->type != tp) {
crypto/libressl/apps/openssl/openssl.c
653
tp = fp->type;
crypto/libressl/apps/openssl/openssl.c
666
BIO_printf(bio_err, "%-15s", fp->name);
crypto/libressl/apps/openssl/openssl.c
668
BIO_printf(bio_err, "%-18s", fp->name);
crypto/libressl/crypto/asn1/a_strex.c
575
X509_NAME_print_ex_fp(FILE *fp, const X509_NAME *nm, int indent,
crypto/libressl/crypto/asn1/a_strex.c
581
btmp = BIO_new_fp(fp, BIO_NOCLOSE);
crypto/libressl/crypto/asn1/a_strex.c
588
return do_name_ex(send_fp_chars, fp, nm, indent, flags);
crypto/libressl/crypto/asn1/a_strex.c
598
ASN1_STRING_print_ex_fp(FILE *fp, const ASN1_STRING *str, unsigned long flags)
crypto/libressl/crypto/asn1/a_strex.c
600
return do_print_ex(send_fp_chars, fp, flags, str);
crypto/libressl/crypto/asn1/bio_asn1.c
121
static long asn1_bio_callback_ctrl(BIO *h, int cmd, BIO_info_cb *fp);
crypto/libressl/crypto/asn1/bio_asn1.c
349
asn1_bio_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
crypto/libressl/crypto/asn1/bio_asn1.c
353
return BIO_callback_ctrl(b->next_bio, cmd, fp);
crypto/libressl/crypto/asn1/t_crl.c
72
X509_CRL_print_fp(FILE *fp, X509_CRL *x)
crypto/libressl/crypto/asn1/t_crl.c
81
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/libressl/crypto/asn1/t_req.c
80
X509_REQ_print_fp(FILE *fp, X509_REQ *x)
crypto/libressl/crypto/asn1/t_req.c
89
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/libressl/crypto/asn1/t_x509.c
84
X509_print_fp(FILE *fp, X509 *x)
crypto/libressl/crypto/asn1/t_x509.c
86
return X509_print_ex_fp(fp, x, XN_FLAG_COMPAT, X509_FLAG_COMPAT);
crypto/libressl/crypto/asn1/t_x509.c
90
X509_print_ex_fp(FILE *fp, X509 *x, unsigned long nmflag, unsigned long cflag)
crypto/libressl/crypto/asn1/t_x509.c
99
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/libressl/crypto/asn1/x_pubkey.c
427
d2i_PUBKEY_fp(FILE *fp, EVP_PKEY **pkey)
crypto/libressl/crypto/asn1/x_pubkey.c
429
return (EVP_PKEY *)ASN1_item_d2i_fp(&EVP_PKEY_PUBKEY_it, fp,
crypto/libressl/crypto/asn1/x_pubkey.c
434
i2d_PUBKEY_fp(FILE *fp, EVP_PKEY *pkey)
crypto/libressl/crypto/asn1/x_pubkey.c
436
return ASN1_item_i2d_fp(&EVP_PKEY_PUBKEY_it, fp, (ASN1_VALUE *)pkey);
crypto/libressl/crypto/asn1/x_pubkey.c
520
d2i_RSA_PUBKEY_fp(FILE *fp, RSA **rsa)
crypto/libressl/crypto/asn1/x_pubkey.c
522
return (RSA *)ASN1_item_d2i_fp(&RSA_PUBKEY_it, fp, (ASN1_VALUE **)rsa);
crypto/libressl/crypto/asn1/x_pubkey.c
526
i2d_RSA_PUBKEY_fp(FILE *fp, RSA *rsa)
crypto/libressl/crypto/asn1/x_pubkey.c
528
return ASN1_item_i2d_fp(&RSA_PUBKEY_it, fp, (ASN1_VALUE *)rsa);
crypto/libressl/crypto/asn1/x_pubkey.c
610
d2i_DSA_PUBKEY_fp(FILE *fp, DSA **dsa)
crypto/libressl/crypto/asn1/x_pubkey.c
612
return (DSA *)ASN1_item_d2i_fp(&DSA_PUBKEY_it, fp, (ASN1_VALUE **)dsa);
crypto/libressl/crypto/asn1/x_pubkey.c
616
i2d_DSA_PUBKEY_fp(FILE *fp, DSA *dsa)
crypto/libressl/crypto/asn1/x_pubkey.c
618
return ASN1_item_i2d_fp(&DSA_PUBKEY_it, fp, (ASN1_VALUE *)dsa);
crypto/libressl/crypto/asn1/x_pubkey.c
701
d2i_EC_PUBKEY_fp(FILE *fp, EC_KEY **ec)
crypto/libressl/crypto/asn1/x_pubkey.c
703
return (EC_KEY *)ASN1_item_d2i_fp(&EC_PUBKEY_it, fp, (ASN1_VALUE **)ec);
crypto/libressl/crypto/asn1/x_pubkey.c
707
i2d_EC_PUBKEY_fp(FILE *fp, EC_KEY *ec)
crypto/libressl/crypto/asn1/x_pubkey.c
709
return ASN1_item_i2d_fp(&EC_PUBKEY_it, fp, (ASN1_VALUE *)ec);
crypto/libressl/crypto/bio/b_dump.c
154
write_fp(const void *data, size_t len, void *fp)
crypto/libressl/crypto/bio/b_dump.c
156
return fwrite(data, 1, len, fp);
crypto/libressl/crypto/bio/b_dump.c
160
BIO_dump_fp(FILE *fp, const char *s, int len)
crypto/libressl/crypto/bio/b_dump.c
162
return BIO_dump_cb(write_fp, fp, s, len);
crypto/libressl/crypto/bio/b_dump.c
166
BIO_dump_indent_fp(FILE *fp, const char *s, int len, int indent)
crypto/libressl/crypto/bio/b_dump.c
168
return BIO_dump_indent_cb(write_fp, fp, s, len, indent);
crypto/libressl/crypto/bio/b_print.c
30
FILE *fp;
crypto/libressl/crypto/bio/b_print.c
32
fp = funopen(bio, NULL, &_BIO_write, NULL, NULL);
crypto/libressl/crypto/bio/b_print.c
33
if (fp == NULL) {
crypto/libressl/crypto/bio/b_print.c
37
ret = vfprintf(fp, format, args);
crypto/libressl/crypto/bio/b_print.c
38
fclose(fp);
crypto/libressl/crypto/bio/bf_buff.c
455
buffer_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
crypto/libressl/crypto/bio/bf_buff.c
463
ret = BIO_callback_ctrl(b->next_bio, cmd, fp);
crypto/libressl/crypto/bio/bf_buff.c
75
static long buffer_callback_ctrl(BIO *h, int cmd, BIO_info_cb *fp);
crypto/libressl/crypto/bio/bf_nbio.c
226
nbiof_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
crypto/libressl/crypto/bio/bf_nbio.c
234
ret = BIO_callback_ctrl(b->next_bio, cmd, fp);
crypto/libressl/crypto/bio/bf_nbio.c
77
static long nbiof_callback_ctrl(BIO *h, int cmd, BIO_info_cb *fp);
crypto/libressl/crypto/bio/bio_lib.c
569
BIO_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
crypto/libressl/crypto/bio/bio_lib.c
583
if ((ret = bio_call_callback(b, BIO_CB_CTRL, (void *)&fp, 0,
crypto/libressl/crypto/bio/bio_lib.c
588
ret = b->method->callback_ctrl(b, cmd, fp);
crypto/libressl/crypto/bio/bio_lib.c
592
(void *)&fp, 0, cmd, 0, ret, NULL);
crypto/libressl/crypto/bio/bss_conn.c
554
conn_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
crypto/libressl/crypto/bio/bss_conn.c
563
data->info_callback = (BIO_info_cb *)fp;
crypto/libressl/crypto/bio/bss_file.c
215
FILE *fp = (FILE *)b->ptr;
crypto/libressl/crypto/bio/bss_file.c
222
ret = (long)fseek(fp, num, 0);
crypto/libressl/crypto/bio/bss_file.c
225
ret = (long)feof(fp);
crypto/libressl/crypto/bio/bss_file.c
229
ret = ftell(fp);
crypto/libressl/crypto/bio/bss_file.c
255
fp = fopen(ptr, p);
crypto/libressl/crypto/bio/bss_file.c
256
if (fp == NULL) {
crypto/libressl/crypto/bio/bss_file.c
263
b->ptr = fp;
crypto/libressl/crypto/bn/bn_ctx.c
294
unsigned int fp = BN_STACK_pop(&ctx->stack);
crypto/libressl/crypto/bn/bn_ctx.c
296
if (fp < ctx->used)
crypto/libressl/crypto/bn/bn_ctx.c
297
BN_POOL_release(&ctx->pool, ctx->used - fp);
crypto/libressl/crypto/bn/bn_ctx.c
298
ctx->used = fp;
crypto/libressl/crypto/bn/bn_print.c
355
BN_print_fp(FILE *fp, const BIGNUM *a)
crypto/libressl/crypto/bn/bn_print.c
362
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/libressl/crypto/cms/cms_io.c
103
PEM_read_CMS(FILE *fp, CMS_ContentInfo **x, pem_password_cb *cb, void *u)
crypto/libressl/crypto/cms/cms_io.c
105
return PEM_ASN1_read((d2i_of_void *)d2i_CMS_ContentInfo, PEM_STRING_CMS, fp,
crypto/libressl/crypto/cms/cms_io.c
117
PEM_write_CMS(FILE *fp, const CMS_ContentInfo *x)
crypto/libressl/crypto/cms/cms_io.c
119
return PEM_ASN1_write((i2d_of_void *)i2d_CMS_ContentInfo, PEM_STRING_CMS, fp,
crypto/libressl/crypto/conf/conf_lib.c
107
LHASH_OF(CONF_VALUE) *CONF_load_fp(LHASH_OF(CONF_VALUE) *conf, FILE *fp,
crypto/libressl/crypto/conf/conf_lib.c
113
if (!(btmp = BIO_new_fp(fp, BIO_NOCLOSE))) {
crypto/libressl/crypto/conf/conf_lib.c
267
NCONF_load_fp(CONF *conf, FILE *fp, long *eline)
crypto/libressl/crypto/conf/conf_lib.c
272
if (!(btmp = BIO_new_fp(fp, BIO_NOCLOSE))) {
crypto/libressl/crypto/dh/dh_asn1.c
154
d2i_DHparams_fp(FILE *fp, DH **a)
crypto/libressl/crypto/dh/dh_asn1.c
156
return ASN1_item_d2i_fp(&DHparams_it, fp, a);
crypto/libressl/crypto/dh/dh_asn1.c
160
i2d_DHparams_fp(FILE *fp, DH *a)
crypto/libressl/crypto/dh/dh_asn1.c
162
return ASN1_item_i2d_fp(&DHparams_it, fp, a);
crypto/libressl/crypto/dh/dh_prn.c
66
DHparams_print_fp(FILE *fp, const DH *x)
crypto/libressl/crypto/dh/dh_prn.c
75
BIO_set_fp(b,fp,BIO_NOCLOSE);
crypto/libressl/crypto/dsa/dsa_asn1.c
321
d2i_DSAparams_fp(FILE *fp, DSA **a)
crypto/libressl/crypto/dsa/dsa_asn1.c
323
return ASN1_item_d2i_fp(&DSAparams_it, fp, a);
crypto/libressl/crypto/dsa/dsa_asn1.c
327
i2d_DSAparams_fp(FILE *fp, DSA *a)
crypto/libressl/crypto/dsa/dsa_asn1.c
329
return ASN1_item_i2d_fp(&DSAparams_it, fp, a);
crypto/libressl/crypto/dsa/dsa_prn.c
66
DSA_print_fp(FILE *fp, const DSA *x, int off)
crypto/libressl/crypto/dsa/dsa_prn.c
75
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/libressl/crypto/dsa/dsa_prn.c
82
DSAparams_print_fp(FILE *fp, const DSA *x)
crypto/libressl/crypto/dsa/dsa_prn.c
91
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/libressl/crypto/ec/eck_prn.c
105
ECParameters_print_fp(FILE * fp, const EC_KEY * x)
crypto/libressl/crypto/ec/eck_prn.c
114
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/libressl/crypto/ec/eck_prn.c
147
print_bin(BIO * fp, const char *str, const unsigned char *num,
crypto/libressl/crypto/ec/eck_prn.c
327
print_bin(BIO * fp, const char *name, const unsigned char *buf,
crypto/libressl/crypto/ec/eck_prn.c
339
if (BIO_write(fp, str, off) <= 0)
crypto/libressl/crypto/ec/eck_prn.c
342
if (BIO_printf(fp, "%s", name) <= 0)
crypto/libressl/crypto/ec/eck_prn.c
349
if (BIO_write(fp, str, off + 1 + 4) <= 0)
crypto/libressl/crypto/ec/eck_prn.c
352
if (BIO_printf(fp, "%02x%s", buf[i], ((i + 1) == len) ? "" : ":") <= 0)
crypto/libressl/crypto/ec/eck_prn.c
355
if (BIO_write(fp, "\n", 1) <= 0)
crypto/libressl/crypto/ec/eck_prn.c
73
ECPKParameters_print_fp(FILE * fp, const EC_GROUP * x, int off)
crypto/libressl/crypto/ec/eck_prn.c
82
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/libressl/crypto/ec/eck_prn.c
89
EC_KEY_print_fp(FILE * fp, const EC_KEY * x, int off)
crypto/libressl/crypto/ec/eck_prn.c
98
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/libressl/crypto/err/err_prn.c
104
ERR_print_errors_fp(FILE *fp)
crypto/libressl/crypto/err/err_prn.c
106
ERR_print_errors_cb(print_fp, fp);
crypto/libressl/crypto/err/err_prn.c
93
print_fp(const char *str, size_t len, void *fp)
crypto/libressl/crypto/err/err_prn.c
98
BIO_set_fp(&bio, fp, BIO_NOCLOSE);
crypto/libressl/crypto/evp/bio_b64.c
553
b64_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
crypto/libressl/crypto/evp/bio_b64.c
561
ret = BIO_callback_ctrl(b->next_bio, cmd, fp);
crypto/libressl/crypto/evp/bio_b64.c
76
static long b64_callback_ctrl(BIO *h, int cmd, BIO_info_cb *fp);
crypto/libressl/crypto/evp/bio_enc.c
376
enc_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
crypto/libressl/crypto/evp/bio_enc.c
384
ret = BIO_callback_ctrl(b->next_bio, cmd, fp);
crypto/libressl/crypto/evp/bio_md.c
244
md_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
crypto/libressl/crypto/evp/bio_md.c
252
ret = BIO_callback_ctrl(b->next_bio, cmd, fp);
crypto/libressl/crypto/evp/bio_md.c
78
static long md_callback_ctrl(BIO *h, int cmd, BIO_info_cb *fp);
crypto/libressl/crypto/idea/i_skey.c
101
IDEA_INT *fp,*tp,t;
crypto/libressl/crypto/idea/i_skey.c
104
fp= &(ek->data[8][0]);
crypto/libressl/crypto/idea/i_skey.c
107
*(tp++)=inverse(fp[0]);
crypto/libressl/crypto/idea/i_skey.c
108
*(tp++)=((int)(0x10000L-fp[2])&0xffff);
crypto/libressl/crypto/idea/i_skey.c
109
*(tp++)=((int)(0x10000L-fp[1])&0xffff);
crypto/libressl/crypto/idea/i_skey.c
110
*(tp++)=inverse(fp[3]);
crypto/libressl/crypto/idea/i_skey.c
112
fp-=6;
crypto/libressl/crypto/idea/i_skey.c
113
*(tp++)=fp[4];
crypto/libressl/crypto/idea/i_skey.c
114
*(tp++)=fp[5];
crypto/libressl/crypto/lhash/lh_stats.c
143
lh_stats(const _LHASH *lh, FILE *fp)
crypto/libressl/crypto/lhash/lh_stats.c
150
BIO_set_fp(bp, fp, BIO_NOCLOSE);
crypto/libressl/crypto/lhash/lh_stats.c
157
lh_node_stats(const _LHASH *lh, FILE *fp)
crypto/libressl/crypto/lhash/lh_stats.c
164
BIO_set_fp(bp, fp, BIO_NOCLOSE);
crypto/libressl/crypto/lhash/lh_stats.c
171
lh_node_usage_stats(const _LHASH *lh, FILE *fp)
crypto/libressl/crypto/lhash/lh_stats.c
178
BIO_set_fp(bp, fp, BIO_NOCLOSE);
crypto/libressl/crypto/mem_dbg.c
188
CRYPTO_mem_leaks_fp(FILE *fp)
crypto/libressl/crypto/pem/pem_all.c
145
PEM_read_X509_REQ(FILE *fp, X509_REQ **x, pem_password_cb *cb, void *u)
crypto/libressl/crypto/pem/pem_all.c
147
return PEM_ASN1_read((d2i_of_void *)d2i_X509_REQ, PEM_STRING_X509_REQ, fp,
crypto/libressl/crypto/pem/pem_all.c
152
PEM_write_X509_REQ(FILE *fp, X509_REQ *x)
crypto/libressl/crypto/pem/pem_all.c
154
return PEM_ASN1_write((i2d_of_void *)i2d_X509_REQ, PEM_STRING_X509_REQ, fp,
crypto/libressl/crypto/pem/pem_all.c
173
PEM_write_X509_REQ_NEW(FILE *fp, X509_REQ *x)
crypto/libressl/crypto/pem/pem_all.c
175
return PEM_ASN1_write((i2d_of_void *)i2d_X509_REQ, PEM_STRING_X509_REQ_OLD, fp,
crypto/libressl/crypto/pem/pem_all.c
187
PEM_read_X509_CRL(FILE *fp, X509_CRL **x, pem_password_cb *cb, void *u)
crypto/libressl/crypto/pem/pem_all.c
189
return PEM_ASN1_read((d2i_of_void *)d2i_X509_CRL, PEM_STRING_X509_CRL, fp,
crypto/libressl/crypto/pem/pem_all.c
194
PEM_write_X509_CRL(FILE *fp, X509_CRL *x)
crypto/libressl/crypto/pem/pem_all.c
196
return PEM_ASN1_write((i2d_of_void *)i2d_X509_CRL, PEM_STRING_X509_CRL, fp,
crypto/libressl/crypto/pem/pem_all.c
215
PEM_read_PKCS7(FILE *fp, PKCS7 **x, pem_password_cb *cb, void *u)
crypto/libressl/crypto/pem/pem_all.c
217
return PEM_ASN1_read((d2i_of_void *)d2i_PKCS7, PEM_STRING_PKCS7, fp,
crypto/libressl/crypto/pem/pem_all.c
222
PEM_write_PKCS7(FILE *fp, PKCS7 *x)
crypto/libressl/crypto/pem/pem_all.c
224
return PEM_ASN1_write((i2d_of_void *)i2d_PKCS7, PEM_STRING_PKCS7, fp,
crypto/libressl/crypto/pem/pem_all.c
243
PEM_write_NETSCAPE_CERT_SEQUENCE(FILE *fp, NETSCAPE_CERT_SEQUENCE *x)
crypto/libressl/crypto/pem/pem_all.c
245
return PEM_ASN1_write((i2d_of_void *)i2d_NETSCAPE_CERT_SEQUENCE, PEM_STRING_X509, fp,
crypto/libressl/crypto/pem/pem_all.c
250
PEM_read_NETSCAPE_CERT_SEQUENCE(FILE *fp, NETSCAPE_CERT_SEQUENCE **x, pem_password_cb *cb, void *u)
crypto/libressl/crypto/pem/pem_all.c
252
return PEM_ASN1_read((d2i_of_void *)d2i_NETSCAPE_CERT_SEQUENCE, PEM_STRING_X509, fp,
crypto/libressl/crypto/pem/pem_all.c
299
PEM_read_RSAPrivateKey(FILE *fp, RSA **rsa, pem_password_cb *cb, void *u)
crypto/libressl/crypto/pem/pem_all.c
303
pktmp = PEM_read_PrivateKey(fp, NULL, cb, u);
crypto/libressl/crypto/pem/pem_all.c
308
PEM_write_RSAPrivateKey(FILE *fp, RSA *x, const EVP_CIPHER *enc,
crypto/libressl/crypto/pem/pem_all.c
311
return PEM_ASN1_write((i2d_of_void *)i2d_RSAPrivateKey, PEM_STRING_RSA, fp,
crypto/libressl/crypto/pem/pem_all.c
334
PEM_read_RSAPublicKey(FILE *fp, RSA **x, pem_password_cb *cb, void *u)
crypto/libressl/crypto/pem/pem_all.c
336
return PEM_ASN1_read((d2i_of_void *)d2i_RSAPublicKey, PEM_STRING_RSA_PUBLIC, fp,
crypto/libressl/crypto/pem/pem_all.c
341
PEM_write_RSAPublicKey(FILE *fp, const RSA *x)
crypto/libressl/crypto/pem/pem_all.c
343
return PEM_ASN1_write((i2d_of_void *)i2d_RSAPublicKey, PEM_STRING_RSA_PUBLIC, fp,
crypto/libressl/crypto/pem/pem_all.c
362
PEM_read_RSA_PUBKEY(FILE *fp, RSA **x, pem_password_cb *cb, void *u)
crypto/libressl/crypto/pem/pem_all.c
364
return PEM_ASN1_read((d2i_of_void *)d2i_RSA_PUBKEY, PEM_STRING_PUBLIC, fp,
crypto/libressl/crypto/pem/pem_all.c
369
PEM_write_RSA_PUBKEY(FILE *fp, RSA *x)
crypto/libressl/crypto/pem/pem_all.c
371
return PEM_ASN1_write((i2d_of_void *)i2d_RSA_PUBKEY, PEM_STRING_PUBLIC, fp,
crypto/libressl/crypto/pem/pem_all.c
412
PEM_read_DSAPrivateKey(FILE *fp, DSA **dsa, pem_password_cb *cb, void *u)
crypto/libressl/crypto/pem/pem_all.c
416
pktmp = PEM_read_PrivateKey(fp, NULL, cb, u);
crypto/libressl/crypto/pem/pem_all.c
421
PEM_write_DSAPrivateKey(FILE *fp, DSA *x, const EVP_CIPHER *enc,
crypto/libressl/crypto/pem/pem_all.c
424
return PEM_ASN1_write((i2d_of_void *)i2d_DSAPrivateKey, PEM_STRING_DSA, fp,
crypto/libressl/crypto/pem/pem_all.c
447
PEM_read_DSA_PUBKEY(FILE *fp, DSA **x, pem_password_cb *cb, void *u)
crypto/libressl/crypto/pem/pem_all.c
449
return PEM_ASN1_read((d2i_of_void *)d2i_DSA_PUBKEY, PEM_STRING_PUBLIC, fp,
crypto/libressl/crypto/pem/pem_all.c
454
PEM_write_DSA_PUBKEY(FILE *fp, DSA *x)
crypto/libressl/crypto/pem/pem_all.c
456
return PEM_ASN1_write((i2d_of_void *)i2d_DSA_PUBKEY, PEM_STRING_PUBLIC, fp,
crypto/libressl/crypto/pem/pem_all.c
475
PEM_read_DSAparams(FILE *fp, DSA **x, pem_password_cb *cb, void *u)
crypto/libressl/crypto/pem/pem_all.c
477
return PEM_ASN1_read((d2i_of_void *)d2i_DSAparams, PEM_STRING_DSAPARAMS, fp,
crypto/libressl/crypto/pem/pem_all.c
482
PEM_write_DSAparams(FILE *fp, const DSA *x)
crypto/libressl/crypto/pem/pem_all.c
484
return PEM_ASN1_write((i2d_of_void *)i2d_DSAparams, PEM_STRING_DSAPARAMS, fp,
crypto/libressl/crypto/pem/pem_all.c
525
PEM_read_ECPKParameters(FILE *fp, EC_GROUP **x, pem_password_cb *cb, void *u)
crypto/libressl/crypto/pem/pem_all.c
527
return PEM_ASN1_read((d2i_of_void *)d2i_ECPKParameters, PEM_STRING_ECPARAMETERS, fp,
crypto/libressl/crypto/pem/pem_all.c
532
PEM_write_ECPKParameters(FILE *fp, const EC_GROUP *x)
crypto/libressl/crypto/pem/pem_all.c
534
return PEM_ASN1_write((i2d_of_void *)i2d_ECPKParameters, PEM_STRING_ECPARAMETERS, fp,
crypto/libressl/crypto/pem/pem_all.c
553
PEM_read_ECPrivateKey(FILE *fp, EC_KEY **eckey, pem_password_cb *cb, void *u)
crypto/libressl/crypto/pem/pem_all.c
557
pktmp = PEM_read_PrivateKey(fp, NULL, cb, u);
crypto/libressl/crypto/pem/pem_all.c
562
PEM_write_ECPrivateKey(FILE *fp, EC_KEY *x, const EVP_CIPHER *enc,
crypto/libressl/crypto/pem/pem_all.c
565
return PEM_ASN1_write((i2d_of_void *)i2d_ECPrivateKey, PEM_STRING_ECPRIVATEKEY, fp,
crypto/libressl/crypto/pem/pem_all.c
587
PEM_read_EC_PUBKEY(FILE *fp, EC_KEY **x, pem_password_cb *cb, void *u)
crypto/libressl/crypto/pem/pem_all.c
589
return PEM_ASN1_read((d2i_of_void *)d2i_EC_PUBKEY, PEM_STRING_PUBLIC, fp,
crypto/libressl/crypto/pem/pem_all.c
594
PEM_write_EC_PUBKEY(FILE *fp, EC_KEY *x)
crypto/libressl/crypto/pem/pem_all.c
596
return PEM_ASN1_write((i2d_of_void *)i2d_EC_PUBKEY, PEM_STRING_PUBLIC, fp,
crypto/libressl/crypto/pem/pem_all.c
619
PEM_read_DHparams(FILE *fp, DH **x, pem_password_cb *cb, void *u)
crypto/libressl/crypto/pem/pem_all.c
621
return PEM_ASN1_read((d2i_of_void *)d2i_DHparams, PEM_STRING_DHPARAMS, fp,
crypto/libressl/crypto/pem/pem_all.c
626
PEM_write_DHparams(FILE *fp, const DH *x)
crypto/libressl/crypto/pem/pem_all.c
628
return PEM_ASN1_write((i2d_of_void *)i2d_DHparams, PEM_STRING_DHPARAMS, fp,
crypto/libressl/crypto/pem/pem_all.c
649
PEM_read_PUBKEY(FILE *fp, EVP_PKEY **x, pem_password_cb *cb, void *u)
crypto/libressl/crypto/pem/pem_all.c
651
return PEM_ASN1_read((d2i_of_void *)d2i_PUBKEY, PEM_STRING_PUBLIC, fp,
crypto/libressl/crypto/pem/pem_all.c
656
PEM_write_PUBKEY(FILE *fp, EVP_PKEY *x)
crypto/libressl/crypto/pem/pem_all.c
658
return PEM_ASN1_write((i2d_of_void *)i2d_PUBKEY, PEM_STRING_PUBLIC, fp,
crypto/libressl/crypto/pem/pem_info.c
81
PEM_X509_INFO_read(FILE *fp, STACK_OF(X509_INFO) *sk, pem_password_cb *cb,
crypto/libressl/crypto/pem/pem_info.c
91
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/libressl/crypto/pem/pem_lib.c
172
PEM_ASN1_read(d2i_of_void *d2i, const char *name, FILE *fp, void **x,
crypto/libressl/crypto/pem/pem_lib.c
182
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/libressl/crypto/pem/pem_lib.c
327
PEM_ASN1_write(i2d_of_void *i2d, const char *name, FILE *fp, void *x,
crypto/libressl/crypto/pem/pem_lib.c
338
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/libressl/crypto/pem/pem_lib.c
578
PEM_write(FILE *fp, const char *name, const char *header,
crypto/libressl/crypto/pem/pem_lib.c
588
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/libressl/crypto/pem/pem_lib.c
652
PEM_read(FILE *fp, char **name, char **header, unsigned char **data, long *len)
crypto/libressl/crypto/pem/pem_lib.c
661
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/libressl/crypto/pem/pem_pk8.c
194
i2d_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc,
crypto/libressl/crypto/pem/pem_pk8.c
197
return do_pk8pkey_fp(fp, x, 1, -1, enc, kstr, klen, cb, u);
crypto/libressl/crypto/pem/pem_pk8.c
201
i2d_PKCS8PrivateKey_nid_fp(FILE *fp, EVP_PKEY *x, int nid, char *kstr,
crypto/libressl/crypto/pem/pem_pk8.c
204
return do_pk8pkey_fp(fp, x, 1, nid, NULL, kstr, klen, cb, u);
crypto/libressl/crypto/pem/pem_pk8.c
208
PEM_write_PKCS8PrivateKey_nid(FILE *fp, EVP_PKEY *x, int nid, char *kstr,
crypto/libressl/crypto/pem/pem_pk8.c
211
return do_pk8pkey_fp(fp, x, 0, nid, NULL, kstr, klen, cb, u);
crypto/libressl/crypto/pem/pem_pk8.c
215
PEM_write_PKCS8PrivateKey(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc,
crypto/libressl/crypto/pem/pem_pk8.c
218
return do_pk8pkey_fp(fp, x, 0, -1, enc, kstr, klen, cb, u);
crypto/libressl/crypto/pem/pem_pk8.c
222
do_pk8pkey_fp(FILE *fp, EVP_PKEY *x, int isder, int nid, const EVP_CIPHER *enc,
crypto/libressl/crypto/pem/pem_pk8.c
228
if (!(bp = BIO_new_fp(fp, BIO_NOCLOSE))) {
crypto/libressl/crypto/pem/pem_pk8.c
238
d2i_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY **x, pem_password_cb *cb, void *u)
crypto/libressl/crypto/pem/pem_pk8.c
243
if (!(bp = BIO_new_fp(fp, BIO_NOCLOSE))) {
crypto/libressl/crypto/pem/pem_pk8.c
253
PEM_read_PKCS8(FILE *fp, X509_SIG **x, pem_password_cb *cb, void *u)
crypto/libressl/crypto/pem/pem_pk8.c
255
return PEM_ASN1_read((d2i_of_void *)d2i_X509_SIG, PEM_STRING_PKCS8, fp,
crypto/libressl/crypto/pem/pem_pk8.c
260
PEM_write_PKCS8(FILE *fp, X509_SIG *x)
crypto/libressl/crypto/pem/pem_pk8.c
262
return PEM_ASN1_write((i2d_of_void *)i2d_X509_SIG, PEM_STRING_PKCS8, fp,
crypto/libressl/crypto/pem/pem_pk8.c
281
PEM_read_PKCS8_PRIV_KEY_INFO(FILE *fp, PKCS8_PRIV_KEY_INFO **x, pem_password_cb *cb, void *u)
crypto/libressl/crypto/pem/pem_pk8.c
283
return PEM_ASN1_read((d2i_of_void *)d2i_PKCS8_PRIV_KEY_INFO, PEM_STRING_PKCS8INF, fp,
crypto/libressl/crypto/pem/pem_pk8.c
288
PEM_write_PKCS8_PRIV_KEY_INFO(FILE *fp, PKCS8_PRIV_KEY_INFO *x)
crypto/libressl/crypto/pem/pem_pk8.c
290
return PEM_ASN1_write((i2d_of_void *)i2d_PKCS8_PRIV_KEY_INFO, PEM_STRING_PKCS8INF, fp,
crypto/libressl/crypto/pem/pem_pkey.c
231
PEM_read_PrivateKey(FILE *fp, EVP_PKEY **x, pem_password_cb *cb, void *u)
crypto/libressl/crypto/pem/pem_pkey.c
240
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/libressl/crypto/pem/pem_pkey.c
247
PEM_write_PrivateKey(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc,
crypto/libressl/crypto/pem/pem_pkey.c
253
if ((b = BIO_new_fp(fp, BIO_NOCLOSE)) == NULL) {
crypto/libressl/crypto/pem/pem_x509.c
69
PEM_read_X509(FILE *fp, X509 **x, pem_password_cb *cb, void *u)
crypto/libressl/crypto/pem/pem_x509.c
71
return PEM_ASN1_read((d2i_of_void *)d2i_X509, PEM_STRING_X509, fp,
crypto/libressl/crypto/pem/pem_x509.c
76
PEM_write_X509(FILE *fp, X509 *x)
crypto/libressl/crypto/pem/pem_x509.c
78
return PEM_ASN1_write((i2d_of_void *)i2d_X509, PEM_STRING_X509, fp,
crypto/libressl/crypto/pem/pem_xaux.c
69
PEM_read_X509_AUX(FILE *fp, X509 **x, pem_password_cb *cb, void *u)
crypto/libressl/crypto/pem/pem_xaux.c
71
return PEM_ASN1_read((d2i_of_void *)d2i_X509_AUX, PEM_STRING_X509_TRUSTED, fp,
crypto/libressl/crypto/pem/pem_xaux.c
76
PEM_write_X509_AUX(FILE *fp, X509 *x)
crypto/libressl/crypto/pem/pem_xaux.c
78
return PEM_ASN1_write((i2d_of_void *)i2d_X509_AUX, PEM_STRING_X509_TRUSTED, fp,
crypto/libressl/crypto/pkcs12/p12_utl.c
136
i2d_PKCS12_fp(FILE *fp, PKCS12 *p12)
crypto/libressl/crypto/pkcs12/p12_utl.c
138
return ASN1_item_i2d_fp(&PKCS12_it, fp, p12);
crypto/libressl/crypto/pkcs12/p12_utl.c
148
d2i_PKCS12_fp(FILE *fp, PKCS12 **p12)
crypto/libressl/crypto/pkcs12/p12_utl.c
150
return ASN1_item_d2i_fp(&PKCS12_it, fp, p12);
crypto/libressl/crypto/rsa/rsa_prn.c
66
RSA_print_fp(FILE *fp, const RSA *x, int off)
crypto/libressl/crypto/rsa/rsa_prn.c
75
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/libressl/crypto/ts/ts_asn1.c
140
d2i_TS_MSG_IMPRINT_fp(FILE *fp, TS_MSG_IMPRINT **a)
crypto/libressl/crypto/ts/ts_asn1.c
142
return ASN1_item_d2i_fp(&TS_MSG_IMPRINT_it, fp, a);
crypto/libressl/crypto/ts/ts_asn1.c
146
i2d_TS_MSG_IMPRINT_fp(FILE *fp, TS_MSG_IMPRINT *a)
crypto/libressl/crypto/ts/ts_asn1.c
148
return ASN1_item_i2d_fp(&TS_MSG_IMPRINT_it, fp, a);
crypto/libressl/crypto/ts/ts_asn1.c
253
d2i_TS_REQ_fp(FILE *fp, TS_REQ **a)
crypto/libressl/crypto/ts/ts_asn1.c
255
return ASN1_item_d2i_fp(&TS_REQ_it, fp, a);
crypto/libressl/crypto/ts/ts_asn1.c
259
i2d_TS_REQ_fp(FILE *fp, TS_REQ *a)
crypto/libressl/crypto/ts/ts_asn1.c
261
return ASN1_item_i2d_fp(&TS_REQ_it, fp, a);
crypto/libressl/crypto/ts/ts_asn1.c
460
d2i_TS_TST_INFO_fp(FILE *fp, TS_TST_INFO **a)
crypto/libressl/crypto/ts/ts_asn1.c
462
return ASN1_item_d2i_fp(&TS_TST_INFO_it, fp, a);
crypto/libressl/crypto/ts/ts_asn1.c
466
i2d_TS_TST_INFO_fp(FILE *fp, TS_TST_INFO *a)
crypto/libressl/crypto/ts/ts_asn1.c
468
return ASN1_item_i2d_fp(&TS_TST_INFO_it, fp, a);
crypto/libressl/crypto/ts/ts_asn1.c
663
d2i_TS_RESP_fp(FILE *fp, TS_RESP **a)
crypto/libressl/crypto/ts/ts_asn1.c
665
return ASN1_item_d2i_fp(&TS_RESP_it, fp, a);
crypto/libressl/crypto/ts/ts_asn1.c
669
i2d_TS_RESP_fp(FILE *fp, TS_RESP *a)
crypto/libressl/crypto/ts/ts_asn1.c
671
return ASN1_item_i2d_fp(&TS_RESP_it, fp, a);
crypto/libressl/crypto/x509/x509_prn.c
217
X509V3_EXT_print_fp(FILE *fp, X509_EXTENSION *ext, int flag, int indent)
crypto/libressl/crypto/x509/x509_prn.c
222
if (!(bio_tmp = BIO_new_fp(fp, BIO_NOCLOSE)))
crypto/libressl/crypto/x509/x_all.c
115
d2i_X509_CRL_fp(FILE *fp, X509_CRL **crl)
crypto/libressl/crypto/x509/x_all.c
117
return ASN1_item_d2i_fp(&X509_CRL_it, fp, crl);
crypto/libressl/crypto/x509/x_all.c
121
i2d_X509_CRL_fp(FILE *fp, X509_CRL *crl)
crypto/libressl/crypto/x509/x_all.c
123
return ASN1_item_i2d_fp(&X509_CRL_it, fp, crl);
crypto/libressl/crypto/x509/x_all.c
139
d2i_PKCS7_fp(FILE *fp, PKCS7 **p7)
crypto/libressl/crypto/x509/x_all.c
141
return ASN1_item_d2i_fp(&PKCS7_it, fp, p7);
crypto/libressl/crypto/x509/x_all.c
145
i2d_PKCS7_fp(FILE *fp, PKCS7 *p7)
crypto/libressl/crypto/x509/x_all.c
147
return ASN1_item_i2d_fp(&PKCS7_it, fp, p7);
crypto/libressl/crypto/x509/x_all.c
163
d2i_X509_REQ_fp(FILE *fp, X509_REQ **req)
crypto/libressl/crypto/x509/x_all.c
165
return ASN1_item_d2i_fp(&X509_REQ_it, fp, req);
crypto/libressl/crypto/x509/x_all.c
169
i2d_X509_REQ_fp(FILE *fp, X509_REQ *req)
crypto/libressl/crypto/x509/x_all.c
171
return ASN1_item_i2d_fp(&X509_REQ_it, fp, req);
crypto/libressl/crypto/x509/x_all.c
188
d2i_RSAPrivateKey_fp(FILE *fp, RSA **rsa)
crypto/libressl/crypto/x509/x_all.c
190
return ASN1_item_d2i_fp(&RSAPrivateKey_it, fp, rsa);
crypto/libressl/crypto/x509/x_all.c
194
i2d_RSAPrivateKey_fp(FILE *fp, RSA *rsa)
crypto/libressl/crypto/x509/x_all.c
196
return ASN1_item_i2d_fp(&RSAPrivateKey_it, fp, rsa);
crypto/libressl/crypto/x509/x_all.c
212
d2i_RSAPublicKey_fp(FILE *fp, RSA **rsa)
crypto/libressl/crypto/x509/x_all.c
214
return ASN1_item_d2i_fp(&RSAPublicKey_it, fp, rsa);
crypto/libressl/crypto/x509/x_all.c
218
i2d_RSAPublicKey_fp(FILE *fp, RSA *rsa)
crypto/libressl/crypto/x509/x_all.c
220
return ASN1_item_i2d_fp(&RSAPublicKey_it, fp, rsa);
crypto/libressl/crypto/x509/x_all.c
238
d2i_DSAPrivateKey_fp(FILE *fp, DSA **dsa)
crypto/libressl/crypto/x509/x_all.c
240
return ASN1_item_d2i_fp(&DSAPrivateKey_it, fp, dsa);
crypto/libressl/crypto/x509/x_all.c
244
i2d_DSAPrivateKey_fp(FILE *fp, DSA *dsa)
crypto/libressl/crypto/x509/x_all.c
246
return ASN1_item_i2d_fp(&DSAPrivateKey_it, fp, dsa);
crypto/libressl/crypto/x509/x_all.c
264
d2i_ECPrivateKey_fp(FILE *fp, EC_KEY **eckey)
crypto/libressl/crypto/x509/x_all.c
266
return ASN1_d2i_fp_of(EC_KEY, EC_KEY_new, d2i_ECPrivateKey, fp, eckey);
crypto/libressl/crypto/x509/x_all.c
270
i2d_ECPrivateKey_fp(FILE *fp, EC_KEY *eckey)
crypto/libressl/crypto/x509/x_all.c
272
return ASN1_i2d_fp_of(EC_KEY, i2d_ECPrivateKey, fp, eckey);
crypto/libressl/crypto/x509/x_all.c
289
d2i_PKCS8_fp(FILE *fp, X509_SIG **p8)
crypto/libressl/crypto/x509/x_all.c
291
return ASN1_item_d2i_fp(&X509_SIG_it, fp, p8);
crypto/libressl/crypto/x509/x_all.c
295
i2d_PKCS8_fp(FILE *fp, X509_SIG *p8)
crypto/libressl/crypto/x509/x_all.c
297
return ASN1_item_i2d_fp(&X509_SIG_it, fp, p8);
crypto/libressl/crypto/x509/x_all.c
315
d2i_PKCS8_PRIV_KEY_INFO_fp(FILE *fp, PKCS8_PRIV_KEY_INFO **p8inf)
crypto/libressl/crypto/x509/x_all.c
317
return ASN1_item_d2i_fp(&PKCS8_PRIV_KEY_INFO_it, fp,
crypto/libressl/crypto/x509/x_all.c
322
i2d_PKCS8_PRIV_KEY_INFO_fp(FILE *fp, PKCS8_PRIV_KEY_INFO *p8inf)
crypto/libressl/crypto/x509/x_all.c
324
return ASN1_item_i2d_fp(&PKCS8_PRIV_KEY_INFO_it, fp,
crypto/libressl/crypto/x509/x_all.c
342
d2i_PrivateKey_fp(FILE *fp, EVP_PKEY **a)
crypto/libressl/crypto/x509/x_all.c
345
fp, a);
crypto/libressl/crypto/x509/x_all.c
349
i2d_PrivateKey_fp(FILE *fp, EVP_PKEY *pkey)
crypto/libressl/crypto/x509/x_all.c
351
return ASN1_i2d_fp_of(EVP_PKEY, i2d_PrivateKey, fp, pkey);
crypto/libressl/crypto/x509/x_all.c
369
i2d_PKCS8PrivateKeyInfo_fp(FILE *fp, EVP_PKEY *key)
crypto/libressl/crypto/x509/x_all.c
376
ret = i2d_PKCS8_PRIV_KEY_INFO_fp(fp, p8inf);
crypto/libressl/crypto/x509/x_all.c
91
d2i_X509_fp(FILE *fp, X509 **x509)
crypto/libressl/crypto/x509/x_all.c
93
return ASN1_item_d2i_fp(&X509_it, fp, x509);
crypto/libressl/crypto/x509/x_all.c
97
i2d_X509_fp(FILE *fp, X509 *x509)
crypto/libressl/crypto/x509/x_all.c
99
return ASN1_item_i2d_fp(&X509_it, fp, x509);
crypto/libressl/include/openssl/asn1.h
806
int ASN1_STRING_print_ex_fp(FILE *fp, const ASN1_STRING *str,
crypto/libressl/include/openssl/asn1.h
834
int ASN1_UTCTIME_print(BIO *fp, const ASN1_UTCTIME *a);
crypto/libressl/include/openssl/asn1.h
835
int ASN1_GENERALIZEDTIME_print(BIO *fp, const ASN1_GENERALIZEDTIME *a);
crypto/libressl/include/openssl/asn1.h
836
int ASN1_TIME_print(BIO *fp, const ASN1_TIME *a);
crypto/libressl/include/openssl/bio.h
433
#define BIO_set_fp(b,fp,c) BIO_ctrl(b,BIO_C_SET_FILE_PTR,c,(char *)fp)
crypto/libressl/include/openssl/bio.h
576
long BIO_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp);
crypto/libressl/include/openssl/bio.h
630
int BIO_dump_fp(FILE *fp, const char *s, int len);
crypto/libressl/include/openssl/bio.h
631
int BIO_dump_indent_fp(FILE *fp, const char *s, int len, int indent);
crypto/libressl/include/openssl/bn.h
446
int BN_print_fp(FILE *fp, const BIGNUM *a);
crypto/libressl/include/openssl/bn.h
447
int BN_print(BIO *fp, const BIGNUM *a);
crypto/libressl/include/openssl/cms.h
141
CMS_ContentInfo *PEM_read_CMS(FILE *fp, CMS_ContentInfo **x,
crypto/libressl/include/openssl/cms.h
144
int PEM_write_CMS(FILE *fp, const CMS_ContentInfo *x);
crypto/libressl/include/openssl/conf.h
124
LHASH_OF(CONF_VALUE) *CONF_load_fp(LHASH_OF(CONF_VALUE) *conf, FILE *fp,
crypto/libressl/include/openssl/conf.h
156
int NCONF_load_fp(CONF *conf, FILE *fp, long *eline);
crypto/libressl/include/openssl/dh.h
125
DH *d2i_DHparams_fp(FILE *fp, DH **a);
crypto/libressl/include/openssl/dh.h
126
int i2d_DHparams_fp(FILE *fp, DH *a);
crypto/libressl/include/openssl/dh.h
180
int DHparams_print_fp(FILE *fp, const DH *x);
crypto/libressl/include/openssl/dsa.h
116
DSA *d2i_DSAparams_fp(FILE *fp, DSA **a);
crypto/libressl/include/openssl/dsa.h
117
int i2d_DSAparams_fp(FILE *fp, DSA *a);
crypto/libressl/include/openssl/dsa.h
187
int DSAparams_print_fp(FILE *fp, const DSA *x);
crypto/libressl/include/openssl/ec.h
721
#define d2i_ECPKParameters_fp(fp,x) (EC_GROUP *)ASN1_d2i_fp(NULL, \
crypto/libressl/include/openssl/ec.h
722
(char *(*)())d2i_ECPKParameters,(fp),(unsigned char **)(x))
crypto/libressl/include/openssl/ec.h
723
#define i2d_ECPKParameters_fp(fp,x) ASN1_i2d_fp(i2d_ECPKParameters,(fp), \
crypto/libressl/include/openssl/ec.h
729
int ECPKParameters_print_fp(FILE *fp, const EC_GROUP *x, int off);
crypto/libressl/include/openssl/ec.h
969
int ECParameters_print_fp(FILE *fp, const EC_KEY *key);
crypto/libressl/include/openssl/ec.h
977
int EC_KEY_print_fp(FILE *fp, const EC_KEY *key, int off);
crypto/libressl/include/openssl/err.h
382
void ERR_print_errors_fp(FILE *fp);
crypto/libressl/include/openssl/pem.h
202
type *PEM_read_##name(FILE *fp, type **x, pem_password_cb *cb, void *u)\
crypto/libressl/include/openssl/pem.h
204
return PEM_ASN1_read((d2i_of_void *)d2i_##asn1, str,fp,(void **)x,cb,u); \
crypto/libressl/include/openssl/pem.h
208
int PEM_write_##name(FILE *fp, type *x) \
crypto/libressl/include/openssl/pem.h
210
return PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,x,NULL,NULL,0,NULL,NULL); \
crypto/libressl/include/openssl/pem.h
214
int PEM_write_##name(FILE *fp, const type *x) \
crypto/libressl/include/openssl/pem.h
216
return PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,(void *)x,NULL,NULL,0,NULL,NULL); \
crypto/libressl/include/openssl/pem.h
220
int PEM_write_##name(FILE *fp, type *x, const EVP_CIPHER *enc, \
crypto/libressl/include/openssl/pem.h
224
return PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,x,enc,kstr,klen,cb,u); \
crypto/libressl/include/openssl/pem.h
228
int PEM_write_##name(FILE *fp, type *x, const EVP_CIPHER *enc, \
crypto/libressl/include/openssl/pem.h
232
return PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,x,enc,kstr,klen,cb,u); \
crypto/libressl/include/openssl/pem.h
306
type *PEM_read_##name(FILE *fp, type **x, pem_password_cb *cb, void *u);
crypto/libressl/include/openssl/pem.h
309
int PEM_write_##name(FILE *fp, type *x);
crypto/libressl/include/openssl/pem.h
312
int PEM_write_##name(FILE *fp, const type *x);
crypto/libressl/include/openssl/pem.h
315
int PEM_write_##name(FILE *fp, type *x, const EVP_CIPHER *enc, \
crypto/libressl/include/openssl/pem.h
395
int PEM_read(FILE *fp, char **name, char **header,
crypto/libressl/include/openssl/pem.h
397
int PEM_write(FILE *fp, const char *name, const char *hdr,
crypto/libressl/include/openssl/pem.h
399
void * PEM_ASN1_read(d2i_of_void *d2i, const char *name, FILE *fp, void **x,
crypto/libressl/include/openssl/pem.h
401
int PEM_ASN1_write(i2d_of_void *i2d, const char *name, FILE *fp,
crypto/libressl/include/openssl/pem.h
404
STACK_OF(X509_INFO) * PEM_X509_INFO_read(FILE *fp, STACK_OF(X509_INFO) *sk,
crypto/libressl/include/openssl/pem.h
486
int i2d_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc,
crypto/libressl/include/openssl/pem.h
489
int i2d_PKCS8PrivateKey_nid_fp(FILE *fp, EVP_PKEY *x, int nid,
crypto/libressl/include/openssl/pem.h
492
int PEM_write_PKCS8PrivateKey_nid(FILE *fp, EVP_PKEY *x, int nid,
crypto/libressl/include/openssl/pem.h
496
EVP_PKEY *d2i_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY **x, pem_password_cb *cb,
crypto/libressl/include/openssl/pem.h
499
int PEM_write_PKCS8PrivateKey(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc,
crypto/libressl/include/openssl/pkcs12.h
277
int i2d_PKCS12_fp(FILE *fp, PKCS12 *p12);
crypto/libressl/include/openssl/pkcs12.h
279
PKCS12 *d2i_PKCS12_fp(FILE *fp, PKCS12 **p12);
crypto/libressl/include/openssl/pkcs7.h
279
PKCS7 *d2i_PKCS7_fp(FILE *fp, PKCS7 **p7);
crypto/libressl/include/openssl/pkcs7.h
280
int i2d_PKCS7_fp(FILE *fp, PKCS7 *p7);
crypto/libressl/include/openssl/rsa.h
299
int RSA_print_fp(FILE *fp, const RSA *r, int offset);
crypto/libressl/include/openssl/ssl.h
1238
int SSL_SESSION_print_fp(FILE *fp, const SSL_SESSION *ses);
crypto/libressl/include/openssl/ssl.h
1239
int SSL_SESSION_print(BIO *fp, const SSL_SESSION *ses);
crypto/libressl/include/openssl/ssl.h
777
SSL_SESSION *PEM_read_SSL_SESSION(FILE *fp, SSL_SESSION **x,
crypto/libressl/include/openssl/ssl.h
780
int PEM_write_SSL_SESSION(FILE *fp, SSL_SESSION *x);
crypto/libressl/include/openssl/ts.h
142
TS_REQ *d2i_TS_REQ_fp(FILE *fp, TS_REQ **a);
crypto/libressl/include/openssl/ts.h
143
int i2d_TS_REQ_fp(FILE *fp, TS_REQ *a);
crypto/libressl/include/openssl/ts.h
144
TS_REQ *d2i_TS_REQ_bio(BIO *fp, TS_REQ **a);
crypto/libressl/include/openssl/ts.h
145
int i2d_TS_REQ_bio(BIO *fp, TS_REQ *a);
crypto/libressl/include/openssl/ts.h
155
TS_MSG_IMPRINT *d2i_TS_MSG_IMPRINT_fp(FILE *fp, TS_MSG_IMPRINT **a);
crypto/libressl/include/openssl/ts.h
156
int i2d_TS_MSG_IMPRINT_fp(FILE *fp, TS_MSG_IMPRINT *a);
crypto/libressl/include/openssl/ts.h
157
TS_MSG_IMPRINT *d2i_TS_MSG_IMPRINT_bio(BIO *fp, TS_MSG_IMPRINT **a);
crypto/libressl/include/openssl/ts.h
158
int i2d_TS_MSG_IMPRINT_bio(BIO *fp, TS_MSG_IMPRINT *a);
crypto/libressl/include/openssl/ts.h
167
TS_RESP *d2i_TS_RESP_fp(FILE *fp, TS_RESP **a);
crypto/libressl/include/openssl/ts.h
168
int i2d_TS_RESP_fp(FILE *fp, TS_RESP *a);
crypto/libressl/include/openssl/ts.h
169
TS_RESP *d2i_TS_RESP_bio(BIO *fp, TS_RESP **a);
crypto/libressl/include/openssl/ts.h
170
int i2d_TS_RESP_bio(BIO *fp, TS_RESP *a);
crypto/libressl/include/openssl/ts.h
186
TS_TST_INFO *d2i_TS_TST_INFO_fp(FILE *fp, TS_TST_INFO **a);
crypto/libressl/include/openssl/ts.h
187
int i2d_TS_TST_INFO_fp(FILE *fp, TS_TST_INFO *a);
crypto/libressl/include/openssl/ts.h
188
TS_TST_INFO *d2i_TS_TST_INFO_bio(BIO *fp, TS_TST_INFO **a);
crypto/libressl/include/openssl/ts.h
189
int i2d_TS_TST_INFO_bio(BIO *fp, TS_TST_INFO *a);
crypto/libressl/include/openssl/x509.h
475
X509 *d2i_X509_fp(FILE *fp, X509 **x509);
crypto/libressl/include/openssl/x509.h
476
int i2d_X509_fp(FILE *fp,X509 *x509);
crypto/libressl/include/openssl/x509.h
477
X509_CRL *d2i_X509_CRL_fp(FILE *fp,X509_CRL **crl);
crypto/libressl/include/openssl/x509.h
478
int i2d_X509_CRL_fp(FILE *fp,X509_CRL *crl);
crypto/libressl/include/openssl/x509.h
479
X509_REQ *d2i_X509_REQ_fp(FILE *fp,X509_REQ **req);
crypto/libressl/include/openssl/x509.h
480
int i2d_X509_REQ_fp(FILE *fp,X509_REQ *req);
crypto/libressl/include/openssl/x509.h
482
RSA *d2i_RSAPrivateKey_fp(FILE *fp,RSA **rsa);
crypto/libressl/include/openssl/x509.h
483
int i2d_RSAPrivateKey_fp(FILE *fp,RSA *rsa);
crypto/libressl/include/openssl/x509.h
484
RSA *d2i_RSAPublicKey_fp(FILE *fp,RSA **rsa);
crypto/libressl/include/openssl/x509.h
485
int i2d_RSAPublicKey_fp(FILE *fp,RSA *rsa);
crypto/libressl/include/openssl/x509.h
486
RSA *d2i_RSA_PUBKEY_fp(FILE *fp,RSA **rsa);
crypto/libressl/include/openssl/x509.h
487
int i2d_RSA_PUBKEY_fp(FILE *fp,RSA *rsa);
crypto/libressl/include/openssl/x509.h
490
DSA *d2i_DSA_PUBKEY_fp(FILE *fp, DSA **dsa);
crypto/libressl/include/openssl/x509.h
491
int i2d_DSA_PUBKEY_fp(FILE *fp, DSA *dsa);
crypto/libressl/include/openssl/x509.h
492
DSA *d2i_DSAPrivateKey_fp(FILE *fp, DSA **dsa);
crypto/libressl/include/openssl/x509.h
493
int i2d_DSAPrivateKey_fp(FILE *fp, DSA *dsa);
crypto/libressl/include/openssl/x509.h
496
EC_KEY *d2i_EC_PUBKEY_fp(FILE *fp, EC_KEY **eckey);
crypto/libressl/include/openssl/x509.h
497
int i2d_EC_PUBKEY_fp(FILE *fp, EC_KEY *eckey);
crypto/libressl/include/openssl/x509.h
498
EC_KEY *d2i_ECPrivateKey_fp(FILE *fp, EC_KEY **eckey);
crypto/libressl/include/openssl/x509.h
499
int i2d_ECPrivateKey_fp(FILE *fp, EC_KEY *eckey);
crypto/libressl/include/openssl/x509.h
501
X509_SIG *d2i_PKCS8_fp(FILE *fp,X509_SIG **p8);
crypto/libressl/include/openssl/x509.h
502
int i2d_PKCS8_fp(FILE *fp,X509_SIG *p8);
crypto/libressl/include/openssl/x509.h
503
PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_fp(FILE *fp,
crypto/libressl/include/openssl/x509.h
505
int i2d_PKCS8_PRIV_KEY_INFO_fp(FILE *fp,PKCS8_PRIV_KEY_INFO *p8inf);
crypto/libressl/include/openssl/x509.h
506
int i2d_PKCS8PrivateKeyInfo_fp(FILE *fp, EVP_PKEY *key);
crypto/libressl/include/openssl/x509.h
507
int i2d_PrivateKey_fp(FILE *fp, EVP_PKEY *pkey);
crypto/libressl/include/openssl/x509.h
508
EVP_PKEY *d2i_PrivateKey_fp(FILE *fp, EVP_PKEY **a);
crypto/libressl/include/openssl/x509.h
509
int i2d_PUBKEY_fp(FILE *fp, EVP_PKEY *pkey);
crypto/libressl/include/openssl/x509.h
510
EVP_PKEY *d2i_PUBKEY_fp(FILE *fp, EVP_PKEY **a);
crypto/libressl/include/openssl/x509.h
887
int X509_NAME_print_ex_fp(FILE *fp, const X509_NAME *nm, int indent,
crypto/libressl/ssl/bio_ssl.c
466
ssl_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
crypto/libressl/ssl/bio_ssl.c
480
(void (*)(const SSL *, int, int))fp);
crypto/libressl/ssl/bio_ssl.c
484
ret = BIO_callback_ctrl(ssl->rbio, cmd, fp);
crypto/libressl/ssl/bio_ssl.c
78
static long ssl_callback_ctrl(BIO *h, int cmd, BIO_info_cb *fp);
crypto/libressl/ssl/s3_lib.c
2171
ssl3_callback_ctrl(SSL *s, int cmd, void (*fp)(void))
crypto/libressl/ssl/s3_lib.c
2179
s->cert->dhe_params_cb = (DH *(*)(SSL *, int, int))fp;
crypto/libressl/ssl/s3_lib.c
2187
unsigned char *, int, void *))fp;
crypto/libressl/ssl/s3_lib.c
2502
ssl3_ctx_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp)(void))
crypto/libressl/ssl/s3_lib.c
2511
(DH *(*)(SSL *, int, int))fp;
crypto/libressl/ssl/s3_lib.c
2519
(int (*)(SSL *, int *, void *))fp;
crypto/libressl/ssl/s3_lib.c
2523
*(int (**)(SSL *, void *))fp = ctx->internal->tlsext_status_cb;
crypto/libressl/ssl/s3_lib.c
2527
ctx->internal->tlsext_status_cb = (int (*)(SSL *, void *))fp;
crypto/libressl/ssl/s3_lib.c
2532
unsigned char *, EVP_CIPHER_CTX *, HMAC_CTX *, int))fp;
crypto/libressl/ssl/ssl_lib.c
1325
SSL_callback_ctrl(SSL *s, int cmd, void (*fp)(void))
crypto/libressl/ssl/ssl_lib.c
1329
s->internal->msg_callback = (ssl_msg_callback_fn *)(fp);
crypto/libressl/ssl/ssl_lib.c
1333
return (ssl3_callback_ctrl(s, cmd, fp));
crypto/libressl/ssl/ssl_lib.c
1423
SSL_CTX_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp)(void))
crypto/libressl/ssl/ssl_lib.c
1427
ctx->internal->msg_callback = (ssl_msg_callback_fn *)fp;
crypto/libressl/ssl/ssl_lib.c
1431
return (ssl3_ctx_callback_ctrl(ctx, cmd, fp));
crypto/libressl/ssl/ssl_locl.h
1408
long ssl3_callback_ctrl(SSL *s, int cmd, void (*fp)(void));
crypto/libressl/ssl/ssl_locl.h
1409
long ssl3_ctx_callback_ctrl(SSL_CTX *s, int cmd, void (*fp)(void));
crypto/libressl/ssl/ssl_sess.c
1204
PEM_write_SSL_SESSION(FILE *fp, SSL_SESSION *x)
crypto/libressl/ssl/ssl_sess.c
1207
PEM_STRING_SSL_SESSION, fp, x, NULL, NULL, 0, NULL, NULL);
crypto/libressl/ssl/ssl_sess.c
1211
PEM_read_SSL_SESSION(FILE *fp, SSL_SESSION **x, pem_password_cb *cb, void *u)
crypto/libressl/ssl/ssl_sess.c
1214
PEM_STRING_SSL_SESSION, fp, (void **)x, cb, u);
crypto/libressl/ssl/ssl_txt.c
102
BIO_set_fp(b, fp, BIO_NOCLOSE);
crypto/libressl/ssl/ssl_txt.c
93
SSL_SESSION_print_fp(FILE *fp, const SSL_SESSION *x)
crypto/libressl/tls/tls_util.c
152
FILE *fp;
crypto/libressl/tls/tls_util.c
184
if ((fp = fdopen(fd, "r")) == NULL)
crypto/libressl/tls/tls_util.c
188
key = PEM_read_PrivateKey(fp, NULL, tls_password_cb, password);
crypto/libressl/tls/tls_util.c
189
fclose(fp);
crypto/openssh/auth.c
233
char *fp, *cafp, *ret = NULL;
crypto/openssh/auth.c
239
fp = sshkey_fingerprint(key,
crypto/openssh/auth.c
244
sshkey_type(key), fp == NULL ? "(null)" : fp,
crypto/openssh/auth.c
251
free(fp);
crypto/openssh/auth.c
254
fp = sshkey_fingerprint(key, options.fingerprint_hash,
crypto/openssh/auth.c
257
fp == NULL ? "(null)" : fp,
crypto/openssh/auth.c
260
free(fp);
crypto/openssh/auth.c
530
char *fp = NULL;
crypto/openssh/auth.c
535
if ((fp = sshkey_fingerprint(key, options.fingerprint_hash,
crypto/openssh/auth.c
548
sshkey_type(key), fp, options.revoked_keys_file);
crypto/openssh/auth.c
552
"revoked keys file %s", sshkey_type(key), fp,
crypto/openssh/auth.c
561
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
80
char *ret, *fp = sshkey_fingerprint(key,
crypto/openssh/auth2-pubkey.c
83
xasprintf(&ret, "%s %s", sshkey_type(key), fp);
crypto/openssh/auth2-pubkey.c
84
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
2239
char *fp, *response;
crypto/openssh/clientloop.c
2246
if ((fp = sshkey_fingerprint(ctx->keys[i],
crypto/openssh/clientloop.c
2252
sshkey_type(ctx->keys[i]), fp);
crypto/openssh/clientloop.c
2254
free(fp);
crypto/openssh/clientloop.c
2257
if ((fp = sshkey_fingerprint(ctx->old_keys[i],
crypto/openssh/clientloop.c
2263
sshkey_type(ctx->old_keys[i]), fp);
crypto/openssh/clientloop.c
2265
free(fp);
crypto/openssh/clientloop.c
2440
char *fp;
crypto/openssh/clientloop.c
2466
fp = sshkey_fingerprint(key, options.fingerprint_hash,
crypto/openssh/clientloop.c
2468
debug3_f("received %s key %s", sshkey_type(key), fp);
crypto/openssh/clientloop.c
2469
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
1303
char *fp, timestamp[64];
crypto/openssh/krl.c
1312
asmprintf(&fp, INT_MAX, &r, "%s", krl->comment);
crypto/openssh/krl.c
1313
fprintf(f, "# Comment: %s\n", fp);
crypto/openssh/krl.c
1314
free(fp);
crypto/openssh/krl.c
1324
if ((fp = sshkey_fingerprint(key, SSH_FP_HASH_DEFAULT,
crypto/openssh/krl.c
1330
fprintf(f, "hash: %s # %s\n", fp, sshkey_ssh_name(key));
crypto/openssh/krl.c
1331
free(fp);
crypto/openssh/krl.c
1335
fp = tohex(rb->blob, rb->len);
crypto/openssh/krl.c
1336
fprintf(f, "hash: SHA256:%s\n", fp);
crypto/openssh/krl.c
1337
free(fp);
crypto/openssh/krl.c
1344
fp = tohex(rb->blob, rb->len);
crypto/openssh/krl.c
1345
fprintf(f, "# hash SHA1:%s\n", fp);
crypto/openssh/krl.c
1346
free(fp);
crypto/openssh/krl.c
1354
if ((fp = sshkey_fingerprint(rc->ca_key,
crypto/openssh/krl.c
1361
sshkey_ssh_name(rc->ca_key), fp);
crypto/openssh/krl.c
1362
free(fp);
crypto/openssh/krl.c
1380
asmprintf(&fp, INT_MAX, &r, "%s", rki->key_id);
crypto/openssh/krl.c
1381
fprintf(f, "id: %s\n", fp);
crypto/openssh/krl.c
1382
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
1413
char *sigalg = NULL, *fp = NULL;
crypto/openssh/monitor.c
1458
if ((fp = sshkey_fingerprint(key, options.fingerprint_hash,
crypto/openssh/monitor.c
1478
sshkey_type(key), fp,
crypto/openssh/monitor.c
1490
"not met ", sshkey_type(key), fp,
crypto/openssh/monitor.c
1519
free(fp);
crypto/openssh/scp.c
2128
static FILE *fp;
crypto/openssh/scp.c
2132
if (fp != NULL || (remout != -1 && (fp = fdopen(remout, "w")))) {
crypto/openssh/scp.c
2133
(void) fprintf(fp, "%c", 0x01);
crypto/openssh/scp.c
2134
(void) fprintf(fp, "scp: ");
crypto/openssh/scp.c
2136
(void) vfprintf(fp, fmt, ap);
crypto/openssh/scp.c
2138
(void) fprintf(fp, "\n");
crypto/openssh/scp.c
2139
(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
1076
char *fp;
crypto/openssh/ssh-agent.c
1106
if ((fp = sshkey_fingerprint(k, SSH_FP_HASH_DEFAULT,
crypto/openssh/ssh-agent.c
1112
dch->hostname, key_is_ca ? "CA " : "", sshkey_type(k), fp);
crypto/openssh/ssh-agent.c
1113
free(fp);
crypto/openssh/ssh-agent.c
1351
char *fp, *comment = NULL, *sk_provider = NULL;
crypto/openssh/ssh-agent.c
1438
if ((fp = sshkey_fingerprint(k, SSH_FP_HASH_DEFAULT,
crypto/openssh/ssh-agent.c
1443
sshkey_ssh_name(k), fp, comment, seconds, confirm,
crypto/openssh/ssh-agent.c
1445
free(fp);
crypto/openssh/ssh-agent.c
1693
char *fp = NULL;
crypto/openssh/ssh-agent.c
1706
if ((fp = sshkey_fingerprint(key, SSH_FP_HASH_DEFAULT,
crypto/openssh/ssh-agent.c
1712
error_fr(r, "sshkey_verify for %s %s", sshkey_type(key), fp);
crypto/openssh/ssh-agent.c
1727
sshkey_type(key), fp);
crypto/openssh/ssh-agent.c
1732
"for %s %s", sshkey_type(key), fp);
crypto/openssh/ssh-agent.c
1749
debug_f("recorded %s %s (slot %zu of %d)", sshkey_type(key), fp, i,
crypto/openssh/ssh-agent.c
1762
free(fp);
crypto/openssh/ssh-agent.c
302
char *fp;
crypto/openssh/ssh-agent.c
309
fp = NULL;
crypto/openssh/ssh-agent.c
311
(fp = sshkey_fingerprint(dch->keys[i],
crypto/openssh/ssh-agent.c
317
dch->keys[i] == NULL ? "none" : fp,
crypto/openssh/ssh-agent.c
319
free(fp);
crypto/openssh/ssh-agent.c
364
char *fp;
crypto/openssh/ssh-agent.c
369
if ((fp = sshkey_fingerprint(key, SSH_FP_HASH_DEFAULT,
crypto/openssh/ssh-agent.c
373
tag, hostname, sshkey_type(key), fp, dch->nkeys);
crypto/openssh/ssh-agent.c
374
free(fp);
crypto/openssh/ssh-agent.c
379
if ((fp = sshkey_fingerprint(dch->keys[i], SSH_FP_HASH_DEFAULT,
crypto/openssh/ssh-agent.c
384
sshkey_type(dch->keys[i]), fp);
crypto/openssh/ssh-agent.c
385
free(fp);
crypto/openssh/ssh-agent.c
624
char *fp;
crypto/openssh/ssh-agent.c
631
if ((fp = sshkey_fingerprint(id->key, SSH_FP_HASH_DEFAULT,
crypto/openssh/ssh-agent.c
635
sshkey_ssh_name(id->key), fp);
crypto/openssh/ssh-agent.c
638
free(fp);
crypto/openssh/ssh-agent.c
843
char *fp = NULL, *pin = NULL, *prompt = NULL;
crypto/openssh/ssh-agent.c
866
if ((fp = sshkey_fingerprint(key, SSH_FP_HASH_DEFAULT,
crypto/openssh/ssh-agent.c
897
sshkey_type(id->key), fp);
crypto/openssh/ssh-agent.c
935
sshkey_type(id->key), fp,
crypto/openssh/ssh-agent.c
953
sshkey_type(id->key), fp);
crypto/openssh/ssh-agent.c
982
free(fp);
crypto/openssh/ssh-keygen.c
1248
char *fp = NULL, *ra = NULL;
crypto/openssh/ssh-keygen.c
1281
fp = sshkey_fingerprint(l->key, fptype, rep);
crypto/openssh/ssh-keygen.c
1284
if (fp == NULL || ra == NULL)
crypto/openssh/ssh-keygen.c
1287
sshkey_type(l->key), fp,
crypto/openssh/ssh-keygen.c
1293
free(fp);
crypto/openssh/ssh-keygen.c
2588
char *wfile = NULL, *asig = NULL, *fp = NULL;
crypto/openssh/ssh-keygen.c
2606
if ((fp = sshkey_fingerprint(signkey, fingerprint_hash,
crypto/openssh/ssh-keygen.c
2610
sshkey_type(signkey), fp);
crypto/openssh/ssh-keygen.c
2611
free(fp);
crypto/openssh/ssh-keygen.c
2808
char *fp = NULL;
crypto/openssh/ssh-keygen.c
2830
if ((fp = sshkey_fingerprint(sign_key, fingerprint_hash,
crypto/openssh/ssh-keygen.c
2833
debug("Valid (unverified) signature from key %s", fp);
crypto/openssh/ssh-keygen.c
2838
free(fp);
crypto/openssh/ssh-keygen.c
2839
fp = NULL;
crypto/openssh/ssh-keygen.c
2858
if ((fp = sshkey_fingerprint(sign_key, fingerprint_hash,
crypto/openssh/ssh-keygen.c
2863
sig_namespace, sshkey_type(sign_key), fp);
crypto/openssh/ssh-keygen.c
2868
sshkey_type(sign_key), fp);
crypto/openssh/ssh-keygen.c
2887
free(fp);
crypto/openssh/ssh-keygen.c
3167
char *fp, *pin = NULL, *pass = NULL, *path, *pubpath;
crypto/openssh/ssh-keygen.c
3198
if ((fp = sshkey_fingerprint(key, fingerprint_hash,
crypto/openssh/ssh-keygen.c
3202
sshkey_type(key), fp, key->sk_application, key->sk_flags);
crypto/openssh/ssh-keygen.c
3345
char *rr_hostname = NULL, *ep, *fp, *ra;
crypto/openssh/ssh-keygen.c
3944
fp = sshkey_fingerprint(public, fingerprint_hash,
crypto/openssh/ssh-keygen.c
3948
if (fp == NULL || ra == NULL)
crypto/openssh/ssh-keygen.c
3953
printf("%s %s\n", fp, comment);
crypto/openssh/ssh-keygen.c
3957
free(fp);
crypto/openssh/ssh-keygen.c
620
get_line(FILE *fp, char *line, size_t len)
crypto/openssh/ssh-keygen.c
626
while ((c = fgetc(fp)) != EOF) {
crypto/openssh/ssh-keygen.c
631
c = fgetc(fp);
crypto/openssh/ssh-keygen.c
632
if (c != EOF && c != '\n' && ungetc(c, fp) == EOF)
crypto/openssh/ssh-keygen.c
653
FILE *fp;
crypto/openssh/ssh-keygen.c
657
if ((fp = fopen(identity_file, "r")) == NULL)
crypto/openssh/ssh-keygen.c
660
while ((blen = get_line(fp, line, sizeof(line))) != -1) {
crypto/openssh/ssh-keygen.c
694
fclose(fp);
crypto/openssh/ssh-keygen.c
701
FILE *fp;
crypto/openssh/ssh-keygen.c
703
if ((fp = fopen(identity_file, "r")) == NULL)
crypto/openssh/ssh-keygen.c
705
if ((pubkey = PEM_read_PUBKEY(fp, NULL, NULL, NULL)) == NULL) {
crypto/openssh/ssh-keygen.c
709
fclose(fp);
crypto/openssh/ssh-keygen.c
745
FILE *fp;
crypto/openssh/ssh-keygen.c
748
if ((fp = fopen(identity_file, "r")) == NULL)
crypto/openssh/ssh-keygen.c
750
if ((rsa = PEM_read_RSAPublicKey(fp, NULL, NULL, NULL)) != NULL) {
crypto/openssh/ssh-keygen.c
755
fclose(fp);
crypto/openssh/ssh-keygen.c
857
char *fp, *ra, **comments = NULL;
crypto/openssh/ssh-keygen.c
868
fp = sshkey_fingerprint(keys[i], fptype, rep);
crypto/openssh/ssh-keygen.c
871
if (fp == NULL || ra == NULL)
crypto/openssh/ssh-keygen.c
874
fp, sshkey_type(keys[i]));
crypto/openssh/ssh-keygen.c
878
free(fp);
crypto/openssh/ssh-keygen.c
914
char *fp = NULL, *ra = NULL;
crypto/openssh/ssh-keygen.c
920
fp = sshkey_fingerprint(public, fptype, rep);
crypto/openssh/ssh-keygen.c
922
if (fp == NULL || ra == NULL)
crypto/openssh/ssh-keygen.c
924
mprintf("%u %s %s (%s)\n", sshkey_size(public), fp,
crypto/openssh/ssh-keygen.c
929
free(fp);
crypto/openssh/ssh-keyscan.c
684
FILE *fp;
crypto/openssh/ssh-keyscan.c
818
fp = stdin;
crypto/openssh/ssh-keyscan.c
819
else if ((fp = fopen(argv[j], "r")) == NULL)
crypto/openssh/ssh-keyscan.c
821
fp == stdin ? "<stdin>" : argv[j], strerror(errno));
crypto/openssh/ssh-keyscan.c
823
while (getline(&line, &linesize, fp) != -1) {
crypto/openssh/ssh-keyscan.c
842
if (ferror(fp))
crypto/openssh/ssh-keyscan.c
844
fp == stdin ? "<stdin>" : argv[j], strerror(errno));
crypto/openssh/ssh-keyscan.c
846
if (fp != stdin)
crypto/openssh/ssh-keyscan.c
847
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
1090
char *fp;
crypto/openssh/ssh-pkcs11.c
1092
if ((fp = sshkey_fingerprint(key, SSH_FP_HASH_DEFAULT,
crypto/openssh/ssh-pkcs11.c
1098
(u_long)slotidx, sshkey_type(key), fp);
crypto/openssh/ssh-pkcs11.c
1099
free(fp);
crypto/openssh/sshconnect.c
1142
fp = sshkey_fingerprint(host_key,
crypto/openssh/sshconnect.c
1146
if (fp == NULL || ra == NULL)
crypto/openssh/sshconnect.c
1148
logit("Host key fingerprint is %s\n%s", fp, ra);
crypto/openssh/sshconnect.c
1150
free(fp);
crypto/openssh/sshconnect.c
1193
fp = sshkey_fingerprint(host_key,
crypto/openssh/sshconnect.c
1197
if (fp == NULL || ra == NULL)
crypto/openssh/sshconnect.c
1200
type, fp);
crypto/openssh/sshconnect.c
1219
confirmed = confirm(msg1, fp);
crypto/openssh/sshconnect.c
1221
free(fp);
crypto/openssh/sshconnect.c
1476
char valid[64], *fp = NULL, *cafp = NULL;
crypto/openssh/sshconnect.c
1479
if ((fp = sshkey_fingerprint(host_key,
crypto/openssh/sshconnect.c
1497
sshkey_ssh_name(host_key), fp,
crypto/openssh/sshconnect.c
1507
debug("Server host key: %s %s", sshkey_ssh_name(host_key), fp);
crypto/openssh/sshconnect.c
1512
sshkey_type(host_key), fp);
crypto/openssh/sshconnect.c
1525
sshkey_type(host_key), fp,
crypto/openssh/sshconnect.c
1532
fp, options.revoked_host_keys);
crypto/openssh/sshconnect.c
1573
free(fp);
crypto/openssh/sshconnect.c
1637
char *fp, *ra;
crypto/openssh/sshconnect.c
1646
fp = sshkey_fingerprint(found->key,
crypto/openssh/sshconnect.c
1650
if (fp == NULL || ra == NULL)
crypto/openssh/sshconnect.c
1657
sshkey_type(found->key), fp);
crypto/openssh/sshconnect.c
1661
free(fp);
crypto/openssh/sshconnect.c
1670
char *fp;
crypto/openssh/sshconnect.c
1672
fp = sshkey_fingerprint(host_key, options.fingerprint_hash,
crypto/openssh/sshconnect.c
1674
if (fp == NULL)
crypto/openssh/sshconnect.c
1684
sshkey_type(host_key), fp);
crypto/openssh/sshconnect.c
1687
free(fp);
crypto/openssh/sshconnect.c
967
char hostline[1000], *hostp, *fp, *ra;
crypto/openssh/sshconnect2.c
1207
char *fp = NULL, *pin = NULL, *prompt = NULL;
crypto/openssh/sshconnect2.c
1243
if ((fp = sshkey_fingerprint(sign_key,
crypto/openssh/sshconnect2.c
1248
sshkey_type(sign_key), fp);
crypto/openssh/sshconnect2.c
1249
free(fp);
crypto/openssh/sshconnect2.c
1315
char *alg = NULL, *fp = NULL;
crypto/openssh/sshconnect2.c
1326
if ((fp = sshkey_fingerprint(id->key, options.fingerprint_hash,
crypto/openssh/sshconnect2.c
1330
debug3_f("using %s with %s %s", method, sshkey_type(id->key), fp);
crypto/openssh/sshconnect2.c
1393
debug3_f("signing using %s %s", alg, fp);
crypto/openssh/sshconnect2.c
1438
loc, sshkey_type(id->key), fp);
crypto/openssh/sshconnect2.c
1470
free(fp);
crypto/openssh/sshconnect2.c
2132
char *fp = NULL, *chost = NULL, *lname = NULL;
crypto/openssh/sshconnect2.c
2182
if ((fp = sshkey_fingerprint(private, options.fingerprint_hash,
crypto/openssh/sshconnect2.c
2188
sshkey_ssh_name(private), fp, authctxt->active_ktype);
crypto/openssh/sshconnect2.c
2229
sshkey_ssh_name(private), fp);
crypto/openssh/sshconnect2.c
2252
free(fp);
crypto/openssh/sshconnect2.c
656
char *fp = NULL, *ret = NULL;
crypto/openssh/sshconnect2.c
660
fp = sshkey_fingerprint(id->key, options.fingerprint_hash,
crypto/openssh/sshconnect2.c
672
fp ? fp : "",
crypto/openssh/sshconnect2.c
675
free(fp);
crypto/openssh/sshconnect2.c
687
char *pkalg = NULL, *fp = NULL, *ident = NULL;
crypto/openssh/sshconnect2.c
726
fp = sshkey_fingerprint(key, options.fingerprint_hash,
crypto/openssh/sshconnect2.c
729
sshkey_type(key), fp == NULL ? "<ERROR>" : fp);
crypto/openssh/sshconnect2.c
739
free(fp);
crypto/openssh/sshd-session.c
622
char *fp;
crypto/openssh/sshd-session.c
635
fp = sshkey_fingerprint(key, options.fingerprint_hash,
crypto/openssh/sshd-session.c
637
debug3_f("key %d: %s %s", i, sshkey_ssh_name(key), fp);
crypto/openssh/sshd-session.c
638
free(fp);
crypto/openssh/sshd.c
1189
char *fp, *line, *logfile = NULL, **rexec_argv = NULL;
crypto/openssh/sshd.c
1546
if ((fp = sshkey_fingerprint(pubkey, options.fingerprint_hash,
crypto/openssh/sshd.c
1550
key ? "private" : "agent", i, sshkey_ssh_name(pubkey), fp);
crypto/openssh/sshd.c
1551
free(fp);
games/atc/main.c
214
FILE *fp;
games/atc/main.c
221
if ((fp = fopen(games, "r")) == NULL) {
games/atc/main.c
225
if (fgets(line, sizeof(line), fp) == NULL) {
games/atc/main.c
229
fclose(fp);
games/atc/main.c
239
FILE *fp;
games/atc/main.c
247
if ((fp = fopen(games, "r")) == NULL) {
games/atc/main.c
251
while (fgets(line, sizeof(line), fp) != NULL) {
games/atc/main.c
260
fclose(fp);
games/atc/main.c
274
FILE *fp;
games/atc/main.c
281
if ((fp = fopen(games, "r")) == NULL) {
games/atc/main.c
286
while (fgets(line, sizeof(line), fp) != NULL) {
games/atc/main.c
290
fclose(fp);
games/battlestar/save.c
101
fwrite(&WEIGHT, sizeof WEIGHT, 1, fp);
games/battlestar/save.c
102
fwrite(&CUMBER, sizeof CUMBER, 1, fp);
games/battlestar/save.c
103
fwrite(&ourclock, sizeof ourclock, 1, fp);
games/battlestar/save.c
105
fwrite(&tmp, sizeof tmp, 1, fp);
games/battlestar/save.c
107
fwrite(location[n].link, sizeof location[n].link, 1, fp);
games/battlestar/save.c
108
fwrite(location[n].objects, sizeof location[n].objects, 1, fp);
games/battlestar/save.c
110
fwrite(inven, sizeof inven, 1, fp);
games/battlestar/save.c
111
fwrite(wear, sizeof wear, 1, fp);
games/battlestar/save.c
112
fwrite(injuries, sizeof injuries, 1, fp);
games/battlestar/save.c
113
fwrite(notes, sizeof notes, 1, fp);
games/battlestar/save.c
114
fwrite(&direction, sizeof direction, 1, fp);
games/battlestar/save.c
115
fwrite(&position, sizeof position, 1, fp);
games/battlestar/save.c
116
fwrite(&ourtime, sizeof ourtime, 1, fp);
games/battlestar/save.c
117
fwrite(&fuel, sizeof fuel, 1, fp);
games/battlestar/save.c
118
fwrite(&torps, sizeof torps, 1, fp);
games/battlestar/save.c
119
fwrite(&carrying, sizeof carrying, 1, fp);
games/battlestar/save.c
120
fwrite(&encumber, sizeof encumber, 1, fp);
games/battlestar/save.c
121
fwrite(&rythmn, sizeof rythmn, 1, fp);
games/battlestar/save.c
122
fwrite(&followfight, sizeof followfight, 1, fp);
games/battlestar/save.c
123
fwrite(&ate, sizeof ate, 1, fp);
games/battlestar/save.c
124
fwrite(&snooze, sizeof snooze, 1, fp);
games/battlestar/save.c
125
fwrite(&meetgirl, sizeof meetgirl, 1, fp);
games/battlestar/save.c
126
fwrite(&followgod, sizeof followgod, 1, fp);
games/battlestar/save.c
127
fwrite(&godready, sizeof godready, 1, fp);
games/battlestar/save.c
128
fwrite(&win, sizeof win, 1, fp);
games/battlestar/save.c
129
fwrite(&wintime, sizeof wintime, 1, fp);
games/battlestar/save.c
130
fwrite(&matchlight, sizeof matchlight, 1, fp);
games/battlestar/save.c
131
fwrite(&matchcount, sizeof matchcount, 1, fp);
games/battlestar/save.c
132
fwrite(&loved, sizeof loved, 1, fp);
games/battlestar/save.c
133
fwrite(&pleasure, sizeof pleasure, 1, fp);
games/battlestar/save.c
134
fwrite(&power, sizeof power, 1, fp);
games/battlestar/save.c
135
fwrite(&ego, sizeof ego, 1, fp);
games/battlestar/save.c
136
fflush(fp);
games/battlestar/save.c
137
if (ferror(fp))
games/battlestar/save.c
139
fclose(fp);
games/battlestar/save.c
40
FILE *fp;
games/battlestar/save.c
44
if ((fp = fopen(filename, "r")) == 0) {
games/battlestar/save.c
47
fread(&WEIGHT, sizeof WEIGHT, 1, fp);
games/battlestar/save.c
48
fread(&CUMBER, sizeof CUMBER, 1, fp);
games/battlestar/save.c
49
fread(&ourclock, sizeof ourclock, 1, fp);
games/battlestar/save.c
50
fread(&tmp, sizeof tmp, 1, fp);
games/battlestar/save.c
53
fread(location[n].link, sizeof location[n].link, 1, fp);
games/battlestar/save.c
54
fread(location[n].objects, sizeof location[n].objects, 1, fp);
games/battlestar/save.c
56
fread(inven, sizeof inven, 1, fp);
games/battlestar/save.c
57
fread(wear, sizeof wear, 1, fp);
games/battlestar/save.c
58
fread(injuries, sizeof injuries, 1, fp);
games/battlestar/save.c
59
fread(notes, sizeof notes, 1, fp);
games/battlestar/save.c
60
fread(&direction, sizeof direction, 1, fp);
games/battlestar/save.c
61
fread(&position, sizeof position, 1, fp);
games/battlestar/save.c
62
fread(&ourtime, sizeof ourtime, 1, fp);
games/battlestar/save.c
63
fread(&fuel, sizeof fuel, 1, fp);
games/battlestar/save.c
64
fread(&torps, sizeof torps, 1, fp);
games/battlestar/save.c
65
fread(&carrying, sizeof carrying, 1, fp);
games/battlestar/save.c
66
fread(&encumber, sizeof encumber, 1, fp);
games/battlestar/save.c
67
fread(&rythmn, sizeof rythmn, 1, fp);
games/battlestar/save.c
68
fread(&followfight, sizeof followfight, 1, fp);
games/battlestar/save.c
69
fread(&ate, sizeof ate, 1, fp);
games/battlestar/save.c
70
fread(&snooze, sizeof snooze, 1, fp);
games/battlestar/save.c
71
fread(&meetgirl, sizeof meetgirl, 1, fp);
games/battlestar/save.c
72
fread(&followgod, sizeof followgod, 1, fp);
games/battlestar/save.c
73
fread(&godready, sizeof godready, 1, fp);
games/battlestar/save.c
74
fread(&win, sizeof win, 1, fp);
games/battlestar/save.c
75
fread(&wintime, sizeof wintime, 1, fp);
games/battlestar/save.c
76
fread(&matchlight, sizeof matchlight, 1, fp);
games/battlestar/save.c
77
fread(&matchcount, sizeof matchcount, 1, fp);
games/battlestar/save.c
78
fread(&loved, sizeof loved, 1, fp);
games/battlestar/save.c
79
fread(&pleasure, sizeof pleasure, 1, fp);
games/battlestar/save.c
80
fread(&power, sizeof power, 1, fp);
games/battlestar/save.c
82
if (fread(&ego, sizeof ego, 1, fp) < 1)
games/battlestar/save.c
84
fclose(fp);
games/battlestar/save.c
92
FILE *fp;
games/battlestar/save.c
96
if ((fp = fopen(filename, "w")) == NULL) {
games/boggle/boggle/bog.c
220
batchword(FILE *fp)
games/boggle/boggle/bog.c
229
while ((w = nextword(fp)) != NULL) {
games/boggle/boggle/help.c
45
FILE *fp;
games/boggle/boggle/help.c
49
if ((fp = fopen(HELPFILE, "r")) == NULL)
games/boggle/boggle/help.c
55
if (ungetc(getc(fp), fp) == EOF) {
games/boggle/boggle/help.c
62
if (fgets(buf, sizeof(buf), fp) == NULL) {
games/boggle/boggle/help.c
70
if (eof || ungetc(getc(fp), fp) == EOF) {
games/boggle/boggle/help.c
83
fclose(fp);
games/boggle/boggle/mach.c
299
flushin(FILE *fp)
games/boggle/boggle/mach.c
301
tcflush(fileno(fp), TCIFLUSH);
games/boggle/boggle/word.c
100
if (fp == NULL) {
games/boggle/boggle/word.c
107
return (fseek(fp, offset, ptrname));
games/boggle/boggle/word.c
113
FILE *fp;
games/boggle/boggle/word.c
115
if ((fp = fopen(dict, "r")) == NULL)
games/boggle/boggle/word.c
117
return (fp);
games/boggle/boggle/word.c
124
loaddict(FILE *fp)
games/boggle/boggle/word.c
131
if (fstat(fileno(fp), &statb) < 0) {
games/boggle/boggle/word.c
132
fclose(fp);
games/boggle/boggle/word.c
141
fclose(fp);
games/boggle/boggle/word.c
150
while (n > 0 && (st = fread(p, 1, BUFSIZ, fp)) > 0) {
games/boggle/boggle/word.c
155
fclose(fp);
games/boggle/boggle/word.c
174
FILE *fp;
games/boggle/boggle/word.c
176
if ((fp = fopen(indexfile, "r")) == NULL) {
games/boggle/boggle/word.c
181
while (fgets(buf, sizeof(buf), fp) != NULL) {
games/boggle/boggle/word.c
184
fclose(fp);
games/boggle/boggle/word.c
190
fclose(fp);
games/boggle/boggle/word.c
199
fclose(fp);
games/boggle/boggle/word.c
202
fclose(fp);
games/boggle/boggle/word.c
56
nextword(FILE *fp)
games/boggle/boggle/word.c
62
if (fp == NULL) {
games/boggle/boggle/word.c
76
if ((pcount = getc(fp)) == EOF)
games/boggle/boggle/word.c
84
while ((ch = getc(fp)) != EOF && ch >= 'a')
games/boggle/boggle/word.c
98
dictseek(FILE *fp, long offset, int ptrname)
games/boggle/mkindex/mkindex.c
74
nextword(FILE *fp, char *buffer, int *clen, int *rlen)
games/boggle/mkindex/mkindex.c
83
if ((pcount = getc(fp)) == EOF)
games/boggle/mkindex/mkindex.c
92
while ((ch = getc(fp)) != EOF && ch >= 'a')
games/factor/factor.c
287
BN_print_dec_fp(FILE *fp, const BIGNUM *num)
games/factor/factor.c
294
fprintf(fp, "%s", buf);
games/factor/factor.c
301
BN_print_fp(FILE *fp, const BIGNUM *num)
games/factor/factor.c
303
fprintf(fp, "%lx", (unsigned long)*num);
games/factor/factor.c
307
BN_print_dec_fp(FILE *fp, const BIGNUM *num)
games/factor/factor.c
309
fprintf(fp, "%lu", (unsigned long)*num);
games/fortune/fortune/fortune.c
1008
FILEDESC *fp;
games/fortune/fortune/fortune.c
1015
for (fp = parent->child; choice--; fp = fp->next)
games/fortune/fortune/fortune.c
1017
DPRINTF(1, (stderr, " using %s\n", fp->name));
games/fortune/fortune/fortune.c
1018
return (fp);
games/fortune/fortune/fortune.c
1025
for (fp = parent->child; (unsigned int)choice >= fp->tbl.str_numstr;
games/fortune/fortune/fortune.c
1026
fp = fp->next) {
games/fortune/fortune/fortune.c
1027
choice -= fp->tbl.str_numstr;
games/fortune/fortune/fortune.c
1029
fp->name, fp->tbl.str_numstr, choice));
games/fortune/fortune/fortune.c
1031
DPRINTF(1, (stderr, " using %s, %u\n", fp->name,
games/fortune/fortune/fortune.c
1032
fp->tbl.str_numstr));
games/fortune/fortune/fortune.c
1033
return (fp);
games/fortune/fortune/fortune.c
1042
sum_noprobs(FILEDESC *fp)
games/fortune/fortune/fortune.c
1049
while (fp != NULL) {
games/fortune/fortune/fortune.c
1050
get_tbl(fp);
games/fortune/fortune/fortune.c
1051
sum_tbl(&Noprob_tbl, &fp->tbl);
games/fortune/fortune/fortune.c
1052
fp = fp->next;
games/fortune/fortune/fortune.c
1068
open_fp(FILEDESC *fp)
games/fortune/fortune/fortune.c
1070
if (fp->inf == NULL && (fp->inf = fdopen(fp->fd, "r")) == NULL) {
games/fortune/fortune/fortune.c
1071
perror(fp->path);
games/fortune/fortune/fortune.c
1081
open_dat(FILEDESC *fp)
games/fortune/fortune/fortune.c
1083
if (fp->datfd < 0 && (fp->datfd = open(fp->datfile, O_RDONLY)) < 0) {
games/fortune/fortune/fortune.c
1084
perror(fp->datfile);
games/fortune/fortune/fortune.c
1095
get_pos(FILEDESC *fp)
games/fortune/fortune/fortune.c
1099
assert(fp->read_tbl);
games/fortune/fortune/fortune.c
1100
if (fp->pos == POS_UNKNOWN) {
games/fortune/fortune/fortune.c
1102
if ((fd = open(fp->posfile, O_RDONLY)) < 0 ||
games/fortune/fortune/fortune.c
1103
read(fd, &fp->pos, sizeof fp->pos) != sizeof fp->pos)
games/fortune/fortune/fortune.c
1104
fp->pos = arc4random_uniform(fp->tbl.str_numstr);
games/fortune/fortune/fortune.c
1105
else if ((unsigned int)fp->pos >= fp->tbl.str_numstr)
games/fortune/fortune/fortune.c
1106
fp->pos %= fp->tbl.str_numstr;
games/fortune/fortune/fortune.c
1110
fp->pos = arc4random_uniform(fp->tbl.str_numstr);
games/fortune/fortune/fortune.c
1113
if ((unsigned int)++(fp->pos) >= fp->tbl.str_numstr)
games/fortune/fortune/fortune.c
1114
fp->pos -= fp->tbl.str_numstr;
games/fortune/fortune/fortune.c
1115
DPRINTF(1, (stderr, "pos for %s is %ld\n", fp->name, (long)fp->pos));
games/fortune/fortune/fortune.c
1123
get_tbl(FILEDESC *fp)
games/fortune/fortune/fortune.c
1128
if (fp->read_tbl)
games/fortune/fortune/fortune.c
1130
if (fp->child == NULL) {
games/fortune/fortune/fortune.c
1131
if ((fd = open(fp->datfile, O_RDONLY)) < 0) {
games/fortune/fortune/fortune.c
1132
perror(fp->datfile);
games/fortune/fortune/fortune.c
1135
if (read(fd, (char *) &fp->tbl, sizeof fp->tbl) != sizeof fp->tbl) {
games/fortune/fortune/fortune.c
1137
"fortune: %s corrupted\n", fp->path);
games/fortune/fortune/fortune.c
1141
fp->tbl.str_numstr = be32toh(fp->tbl.str_numstr);
games/fortune/fortune/fortune.c
1142
fp->tbl.str_longlen = be32toh(fp->tbl.str_longlen);
games/fortune/fortune/fortune.c
1143
fp->tbl.str_shortlen = be32toh(fp->tbl.str_shortlen);
games/fortune/fortune/fortune.c
1144
fp->tbl.str_flags = be32toh(fp->tbl.str_flags);
games/fortune/fortune/fortune.c
1148
zero_tbl(&fp->tbl);
games/fortune/fortune/fortune.c
1149
for (child = fp->child; child != NULL; child = child->next) {
games/fortune/fortune/fortune.c
1151
sum_tbl(&fp->tbl, &child->tbl);
games/fortune/fortune/fortune.c
1154
fp->read_tbl = true;
games/fortune/fortune/fortune.c
1286
FILEDESC *fp;
games/fortune/fortune/fortune.c
1290
for (fp = list; fp != NULL; fp = fp->next) {
games/fortune/fortune/fortune.c
1291
if (fp->child != NULL) {
games/fortune/fortune/fortune.c
1292
if ((len = maxlen_in_list(fp->child)) > maxlen)
games/fortune/fortune/fortune.c
1296
get_tbl(fp);
games/fortune/fortune/fortune.c
1297
if (fp->tbl.str_longlen > (unsigned int)maxlen)
games/fortune/fortune/fortune.c
1298
maxlen = fp->tbl.str_longlen;
games/fortune/fortune/fortune.c
1313
FILEDESC *fp;
games/fortune/fortune/fortune.c
1317
for (fp = list; fp != NULL; fp = fp->next) {
games/fortune/fortune/fortune.c
1318
if (fp->child != NULL) {
games/fortune/fortune/fortune.c
1319
matches_in_list(fp->child);
games/fortune/fortune/fortune.c
1322
DPRINTF(1, (stderr, "searching in %s\n", fp->path));
games/fortune/fortune/fortune.c
1323
open_fp(fp);
games/fortune/fortune/fortune.c
1326
while (fgets(sp, Fort_len, fp->inf) != NULL)
games/fortune/fortune/fortune.c
1327
if (fp->tbl.str_flags & STR_COMMENTS
games/fortune/fortune/fortune.c
1328
&& sp[0] == fp->tbl.str_delim
games/fortune/fortune/fortune.c
1329
&& sp[1] == fp->tbl.str_delim)
games/fortune/fortune/fortune.c
1331
else if (!STR_ENDSTRING(sp, fp->tbl))
games/fortune/fortune/fortune.c
1335
if (fp->tbl.str_flags & STR_ROTATED)
games/fortune/fortune/fortune.c
1345
printf("%c%c", fp->tbl.str_delim,
games/fortune/fortune/fortune.c
1346
fp->tbl.str_delim);
games/fortune/fortune/fortune.c
1348
printf(" (%s)", fp->name);
games/fortune/fortune/fortune.c
209
display(FILEDESC *fp)
games/fortune/fortune/fortune.c
215
open_fp(fp);
games/fortune/fortune/fortune.c
216
fseeko(fp->inf, Seekpts[0], SEEK_SET);
games/fortune/fortune/fortune.c
217
for (Fort_len = 0; fgets(line, sizeof line, fp->inf) != NULL &&
games/fortune/fortune/fortune.c
218
!STR_ENDSTRING(line, fp->tbl); Fort_len++) {
games/fortune/fortune/fortune.c
219
if (fp->tbl.str_flags & STR_ROTATED)
games/fortune/fortune/fortune.c
228
if (fp->tbl.str_flags & STR_COMMENTS
games/fortune/fortune/fortune.c
229
&& line[0] == fp->tbl.str_delim
games/fortune/fortune/fortune.c
230
&& line[1] == fp->tbl.str_delim)
games/fortune/fortune/fortune.c
450
FILEDESC *fp;
games/fortune/fortune/fortune.c
534
fp = new_fp();
games/fortune/fortune/fortune.c
535
fp->fd = fd;
games/fortune/fortune/fortune.c
536
fp->percent = percent;
games/fortune/fortune/fortune.c
537
fp->name = file;
games/fortune/fortune/fortune.c
538
fp->path = path;
games/fortune/fortune/fortune.c
539
fp->parent = parent;
games/fortune/fortune/fortune.c
541
if ((isdir && !add_dir(fp)) ||
games/fortune/fortune/fortune.c
543
!is_fortfile(path, &fp->datfile, &fp->posfile, (parent != NULL))))
games/fortune/fortune/fortune.c
551
do_free(fp->datfile);
games/fortune/fortune/fortune.c
552
do_free(fp->posfile);
games/fortune/fortune/fortune.c
553
free(fp);
games/fortune/fortune/fortune.c
564
all_forts(fp, offensive);
games/fortune/fortune/fortune.c
566
*head = *tail = fp;
games/fortune/fortune/fortune.c
567
else if (fp->percent == NO_PROB) {
games/fortune/fortune/fortune.c
568
(*tail)->next = fp;
games/fortune/fortune/fortune.c
569
fp->prev = *tail;
games/fortune/fortune/fortune.c
570
*tail = fp;
games/fortune/fortune/fortune.c
573
(*head)->prev = fp;
games/fortune/fortune/fortune.c
574
fp->next = *head;
games/fortune/fortune/fortune.c
575
*head = fp;
games/fortune/fortune/fortune.c
578
fp->was_pos_file = (access(fp->posfile, W_OK) >= 0);
games/fortune/fortune/fortune.c
590
FILEDESC *fp;
games/fortune/fortune/fortune.c
592
fp = do_malloc(sizeof(*fp));
games/fortune/fortune/fortune.c
593
fp->datfd = -1;
games/fortune/fortune/fortune.c
594
fp->pos = POS_UNKNOWN;
games/fortune/fortune/fortune.c
595
fp->inf = NULL;
games/fortune/fortune/fortune.c
596
fp->fd = -1;
games/fortune/fortune/fortune.c
597
fp->percent = NO_PROB;
games/fortune/fortune/fortune.c
598
fp->read_tbl = false;
games/fortune/fortune/fortune.c
599
fp->next = NULL;
games/fortune/fortune/fortune.c
600
fp->prev = NULL;
games/fortune/fortune/fortune.c
601
fp->child = NULL;
games/fortune/fortune/fortune.c
602
fp->parent = NULL;
games/fortune/fortune/fortune.c
603
fp->datfile = NULL;
games/fortune/fortune/fortune.c
604
fp->posfile = NULL;
games/fortune/fortune/fortune.c
606
return (fp);
games/fortune/fortune/fortune.c
643
all_forts(FILEDESC *fp, char *offensive)
games/fortune/fortune/fortune.c
650
if (fp->child != NULL) /* this is a directory, not a file */
games/fortune/fortune/fortune.c
659
*scene = *fp;
games/fortune/fortune/fortune.c
661
fp->num_children = 2;
games/fortune/fortune/fortune.c
662
fp->child = scene;
games/fortune/fortune/fortune.c
666
scene->parent = obscene->parent = fp;
games/fortune/fortune/fortune.c
668
fp->fd = -1;
games/fortune/fortune/fortune.c
690
add_dir(FILEDESC *fp)
games/fortune/fortune/fortune.c
697
close(fp->fd);
games/fortune/fortune/fortune.c
698
fp->fd = -1;
games/fortune/fortune/fortune.c
699
if ((dir = opendir(fp->path)) == NULL) {
games/fortune/fortune/fortune.c
700
perror(fp->path);
games/fortune/fortune/fortune.c
704
DPRINTF(1, (stderr, "adding dir \"%s\"\n", fp->path));
games/fortune/fortune/fortune.c
705
fp->num_children = 0;
games/fortune/fortune/fortune.c
710
if (add_file(NO_PROB, name, fp->path, &fp->child, &tailp, fp))
games/fortune/fortune/fortune.c
711
fp->num_children++;
games/fortune/fortune/fortune.c
715
if (fp->num_children == 0) {
games/fortune/fortune/fortune.c
717
"fortune: %s: No fortune files in directory.\n", fp->path);
games/fortune/fortune/fortune.c
877
FILEDESC *fp, *last = NULL;
games/fortune/fortune/fortune.c
888
for (fp = File_tail; fp != NULL; fp = fp->prev)
games/fortune/fortune/fortune.c
889
if (fp->percent == NO_PROB) {
games/fortune/fortune/fortune.c
892
last = fp;
games/fortune/fortune/fortune.c
894
percent += fp->percent;
games/fortune/fortune/fortune.c
917
for (fp = File_tail; fp != last; fp = fp->prev)
games/fortune/fortune/fortune.c
918
if (fp->percent == NO_PROB) {
games/fortune/fortune/fortune.c
919
fp->percent = frac;
games/fortune/fortune/fortune.c
946
FILEDESC *fp;
games/fortune/fortune/fortune.c
950
fp = File_list;
games/fortune/fortune/fortune.c
954
for (fp = File_list; fp->percent != NO_PROB; fp = fp->next)
games/fortune/fortune/fortune.c
955
if (choice < fp->percent)
games/fortune/fortune/fortune.c
958
choice -= fp->percent;
games/fortune/fortune/fortune.c
961
fp->name, fp->percent, choice));
games/fortune/fortune/fortune.c
964
fp->name, fp->percent, choice));
games/fortune/fortune/fortune.c
966
if (fp->percent != NO_PROB)
games/fortune/fortune/fortune.c
967
get_tbl(fp);
games/fortune/fortune/fortune.c
969
if (fp->next != NULL) {
games/fortune/fortune/fortune.c
970
sum_noprobs(fp);
games/fortune/fortune/fortune.c
974
while ((unsigned int)choice >= fp->tbl.str_numstr) {
games/fortune/fortune/fortune.c
975
choice -= fp->tbl.str_numstr;
games/fortune/fortune/fortune.c
976
fp = fp->next;
games/fortune/fortune/fortune.c
979
fp->name, fp->tbl.str_numstr,
games/fortune/fortune/fortune.c
982
DPRINTF(1, (stderr, "using \"%s\", %u\n", fp->name,
games/fortune/fortune/fortune.c
983
fp->tbl.str_numstr));
games/fortune/fortune/fortune.c
985
get_tbl(fp);
games/fortune/fortune/fortune.c
987
if (fp->child != NULL) {
games/fortune/fortune/fortune.c
989
fp = pick_child(fp);
games/fortune/fortune/fortune.c
991
Fortfile = fp;
games/fortune/fortune/fortune.c
992
get_pos(fp);
games/fortune/fortune/fortune.c
993
open_dat(fp);
games/fortune/fortune/fortune.c
994
lseek(fp->datfd,
games/fortune/fortune/fortune.c
995
(off_t) (sizeof fp->tbl + fp->pos * sizeof Seekpts[0]), SEEK_SET);
games/fortune/fortune/fortune.c
996
read(fp->datfd, Seekpts, sizeof Seekpts);
games/gomoku/bdisp.c
185
bdump(FILE *fp)
games/gomoku/bdisp.c
191
fprintf(fp, " A B C D E F G H J K L M N O P Q R S T\n");
games/gomoku/bdisp.c
195
fprintf(fp, "%2d ", j);
games/gomoku/bdisp.c
207
putc(c, fp);
games/gomoku/bdisp.c
208
putc(' ', fp);
games/gomoku/bdisp.c
211
fprintf(fp, "%d\n", j);
games/gomoku/bdisp.c
215
fprintf(fp, " A B C D E F G H J K L M N O P Q R S T\n");
games/gomoku/main.c
246
FILE *fp;
games/gomoku/main.c
250
if ((fp = fopen(fname, "w")) == NULL) {
games/gomoku/main.c
255
fprintf(fp, "%s\n",
games/gomoku/main.c
257
fclose(fp);
games/gomoku/main.c
319
FILE *fp;
games/gomoku/main.c
323
if ((fp = fopen(fname, "w")) == NULL) {
games/gomoku/main.c
328
fprintf(fp, "%s\n",
games/gomoku/main.c
330
fclose(fp);
games/gomoku/main.c
341
readinput(FILE *fp)
games/gomoku/main.c
348
while ((c = getc(fp)) != EOF && c != '\n' && pos < sizeof(buf) - 1)
games/gomoku/main.c
363
FILE *fp;
games/gomoku/main.c
410
if ((fp = fopen(input + 1, "w")) == NULL)
games/gomoku/main.c
413
fprintf(fp, "%s", stoc(movelog[i]));
games/gomoku/main.c
415
fprintf(fp, " %s\n", stoc(movelog[i]));
games/gomoku/main.c
417
fputc('\n', fp);
games/gomoku/main.c
419
bdump(fp);
games/gomoku/main.c
420
fclose(fp);
games/hack/hack.pager.c
104
(void) fclose(fp);
games/hack/hack.pager.c
117
page_more(fp, 1); /* does fclose() */
games/hack/hack.pager.c
121
(void) fclose(fp); /* kopper@psuvax1 */
games/hack/hack.pager.c
125
(void) fclose(fp);
games/hack/hack.pager.c
142
page_more(FILE *fp, int strip)
games/hack/hack.pager.c
150
while (fgets(bufr, CO - 1, fp) && (!strip || *bufr == '\t') && !got_intrup) {
games/hack/hack.pager.c
162
(void) fclose(fp);
games/hack/hack.pager.c
86
FILE *fp;
games/hack/hack.pager.c
90
if (!(fp = fopen(DATAFILE, "r")))
games/hack/hack.pager.c
96
while (fgets(buf, BUFSZ, fp))
games/hunt/huntd/answer.c
530
answer_info(FILE *fp)
games/hunt/huntd/answer.c
539
fprintf(fp, "\nSpawning connections:\n");
games/hunt/huntd/answer.c
547
fprintf(fp, "fd %d: state %d, from %s:%d\n",
games/hunt/huntd/driver.c
1026
fp = fdopen(s, "w");
games/hunt/huntd/driver.c
1027
if (fp == NULL) {
games/hunt/huntd/driver.c
1033
print_stats(fp);
games/hunt/huntd/driver.c
1035
fclose(fp);
games/hunt/huntd/driver.c
1043
print_stats(FILE *fp)
games/hunt/huntd/driver.c
1049
fputs("Name\t\tScore\tDucked\tAbsorb\tFaced\tShot\tRobbed\tMissed\tSlimeK\n", fp);
games/hunt/huntd/driver.c
1051
fprintf(fp, "%s%c%c%c\t", ip->i_name,
games/hunt/huntd/driver.c
1057
putc('\t', fp);
games/hunt/huntd/driver.c
1058
fprintf(fp, "%.2f\t%d\t%d\t%d\t%d\t%d\t%d\t%d\n",
games/hunt/huntd/driver.c
1063
fputs("\n\nName\t\tEnemy\tFriend\tDeaths\tStill\tSaved\tConnect\n", fp);
games/hunt/huntd/driver.c
1065
fprintf(fp, "%s%c%c%c\t", ip->i_name,
games/hunt/huntd/driver.c
1071
putc('\t', fp);
games/hunt/huntd/driver.c
1072
fprintf(fp, "%d\t%d\t%d\t%d\t%d\t",
games/hunt/huntd/driver.c
1077
putc('p', fp);
games/hunt/huntd/driver.c
1080
putc('m', fp);
games/hunt/huntd/driver.c
1081
putc('\n', fp);
games/hunt/huntd/driver.c
1093
FILE *fp;
games/hunt/huntd/driver.c
1096
fp = fdopen(tty, "w");
games/hunt/huntd/driver.c
1097
print_stats(fp);
games/hunt/huntd/driver.c
1098
answer_info(fp);
games/hunt/huntd/driver.c
1099
fclose(fp);
games/hunt/huntd/driver.c
995
FILE *fp;
games/phantasia/gamesupport.c
494
FILE *fp; /* to open the file */
games/phantasia/gamesupport.c
496
if ((fp = fopen(_PATH_SCORE, "r")) != NULL) {
games/phantasia/gamesupport.c
497
while (fread((char *)&sbuf, SZ_SCORESTRUCT, 1, fp) == 1)
games/phantasia/gamesupport.c
500
fclose(fp);
games/phantasia/gamesupport.c
581
FILE *fp; /* to open scoreboard file */
games/phantasia/gamesupport.c
585
if ((fp = fopen(_PATH_SCORE, "r+")) != NULL) {
games/phantasia/gamesupport.c
586
while (fread((char *)&sbuf, SZ_SCORESTRUCT, 1, fp) == 1)
games/phantasia/gamesupport.c
612
fseek(fp, loc, SEEK_SET);
games/phantasia/gamesupport.c
613
fwrite((char *)&sbuf, SZ_SCORESTRUCT, 1, fp);
games/phantasia/gamesupport.c
614
fclose(fp);
games/phantasia/interplayer.c
694
FILE *fp; /* to clear energy voids */
games/phantasia/interplayer.c
726
fp = fopen(_PATH_MESS, "w");
games/phantasia/interplayer.c
727
fprintf(fp, "All hail the new king!");
games/phantasia/interplayer.c
728
fclose(fp);
games/phantasia/interplayer.c
733
fp = fopen(_PATH_VOID, "w");
games/phantasia/interplayer.c
734
fwrite((char *)&Enrgyvoid, SZ_VOIDSTRUCT, 1, fp);
games/phantasia/interplayer.c
735
fclose(fp);
games/phantasia/interplayer.c
761
FILE *fp; /* for opening gold file */
games/phantasia/interplayer.c
814
if ((fp = fopen(_PATH_GOLD, "r+")) != NULL) {
games/phantasia/interplayer.c
816
fread((char *)&temp1, sizeof(double), 1, fp);
games/phantasia/interplayer.c
817
fseek(fp, 0L, SEEK_SET);
games/phantasia/interplayer.c
820
fwrite((char *)&temp2, sizeof(double), 1, fp);
games/phantasia/interplayer.c
821
fclose(fp);
games/phantasia/main.c
447
FILE *fp; /* for opening files */
games/phantasia/main.c
534
fp = fopen(_PATH_MESS, "w");
games/phantasia/main.c
536
fprintf(fp, "%s: %s", Player.p_name, Databuf);
games/phantasia/main.c
537
fclose(fp);
games/phantasia/main.c
654
FILE *fp; /* used for opening various files */
games/phantasia/main.c
665
if ((fp = fopen(_PATH_MOTD, "r")) != NULL
games/phantasia/main.c
666
&& fgets(Databuf, SZ_DATABUF, fp) != NULL) {
games/phantasia/main.c
668
fclose(fp);
games/phantasia/main.c
744
if ((fp = fopen(_PATH_LASTDEAD, "r")) != NULL
games/phantasia/main.c
745
&& fgets(Databuf, SZ_DATABUF, fp) != NULL) {
games/phantasia/main.c
748
fclose(fp);
games/phantasia/misc.c
1279
FILE *fp; /* to update Goldfile */
games/phantasia/misc.c
1309
if ((fp = fopen(_PATH_GOLD, "r+")) != NULL) {
games/phantasia/misc.c
1312
fread((char *)&dtemp, sizeof(double), 1, fp);
games/phantasia/misc.c
1314
fseek(fp, 0L, SEEK_SET);
games/phantasia/misc.c
1315
fwrite((char *)&dtemp, sizeof(double), 1, fp);
games/phantasia/misc.c
1316
fclose(fp);
games/phantasia/misc.c
706
FILE *fp; /* for updating various files */
games/phantasia/misc.c
768
fp = fopen(_PATH_LASTDEAD, "w");
games/phantasia/misc.c
769
fprintf(fp, "%s (%s, run by %s, level %.0f, killed by %s)",
games/phantasia/misc.c
772
fclose(fp);
games/phantasia/misc.c
775
fp = fopen(_PATH_MESS, "w");
games/phantasia/misc.c
776
fprintf(fp, "%s was killed by %s.", Player.p_name, how);
games/phantasia/misc.c
777
fclose(fp);
games/phantasia/setup.c
110
if ((fp = fopen(_SPATH_VOID, "w")) == NULL)
games/phantasia/setup.c
113
fwrite(&Enrgyvoid, SZ_VOIDSTRUCT, 1, fp);
games/phantasia/setup.c
114
fclose(fp);
games/phantasia/setup.c
120
else if ((fp = fopen(monsterfile, "r")) == NULL) {
games/phantasia/setup.c
132
while (fgets(Databuf, SZ_DATABUF, fp) != NULL) {
games/phantasia/setup.c
142
fclose(fp);
games/phantasia/setup.c
58
FILE *fp; /* for opening files */
games/quiz/quiz.c
110
FILE *fp;
games/quiz/quiz.c
115
if ((fp = fopen(file, "r")) == NULL)
games/quiz/quiz.c
125
while ((lp = fgetln(fp, &len)) != NULL) {
games/quiz/quiz.c
140
fclose(fp);
games/rogue/message.c
317
FILE *fp;
games/rogue/message.c
322
if ((fp = fopen(_PATH_SCREENDUMP, "w")) != NULL) {
games/rogue/message.c
334
fputs(buf, fp);
games/rogue/message.c
335
putc('\n', fp);
games/rogue/message.c
337
fclose(fp);
games/rogue/save.c
111
if ( ((fp = fopen(sfile, "w")) == NULL) ||
games/rogue/save.c
119
r_write(fp, (char *) &detect_monster, sizeof(detect_monster));
games/rogue/save.c
120
r_write(fp, (char *) &cur_level, sizeof(cur_level));
games/rogue/save.c
121
r_write(fp, (char *) &max_level, sizeof(max_level));
games/rogue/save.c
122
write_string(hunger_str, fp);
games/rogue/save.c
123
write_string(login_name, fp);
games/rogue/save.c
124
r_write(fp, (char *) &party_room, sizeof(party_room));
games/rogue/save.c
125
write_pack(&level_monsters, fp);
games/rogue/save.c
126
write_pack(&level_objects, fp);
games/rogue/save.c
127
r_write(fp, (char *) &file_id, sizeof(file_id));
games/rogue/save.c
128
rw_dungeon(fp, 1);
games/rogue/save.c
129
r_write(fp, (char *) &foods, sizeof(foods));
games/rogue/save.c
130
r_write(fp, (char *) &rogue, sizeof(fighter));
games/rogue/save.c
131
write_pack(&rogue.pack, fp);
games/rogue/save.c
132
rw_id(id_potions, fp, POTIONS, 1);
games/rogue/save.c
133
rw_id(id_scrolls, fp, SCROLS, 1);
games/rogue/save.c
134
rw_id(id_wands, fp, WANDS, 1);
games/rogue/save.c
135
rw_id(id_rings, fp, RINGS, 1);
games/rogue/save.c
136
r_write(fp, (char *) traps, (MAX_TRAPS * sizeof(trap)));
games/rogue/save.c
137
r_write(fp, (char *) is_wood, (WANDS * sizeof(boolean)));
games/rogue/save.c
138
r_write(fp, (char *) &cur_room, sizeof(cur_room));
games/rogue/save.c
139
rw_rooms(fp, 1);
games/rogue/save.c
140
r_write(fp, (char *) &being_held, sizeof(being_held));
games/rogue/save.c
141
r_write(fp, (char *) &bear_trap, sizeof(bear_trap));
games/rogue/save.c
142
r_write(fp, (char *) &halluc, sizeof(halluc));
games/rogue/save.c
143
r_write(fp, (char *) &blind, sizeof(blind));
games/rogue/save.c
144
r_write(fp, (char *) &confused, sizeof(confused));
games/rogue/save.c
145
r_write(fp, (char *) &levitate, sizeof(levitate));
games/rogue/save.c
146
r_write(fp, (char *) &haste_self, sizeof(haste_self));
games/rogue/save.c
147
r_write(fp, (char *) &see_invisible, sizeof(see_invisible));
games/rogue/save.c
148
r_write(fp, (char *) &detect_monster, sizeof(detect_monster));
games/rogue/save.c
149
r_write(fp, (char *) &wizard, sizeof(wizard));
games/rogue/save.c
150
r_write(fp, (char *) &score_only, sizeof(score_only));
games/rogue/save.c
151
r_write(fp, (char *) &m_moves, sizeof(m_moves));
games/rogue/save.c
154
r_write(fp, (char *) &rt_buf, sizeof(rt_buf));
games/rogue/save.c
155
fclose(fp);
games/rogue/save.c
179
FILE *fp = NULL;
games/rogue/save.c
186
((fp = fopen(fname, "r")) == NULL)) {
games/rogue/save.c
193
r_read(fp, (char *) &detect_monster, sizeof(detect_monster));
games/rogue/save.c
194
r_read(fp, (char *) &cur_level, sizeof(cur_level));
games/rogue/save.c
195
r_read(fp, (char *) &max_level, sizeof(max_level));
games/rogue/save.c
196
read_string(hunger_str, fp, sizeof hunger_str);
games/rogue/save.c
199
read_string(login_name, fp, sizeof login_name);
games/rogue/save.c
204
r_read(fp, (char *) &party_room, sizeof(party_room));
games/rogue/save.c
205
read_pack(&level_monsters, fp, 0);
games/rogue/save.c
206
read_pack(&level_objects, fp, 0);
games/rogue/save.c
207
r_read(fp, (char *) &saved_file_id, sizeof(saved_file_id));
games/rogue/save.c
211
rw_dungeon(fp, 0);
games/rogue/save.c
212
r_read(fp, (char *) &foods, sizeof(foods));
games/rogue/save.c
213
r_read(fp, (char *) &rogue, sizeof(fighter));
games/rogue/save.c
214
read_pack(&rogue.pack, fp, 1);
games/rogue/save.c
215
rw_id(id_potions, fp, POTIONS, 0);
games/rogue/save.c
216
rw_id(id_scrolls, fp, SCROLS, 0);
games/rogue/save.c
217
rw_id(id_wands, fp, WANDS, 0);
games/rogue/save.c
218
rw_id(id_rings, fp, RINGS, 0);
games/rogue/save.c
219
r_read(fp, (char *) traps, (MAX_TRAPS * sizeof(trap)));
games/rogue/save.c
220
r_read(fp, (char *) is_wood, (WANDS * sizeof(boolean)));
games/rogue/save.c
221
r_read(fp, (char *) &cur_room, sizeof(cur_room));
games/rogue/save.c
222
rw_rooms(fp, 0);
games/rogue/save.c
223
r_read(fp, (char *) &being_held, sizeof(being_held));
games/rogue/save.c
224
r_read(fp, (char *) &bear_trap, sizeof(bear_trap));
games/rogue/save.c
225
r_read(fp, (char *) &halluc, sizeof(halluc));
games/rogue/save.c
226
r_read(fp, (char *) &blind, sizeof(blind));
games/rogue/save.c
227
r_read(fp, (char *) &confused, sizeof(confused));
games/rogue/save.c
228
r_read(fp, (char *) &levitate, sizeof(levitate));
games/rogue/save.c
229
r_read(fp, (char *) &haste_self, sizeof(haste_self));
games/rogue/save.c
230
r_read(fp, (char *) &see_invisible, sizeof(see_invisible));
games/rogue/save.c
231
r_read(fp, (char *) &detect_monster, sizeof(detect_monster));
games/rogue/save.c
232
r_read(fp, (char *) &wizard, sizeof(wizard));
games/rogue/save.c
233
r_read(fp, (char *) &score_only, sizeof(score_only));
games/rogue/save.c
234
r_read(fp, (char *) &m_moves, sizeof(m_moves));
games/rogue/save.c
235
r_read(fp, (char *) &saved_time, sizeof(saved_time));
games/rogue/save.c
237
if (fread(buf, sizeof(char), 1, fp) > 0) {
games/rogue/save.c
254
fclose(fp);
games/rogue/save.c
258
write_pack(const object *pack, FILE *fp)
games/rogue/save.c
263
r_write(fp, (const char *) pack, sizeof(object));
games/rogue/save.c
266
r_write(fp, (const char *) &t, sizeof(object));
games/rogue/save.c
270
read_pack(object *pack, FILE *fp, boolean is_rogue)
games/rogue/save.c
275
r_read(fp, (char *) &read_obj, sizeof(object));
games/rogue/save.c
298
rw_dungeon(FILE *fp, boolean rw)
games/rogue/save.c
305
r_write(fp, (char *) dungeon[i], (DCOLS * sizeof(dungeon[0][0])));
games/rogue/save.c
309
r_write(fp, buf, DCOLS);
games/rogue/save.c
311
r_read(fp, (char *) dungeon[i], (DCOLS * sizeof(dungeon[0][0])));
games/rogue/save.c
312
r_read(fp, buf, DCOLS);
games/rogue/save.c
321
rw_id(struct id id_table[], FILE *fp, int n, boolean wr)
games/rogue/save.c
327
r_write(fp, (const char *) &(id_table[i].value), sizeof(short));
games/rogue/save.c
328
r_write(fp, (const char *) &(id_table[i].id_status),
games/rogue/save.c
330
write_string(id_table[i].title, fp);
games/rogue/save.c
332
r_read(fp, (char *) &(id_table[i].value), sizeof(short));
games/rogue/save.c
333
r_read(fp, (char *) &(id_table[i].id_status),
games/rogue/save.c
335
read_string(id_table[i].title, fp, MAX_ID_TITLE_LEN);
games/rogue/save.c
341
write_string(char *s, FILE *fp)
games/rogue/save.c
347
r_write(fp, (char *) &n, sizeof(short));
games/rogue/save.c
348
r_write(fp, s, n);
games/rogue/save.c
352
read_string(char *s, FILE *fp, size_t len)
games/rogue/save.c
356
r_read(fp, (char *) &n, sizeof(short));
games/rogue/save.c
360
r_read(fp, s, n);
games/rogue/save.c
367
rw_rooms(FILE *fp, boolean rw)
games/rogue/save.c
372
rw ? r_write(fp, (char *) (rooms + i), sizeof(room)) :
games/rogue/save.c
373
r_read(fp, (char *) (rooms + i), sizeof(room));
games/rogue/save.c
378
r_read(FILE *fp, char *buf, int n)
games/rogue/save.c
380
if (fread(buf, sizeof(char), n, fp) != (unsigned)n) {
games/rogue/save.c
386
r_write(FILE *fp, const char *buf, int n)
games/rogue/save.c
389
if (fwrite(buf, sizeof(char), n, fp) != (unsigned)n) {
games/rogue/save.c
87
FILE *fp;
games/rogue/score.c
203
FILE *fp;
games/rogue/score.c
209
if ((fp = fopen(_PATH_SCOREFILE, "r+")) == NULL &&
games/rogue/score.c
210
(fp = fopen(_PATH_SCOREFILE, "w+")) == NULL) {
games/rogue/score.c
214
rewind(fp);
games/rogue/score.c
218
if (((n = fread(scores[i], sizeof(char), 80, fp)) < 80) && (n != 0)) {
games/rogue/score.c
222
if ((n = fread(n_names[i], sizeof(char), 30, fp)) < 30) {
games/rogue/score.c
281
rewind(fp);
games/rogue/score.c
307
fwrite(scores[i], sizeof(char), 80, fp);
games/rogue/score.c
309
fwrite(n_names[i], sizeof(char), 30, fp);
games/rogue/score.c
317
fclose(fp);
games/sail/dr_2.c
181
struct File *fp = ship->file;
games/sail/dr_2.c
183
if ((dir = fp->dir) == 0)
games/sail/dr_2.c
185
row = fp->row;
games/sail/dr_2.c
186
col = fp->col;
games/sail/dr_2.c
187
drift = fp->drift;
games/sail/dr_2.c
188
move_ship(ship, movement, &fp->dir, &fp->row, &fp->col, &drift);
games/sail/dr_2.c
196
if ((ran = portside(ship, to, 1) - fp->dir) == 4 || ran == -4)
games/sail/dr_2.c
200
fp->row = row;
games/sail/dr_2.c
201
fp->col = col;
games/sail/dr_2.c
202
fp->dir = dir;
games/sail/lo_main.c
100
while (fread(&log, sizeof log, 1, fp) == 1 &&
games/sail/lo_main.c
116
fclose(fp);
games/sail/lo_main.c
124
FILE *fp;
games/sail/lo_main.c
131
if ((fp = fopen(_PATH_LOGFILE, "r")) == NULL) {
games/sail/lo_main.c
134
switch (fread(&npeople, sizeof npeople, 1, fp)) {
games/sail/lo_main.c
143
while (fread(&log, sizeof log, 1, fp) == 1 &&
games/sail/lo_main.c
156
fclose(fp);
games/sail/lo_main.c
68
FILE *fp;
games/sail/lo_main.c
78
fp = fopen(_PATH_LOGFILE, "r");
games/sail/lo_main.c
79
if (fp == NULL) {
games/sail/lo_main.c
85
switch (fread(&npeople, sizeof npeople, 1, fp)) {
games/sail/misc.c
198
FILE *fp;
games/sail/misc.c
206
if ((fp = fopen(_PATH_LOGFILE, "r+")) == NULL) {
games/sail/misc.c
212
if (flock(fileno(fp), LOCK_EX) < 0)
games/sail/misc.c
216
persons = getw(fp);
games/sail/misc.c
217
n = fread(log, sizeof(struct logs), NLOG, fp);
games/sail/misc.c
221
rewind(fp);
games/sail/misc.c
223
putw(1, fp);
games/sail/misc.c
225
putw(persons + 1, fp);
games/sail/misc.c
229
fwrite(log, sizeof (struct logs), lp - log, fp);
games/sail/misc.c
235
fwrite(&log[NLOG-1], sizeof (struct logs), 1, fp);
games/sail/misc.c
236
fwrite(lp, sizeof (struct logs), &log[NLOG-1] - lp, fp);
games/sail/misc.c
240
flock(fileno(fp), LOCK_UN);
games/sail/misc.c
242
fclose(fp);
games/sail/pl_7.c
940
struct File *fp;
games/sail/pl_7.c
995
fp = SHIP(player)->file;
games/sail/pl_7.c
996
if (fp->captain[0] || fp->struck || fp->captured != 0)
include/printf.h
117
int __xvprintf(FILE *fp, const char *fmt0, va_list ap);
include/stdio.h
477
#define getc(fp) (!__isthreaded ? __sgetc(fp) : (getc)(fp))
include/stdio.h
478
#define putc(x, fp) (!__isthreaded ? __sputc(x, fp) : (putc)(x, fp))
include/stdio.h
495
#define getc_unlocked(fp) __sgetc(fp)
include/stdio.h
496
#define putc_unlocked(x, fp) __sputc(x, fp)
include/wchar.h
217
#define getwc(fp) fgetwc(fp)
include/wchar.h
219
#define putwc(wc, fp) fputwc(wc, fp)
lib/libc/db/hash/hash.c
110
hashp->fp = -1;
lib/libc/db/hash/hash.c
121
if ((hashp->fp = _open(file, flags | O_CLOEXEC, mode)) == -1)
lib/libc/db/hash/hash.c
123
_fcntl(hashp->fp, F_SETFD, 1);
lib/libc/db/hash/hash.c
124
new_table = _fstat(hashp->fp, &statbuf) == 0 &&
lib/libc/db/hash/hash.c
139
hdrsize = _read(hashp->fp, &hashp->hdr, sizeof(HASHHDR));
lib/libc/db/hash/hash.c
229
_close(hashp->fp);
lib/libc/db/hash/hash.c
261
if (hashp->fp == -1) {
lib/libc/db/hash/hash.c
265
return (hashp->fp);
lib/libc/db/hash/hash.c
423
if (hashp->fp != -1)
lib/libc/db/hash/hash.c
424
_close(hashp->fp);
lib/libc/db/hash/hash.c
475
int fp, i, wsize;
lib/libc/db/hash/hash.c
483
fp = hashp->fp;
lib/libc/db/hash/hash.c
489
if ((wsize = pwrite(fp, whdrp, sizeof(HASHHDR), (off_t)0)) == -1)
lib/libc/db/hash/hash.h
97
int fp; /* File pointer */
lib/libc/db/hash/hash_page.c
521
fd = hashp->fp;
lib/libc/db/hash/hash_page.c
575
if ((hashp->fp == -1) && open_temp(hashp))
lib/libc/db/hash/hash_page.c
577
fd = hashp->fp;
lib/libc/db/hash/hash_page.c
863
if ((hashp->fp = mkostemp(path, O_CLOEXEC)) != -1) {
lib/libc/db/hash/hash_page.c
865
_fcntl(hashp->fp, F_SETFD, 1);
lib/libc/db/hash/hash_page.c
868
return (hashp->fp != -1 ? 0 : -1);
lib/libc/db/hash/ndbm.c
246
return(((HTAB *)db->internal)->fp);
lib/libc/db/test/btree.tests/main.c
551
FILE *fp;
lib/libc/db/test/btree.tests/main.c
554
if ((fp = fopen(argv[1], "w")) == NULL) {
lib/libc/db/test/btree.tests/main.c
560
fprintf(fp, "%s\n", key.data);
lib/libc/db/test/btree.tests/main.c
566
fclose(fp);
lib/libc/db/test/btree.tests/main.c
574
FILE *fp;
lib/libc/db/test/btree.tests/main.c
582
if ((fp = fopen(argv[1], "r")) == NULL) {
lib/libc/db/test/btree.tests/main.c
588
for (cnt = 1; (lp = fgetline(fp, &len)) != NULL; ++cnt) {
lib/libc/db/test/btree.tests/main.c
620
fclose(fp);
lib/libc/db/test/hash.tests/tcreat3.c
53
FILE *fp;
lib/libc/db/test/hash.tests/tdel.c
108
fclose(fp);
lib/libc/db/test/hash.tests/tdel.c
54
FILE *fp;
lib/libc/db/test/hash.tests/tdel.c
96
fp = fopen ( argv[0], "r");
lib/libc/db/test/hash.tests/tdel.c
98
while ( fgets(wp1, 8192, fp) &&
lib/libc/db/test/hash.tests/tdel.c
99
fgets(wp2, 8192, fp) &&
lib/libc/db/test/hash.tests/thash4.c
100
fp = fopen ( argv[0], "r");
lib/libc/db/test/hash.tests/thash4.c
102
while ( fgets(wp1, 256, fp) &&
lib/libc/db/test/hash.tests/thash4.c
103
fgets(wp2, 8192, fp) &&
lib/libc/db/test/hash.tests/thash4.c
118
fclose(fp);
lib/libc/db/test/hash.tests/thash4.c
56
FILE *fp;
lib/libc/db/test/hash.tests/tseq.c
53
FILE *fp;
lib/libc/gen/err.c
53
err_set_file(void *fp)
lib/libc/gen/err.c
55
if (fp)
lib/libc/gen/err.c
56
err_file = fp;
lib/libc/gen/fmtmsg.c
55
FILE *fp;
lib/libc/gen/fmtmsg.c
89
if ((fp = fopen("/dev/console", "a")) == NULL) {
lib/libc/gen/fmtmsg.c
93
fprintf(fp, "%s", output);
lib/libc/gen/fmtmsg.c
94
fclose(fp);
lib/libc/gen/getdevpath.c
110
FILE *fp;
lib/libc/gen/getdevpath.c
130
if ((fp = fopen(dtpath, "r")) != NULL) {
lib/libc/gen/getdevpath.c
131
while (fgets(buf, sizeof(buf), fp) != NULL) {
lib/libc/gen/getdevpath.c
175
fclose(fp);
lib/libc/gen/getgrent.c
1209
if (st->fp != NULL)
lib/libc/gen/getgrent.c
1210
fclose(st->fp);
lib/libc/gen/getgrent.c
1249
if (st->fp != NULL)
lib/libc/gen/getgrent.c
1250
rewind(st->fp);
lib/libc/gen/getgrent.c
1252
st->fp = fopen(_PATH_GROUP, "r");
lib/libc/gen/getgrent.c
1258
if (st->fp != NULL) {
lib/libc/gen/getgrent.c
1259
fclose(st->fp);
lib/libc/gen/getgrent.c
1260
st->fp = NULL;
lib/libc/gen/getgrent.c
133
FILE *fp;
lib/libc/gen/getgrent.c
1335
if (st->fp == NULL &&
lib/libc/gen/getgrent.c
1336
((st->fp = fopen(_PATH_GROUP, "r")) == NULL)) {
lib/libc/gen/getgrent.c
1344
rewind(st->fp);
lib/libc/gen/getgrent.c
1407
pos = ftello(st->fp);
lib/libc/gen/getgrent.c
1408
while ((line = fgetln(st->fp, &linesize)) != NULL) {
lib/libc/gen/getgrent.c
1448
pos = ftello(st->fp);
lib/libc/gen/getgrent.c
1451
if (!stayopen && st->fp != NULL) {
lib/libc/gen/getgrent.c
1452
fclose(st->fp);
lib/libc/gen/getgrent.c
1453
st->fp = NULL;
lib/libc/gen/getgrent.c
1457
else if (rv == NS_RETURN && *errnop == ERANGE && st->fp != NULL)
lib/libc/gen/getgrent.c
1458
fseeko(st->fp, pos, SEEK_SET);
lib/libc/gen/getgrent.c
790
if (((struct files_state *)p)->fp != NULL)
lib/libc/gen/getgrent.c
791
fclose(((struct files_state *)p)->fp);
lib/libc/gen/getgrent.c
808
if (st->fp != NULL)
lib/libc/gen/getgrent.c
809
rewind(st->fp);
lib/libc/gen/getgrent.c
811
st->fp = fopen(_PATH_GROUP, "r");
lib/libc/gen/getgrent.c
814
if (st->fp != NULL) {
lib/libc/gen/getgrent.c
815
fclose(st->fp);
lib/libc/gen/getgrent.c
816
st->fp = NULL;
lib/libc/gen/getgrent.c
861
if (st->fp == NULL &&
lib/libc/gen/getgrent.c
862
((st->fp = fopen(_PATH_GROUP, "r")) == NULL)) {
lib/libc/gen/getgrent.c
869
rewind(st->fp);
lib/libc/gen/getgrent.c
873
pos = ftello(st->fp);
lib/libc/gen/getgrent.c
874
while ((line = fgetln(st->fp, &linesize)) != NULL) {
lib/libc/gen/getgrent.c
895
pos = ftello(st->fp);
lib/libc/gen/getgrent.c
897
if (!stayopen && st->fp != NULL) {
lib/libc/gen/getgrent.c
898
fclose(st->fp);
lib/libc/gen/getgrent.c
899
st->fp = NULL;
lib/libc/gen/getgrent.c
903
else if (rv == NS_RETURN && *errnop == ERANGE && st->fp != NULL)
lib/libc/gen/getgrent.c
904
fseeko(st->fp, pos, SEEK_SET);
lib/libc/gen/getgrent.c
99
FILE *fp;
lib/libc/gen/getusershell.c
112
FILE *fp;
lib/libc/gen/getusershell.c
119
if ((fp = fopen(_PATH_SHELLS, "r")) == NULL)
lib/libc/gen/getusershell.c
123
while (fgets(cp, MAXPATHLEN + 1, fp) != NULL) {
lib/libc/gen/getusershell.c
134
fclose(fp);
lib/libc/gen/popen.c
142
_close(__sfileno(p->fp));
lib/libc/gen/popen.c
159
cur->fp = iop;
lib/libc/gen/popen.c
190
if (cur->fp == iop)
lib/libc/gen/popen.c
58
FILE *fp;
lib/libc/gen/syslog.c
136
FILE *fp, *fmt_fp;
lib/libc/gen/syslog.c
163
fp = fwopen(&tbuf_cookie, writehook);
lib/libc/gen/syslog.c
164
if (fp == NULL)
lib/libc/gen/syslog.c
169
fprintf(fp, "<%d>", pri);
lib/libc/gen/syslog.c
170
fprintf(fp, "%.15s ", ctime_r(&now, timbuf) + 4);
lib/libc/gen/syslog.c
173
fflush(fp);
lib/libc/gen/syslog.c
179
fprintf(fp, "%s", LogTag);
lib/libc/gen/syslog.c
181
fprintf(fp, "[%d]", getpid());
lib/libc/gen/syslog.c
183
fprintf(fp, ": ");
lib/libc/gen/syslog.c
193
fclose(fp);
lib/libc/gen/syslog.c
226
vfprintf(fp, fmt, ap);
lib/libc/gen/syslog.c
227
fclose(fp);
lib/libc/gen/utmpx.c
103
(void)fclose(fp);
lib/libc/gen/utmpx.c
129
if (fp != NULL) {
lib/libc/gen/utmpx.c
130
fclose(fp);
lib/libc/gen/utmpx.c
131
fp = NULL;
lib/libc/gen/utmpx.c
144
if (fp == NULL)
lib/libc/gen/utmpx.c
146
(void)fseeko(fp, (off_t)sizeof(ut), SEEK_SET);
lib/libc/gen/utmpx.c
154
if (fp != NULL) {
lib/libc/gen/utmpx.c
155
(void)fclose(fp);
lib/libc/gen/utmpx.c
156
fp = NULL;
lib/libc/gen/utmpx.c
164
if (fp == NULL) {
lib/libc/gen/utmpx.c
169
if (fread(&ut, sizeof(ut), 1, fp) != 1)
lib/libc/gen/utmpx.c
290
if ((fp != NULL && readonly) || (fp == NULL && geteuid() != 0))
lib/libc/gen/utmpx.c
296
if (fp == NULL) {
lib/libc/gen/utmpx.c
298
if (fp == NULL || readonly)
lib/libc/gen/utmpx.c
305
if (lockf(fileno(fp), F_LOCK, (off_t)0) == -1)
lib/libc/gen/utmpx.c
308
if (fseeko(fp, (off_t)0, SEEK_END) == -1)
lib/libc/gen/utmpx.c
315
if (fseeko(fp, -(off_t)sizeof(ut), SEEK_CUR) == -1)
lib/libc/gen/utmpx.c
319
if (fwrite(&temp, sizeof (temp), 1, fp) != 1)
lib/libc/gen/utmpx.c
322
if (fflush(fp) == -1)
lib/libc/gen/utmpx.c
328
if (lockf(fileno(fp), F_ULOCK, (off_t)0) == -1)
lib/libc/gen/utmpx.c
52
static FILE *fp;
lib/libc/gen/utmpx.c
71
if ((fp = fopen(fname, "re+")) == NULL)
lib/libc/gen/utmpx.c
72
if ((fp = fopen(fname, "we+")) == NULL) {
lib/libc/gen/utmpx.c
73
if ((fp = fopen(fname, "re")) == NULL)
lib/libc/gen/utmpx.c
80
if (_fstat(fileno(fp), &st) == -1)
lib/libc/gen/utmpx.c
88
if (fwrite(&ut, sizeof(ut), 1, fp) != 1)
lib/libc/gen/utmpx.c
92
if (fread(&ut, sizeof(ut), 1, fp) != 1)
lib/libc/include/libc_private.h
78
#define FLOCKFILE(fp) if (__isthreaded) _FLOCKFILE(fp)
lib/libc/include/libc_private.h
79
#define FUNLOCKFILE(fp) if (__isthreaded) _funlockfile(fp)
lib/libc/locale/collate.c
425
wchar_t *bp, *fp, c;
lib/libc/locale/collate.c
433
fp = tr + wcslen(tr) - 1;
lib/libc/locale/collate.c
434
while (bp < fp) {
lib/libc/locale/collate.c
436
*bp++ = *fp;
lib/libc/locale/collate.c
437
*fp-- = c;
lib/libc/locale/collate.c
573
wchar_t *bp, *fp, c;
lib/libc/locale/collate.c
581
fp = tr + wcslen(tr) - 1;
lib/libc/locale/collate.c
582
while (bp < fp) {
lib/libc/locale/collate.c
584
*bp++ = *fp;
lib/libc/locale/collate.c
585
*fp-- = c;
lib/libc/net/ether_addr.c
144
FILE *fp;
lib/libc/net/ether_addr.c
155
if ((fp = fopen(_PATH_ETHERS, "r")) == NULL)
lib/libc/net/ether_addr.c
157
while (fgets(buf,BUFSIZ,fp)) {
lib/libc/net/ether_addr.c
179
fclose(fp);
lib/libc/net/ether_addr.c
184
fclose(fp);
lib/libc/net/ether_addr.c
194
FILE *fp;
lib/libc/net/ether_addr.c
204
if ((fp = fopen(_PATH_ETHERS, "r")) == NULL)
lib/libc/net/ether_addr.c
206
while (fgets(buf,BUFSIZ,fp)) {
lib/libc/net/ether_addr.c
227
fclose(fp);
lib/libc/net/ether_addr.c
232
fclose(fp);
lib/libc/net/eui64.c
219
FILE *fp;
lib/libc/net/eui64.c
229
if ((fp = fopen(_PATH_EUI64, "r")) == NULL)
lib/libc/net/eui64.c
232
while (fgets(buf,BUFSIZ,fp)) {
lib/libc/net/eui64.c
255
fclose(fp);
lib/libc/net/eui64.c
260
fclose(fp);
lib/libc/net/eui64.c
270
FILE *fp;
lib/libc/net/eui64.c
279
if ((fp = fopen(_PATH_EUI64, "r")) == NULL)
lib/libc/net/eui64.c
282
while (fgets(buf,BUFSIZ,fp)) {
lib/libc/net/eui64.c
303
fclose(fp);
lib/libc/net/eui64.c
308
fclose(fp);
lib/libc/net/getprotoent.c
341
if (ped->fp == NULL)
lib/libc/net/getprotoent.c
342
ped->fp = fopen(_PATH_PROTOCOLS, "r");
lib/libc/net/getprotoent.c
344
rewind(ped->fp);
lib/libc/net/getprotoent.c
351
if (ped->fp) {
lib/libc/net/getprotoent.c
352
fclose(ped->fp);
lib/libc/net/getprotoent.c
353
ped->fp = NULL;
lib/libc/net/getprotoent.c
365
if (ped->fp == NULL && (ped->fp = fopen(_PATH_PROTOCOLS, "r")) == NULL)
lib/libc/net/getprotoent.c
368
if ((p = fgets(ped->line, sizeof ped->line, ped->fp)) == NULL)
lib/libc/net/getprotoent.c
63
if (ped->fp) {
lib/libc/net/getprotoent.c
64
fclose(ped->fp);
lib/libc/net/getprotoent.c
65
ped->fp = NULL;
lib/libc/net/getservent.c
216
f = ((struct files_state *)p)->fp;
lib/libc/net/getservent.c
291
if (st->fp == NULL)
lib/libc/net/getservent.c
294
if (st->fp == NULL && (st->fp = fopen(_PATH_SERVICES, "r")) == NULL) {
lib/libc/net/getservent.c
302
rewind(st->fp);
lib/libc/net/getservent.c
309
if ((line = fgetln(st->fp, &linesize)) == NULL) {
lib/libc/net/getservent.c
408
if (!stayopen && st->fp != NULL) {
lib/libc/net/getservent.c
409
fclose(st->fp);
lib/libc/net/getservent.c
410
st->fp = NULL;
lib/libc/net/getservent.c
433
if (st->fp == NULL)
lib/libc/net/getservent.c
434
st->fp = fopen(_PATH_SERVICES, "r");
lib/libc/net/getservent.c
436
rewind(st->fp);
lib/libc/net/getservent.c
440
if (st->fp != NULL) {
lib/libc/net/getservent.c
441
fclose(st->fp);
lib/libc/net/getservent.c
442
st->fp = NULL;
lib/libc/net/getservent.c
83
FILE *fp;
lib/libc/net/hesiod.c
266
FILE *fp;
lib/libc/net/hesiod.c
273
fp = fopen(filename, "r");
lib/libc/net/hesiod.c
274
if (!fp) {
lib/libc/net/hesiod.c
287
while (fgets(buf, sizeof(buf), fp) != NULL) {
lib/libc/net/hesiod.c
336
fclose(fp);
lib/libc/net/netdb_private.h
97
FILE *fp;
lib/libc/resolv/res_init.c
158
FILE *fp;
lib/libc/resolv/res_init.c
307
if ((fp = fopen(_PATH_RESCONF, "r")) != NULL) {
lib/libc/resolv/res_init.c
309
while (fgets(buf, sizeof(buf), fp) != NULL) {
lib/libc/resolv/res_init.c
453
(void) fclose(fp);
lib/libc/resolv/res_query.c
402
FILE *fp;
lib/libc/resolv/res_query.c
407
if (file == NULL || (fp = fopen(file, "r")) == NULL)
lib/libc/resolv/res_query.c
409
setbuf(fp, NULL);
lib/libc/resolv/res_query.c
411
while (fgets(buf, sizeof(buf), fp)) {
lib/libc/resolv/res_query.c
428
fclose(fp);
lib/libc/resolv/res_query.c
432
fclose(fp);
lib/libc/rpc/getrpcent.c
197
f = ((struct files_state *)p)->fp;
lib/libc/rpc/getrpcent.c
249
if (st->fp == NULL && (st->fp = fopen(RPCDB, "r")) == NULL) {
lib/libc/rpc/getrpcent.c
257
rewind(st->fp);
lib/libc/rpc/getrpcent.c
262
if ((line = fgetln(st->fp, &linesize)) == NULL) {
lib/libc/rpc/getrpcent.c
323
if (!stayopen && st->fp!=NULL) {
lib/libc/rpc/getrpcent.c
324
fclose(st->fp);
lib/libc/rpc/getrpcent.c
325
st->fp = NULL;
lib/libc/rpc/getrpcent.c
349
if (st->fp == NULL)
lib/libc/rpc/getrpcent.c
350
st->fp = fopen(RPCDB, "r");
lib/libc/rpc/getrpcent.c
352
rewind(st->fp);
lib/libc/rpc/getrpcent.c
356
if (st->fp != NULL) {
lib/libc/rpc/getrpcent.c
357
fclose(st->fp);
lib/libc/rpc/getrpcent.c
358
st->fp = NULL;
lib/libc/rpc/getrpcent.c
85
FILE *fp;
lib/libc/stdio/__fpending.c
40
__fpending(const FILE *fp)
lib/libc/stdio/__fpending.c
42
if (HASUB(fp))
lib/libc/stdio/__fpending.c
43
return(fp->_up - fp->_bf._base);
lib/libc/stdio/__fpending.c
45
return(fp->pub._p - fp->_bf._base);
lib/libc/stdio/_flock_stub.c
105
if (fp->_fl_owner == curthread) {
lib/libc/stdio/_flock_stub.c
110
if (fp->_fl_count > 1) {
lib/libc/stdio/_flock_stub.c
116
fp->_fl_count--;
lib/libc/stdio/_flock_stub.c
122
fp->_fl_count = 0;
lib/libc/stdio/_flock_stub.c
123
fp->_fl_owner = NULL;
lib/libc/stdio/_flock_stub.c
124
_pthread_mutex_unlock(&fp->_fl_mutex);
lib/libc/stdio/_flock_stub.c
50
_flockfile(FILE *fp)
lib/libc/stdio/_flock_stub.c
54
if (fp->_fl_owner == curthread)
lib/libc/stdio/_flock_stub.c
55
fp->_fl_count++;
lib/libc/stdio/_flock_stub.c
61
_pthread_mutex_lock(&fp->_fl_mutex);
lib/libc/stdio/_flock_stub.c
62
fp->_fl_owner = curthread;
lib/libc/stdio/_flock_stub.c
63
fp->_fl_count = 1;
lib/libc/stdio/_flock_stub.c
71
_flockfile_debug_stub(FILE *fp, char *fname __unused, int lineno __unused)
lib/libc/stdio/_flock_stub.c
73
_flockfile(fp);
lib/libc/stdio/_flock_stub.c
77
_ftrylockfile(FILE *fp)
lib/libc/stdio/_flock_stub.c
82
if (fp->_fl_owner == curthread)
lib/libc/stdio/_flock_stub.c
83
fp->_fl_count++;
lib/libc/stdio/_flock_stub.c
88
else if (_pthread_mutex_trylock(&fp->_fl_mutex) == 0) {
lib/libc/stdio/_flock_stub.c
89
fp->_fl_owner = curthread;
lib/libc/stdio/_flock_stub.c
90
fp->_fl_count = 1;
lib/libc/stdio/_flock_stub.c
98
_funlockfile(FILE *fp)
lib/libc/stdio/clrerr.c
46
clearerr(FILE *fp)
lib/libc/stdio/clrerr.c
48
FLOCKFILE(fp);
lib/libc/stdio/clrerr.c
49
__sclearerr(fp);
lib/libc/stdio/clrerr.c
50
FUNLOCKFILE(fp);
lib/libc/stdio/clrerr.c
54
clearerr_unlocked(FILE *fp)
lib/libc/stdio/clrerr.c
56
__sclearerr(fp);
lib/libc/stdio/fclose.c
46
fclose(FILE *fp)
lib/libc/stdio/fclose.c
50
if (fp->pub._flags == 0) { /* not open! */
lib/libc/stdio/fclose.c
54
FLOCKFILE(fp);
lib/libc/stdio/fclose.c
55
r = fp->pub._flags & __SWR ? __sflush(fp) : 0;
lib/libc/stdio/fclose.c
56
if (fp->_close != NULL && (*fp->_close)(fp->_cookie) < 0)
lib/libc/stdio/fclose.c
58
if (fp->pub._flags & __SMBF)
lib/libc/stdio/fclose.c
59
free((char *)fp->_bf._base);
lib/libc/stdio/fclose.c
60
if (HASUB(fp))
lib/libc/stdio/fclose.c
61
FREEUB(fp);
lib/libc/stdio/fclose.c
62
if (HASLB(fp))
lib/libc/stdio/fclose.c
63
FREELB(fp);
lib/libc/stdio/fclose.c
64
fp->pub._fileno = -1;
lib/libc/stdio/fclose.c
65
fp->pub._r = fp->pub._w = 0; /* Mess up if reaccessed. */
lib/libc/stdio/fclose.c
66
fp->pub._flags = 0; /* Release this FILE for reuse. */
lib/libc/stdio/fclose.c
67
FUNLOCKFILE(fp);
lib/libc/stdio/fcookie.c
43
_fcookie(FILE *fp)
lib/libc/stdio/fcookie.c
45
return(fp->_cookie);
lib/libc/stdio/fdopen.c
49
FILE *fp;
lib/libc/stdio/fdopen.c
64
if ((fp = __sfp()) == NULL)
lib/libc/stdio/fdopen.c
71
fp->pub._flags = flags;
lib/libc/stdio/fdopen.c
78
fp->pub._flags |= __SAPP;
lib/libc/stdio/fdopen.c
79
fp->pub._fileno = fd;
lib/libc/stdio/fdopen.c
80
fp->_cookie = fp;
lib/libc/stdio/fdopen.c
81
fp->_read = __sread;
lib/libc/stdio/fdopen.c
82
fp->_write = __swrite;
lib/libc/stdio/fdopen.c
83
fp->_seek = __sseek;
lib/libc/stdio/fdopen.c
84
fp->_close = __sclose;
lib/libc/stdio/fdopen.c
85
return (fp);
lib/libc/stdio/feof.c
46
feof(FILE *fp)
lib/libc/stdio/feof.c
50
FLOCKFILE(fp);
lib/libc/stdio/feof.c
51
ret= __sfeof(fp);
lib/libc/stdio/feof.c
52
FUNLOCKFILE(fp);
lib/libc/stdio/feof.c
57
feof_unlocked(FILE *fp)
lib/libc/stdio/feof.c
59
return (__sfeof(fp));
lib/libc/stdio/ferror.c
46
ferror(FILE *fp)
lib/libc/stdio/ferror.c
50
FLOCKFILE(fp);
lib/libc/stdio/ferror.c
51
ret = __sferror(fp);
lib/libc/stdio/ferror.c
52
FUNLOCKFILE(fp);
lib/libc/stdio/ferror.c
57
ferror_unlocked(FILE *fp)
lib/libc/stdio/ferror.c
59
return (__sferror(fp));
lib/libc/stdio/fflush.c
100
__sflush(FILE *fp)
lib/libc/stdio/fflush.c
105
t = fp->pub._flags;
lib/libc/stdio/fflush.c
109
if ((p = fp->_bf._base) == NULL)
lib/libc/stdio/fflush.c
112
n = fp->pub._p - p; /* write this much */
lib/libc/stdio/fflush.c
118
fp->pub._p = p;
lib/libc/stdio/fflush.c
119
fp->pub._w = t & (__SLBF|__SNBF) ? 0 : fp->_bf._size;
lib/libc/stdio/fflush.c
122
t = _swrite(fp, (char *)p, n);
lib/libc/stdio/fflush.c
125
if (p > fp->pub._p) {
lib/libc/stdio/fflush.c
127
memmove(fp->pub._p, p, n);
lib/libc/stdio/fflush.c
128
fp->pub._p += n;
lib/libc/stdio/fflush.c
129
if ((fp->pub._flags & (__SLBF | __SNBF)) == 0)
lib/libc/stdio/fflush.c
130
fp->pub._w -= n;
lib/libc/stdio/fflush.c
132
fp->pub._flags |= __SERR;
lib/libc/stdio/fflush.c
140
sflush_locked(FILE *fp)
lib/libc/stdio/fflush.c
144
FLOCKFILE(fp);
lib/libc/stdio/fflush.c
145
ret = __sflush(fp);
lib/libc/stdio/fflush.c
146
FUNLOCKFILE(fp);
lib/libc/stdio/fflush.c
51
fflush(FILE *fp)
lib/libc/stdio/fflush.c
55
if (fp == NULL)
lib/libc/stdio/fflush.c
57
FLOCKFILE(fp);
lib/libc/stdio/fflush.c
71
if ((fp->pub._flags & (__SWR | __SRW)) == 0)
lib/libc/stdio/fflush.c
74
retval = __sflush(fp);
lib/libc/stdio/fflush.c
75
FUNLOCKFILE(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->pub._flags & (__SWR | __SRW)) == 0)
lib/libc/stdio/fflush.c
93
retval = __sflush(fp);
lib/libc/stdio/fgetc.c
44
fgetc(FILE *fp)
lib/libc/stdio/fgetc.c
47
FLOCKFILE(fp);
lib/libc/stdio/fgetc.c
48
retval = __sgetc(fp);
lib/libc/stdio/fgetc.c
49
FUNLOCKFILE(fp);
lib/libc/stdio/fgetln.c
102
ret = (char *)fp->pub._p;
lib/libc/stdio/fgetln.c
103
*lenp = len = p - fp->pub._p;
lib/libc/stdio/fgetln.c
104
fp->pub._flags |= __SMOD;
lib/libc/stdio/fgetln.c
105
fp->pub._r -= len;
lib/libc/stdio/fgetln.c
106
fp->pub._p = p;
lib/libc/stdio/fgetln.c
107
FUNLOCKFILE(fp);
lib/libc/stdio/fgetln.c
121
for (len = fp->pub._r, off = 0;; len += fp->pub._r) {
lib/libc/stdio/fgetln.c
129
if (__slbexpand(fp, len + OPTIMISTIC))
lib/libc/stdio/fgetln.c
131
memcpy((void *)(fp->_lb._base + off), (void *)fp->pub._p,
lib/libc/stdio/fgetln.c
134
if (__srefill(fp))
lib/libc/stdio/fgetln.c
136
if ((p = memchr((void *)fp->pub._p, '\n', (size_t)fp->pub._r))
lib/libc/stdio/fgetln.c
142
diff = p - fp->pub._p;
lib/libc/stdio/fgetln.c
144
if (__slbexpand(fp, len))
lib/libc/stdio/fgetln.c
146
memcpy((void *)(fp->_lb._base + off), (void *)fp->pub._p, diff);
lib/libc/stdio/fgetln.c
147
fp->pub._r -= diff;
lib/libc/stdio/fgetln.c
148
fp->pub._p = p;
lib/libc/stdio/fgetln.c
153
fp->_lb._base[len] = 0;
lib/libc/stdio/fgetln.c
155
FUNLOCKFILE(fp);
lib/libc/stdio/fgetln.c
156
return ((char *)fp->_lb._base);
lib/libc/stdio/fgetln.c
160
FUNLOCKFILE(fp);
lib/libc/stdio/fgetln.c
53
__slbexpand(FILE *fp, size_t newsize)
lib/libc/stdio/fgetln.c
60
if (fp->_lb._size >= newsize)
lib/libc/stdio/fgetln.c
62
if ((p = realloc(fp->_lb._base, newsize)) == NULL)
lib/libc/stdio/fgetln.c
64
fp->_lb._base = p;
lib/libc/stdio/fgetln.c
65
fp->_lb._size = newsize;
lib/libc/stdio/fgetln.c
77
fgetln(FILE *fp, size_t *lenp)
lib/libc/stdio/fgetln.c
83
FLOCKFILE(fp);
lib/libc/stdio/fgetln.c
84
ORIENT(fp, -1);
lib/libc/stdio/fgetln.c
86
if (fp->pub._r <= 0 && __srefill(fp)) {
lib/libc/stdio/fgetln.c
88
FUNLOCKFILE(fp);
lib/libc/stdio/fgetln.c
93
if ((p = memchr((void *)fp->pub._p, '\n', (size_t)fp->pub._r)) != NULL) {
lib/libc/stdio/fgetpos.c
40
fgetpos(FILE * __restrict fp, fpos_t * __restrict pos)
lib/libc/stdio/fgetpos.c
45
if ((*pos = ftello(fp)) == (fpos_t)-1)
lib/libc/stdio/fgets.c
104
FUNLOCKFILE(fp);
lib/libc/stdio/fgets.c
49
fgets(char *buf, int n, FILE *fp)
lib/libc/stdio/fgets.c
58
FLOCKFILE(fp);
lib/libc/stdio/fgets.c
59
ORIENT(fp, -1);
lib/libc/stdio/fgets.c
66
if ((len = fp->pub._r) <= 0) {
lib/libc/stdio/fgets.c
67
if (__srefill(fp)) {
lib/libc/stdio/fgets.c
70
FUNLOCKFILE(fp);
lib/libc/stdio/fgets.c
75
len = fp->pub._r;
lib/libc/stdio/fgets.c
77
p = fp->pub._p;
lib/libc/stdio/fgets.c
90
fp->pub._r -= len;
lib/libc/stdio/fgets.c
91
fp->pub._p = t;
lib/libc/stdio/fgets.c
94
FUNLOCKFILE(fp);
lib/libc/stdio/fgets.c
97
fp->pub._r -= len;
lib/libc/stdio/fgets.c
98
fp->pub._p += len;
lib/libc/stdio/fgetwc.c
101
fp->pub._p++;
lib/libc/stdio/fgetwc.c
102
fp->pub._r--;
lib/libc/stdio/fgetwc.c
106
fp->pub._p += nconv;
lib/libc/stdio/fgetwc.c
107
fp->pub._r -= nconv;
lib/libc/stdio/fgetwc.c
111
} while (__srefill(fp) == 0);
lib/libc/stdio/fgetwc.c
112
fp->pub._flags |= __SERR;
lib/libc/stdio/fgetwc.c
50
fgetwc_l(FILE *fp, locale_t locale)
lib/libc/stdio/fgetwc.c
55
FLOCKFILE(fp);
lib/libc/stdio/fgetwc.c
56
ORIENT(fp, 1);
lib/libc/stdio/fgetwc.c
57
r = __fgetwc(fp, locale);
lib/libc/stdio/fgetwc.c
58
FUNLOCKFILE(fp);
lib/libc/stdio/fgetwc.c
64
fgetwc(FILE *fp)
lib/libc/stdio/fgetwc.c
66
return fgetwc_l(fp, __get_locale());
lib/libc/stdio/fgetwc.c
76
__fgetwc_mbs(FILE *fp, mbstate_t *mbs, int *nread, locale_t locale)
lib/libc/stdio/fgetwc.c
82
if (fp->pub._r <= 0 && __srefill(fp)) {
lib/libc/stdio/fgetwc.c
88
wc = *fp->pub._p++;
lib/libc/stdio/fgetwc.c
89
fp->pub._r--;
lib/libc/stdio/fgetwc.c
95
nconv = l->__mbrtowc(&wc, fp->pub._p, fp->pub._r, mbs);
lib/libc/stdio/fgetwln.c
45
fgetwln_l(FILE * __restrict fp, size_t *lenp, locale_t locale)
lib/libc/stdio/fgetwln.c
51
FLOCKFILE(fp);
lib/libc/stdio/fgetwln.c
52
ORIENT(fp, 1);
lib/libc/stdio/fgetwln.c
55
while ((wc = __fgetwc(fp, locale)) != WEOF) {
lib/libc/stdio/fgetwln.c
57
if (len * sizeof(wchar_t) >= fp->_lb._size &&
lib/libc/stdio/fgetwln.c
58
__slbexpand(fp, (len + GROW) * sizeof(wchar_t)))
lib/libc/stdio/fgetwln.c
60
*((wchar_t *)fp->_lb._base + len++) = wc;
lib/libc/stdio/fgetwln.c
67
FUNLOCKFILE(fp);
lib/libc/stdio/fgetwln.c
69
return ((wchar_t *)fp->_lb._base);
lib/libc/stdio/fgetwln.c
72
FUNLOCKFILE(fp);
lib/libc/stdio/fgetwln.c
77
fgetwln(FILE * __restrict fp, size_t *lenp)
lib/libc/stdio/fgetwln.c
79
return fgetwln_l(fp, lenp, __get_locale());
lib/libc/stdio/fgetws.c
101
} while (wsp[-1] != L'\n' && n > 1 && (fp->pub._r > 0 ||
lib/libc/stdio/fgetws.c
102
__srefill(fp) == 0));
lib/libc/stdio/fgetws.c
110
FUNLOCKFILE(fp);
lib/libc/stdio/fgetws.c
115
FUNLOCKFILE(fp);
lib/libc/stdio/fgetws.c
119
fgetws(wchar_t * __restrict ws, int n, FILE * __restrict fp)
lib/libc/stdio/fgetws.c
121
return fgetws_l(ws, n, fp, __get_locale());
lib/libc/stdio/fgetws.c
46
fgetws_l(wchar_t * __restrict ws, int n, FILE * __restrict fp, locale_t locale)
lib/libc/stdio/fgetws.c
57
FLOCKFILE(fp);
lib/libc/stdio/fgetws.c
58
ORIENT(fp, 1);
lib/libc/stdio/fgetws.c
59
wcio = WCIO_GET(fp);
lib/libc/stdio/fgetws.c
73
if (fp->pub._r <= 0 && __srefill(fp))
lib/libc/stdio/fgetws.c
78
src = fp->pub._p;
lib/libc/stdio/fgetws.c
79
nl = memchr(fp->pub._p, '\n', fp->pub._r);
lib/libc/stdio/fgetws.c
81
nl != NULL ? (nl - fp->pub._p + 1) :
lib/libc/stdio/fgetws.c
82
fp->pub._r, n - 1, st);
lib/libc/stdio/fgetws.c
94
src = memchr(fp->pub._p, '\0', fp->pub._r);
lib/libc/stdio/fgetws.c
97
fp->pub._r -= (unsigned char *)src - fp->pub._p;
lib/libc/stdio/fgetws.c
98
fp->pub._p = (unsigned char *)src;
lib/libc/stdio/fileno.c
46
fileno(FILE *fp)
lib/libc/stdio/fileno.c
50
FLOCKFILE(fp);
lib/libc/stdio/fileno.c
51
fd = __sfileno(fp);
lib/libc/stdio/fileno.c
52
FUNLOCKFILE(fp);
lib/libc/stdio/fileno.c
58
fileno_unlocked(FILE *fp)
lib/libc/stdio/fileno.c
60
return (__sfileno(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->pub._flags == 0)
lib/libc/stdio/findfp.c
138
fp = g->iobs;
lib/libc/stdio/findfp.c
140
fp->pub._flags = 1; /* reserve this slot; caller sets real flags */
lib/libc/stdio/findfp.c
142
fp->pub._p = NULL; /* no current pointer */
lib/libc/stdio/findfp.c
143
fp->pub._w = 0; /* nothing to read or write */
lib/libc/stdio/findfp.c
144
fp->pub._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->pub._lbfsize = 0; /* not line buffered */
lib/libc/stdio/findfp.c
148
fp->pub._fileno = -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
memset(WCIO_GET(fp), 0, sizeof(struct wchar_io_data));
lib/libc/stdio/findfp.c
156
return (fp);
lib/libc/stdio/fmemopen.c
155
FILE *fp;
lib/libc/stdio/fmemopen.c
168
fp = __sfp();
lib/libc/stdio/fmemopen.c
169
if (fp == NULL)
lib/libc/stdio/fmemopen.c
183
fp->_close = &fmemopen_close1;
lib/libc/stdio/fmemopen.c
188
fp->_close = &fmemopen_close0;
lib/libc/stdio/fmemopen.c
201
fp->pub._flags = flags;
lib/libc/stdio/fmemopen.c
202
fp->_write = (flags & __SRD) ? NULL : &fmemopen_write;
lib/libc/stdio/fmemopen.c
203
fp->_read = (flags & __SWR) ? NULL : &fmemopen_read;
lib/libc/stdio/fmemopen.c
204
fp->_seek = &fmemopen_seek;
lib/libc/stdio/fmemopen.c
205
fp->_cookie = (void *)cookie;
lib/libc/stdio/fmemopen.c
207
return fp;
lib/libc/stdio/fmemopen.c
214
fp->pub._flags = 0;
lib/libc/stdio/fopen.c
49
FILE *fp;
lib/libc/stdio/fopen.c
55
if ((fp = __sfp()) == NULL)
lib/libc/stdio/fopen.c
58
fp->pub._flags = 0; /* release */
lib/libc/stdio/fopen.c
61
fp->pub._fileno = f;
lib/libc/stdio/fopen.c
62
fp->pub._flags = flags;
lib/libc/stdio/fopen.c
63
fp->_cookie = fp;
lib/libc/stdio/fopen.c
64
fp->_read = __sread;
lib/libc/stdio/fopen.c
65
fp->_write = __swrite;
lib/libc/stdio/fopen.c
66
fp->_seek = __sseek;
lib/libc/stdio/fopen.c
67
fp->_close = __sclose;
lib/libc/stdio/fopen.c
77
_sseek(fp, (fpos_t)0, SEEK_END);
lib/libc/stdio/fopen.c
78
return (fp);
lib/libc/stdio/fopencookie.c
54
FILE *fp;
lib/libc/stdio/fopencookie.c
74
fp = funopen(thunk, readfn, writefn, _fopencookie_seek,
lib/libc/stdio/fopencookie.c
76
if (fp == NULL) {
lib/libc/stdio/fopencookie.c
82
fp->pub._flags |= __SAPP;
lib/libc/stdio/fopencookie.c
84
return (fp);
lib/libc/stdio/fparseln.c
107
if ((ptr = fgetln(fp, &s)) == NULL)
lib/libc/stdio/fparseln.c
71
fparseln(FILE *fp, size_t *size, size_t *lineno, const char str[3], int flags)
lib/libc/stdio/fparseln.c
82
_DIAGASSERT(fp != NULL);
lib/libc/stdio/fprintf.c
47
fprintf(FILE * __restrict fp, const char * __restrict fmt, ...)
lib/libc/stdio/fprintf.c
53
ret = vfprintf_l(fp, __get_locale(), fmt, ap);
lib/libc/stdio/fprintf.c
58
fprintf_l(FILE * __restrict fp, locale_t locale, const char * __restrict fmt, ...)
lib/libc/stdio/fprintf.c
65
ret = vfprintf_l(fp, locale, fmt, ap);
lib/libc/stdio/fpurge.c
49
fpurge(FILE *fp)
lib/libc/stdio/fpurge.c
52
FLOCKFILE(fp);
lib/libc/stdio/fpurge.c
53
if (!fp->pub._flags) {
lib/libc/stdio/fpurge.c
57
if (HASUB(fp))
lib/libc/stdio/fpurge.c
58
FREEUB(fp);
lib/libc/stdio/fpurge.c
59
fp->pub._p = fp->_bf._base;
lib/libc/stdio/fpurge.c
60
fp->pub._r = 0;
lib/libc/stdio/fpurge.c
61
fp->pub._w = fp->pub._flags & (__SLBF|__SNBF|__SRD) ? 0 : fp->_bf._size;
lib/libc/stdio/fpurge.c
64
FUNLOCKFILE(fp);
lib/libc/stdio/fputc.c
45
fputc_unlocked(int c, FILE *fp)
lib/libc/stdio/fputc.c
47
return (__sputc(c, fp));
lib/libc/stdio/fputc.c
51
fputc(int c, FILE *fp)
lib/libc/stdio/fputc.c
54
FLOCKFILE(fp);
lib/libc/stdio/fputc.c
55
retval = fputc_unlocked(c, fp);
lib/libc/stdio/fputc.c
56
FUNLOCKFILE(fp);
lib/libc/stdio/fputs.c
47
fputs_unlocked(const char * __restrict s, FILE * __restrict fp)
lib/libc/stdio/fputs.c
57
ORIENT(fp, -1);
lib/libc/stdio/fputs.c
58
retval = __sfvwrite(fp, &uio);
lib/libc/stdio/fputs.c
63
fputs(const char * __restrict s, FILE * __restrict fp)
lib/libc/stdio/fputs.c
67
FLOCKFILE(fp);
lib/libc/stdio/fputs.c
68
retval = fputs_unlocked(s, fp);
lib/libc/stdio/fputs.c
69
FUNLOCKFILE(fp);
lib/libc/stdio/fputwc.c
100
r = __fputwc(wc, fp, locale);
lib/libc/stdio/fputwc.c
101
FUNLOCKFILE(fp);
lib/libc/stdio/fputwc.c
106
fputwc(wchar_t wc, FILE *fp)
lib/libc/stdio/fputwc.c
108
return fputwc_l(wc, fp, __get_locale());
lib/libc/stdio/fputwc.c
50
__fputwc(wchar_t wc, FILE *fp, locale_t locale)
lib/libc/stdio/fputwc.c
58
ORIENT(fp, 1);
lib/libc/stdio/fputwc.c
59
wcio = WCIO_GET(fp);
lib/libc/stdio/fputwc.c
78
fp->pub._flags |= __SERR;
lib/libc/stdio/fputwc.c
84
if (__sputc((unsigned char)buf[i], fp) == EOF)
lib/libc/stdio/fputwc.c
94
fputwc_l(wchar_t wc, FILE *fp, locale_t locale)
lib/libc/stdio/fputwc.c
99
FLOCKFILE(fp);
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(fp);
lib/libc/stdio/fputws.c
59
ORIENT(fp, 1);
lib/libc/stdio/fputws.c
60
wcio = WCIO_GET(fp);
lib/libc/stdio/fputws.c
66
if (prepwrite(fp) != 0)
lib/libc/stdio/fputws.c
78
if (__sfvwrite(fp, &uio) != 0)
lib/libc/stdio/fputws.c
81
FUNLOCKFILE(fp);
lib/libc/stdio/fputws.c
85
FUNLOCKFILE(fp);
lib/libc/stdio/fputws.c
90
fputws(const wchar_t * __restrict ws, FILE * __restrict fp)
lib/libc/stdio/fputws.c
92
return fputws_l(ws, fp, __get_locale());
lib/libc/stdio/fread.c
48
fread(void * __restrict buf, size_t size, size_t count, FILE * __restrict fp)
lib/libc/stdio/fread.c
52
FLOCKFILE(fp);
lib/libc/stdio/fread.c
53
ret = __fread(buf, size, count, fp);
lib/libc/stdio/fread.c
54
FUNLOCKFILE(fp);
lib/libc/stdio/fread.c
59
__fread(void * __restrict buf, size_t size, size_t count, FILE * __restrict fp)
lib/libc/stdio/fread.c
73
ORIENT(fp, -1);
lib/libc/stdio/fread.c
74
if (fp->pub._r < 0)
lib/libc/stdio/fread.c
75
fp->pub._r = 0;
lib/libc/stdio/fread.c
78
while (resid > (r = fp->pub._r)) {
lib/libc/stdio/fread.c
79
memcpy((void *)p, (void *)fp->pub._p, (size_t)r);
lib/libc/stdio/fread.c
80
fp->pub._p += r;
lib/libc/stdio/fread.c
84
if (__srefill(fp)) {
lib/libc/stdio/fread.c
89
memcpy((void *)p, (void *)fp->pub._p, resid);
lib/libc/stdio/fread.c
90
fp->pub._r -= resid;
lib/libc/stdio/fread.c
91
fp->pub._p += resid;
lib/libc/stdio/freopen.c
102
if (_fcntl(fp->pub._fileno, F_SETFL, dflags) < 0) {
lib/libc/stdio/freopen.c
104
fclose(fp);
lib/libc/stdio/freopen.c
105
FUNLOCKFILE(fp);
lib/libc/stdio/freopen.c
111
ftruncate(fp->pub._fileno, (off_t)0);
lib/libc/stdio/freopen.c
113
_sseek(fp, (fpos_t)0, SEEK_SET);
lib/libc/stdio/freopen.c
115
(fdflags = _fcntl(fileno(fp), F_GETFD, 0)) != -1 &&
lib/libc/stdio/freopen.c
117
(void)_fcntl(fileno(fp), F_SETFD, fdflags | FD_CLOEXEC);
lib/libc/stdio/freopen.c
119
f = fp->pub._fileno;
lib/libc/stdio/freopen.c
133
if (fp->pub._flags == 0) {
lib/libc/stdio/freopen.c
134
fp->pub._flags = __SEOF; /* hold on to it */
lib/libc/stdio/freopen.c
139
if (fp->pub._flags & __SWR)
lib/libc/stdio/freopen.c
140
__sflush(fp);
lib/libc/stdio/freopen.c
142
isopen = fp->_close != NULL;
lib/libc/stdio/freopen.c
143
if ((wantfd = fp->pub._fileno) < 0 && isopen) {
lib/libc/stdio/freopen.c
144
(*fp->_close)(fp->_cookie);
lib/libc/stdio/freopen.c
154
(*fp->_close)(fp->_cookie);
lib/libc/stdio/freopen.c
168
(*fp->_close)(fp->_cookie);
lib/libc/stdio/freopen.c
169
if (fp->pub._flags & __SMBF)
lib/libc/stdio/freopen.c
170
free((char *)fp->_bf._base);
lib/libc/stdio/freopen.c
171
fp->pub._w = 0;
lib/libc/stdio/freopen.c
172
fp->pub._r = 0;
lib/libc/stdio/freopen.c
173
fp->pub._p = NULL;
lib/libc/stdio/freopen.c
174
fp->_bf._base = NULL;
lib/libc/stdio/freopen.c
175
fp->_bf._size = 0;
lib/libc/stdio/freopen.c
176
fp->pub._lbfsize = 0;
lib/libc/stdio/freopen.c
177
if (HASUB(fp))
lib/libc/stdio/freopen.c
178
FREEUB(fp);
lib/libc/stdio/freopen.c
179
fp->_ub._size = 0;
lib/libc/stdio/freopen.c
180
if (HASLB(fp))
lib/libc/stdio/freopen.c
181
FREELB(fp);
lib/libc/stdio/freopen.c
182
fp->_lb._size = 0;
lib/libc/stdio/freopen.c
183
memset(WCIO_GET(fp), 0, sizeof(struct wchar_io_data));
lib/libc/stdio/freopen.c
186
fp->pub._flags = 0; /* set it free */
lib/libc/stdio/freopen.c
187
FUNLOCKFILE(fp);
lib/libc/stdio/freopen.c
211
fp->pub._flags = flags;
lib/libc/stdio/freopen.c
212
fp->pub._fileno = f;
lib/libc/stdio/freopen.c
213
fp->_cookie = fp;
lib/libc/stdio/freopen.c
214
fp->_read = __sread;
lib/libc/stdio/freopen.c
215
fp->_write = __swrite;
lib/libc/stdio/freopen.c
216
fp->_seek = __sseek;
lib/libc/stdio/freopen.c
217
fp->_close = __sclose;
lib/libc/stdio/freopen.c
227
_sseek(fp, (fpos_t)0, SEEK_END);
lib/libc/stdio/freopen.c
228
FUNLOCKFILE(fp);
lib/libc/stdio/freopen.c
229
return (fp);
lib/libc/stdio/freopen.c
54
freopen(const char * __restrict file, const char * __restrict mode, FILE *fp)
lib/libc/stdio/freopen.c
61
fclose(fp);
lib/libc/stdio/freopen.c
66
FLOCKFILE(fp);
lib/libc/stdio/freopen.c
78
if (fp->pub._flags == 0) {
lib/libc/stdio/freopen.c
79
FUNLOCKFILE(fp);
lib/libc/stdio/freopen.c
83
if ((dflags = _fcntl(fp->pub._fileno, F_GETFL)) < 0) {
lib/libc/stdio/freopen.c
85
fclose(fp);
lib/libc/stdio/freopen.c
86
FUNLOCKFILE(fp);
lib/libc/stdio/freopen.c
92
fclose(fp);
lib/libc/stdio/freopen.c
93
FUNLOCKFILE(fp);
lib/libc/stdio/freopen.c
97
if (fp->pub._flags & __SWR)
lib/libc/stdio/freopen.c
98
__sflush(fp);
lib/libc/stdio/fscanf.c
51
fscanf(FILE * __restrict fp, char const * __restrict fmt, ...)
lib/libc/stdio/fscanf.c
57
FLOCKFILE(fp);
lib/libc/stdio/fscanf.c
58
ret = __svfscanf(fp, __get_locale(), fmt, ap);
lib/libc/stdio/fscanf.c
60
FUNLOCKFILE(fp);
lib/libc/stdio/fscanf.c
64
fscanf_l(FILE * __restrict fp, locale_t locale, char const * __restrict fmt, ...)
lib/libc/stdio/fscanf.c
71
FLOCKFILE(fp);
lib/libc/stdio/fscanf.c
72
ret = __svfscanf(fp, locale, fmt, ap);
lib/libc/stdio/fscanf.c
74
FUNLOCKFILE(fp);
lib/libc/stdio/fseek.c
102
if ((seekfn = fp->_seek) == NULL) {
lib/libc/stdio/fseek.c
119
if (_ftello(fp, &curoff))
lib/libc/stdio/fseek.c
166
if (fp->_bf._base == NULL)
lib/libc/stdio/fseek.c
167
__smakebuf(fp);
lib/libc/stdio/fseek.c
168
if (fp->pub._flags & (__SWR | __SRW | __SNBF | __SNPT))
lib/libc/stdio/fseek.c
170
if ((fp->pub._flags & __SOPT) == 0) {
lib/libc/stdio/fseek.c
172
fp->pub._fileno < 0 || _fstat(fp->pub._fileno, &st) ||
lib/libc/stdio/fseek.c
174
fp->pub._flags |= __SNPT;
lib/libc/stdio/fseek.c
177
fp->_blksize = st.st_blksize;
lib/libc/stdio/fseek.c
178
fp->pub._flags |= __SOPT;
lib/libc/stdio/fseek.c
188
if (_fstat(fp->pub._fileno, &st))
lib/libc/stdio/fseek.c
205
if (!havepos && _ftello(fp, &curoff))
lib/libc/stdio/fseek.c
212
if (fp->pub._flags & __SMOD)
lib/libc/stdio/fseek.c
221
if (HASUB(fp)) {
lib/libc/stdio/fseek.c
222
curoff += fp->pub._r; /* kill off ungetc */
lib/libc/stdio/fseek.c
223
n = fp->_up - fp->_bf._base;
lib/libc/stdio/fseek.c
225
n += fp->_ur;
lib/libc/stdio/fseek.c
227
n = fp->pub._p - fp->_bf._base;
lib/libc/stdio/fseek.c
229
n += fp->pub._r;
lib/libc/stdio/fseek.c
240
fp->pub._p = fp->_bf._base + o;
lib/libc/stdio/fseek.c
241
fp->pub._r = n - o;
lib/libc/stdio/fseek.c
242
if (HASUB(fp))
lib/libc/stdio/fseek.c
243
FREEUB(fp);
lib/libc/stdio/fseek.c
244
fp->pub._flags &= ~__SEOF;
lib/libc/stdio/fseek.c
245
memset(WCIO_GET(fp), 0, sizeof(struct wchar_io_data));
lib/libc/stdio/fseek.c
258
curoff = rounddown2(target, fp->_blksize);
lib/libc/stdio/fseek.c
259
if (_sseek(fp, curoff, SEEK_SET) == POS_ERR)
lib/libc/stdio/fseek.c
261
fp->pub._r = 0;
lib/libc/stdio/fseek.c
262
fp->pub._p = fp->_bf._base;
lib/libc/stdio/fseek.c
263
if (HASUB(fp))
lib/libc/stdio/fseek.c
264
FREEUB(fp);
lib/libc/stdio/fseek.c
267
if (__srefill(fp) || fp->pub._r < n)
lib/libc/stdio/fseek.c
269
fp->pub._p += n;
lib/libc/stdio/fseek.c
270
fp->pub._r -= n;
lib/libc/stdio/fseek.c
272
fp->pub._flags &= ~__SEOF;
lib/libc/stdio/fseek.c
273
memset(WCIO_GET(fp), 0, sizeof(struct wchar_io_data));
lib/libc/stdio/fseek.c
281
if (__sflush(fp) ||
lib/libc/stdio/fseek.c
282
(ret = _sseek(fp, (fpos_t)offset, whence)) == POS_ERR)
lib/libc/stdio/fseek.c
285
fp->pub._flags |= __SERR;
lib/libc/stdio/fseek.c
290
if (HASUB(fp))
lib/libc/stdio/fseek.c
291
FREEUB(fp);
lib/libc/stdio/fseek.c
292
fp->pub._p = fp->_bf._base;
lib/libc/stdio/fseek.c
293
fp->pub._r = 0;
lib/libc/stdio/fseek.c
295
fp->pub._flags &= ~__SEOF;
lib/libc/stdio/fseek.c
296
memset(WCIO_GET(fp), 0, sizeof(struct wchar_io_data));
lib/libc/stdio/fseek.c
51
fseek(FILE *fp, long offset, int whence)
lib/libc/stdio/fseek.c
60
FLOCKFILE(fp);
lib/libc/stdio/fseek.c
61
ret = _fseeko(fp, (off_t)offset, whence, 1);
lib/libc/stdio/fseek.c
62
FUNLOCKFILE(fp);
lib/libc/stdio/fseek.c
69
fseeko(FILE *fp, off_t offset, int whence)
lib/libc/stdio/fseek.c
78
FLOCKFILE(fp);
lib/libc/stdio/fseek.c
79
ret = _fseeko(fp, offset, whence, 0);
lib/libc/stdio/fseek.c
80
FUNLOCKFILE(fp);
lib/libc/stdio/fseek.c
91
_fseeko(FILE *fp, off_t offset, int whence, int ltest)
lib/libc/stdio/ftell.c
100
pos = _sseek(fp, (fpos_t)0, SEEK_CUR);
lib/libc/stdio/ftell.c
104
if (fp->pub._flags & __SRD) {
lib/libc/stdio/ftell.c
110
if ((pos -= (HASUB(fp) ? fp->_ur : fp->pub._r)) < 0) {
lib/libc/stdio/ftell.c
111
fp->pub._flags |= __SERR;
lib/libc/stdio/ftell.c
115
if (HASUB(fp))
lib/libc/stdio/ftell.c
116
pos -= fp->pub._r; /* Can be negative at this point. */
lib/libc/stdio/ftell.c
117
} else if ((fp->pub._flags & __SWR) && fp->pub._p != NULL) {
lib/libc/stdio/ftell.c
123
n = fp->pub._p - fp->_bf._base;
lib/libc/stdio/ftell.c
49
ftell(FILE *fp)
lib/libc/stdio/ftell.c
53
rv = ftello(fp);
lib/libc/stdio/ftell.c
65
ftello(FILE *fp)
lib/libc/stdio/ftell.c
70
FLOCKFILE(fp);
lib/libc/stdio/ftell.c
71
ret = _ftello(fp, &rv);
lib/libc/stdio/ftell.c
72
FUNLOCKFILE(fp);
lib/libc/stdio/ftell.c
83
_ftello(FILE *fp, fpos_t *offset)
lib/libc/stdio/ftell.c
88
if (fp->_seek == NULL) {
lib/libc/stdio/ftell.c
97
if (fp->pub._flags & __SOFF)
lib/libc/stdio/ftell.c
98
pos = fp->_offset;
lib/libc/stdio/funopen.c
46
FILE *fp;
lib/libc/stdio/funopen.c
61
if ((fp = __sfp()) == NULL)
lib/libc/stdio/funopen.c
63
fp->pub._flags = flags;
lib/libc/stdio/funopen.c
64
fp->pub._fileno = -1;
lib/libc/stdio/funopen.c
65
fp->_cookie = (void *)cookie;
lib/libc/stdio/funopen.c
66
fp->_read = readfn;
lib/libc/stdio/funopen.c
67
fp->_write = writefn;
lib/libc/stdio/funopen.c
68
fp->_seek = seekfn;
lib/libc/stdio/funopen.c
69
fp->_close = closefn;
lib/libc/stdio/funopen.c
70
return (fp);
lib/libc/stdio/fvwrite.c
103
if ((fp->pub._flags & (__SALC | __SSTR)) ==
lib/libc/stdio/fvwrite.c
104
(__SALC | __SSTR) && fp->pub._w < len) {
lib/libc/stdio/fvwrite.c
105
size_t blen = fp->pub._p - fp->_bf._base;
lib/libc/stdio/fvwrite.c
111
fp->pub._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->pub._p = fp->_bf._base + blen;
lib/libc/stdio/fvwrite.c
119
w = fp->pub._w;
lib/libc/stdio/fvwrite.c
120
if (fp->pub._flags & __SSTR) {
lib/libc/stdio/fvwrite.c
125
fp->pub._w -= w;
lib/libc/stdio/fvwrite.c
126
fp->pub._p += w;
lib/libc/stdio/fvwrite.c
129
} else if (fp->pub._p > fp->_bf._base && len > w) {
lib/libc/stdio/fvwrite.c
133
fp->pub._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->pub._w -= w;
lib/libc/stdio/fvwrite.c
146
fp->pub._p += w;
lib/libc/stdio/fvwrite.c
169
w = fp->pub._w + fp->_bf._size;
lib/libc/stdio/fvwrite.c
170
if (fp->pub._p > fp->_bf._base && s > w) {
lib/libc/stdio/fvwrite.c
173
fp->pub._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->pub._w -= w;
lib/libc/stdio/fvwrite.c
184
fp->pub._p += w;
lib/libc/stdio/fvwrite.c
188
if (__fflush(fp))
lib/libc/stdio/fvwrite.c
199
fp->pub._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->pub._p, (void *)p, (size_t)(n))
lib/libc/stdio/fvwrite.c
77
if (fp->pub._flags & __SNBF) {
lib/libc/stdio/fvwrite.c
83
w = _swrite(fp, p, MIN(len, BUFSIZ));
lib/libc/stdio/fvwrite.c
89
} else if ((fp->pub._flags & __SLBF) == 0) {
lib/libc/stdio/fwalk.c
44
FILE *fp;
lib/libc/stdio/fwalk.c
58
for (fp = g->iobs, n = g->niobs; --n >= 0; fp++)
lib/libc/stdio/fwalk.c
59
if ((fp->pub._flags != 0) &&
lib/libc/stdio/fwalk.c
60
((fp->pub._flags & __SIGN) == 0))
lib/libc/stdio/fwalk.c
61
ret |= (*function)(fp);
lib/libc/stdio/fwide.c
41
fwide(FILE *fp, int mode)
lib/libc/stdio/fwide.c
45
_DIAGASSERT(fp != NULL);
lib/libc/stdio/fwide.c
58
FLOCKFILE(fp);
lib/libc/stdio/fwide.c
59
wcio = WCIO_GET(fp);
lib/libc/stdio/fwide.c
67
FUNLOCKFILE(fp);
lib/libc/stdio/fwprintf.c
41
fwprintf(FILE * __restrict fp, const wchar_t * __restrict fmt, ...)
lib/libc/stdio/fwprintf.c
47
ret = vfwprintf(fp, fmt, ap);
lib/libc/stdio/fwprintf.c
53
fwprintf_l(FILE * __restrict fp, locale_t locale, const wchar_t * __restrict fmt, ...)
lib/libc/stdio/fwprintf.c
59
ret = vfwprintf_l(fp, locale, fmt, ap);
lib/libc/stdio/fwrite.c
48
FILE * __restrict fp)
lib/libc/stdio/fwrite.c
59
ORIENT(fp, -1);
lib/libc/stdio/fwrite.c
65
if (__sfvwrite(fp, &uio) != 0)
lib/libc/stdio/fwrite.c
72
FILE * __restrict fp)
lib/libc/stdio/fwrite.c
76
FLOCKFILE(fp);
lib/libc/stdio/fwrite.c
77
n = fwrite_unlocked(buf, size, count, fp);
lib/libc/stdio/fwrite.c
78
FUNLOCKFILE(fp);
lib/libc/stdio/fwscanf.c
41
fwscanf(FILE * __restrict fp, const wchar_t * __restrict fmt, ...)
lib/libc/stdio/fwscanf.c
47
r = vfwscanf(fp, fmt, ap);
lib/libc/stdio/fwscanf.c
53
fwscanf_l(FILE * __restrict fp, locale_t locale, const wchar_t * __restrict fmt, ...)
lib/libc/stdio/fwscanf.c
59
r = vfwscanf_l(fp, locale, fmt, ap);
lib/libc/stdio/getc.c
47
getc(FILE *fp)
lib/libc/stdio/getc.c
50
FLOCKFILE(fp);
lib/libc/stdio/getc.c
51
retval = __sgetc(fp);
lib/libc/stdio/getc.c
52
FUNLOCKFILE(fp);
lib/libc/stdio/getc.c
57
getc_unlocked(FILE *fp)
lib/libc/stdio/getc.c
59
return (__sgetc(fp));
lib/libc/stdio/getdelim.c
109
FILE * __restrict fp)
lib/libc/stdio/getdelim.c
114
FLOCKFILE(fp);
lib/libc/stdio/getdelim.c
115
ORIENT(fp, -1);
lib/libc/stdio/getdelim.c
125
if (fp->pub._r <= 0 && __srefill(fp)) {
lib/libc/stdio/getdelim.c
127
if (__sferror(fp) || expandtofit(linep, 1, linecapp))
lib/libc/stdio/getdelim.c
129
FUNLOCKFILE(fp);
lib/libc/stdio/getdelim.c
135
while ((endp = memchr(fp->pub._p, delim, fp->pub._r)) == NULL) {
lib/libc/stdio/getdelim.c
136
if (sappend(linep, &linelen, linecapp, fp->pub._p, fp->pub._r))
lib/libc/stdio/getdelim.c
138
if (__srefill(fp)) {
lib/libc/stdio/getdelim.c
139
if (__sferror(fp))
lib/libc/stdio/getdelim.c
145
if (sappend(linep, &linelen, linecapp, fp->pub._p, endp - fp->pub._p))
lib/libc/stdio/getdelim.c
147
fp->pub._r -= endp - fp->pub._p;
lib/libc/stdio/getdelim.c
148
fp->pub._p = endp;
lib/libc/stdio/getdelim.c
152
FUNLOCKFILE(fp);
lib/libc/stdio/getdelim.c
156
fp->pub._flags |= __SERR;
lib/libc/stdio/getdelim.c
157
FUNLOCKFILE(fp);
lib/libc/stdio/getline.c
33
FILE * __restrict fp)
lib/libc/stdio/getline.c
35
return (getdelim(linep, linecapp, '\n', fp));
lib/libc/stdio/getw.c
40
getw(FILE *fp)
lib/libc/stdio/getw.c
44
return (fread((void *)&x, sizeof(x), 1, fp) == 1 ? x : EOF);
lib/libc/stdio/getwc.c
50
getwc(FILE *fp)
lib/libc/stdio/getwc.c
53
return (fgetwc(fp));
lib/libc/stdio/getwc.c
56
getwc_l(FILE *fp, locale_t locale)
lib/libc/stdio/getwc.c
59
return (fgetwc_l(fp, locale));
lib/libc/stdio/local.h
107
return (__fgetwc_mbs(fp, st, &nread, locale));
lib/libc/stdio/local.h
114
#define prepwrite(fp) \
lib/libc/stdio/local.h
115
((((fp)->pub._flags & __SWR) == 0 || \
lib/libc/stdio/local.h
116
((fp)->_bf._base == NULL && ((fp)->pub._flags & __SSTR) == 0)) && \
lib/libc/stdio/local.h
117
__swsetup(fp))
lib/libc/stdio/local.h
123
#define HASUB(fp) ((fp)->_ub._base != NULL)
lib/libc/stdio/local.h
124
#define FREEUB(fp) { \
lib/libc/stdio/local.h
125
if ((fp)->_ub._base != (fp)->_ubuf) \
lib/libc/stdio/local.h
126
free((char *)(fp)->_ub._base); \
lib/libc/stdio/local.h
127
(fp)->_ub._base = NULL; \
lib/libc/stdio/local.h
133
#define HASLB(fp) ((fp)->_lb._base != NULL)
lib/libc/stdio/local.h
134
#define FREELB(fp) { \
lib/libc/stdio/local.h
135
free((char *)(fp)->_lb._base); \
lib/libc/stdio/local.h
136
(fp)->_lb._base = NULL; \
lib/libc/stdio/local.h
152
#define ORIENT(fp, o) _SET_ORIENTATION(fp, o)
lib/libc/stdio/local.h
60
extern int __fflush(FILE *fp);
lib/libc/stdio/local.h
88
FILE * __restrict fp);
lib/libc/stdio/local.h
92
__fgetwc(FILE *fp, locale_t locale)
lib/libc/stdio/local.h
98
_SET_ORIENTATION(fp,1);
lib/libc/stdio/local.h
99
wcio = WCIO_GET(fp);
lib/libc/stdio/makebuf.c
110
fp->_blksize = st.st_blksize;
lib/libc/stdio/makebuf.c
111
return ((st.st_mode & S_IFMT) == S_IFREG && fp->_seek == __sseek ?
lib/libc/stdio/makebuf.c
55
__smakebuf(FILE *fp)
lib/libc/stdio/makebuf.c
62
if (fp->pub._flags & __SNBF) {
lib/libc/stdio/makebuf.c
63
fp->_bf._base = fp->pub._p = fp->_nbuf;
lib/libc/stdio/makebuf.c
64
fp->_bf._size = 1;
lib/libc/stdio/makebuf.c
67
flags = __swhatbuf(fp, &size, &couldbetty);
lib/libc/stdio/makebuf.c
69
fp->pub._flags |= __SNBF;
lib/libc/stdio/makebuf.c
70
fp->_bf._base = fp->pub._p = fp->_nbuf;
lib/libc/stdio/makebuf.c
71
fp->_bf._size = 1;
lib/libc/stdio/makebuf.c
76
fp->_bf._base = fp->pub._p = p;
lib/libc/stdio/makebuf.c
77
fp->_bf._size = size;
lib/libc/stdio/makebuf.c
78
if (couldbetty && isatty(fp->pub._fileno))
lib/libc/stdio/makebuf.c
80
fp->pub._flags |= flags;
lib/libc/stdio/makebuf.c
87
__swhatbuf(FILE *fp, size_t *bufsize, int *couldbetty)
lib/libc/stdio/makebuf.c
91
if (fp->pub._fileno < 0 || _fstat(fp->pub._fileno, &st) < 0) {
lib/libc/stdio/open_memstream.c
174
FILE *fp;
lib/libc/stdio/open_memstream.c
196
fp = funopen(ms, NULL, memstream_write, memstream_seek,
lib/libc/stdio/open_memstream.c
198
if (fp == NULL) {
lib/libc/stdio/open_memstream.c
206
fwide(fp, -1);
lib/libc/stdio/open_memstream.c
207
return (fp);
lib/libc/stdio/open_wmemstream.c
235
FILE *fp;
lib/libc/stdio/open_wmemstream.c
258
fp = funopen(ms, NULL, wmemstream_write, wmemstream_seek,
lib/libc/stdio/open_wmemstream.c
260
if (fp == NULL) {
lib/libc/stdio/open_wmemstream.c
268
fwide(fp, 1);
lib/libc/stdio/open_wmemstream.c
269
return (fp);
lib/libc/stdio/printfcommon.h
155
return (__sprint(iop->fp, &iop->uio, locale));
lib/libc/stdio/printfcommon.h
67
FILE *fp;
lib/libc/stdio/printfcommon.h
73
io_init(struct io_state *iop, FILE *fp)
lib/libc/stdio/printfcommon.h
79
iop->fp = fp;
lib/libc/stdio/printfcommon.h
94
return (__sprint(iop->fp, &iop->uio, locale));
lib/libc/stdio/putc.c
46
putc(int c, FILE *fp)
lib/libc/stdio/putc.c
49
FLOCKFILE(fp);
lib/libc/stdio/putc.c
50
retval = __sputc(c, fp);
lib/libc/stdio/putc.c
51
FUNLOCKFILE(fp);
lib/libc/stdio/putc.c
56
putc_unlocked(int ch, FILE *fp)
lib/libc/stdio/putc.c
59
return (__sputc(ch, fp));
lib/libc/stdio/putw.c
44
putw(int w, FILE *fp)
lib/libc/stdio/putw.c
54
FLOCKFILE(fp);
lib/libc/stdio/putw.c
55
retval = __sfvwrite(fp, &uio);
lib/libc/stdio/putw.c
56
FUNLOCKFILE(fp);
lib/libc/stdio/putwc.c
50
putwc_l(wchar_t wc, FILE *fp, locale_t locale)
lib/libc/stdio/putwc.c
53
return (fputwc_l(wc, fp, locale));
lib/libc/stdio/putwc.c
56
putwc(wchar_t wc, FILE *fp)
lib/libc/stdio/putwc.c
58
return putwc_l(wc, fp, __get_locale());
lib/libc/stdio/refill.c
103
if (HASUB(fp)) {
lib/libc/stdio/refill.c
104
FREEUB(fp);
lib/libc/stdio/refill.c
105
if ((fp->pub._r = fp->_ur) != 0) {
lib/libc/stdio/refill.c
106
fp->pub._p = fp->_up;
lib/libc/stdio/refill.c
112
if (fp->_bf._base == NULL)
lib/libc/stdio/refill.c
113
__smakebuf(fp);
lib/libc/stdio/refill.c
120
if (fp->pub._flags & (__SLBF|__SNBF)) {
lib/libc/stdio/refill.c
122
fp->pub._flags |= __SIGN;
lib/libc/stdio/refill.c
124
fp->pub._flags &= ~__SIGN;
lib/libc/stdio/refill.c
127
if ((fp->pub._flags & (__SLBF|__SWR)) == (__SLBF|__SWR))
lib/libc/stdio/refill.c
128
__sflush(fp);
lib/libc/stdio/refill.c
130
fp->pub._p = fp->_bf._base;
lib/libc/stdio/refill.c
131
fp->pub._r = _sread(fp, (char *)fp->pub._p, fp->_bf._size);
lib/libc/stdio/refill.c
132
fp->pub._flags &= ~__SMOD; /* buffer contents are again pristine */
lib/libc/stdio/refill.c
133
if (fp->pub._r <= 0) {
lib/libc/stdio/refill.c
134
if (fp->pub._r == 0)
lib/libc/stdio/refill.c
135
fp->pub._flags |= __SEOF;
lib/libc/stdio/refill.c
137
fp->pub._r = 0;
lib/libc/stdio/refill.c
138
fp->pub._flags |= __SERR;
lib/libc/stdio/refill.c
48
lflush(FILE *fp)
lib/libc/stdio/refill.c
52
if ((fp->pub._flags & (__SLBF|__SWR)) == (__SLBF|__SWR)) {
lib/libc/stdio/refill.c
53
FLOCKFILE(fp);
lib/libc/stdio/refill.c
54
ret = __sflush(fp);
lib/libc/stdio/refill.c
55
FUNLOCKFILE(fp);
lib/libc/stdio/refill.c
65
__srefill(FILE *fp)
lib/libc/stdio/refill.c
72
ORIENT(fp, -1);
lib/libc/stdio/refill.c
74
fp->pub._r = 0; /* largely a convenience for callers */
lib/libc/stdio/refill.c
77
if (fp->pub._flags & __SEOF)
lib/libc/stdio/refill.c
81
if ((fp->pub._flags & __SRD) == 0) {
lib/libc/stdio/refill.c
82
if ((fp->pub._flags & __SRW) == 0) {
lib/libc/stdio/refill.c
84
fp->pub._flags |= __SERR;
lib/libc/stdio/refill.c
88
if (fp->pub._flags & __SWR) {
lib/libc/stdio/refill.c
89
if (__sflush(fp))
lib/libc/stdio/refill.c
91
fp->pub._flags &= ~__SWR;
lib/libc/stdio/refill.c
92
fp->pub._w = 0;
lib/libc/stdio/refill.c
93
fp->pub._lbfsize = 0;
lib/libc/stdio/refill.c
95
fp->pub._flags |= __SRD;
lib/libc/stdio/rewind.c
45
rewind(FILE *fp)
lib/libc/stdio/rewind.c
53
FLOCKFILE(fp);
lib/libc/stdio/rewind.c
54
if (_fseeko(fp, (off_t)0, SEEK_SET, 1) == 0) {
lib/libc/stdio/rewind.c
55
clearerr_unlocked(fp);
lib/libc/stdio/rewind.c
58
FUNLOCKFILE(fp);
lib/libc/stdio/rget.c
45
__srget(FILE *fp)
lib/libc/stdio/rget.c
47
if (__srefill(fp) == 0) {
lib/libc/stdio/rget.c
48
fp->pub._r--;
lib/libc/stdio/rget.c
49
return (*fp->pub._p++);
lib/libc/stdio/setbuf.c
41
setbuf(FILE * __restrict fp, char * __restrict buf)
lib/libc/stdio/setbuf.c
43
setvbuf(fp, buf, buf ? _IOFBF : _IONBF, BUFSIZ);
lib/libc/stdio/setbuffer.c
40
setbuffer(FILE *fp, char *buf, int size)
lib/libc/stdio/setbuffer.c
43
setvbuf(fp, buf, buf ? _IOFBF : _IONBF, (size_t)size);
lib/libc/stdio/setbuffer.c
50
setlinebuf(FILE *fp)
lib/libc/stdio/setbuffer.c
53
return (setvbuf(fp, NULL, _IOLBF, (size_t)0));
lib/libc/stdio/setvbuf.c
111
fp->pub._flags = flags | __SNBF;
lib/libc/stdio/setvbuf.c
112
fp->pub._w = 0;
lib/libc/stdio/setvbuf.c
113
fp->_bf._base = fp->pub._p = fp->_nbuf;
lib/libc/stdio/setvbuf.c
114
fp->_bf._size = 1;
lib/libc/stdio/setvbuf.c
115
FUNLOCKFILE(fp);
lib/libc/stdio/setvbuf.c
136
fp->pub._flags = flags;
lib/libc/stdio/setvbuf.c
137
fp->_bf._base = fp->pub._p = (unsigned char *)buf;
lib/libc/stdio/setvbuf.c
138
fp->_bf._size = size;
lib/libc/stdio/setvbuf.c
146
fp->pub._w = 0;
lib/libc/stdio/setvbuf.c
147
fp->pub._lbfsize = -fp->_bf._size;
lib/libc/stdio/setvbuf.c
149
fp->pub._w = size;
lib/libc/stdio/setvbuf.c
152
fp->pub._w = 0;
lib/libc/stdio/setvbuf.c
156
FUNLOCKFILE(fp);
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(fp);
lib/libc/stdio/setvbuf.c
71
__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->pub._r = fp->pub._lbfsize = 0;
lib/libc/stdio/setvbuf.c
75
flags = fp->pub._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/sreadahead.c
51
__sreadahead(FILE *fp)
lib/libc/stdio/sreadahead.c
55
count = fp->pub._r;
lib/libc/stdio/sreadahead.c
56
if (HASUB(fp))
lib/libc/stdio/sreadahead.c
57
count += fp->_ur;
lib/libc/stdio/stdio.c
102
_swrite(FILE *fp, const char *buf, int n)
lib/libc/stdio/stdio.c
107
if (fp->pub._flags & __SAPP) {
lib/libc/stdio/stdio.c
109
if (_sseek(fp, (fpos_t)0, SEEK_END) == -1 &&
lib/libc/stdio/stdio.c
110
(fp->pub._flags & __SOPT))
lib/libc/stdio/stdio.c
114
ret = (*fp->_write)(fp->_cookie, buf, n);
lib/libc/stdio/stdio.c
117
if ((fp->pub._flags & (__SAPP|__SOFF)) == (__SAPP|__SOFF) &&
lib/libc/stdio/stdio.c
118
fp->_offset <= OFF_MAX - ret)
lib/libc/stdio/stdio.c
119
fp->_offset += ret;
lib/libc/stdio/stdio.c
121
fp->pub._flags &= ~__SOFF;
lib/libc/stdio/stdio.c
124
fp->pub._flags &= ~__SOFF;
lib/libc/stdio/stdio.c
129
_sseek(FILE *fp, fpos_t offset, int whence)
lib/libc/stdio/stdio.c
136
ret = (*fp->_seek)(fp->_cookie, offset, whence);
lib/libc/stdio/stdio.c
148
if (HASUB(fp))
lib/libc/stdio/stdio.c
149
FREEUB(fp);
lib/libc/stdio/stdio.c
150
fp->pub._p = fp->_bf._base;
lib/libc/stdio/stdio.c
151
fp->pub._r = 0;
lib/libc/stdio/stdio.c
152
fp->pub._flags &= ~__SEOF;
lib/libc/stdio/stdio.c
154
fp->pub._flags |= __SERR;
lib/libc/stdio/stdio.c
157
fp->pub._flags &= ~__SAPP;
lib/libc/stdio/stdio.c
158
fp->pub._flags &= ~__SOFF;
lib/libc/stdio/stdio.c
160
} else if (fp->pub._flags & __SOPT) {
lib/libc/stdio/stdio.c
161
fp->pub._flags |= __SOFF;
lib/libc/stdio/stdio.c
162
fp->_offset = ret;
lib/libc/stdio/stdio.c
52
FILE *fp = cookie;
lib/libc/stdio/stdio.c
54
return(_read(fp->pub._fileno, buf, (size_t)n));
lib/libc/stdio/stdio.c
60
FILE *fp = cookie;
lib/libc/stdio/stdio.c
62
return (_write(fp->pub._fileno, buf, (size_t)n));
lib/libc/stdio/stdio.c
68
FILE *fp = cookie;
lib/libc/stdio/stdio.c
70
return (lseek(fp->pub._fileno, (off_t)offset, whence));
lib/libc/stdio/stdio.c
84
_sread(FILE *fp, char *buf, int n)
lib/libc/stdio/stdio.c
88
ret = (*fp->_read)(fp->_cookie, buf, n);
lib/libc/stdio/stdio.c
90
if (fp->pub._flags & __SOFF) {
lib/libc/stdio/stdio.c
91
if (fp->_offset <= OFF_MAX - ret)
lib/libc/stdio/stdio.c
92
fp->_offset += ret;
lib/libc/stdio/stdio.c
94
fp->pub._flags &= ~__SOFF;
lib/libc/stdio/stdio.c
97
fp->pub._flags &= ~__SOFF;
lib/libc/stdio/tmpfile.c
52
FILE *fp;
lib/libc/stdio/tmpfile.c
83
if ((fp = fdopen(fd, "w+")) == NULL) {
lib/libc/stdio/tmpfile.c
89
return (fp);
lib/libc/stdio/ungetc.c
105
__ungetc(int c, FILE *fp)
lib/libc/stdio/ungetc.c
109
if ((fp->pub._flags & __SRD) == 0) {
lib/libc/stdio/ungetc.c
114
if ((fp->pub._flags & __SRW) == 0)
lib/libc/stdio/ungetc.c
116
if (fp->pub._flags & __SWR) {
lib/libc/stdio/ungetc.c
117
if (__sflush(fp))
lib/libc/stdio/ungetc.c
119
fp->pub._flags &= ~__SWR;
lib/libc/stdio/ungetc.c
120
fp->pub._w = 0;
lib/libc/stdio/ungetc.c
121
fp->pub._lbfsize = 0;
lib/libc/stdio/ungetc.c
123
fp->pub._flags |= __SRD;
lib/libc/stdio/ungetc.c
131
if (HASUB(fp)) {
lib/libc/stdio/ungetc.c
132
if (fp->pub._r >= fp->_ub._size && __submore(fp))
lib/libc/stdio/ungetc.c
134
*--fp->pub._p = c;
lib/libc/stdio/ungetc.c
135
fp->pub._r++;
lib/libc/stdio/ungetc.c
138
fp->pub._flags &= ~__SEOF;
lib/libc/stdio/ungetc.c
145
if (fp->_bf._base != NULL && fp->pub._p > fp->_bf._base &&
lib/libc/stdio/ungetc.c
146
fp->pub._p[-1] == c) {
lib/libc/stdio/ungetc.c
147
fp->pub._p--;
lib/libc/stdio/ungetc.c
148
fp->pub._r++;
lib/libc/stdio/ungetc.c
156
fp->_ur = fp->pub._r;
lib/libc/stdio/ungetc.c
157
fp->_up = fp->pub._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->pub._p = &fp->_ubuf[sizeof(fp->_ubuf) - 1];
lib/libc/stdio/ungetc.c
162
fp->pub._r = 1;
lib/libc/stdio/ungetc.c
53
__submore(FILE *fp)
lib/libc/stdio/ungetc.c
58
if (fp->_ub._base == fp->_ubuf) {
lib/libc/stdio/ungetc.c
64
fp->_ub._base = p;
lib/libc/stdio/ungetc.c
65
fp->_ub._size = BUFSIZ;
lib/libc/stdio/ungetc.c
66
p += BUFSIZ - sizeof(fp->_ubuf);
lib/libc/stdio/ungetc.c
67
for (i = sizeof(fp->_ubuf); --i >= 0;)
lib/libc/stdio/ungetc.c
68
p[i] = fp->_ubuf[i];
lib/libc/stdio/ungetc.c
69
fp->pub._p = p;
lib/libc/stdio/ungetc.c
72
i = fp->_ub._size;
lib/libc/stdio/ungetc.c
73
p = realloc(fp->_ub._base, (size_t)(i << 1));
lib/libc/stdio/ungetc.c
78
fp->pub._p = p + i;
lib/libc/stdio/ungetc.c
79
fp->_ub._base = p;
lib/libc/stdio/ungetc.c
80
fp->_ub._size = i << 1;
lib/libc/stdio/ungetc.c
88
ungetc(int c, FILE *fp)
lib/libc/stdio/ungetc.c
94
FLOCKFILE(fp);
lib/libc/stdio/ungetc.c
95
ORIENT(fp, -1);
lib/libc/stdio/ungetc.c
96
ret = __ungetc(c, fp);
lib/libc/stdio/ungetc.c
97
FUNLOCKFILE(fp);
lib/libc/stdio/ungetwc.c
51
__ungetwc(wint_t wc, FILE *fp, locale_t locale)
lib/libc/stdio/ungetwc.c
59
ORIENT(fp,1);
lib/libc/stdio/ungetwc.c
60
wcio = WCIO_GET(fp);
lib/libc/stdio/ungetwc.c
70
fp->pub._flags |= __SERR;
lib/libc/stdio/ungetwc.c
74
if (__ungetc((unsigned char)buf[len], fp) == EOF)
lib/libc/stdio/ungetwc.c
84
ungetwc_l(wint_t wc, FILE *fp, locale_t locale)
lib/libc/stdio/ungetwc.c
89
FLOCKFILE(fp);
lib/libc/stdio/ungetwc.c
90
ORIENT(fp, 1);
lib/libc/stdio/ungetwc.c
91
r = __ungetwc(wc, fp, locale);
lib/libc/stdio/ungetwc.c
92
FUNLOCKFILE(fp);
lib/libc/stdio/ungetwc.c
97
ungetwc(wint_t wc, FILE *fp)
lib/libc/stdio/ungetwc.c
99
return ungetwc_l(wc, fp, __get_locale());
lib/libc/stdio/vfprintf.c
1027
if (__sferror(fp))
lib/libc/stdio/vfprintf.c
153
__sprint(FILE *fp, struct __suio *uio, locale_t locale __unused)
lib/libc/stdio/vfprintf.c
161
err = __sfvwrite(fp, uio);
lib/libc/stdio/vfprintf.c
173
__sbprintf(FILE *fp, locale_t locale, const char *fmt, va_list ap)
lib/libc/stdio/vfprintf.c
180
if (prepwrite(fp) != 0)
lib/libc/stdio/vfprintf.c
184
fake.pub._flags = fp->pub._flags & ~__SNBF;
lib/libc/stdio/vfprintf.c
185
fake.pub._fileno = fp->pub._fileno;
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
199
fp->pub._flags |= __SERR;
lib/libc/stdio/vfprintf.c
266
vfprintf_l(FILE * __restrict fp, locale_t locale, const char * __restrict fmt0,
lib/libc/stdio/vfprintf.c
272
FLOCKFILE(fp);
lib/libc/stdio/vfprintf.c
274
if ((fp->pub._flags & (__SNBF|__SWR|__SRW)) == (__SNBF|__SWR) &&
lib/libc/stdio/vfprintf.c
275
fp->pub._fileno >= 0)
lib/libc/stdio/vfprintf.c
276
ret = __sbprintf(fp, locale, fmt0, ap);
lib/libc/stdio/vfprintf.c
278
ret = __vfprintf(fp, locale, fmt0, ap);
lib/libc/stdio/vfprintf.c
279
FUNLOCKFILE(fp);
lib/libc/stdio/vfprintf.c
283
vfprintf(FILE * __restrict fp, const char * __restrict fmt0, va_list ap)
lib/libc/stdio/vfprintf.c
285
return vfprintf_l(fp, __get_locale(), fmt0, ap);
lib/libc/stdio/vfprintf.c
303
__vfprintf(FILE *fp, locale_t locale, const char *fmt0, va_list ap)
lib/libc/stdio/vfprintf.c
450
return (__xvprintf(fp, fmt0, ap));
lib/libc/stdio/vfprintf.c
453
if (prepwrite(fp) != 0) {
lib/libc/stdio/vfprintf.c
463
io_init(&io, fp);
lib/libc/stdio/vfprintf.c
618
fp->pub._flags |= __SERR;
lib/libc/stdio/vfprintf.c
829
fp->pub._flags |= __SERR;
lib/libc/stdio/vfscanf.c
1084
if (--fp->pub._r > 0)
lib/libc/stdio/vfscanf.c
1085
fp->pub._p++;
lib/libc/stdio/vfscanf.c
1086
else if (__srefill(fp))
lib/libc/stdio/vfscanf.c
1092
__ungetc(*(u_char *)p, fp);
lib/libc/stdio/vfscanf.c
129
convert_char(FILE *fp, char * p, int width)
lib/libc/stdio/vfscanf.c
136
if ((n = fp->pub._r) < width) {
lib/libc/stdio/vfscanf.c
139
fp->pub._p += n;
lib/libc/stdio/vfscanf.c
140
if (__srefill(fp)) {
lib/libc/stdio/vfscanf.c
147
fp->pub._r -= width;
lib/libc/stdio/vfscanf.c
148
fp->pub._p += width;
lib/libc/stdio/vfscanf.c
154
size_t r = __fread(p, 1, width, fp);
lib/libc/stdio/vfscanf.c
163
convert_wchar(FILE *fp, wchar_t *wcp, int width, locale_t locale)
lib/libc/stdio/vfscanf.c
172
(wi = __fgetwc_mbs(fp, &mbs, &nread, locale)) != WEOF) {
lib/libc/stdio/vfscanf.c
183
convert_ccl(FILE *fp, char * p, int width, const char *ccltab)
lib/libc/stdio/vfscanf.c
190
while (ccltab[*fp->pub._p]) {
lib/libc/stdio/vfscanf.c
191
n++, fp->pub._r--, fp->pub._p++;
lib/libc/stdio/vfscanf.c
194
if (fp->pub._r <= 0 && __srefill(fp)) {
lib/libc/stdio/vfscanf.c
202
while (ccltab[*fp->pub._p]) {
lib/libc/stdio/vfscanf.c
203
fp->pub._r--;
lib/libc/stdio/vfscanf.c
204
*p++ = *fp->pub._p++;
lib/libc/stdio/vfscanf.c
207
if (fp->pub._r <= 0 && __srefill(fp)) {
lib/libc/stdio/vfscanf.c
222
convert_wccl(FILE *fp, wchar_t *wcp, int width, const char *ccltab,
lib/libc/stdio/vfscanf.c
232
while ((wi = __fgetwc_mbs(fp, &mbs, &nread, locale)) != WEOF &&
lib/libc/stdio/vfscanf.c
236
__ungetwc(wi, fp, __get_locale());
lib/libc/stdio/vfscanf.c
238
while ((wi = __fgetwc_mbs(fp, &mbs, &nread, locale)) != WEOF &&
lib/libc/stdio/vfscanf.c
244
__ungetwc(wi, fp, __get_locale());
lib/libc/stdio/vfscanf.c
253
convert_string(FILE *fp, char * p, int width)
lib/libc/stdio/vfscanf.c
260
while (!isspace(*fp->pub._p)) {
lib/libc/stdio/vfscanf.c
261
n++, fp->pub._r--, fp->pub._p++;
lib/libc/stdio/vfscanf.c
264
if (fp->pub._r <= 0 && __srefill(fp))
lib/libc/stdio/vfscanf.c
269
while (!isspace(*fp->pub._p)) {
lib/libc/stdio/vfscanf.c
270
fp->pub._r--;
lib/libc/stdio/vfscanf.c
271
*p++ = *fp->pub._p++;
lib/libc/stdio/vfscanf.c
274
if (fp->pub._r <= 0 && __srefill(fp))
lib/libc/stdio/vfscanf.c
284
convert_wstring(FILE *fp, wchar_t *wcp, int width, locale_t locale)
lib/libc/stdio/vfscanf.c
293
while ((wi = __fgetwc_mbs(fp, &mbs, &nread, locale)) != WEOF &&
lib/libc/stdio/vfscanf.c
297
__ungetwc(wi, fp, __get_locale());
lib/libc/stdio/vfscanf.c
299
while ((wi = __fgetwc_mbs(fp, &mbs, &nread, locale)) != WEOF &&
lib/libc/stdio/vfscanf.c
305
__ungetwc(wi, fp, __get_locale());
lib/libc/stdio/vfscanf.c
319
parseint(FILE *fp, char * __restrict buf, int width, int base, int flags)
lib/libc/stdio/vfscanf.c
329
c = *fp->pub._p;
lib/libc/stdio/vfscanf.c
416
if (--fp->pub._r > 0)
lib/libc/stdio/vfscanf.c
417
fp->pub._p++;
lib/libc/stdio/vfscanf.c
418
else if (__srefill(fp))
lib/libc/stdio/vfscanf.c
428
(void) __ungetc(*(u_char *)--p, fp);
lib/libc/stdio/vfscanf.c
434
(void) __ungetc(c, fp);
lib/libc/stdio/vfscanf.c
443
__vfscanf(FILE *fp, char const *fmt0, va_list ap)
lib/libc/stdio/vfscanf.c
447
FLOCKFILE(fp);
lib/libc/stdio/vfscanf.c
448
ret = __svfscanf(fp, __get_locale(), fmt0, ap);
lib/libc/stdio/vfscanf.c
449
FUNLOCKFILE(fp);
lib/libc/stdio/vfscanf.c
456
vfscanf_l(FILE *fp, locale_t locale, char const *fmt0, va_list ap)
lib/libc/stdio/vfscanf.c
461
FLOCKFILE(fp);
lib/libc/stdio/vfscanf.c
462
ret = __svfscanf(fp, locale, fmt0, ap);
lib/libc/stdio/vfscanf.c
463
FUNLOCKFILE(fp);
lib/libc/stdio/vfscanf.c
471
__svfscanf(FILE *fp, locale_t locale, const char *fmt0, va_list ap)
lib/libc/stdio/vfscanf.c
486
ORIENT(fp, -1);
lib/libc/stdio/vfscanf.c
496
while ((fp->pub._r > 0 || __srefill(fp) == 0) && isspace(*fp->pub._p))
lib/libc/stdio/vfscanf.c
497
nread++, fp->pub._r--, fp->pub._p++;
lib/libc/stdio/vfscanf.c
512
if (fp->pub._r <= 0 && __srefill(fp))
lib/libc/stdio/vfscanf.c
514
if (*fp->pub._p != c)
lib/libc/stdio/vfscanf.c
516
fp->pub._r--, fp->pub._p++;
lib/libc/stdio/vfscanf.c
660
if (fp->pub._r <= 0 && __srefill(fp))
lib/libc/stdio/vfscanf.c
668
while (isspace(*fp->pub._p)) {
lib/libc/stdio/vfscanf.c
670
if (--fp->pub._r > 0)
lib/libc/stdio/vfscanf.c
671
fp->pub._p++;
lib/libc/stdio/vfscanf.c
672
else if (__srefill(fp))
lib/libc/stdio/vfscanf.c
692
nr = convert_wchar(fp, GETARG(wchar_t *),
lib/libc/stdio/vfscanf.c
695
nr = convert_char(fp, GETARG(char *), width);
lib/libc/stdio/vfscanf.c
706
nr = convert_wccl(fp, GETARG(wchar_t *), width,
lib/libc/stdio/vfscanf.c
709
nr = convert_ccl(fp, GETARG(char *), width,
lib/libc/stdio/vfscanf.c
725
nr = convert_wstring(fp, GETARG(wchar_t *),
lib/libc/stdio/vfscanf.c
728
nr = convert_string(fp, GETARG(char *), width);
lib/libc/stdio/vfscanf.c
745
nr = parseint(fp, buf, width, base, flags);
lib/libc/stdio/vfscanf.c
783
nr = parsefloat(fp, buf, buf + width, locale);
lib/libc/stdio/vfscanf.c
929
parsefloat(FILE *fp, char *buf, char *end, locale_t locale)
lib/libc/stdio/vfscanf.c
952
c = *fp->pub._p;
lib/libc/stdio/vfwprintf.c
1087
if (__sferror(fp))
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.pub._flags = fp->pub._flags & ~__SNBF;
lib/libc/stdio/vfwprintf.c
221
fake.pub._fileno = fp->pub._fileno;
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
235
fp->pub._flags |= __SERR;
lib/libc/stdio/vfwprintf.c
244
__xfputwc(wchar_t wc, FILE *fp, locale_t locale)
lib/libc/stdio/vfwprintf.c
252
if ((fp->pub._flags & __SSTR) == 0)
lib/libc/stdio/vfwprintf.c
253
return (__fputwc(wc, fp, locale));
lib/libc/stdio/vfwprintf.c
257
fp->pub._flags |= __SERR;
lib/libc/stdio/vfwprintf.c
265
return (__sfvwrite(fp, &uio) != EOF ? (wint_t)wc : WEOF);
lib/libc/stdio/vfwprintf.c
345
vfwprintf_l(FILE * __restrict fp, locale_t locale,
lib/libc/stdio/vfwprintf.c
351
FLOCKFILE(fp);
lib/libc/stdio/vfwprintf.c
353
if ((fp->pub._flags & (__SNBF|__SWR|__SRW)) == (__SNBF|__SWR) &&
lib/libc/stdio/vfwprintf.c
354
fp->pub._fileno >= 0)
lib/libc/stdio/vfwprintf.c
355
ret = __sbprintf(fp, locale, fmt0, ap);
lib/libc/stdio/vfwprintf.c
357
ret = __vfwprintf(fp, locale, fmt0, ap);
lib/libc/stdio/vfwprintf.c
358
FUNLOCKFILE(fp);
lib/libc/stdio/vfwprintf.c
362
vfwprintf(FILE * __restrict fp, const wchar_t * __restrict fmt0, va_list ap)
lib/libc/stdio/vfwprintf.c
364
return vfwprintf_l(fp, __get_locale(), fmt0, ap);
lib/libc/stdio/vfwprintf.c
382
__vfwprintf(FILE *fp, locale_t locale, const wchar_t *fmt0, va_list ap)
lib/libc/stdio/vfwprintf.c
526
if (prepwrite(fp) != 0)
lib/libc/stdio/vfwprintf.c
534
io_init(&io, fp);
lib/libc/stdio/vfwprintf.c
893
fp->pub._flags |= __SERR;
lib/libc/stdio/vfwscanf.c
141
convert_char(FILE *fp, char * mbp, int width, locale_t locale)
lib/libc/stdio/vfwscanf.c
150
while (width-- != 0 && (wi = __fgetwc(fp, locale)) != WEOF) {
lib/libc/stdio/vfwscanf.c
165
convert_wchar(FILE *fp, wchar_t *wcp, int width, locale_t locale)
lib/libc/stdio/vfwscanf.c
171
while (width-- != 0 && (wi = __fgetwc(fp, locale)) != WEOF) {
lib/libc/stdio/vfwscanf.c
182
convert_ccl(FILE *fp, char * mbp, int width, const struct ccl *ccl,
lib/libc/stdio/vfwscanf.c
192
while ((wi = __fgetwc(fp, locale)) != WEOF &&
lib/libc/stdio/vfwscanf.c
203
__ungetwc(wi, fp, locale);
lib/libc/stdio/vfwscanf.c
210
convert_wccl(FILE *fp, wchar_t *wcp, int width, const struct ccl *ccl,
lib/libc/stdio/vfwscanf.c
219
while ((wi = __fgetwc(fp, locale)) != WEOF &&
lib/libc/stdio/vfwscanf.c
223
__ungetwc(wi, fp, locale);
lib/libc/stdio/vfwscanf.c
226
while ((wi = __fgetwc(fp, locale)) != WEOF &&
lib/libc/stdio/vfwscanf.c
230
__ungetwc(wi, fp, locale);
lib/libc/stdio/vfwscanf.c
240
convert_string(FILE *fp, char * mbp, int width, locale_t locale)
lib/libc/stdio/vfwscanf.c
249
while ((wi = __fgetwc(fp, locale)) != WEOF && width-- != 0 &&
lib/libc/stdio/vfwscanf.c
260
__ungetwc(wi, fp, locale);
lib/libc/stdio/vfwscanf.c
267
convert_wstring(FILE *fp, wchar_t *wcp, int width, locale_t locale)
lib/libc/stdio/vfwscanf.c
275
while ((wi = __fgetwc(fp, locale)) != WEOF &&
lib/libc/stdio/vfwscanf.c
279
__ungetwc(wi, fp, locale);
lib/libc/stdio/vfwscanf.c
282
while ((wi = __fgetwc(fp, locale)) != WEOF &&
lib/libc/stdio/vfwscanf.c
288
__ungetwc(wi, fp, locale);
lib/libc/stdio/vfwscanf.c
302
parseint(FILE *fp, wchar_t *buf, int width, int base, int flags,
lib/libc/stdio/vfwscanf.c
313
c = __fgetwc(fp, locale);
lib/libc/stdio/vfwscanf.c
395
__ungetwc(c, fp, locale);
lib/libc/stdio/vfwscanf.c
410
__ungetwc(*--wcp, fp, locale);
lib/libc/stdio/vfwscanf.c
416
__ungetwc(c, fp, locale);
lib/libc/stdio/vfwscanf.c
425
vfwscanf_l(FILE * __restrict fp, locale_t locale,
lib/libc/stdio/vfwscanf.c
431
FLOCKFILE(fp);
lib/libc/stdio/vfwscanf.c
432
ORIENT(fp, 1);
lib/libc/stdio/vfwscanf.c
433
ret = __vfwscanf(fp, locale, fmt, ap);
lib/libc/stdio/vfwscanf.c
434
FUNLOCKFILE(fp);
lib/libc/stdio/vfwscanf.c
438
vfwscanf(FILE * __restrict fp, const wchar_t * __restrict fmt, va_list ap)
lib/libc/stdio/vfwscanf.c
440
return vfwscanf_l(fp, __get_locale(), fmt, ap);
lib/libc/stdio/vfwscanf.c
447
__vfwscanf(FILE * __restrict fp, locale_t locale,
lib/libc/stdio/vfwscanf.c
472
while ((c = __fgetwc(fp, locale)) != WEOF &&
lib/libc/stdio/vfwscanf.c
476
__ungetwc(c, fp, locale);
lib/libc/stdio/vfwscanf.c
491
if ((wi = __fgetwc(fp, locale)) == WEOF)
lib/libc/stdio/vfwscanf.c
494
__ungetwc(wi, fp, locale);
lib/libc/stdio/vfwscanf.c
653
while ((wi = __fgetwc(fp, locale)) != WEOF && iswspace(wi))
lib/libc/stdio/vfwscanf.c
657
__ungetwc(wi, fp, locale);
lib/libc/stdio/vfwscanf.c
670
nr = convert_wchar(fp, GETARG(wchar_t *), width,
lib/libc/stdio/vfwscanf.c
673
nr = convert_char(fp, GETARG(char *), width,
lib/libc/stdio/vfwscanf.c
686
nr = convert_wccl(fp, GETARG(wchar_t *), width,
lib/libc/stdio/vfwscanf.c
689
nr = convert_ccl(fp, GETARG(char *), width,
lib/libc/stdio/vfwscanf.c
705
nr = convert_wstring(fp, GETARG(wchar_t *),
lib/libc/stdio/vfwscanf.c
708
nr = convert_string(fp, GETARG(char *), width,
lib/libc/stdio/vfwscanf.c
721
nr = parseint(fp, buf, width, base, flags, locale);
lib/libc/stdio/vfwscanf.c
760
nr = parsefloat(fp, buf, buf + width, locale);
lib/libc/stdio/vfwscanf.c
791
parsefloat(FILE *fp, wchar_t *buf, wchar_t *end, locale_t locale)
lib/libc/stdio/vfwscanf.c
822
if ((c = __fgetwc(fp, locale)) == WEOF)
lib/libc/stdio/vfwscanf.c
942
__ungetwc(c, fp, locale);
lib/libc/stdio/vfwscanf.c
944
__ungetwc(*p, fp, locale);
lib/libc/stdio/wbuf.c
47
__swbuf(int c, FILE *fp)
lib/libc/stdio/wbuf.c
58
fp->pub._w = fp->pub._lbfsize;
lib/libc/stdio/wbuf.c
59
if (prepwrite(fp) != 0)
lib/libc/stdio/wbuf.c
63
ORIENT(fp, -1);
lib/libc/stdio/wbuf.c
74
n = fp->pub._p - fp->_bf._base;
lib/libc/stdio/wbuf.c
75
if (n >= fp->_bf._size) {
lib/libc/stdio/wbuf.c
76
if (__fflush(fp))
lib/libc/stdio/wbuf.c
80
fp->pub._w--;
lib/libc/stdio/wbuf.c
81
*fp->pub._p++ = c;
lib/libc/stdio/wbuf.c
82
if (++n == fp->_bf._size || (fp->pub._flags & __SLBF && c == '\n'))
lib/libc/stdio/wbuf.c
83
if (__fflush(fp))
lib/libc/stdio/wcio.h
50
#define _SET_ORIENTATION(fp, mode) \
lib/libc/stdio/wcio.h
52
struct wchar_io_data *_wcio = WCIO_GET(fp);\
lib/libc/stdio/wcio.h
60
#define WCIO_GET(fp) (&(fp)->_wcio)
lib/libc/stdio/wcio.h
61
#define WCIO_FREE(fp) \
lib/libc/stdio/wcio.h
63
(fp)->_wcio.wcio_mode = 0;\
lib/libc/stdio/wcio.h
64
WCIO_FREEUB(fp);\
lib/libc/stdio/wcio.h
66
#define WCIO_FREEUB(fp) \
lib/libc/stdio/wcio.h
68
(fp)->_wcio.wcio_ungetwc_inbuf = 0;\
lib/libc/stdio/wsetup.c
47
__swsetup(FILE *fp)
lib/libc/stdio/wsetup.c
56
if ((fp->pub._flags & __SWR) == 0) {
lib/libc/stdio/wsetup.c
57
if ((fp->pub._flags & __SRW) == 0) {
lib/libc/stdio/wsetup.c
59
fp->pub._flags |= __SERR;
lib/libc/stdio/wsetup.c
62
if (fp->pub._flags & __SRD) {
lib/libc/stdio/wsetup.c
64
if (HASUB(fp))
lib/libc/stdio/wsetup.c
65
FREEUB(fp);
lib/libc/stdio/wsetup.c
66
fp->pub._flags &= ~(__SRD|__SEOF);
lib/libc/stdio/wsetup.c
67
fp->pub._r = 0;
lib/libc/stdio/wsetup.c
68
fp->pub._p = fp->_bf._base;
lib/libc/stdio/wsetup.c
70
fp->pub._flags |= __SWR;
lib/libc/stdio/wsetup.c
76
if (fp->_bf._base == NULL)
lib/libc/stdio/wsetup.c
77
__smakebuf(fp);
lib/libc/stdio/wsetup.c
78
if (fp->pub._flags & __SLBF) {
lib/libc/stdio/wsetup.c
84
fp->pub._w = 0;
lib/libc/stdio/wsetup.c
85
fp->pub._lbfsize = -fp->_bf._size;
lib/libc/stdio/wsetup.c
87
fp->pub._w = fp->pub._flags & __SNBF ? 0 : fp->_bf._size;
lib/libc/stdio/xprintf.c
112
__sfvwrite(io->fp, &io->uio);
lib/libc/stdio/xprintf.c
120
if (io->fp->pub._flags & __SERR)
lib/libc/stdio/xprintf.c
267
__v2printf(FILE *fp, const char *fmt0, unsigned pct, va_list ap)
lib/libc/stdio/xprintf.c
282
io.fp = fp;
lib/libc/stdio/xprintf.c
555
fp, pi, (const void *)pi->arg);
lib/libc/stdio/xprintf.c
561
io.fp->pub._flags |= __SERR;
lib/libc/stdio/xprintf.c
571
extern int __fflush(FILE *fp);
lib/libc/stdio/xprintf.c
579
__v3printf(FILE *fp, const char *fmt, int pct, va_list ap)
lib/libc/stdio/xprintf.c
586
fake.pub._flags = fp->pub._flags & ~__SNBF;
lib/libc/stdio/xprintf.c
587
fake.pub._fileno = fp->pub._fileno;
lib/libc/stdio/xprintf.c
588
fake._cookie = fp->_cookie;
lib/libc/stdio/xprintf.c
589
fake._write = fp->_write;
lib/libc/stdio/xprintf.c
590
memcpy(WCIO_GET(&fake), WCIO_GET(fp), sizeof(struct wchar_io_data));
lib/libc/stdio/xprintf.c
602
fp->pub._flags |= __SERR;
lib/libc/stdio/xprintf.c
607
__xvprintf(FILE *fp, const char *fmt0, va_list ap)
lib/libc/stdio/xprintf.c
622
if ((fp->pub._flags & (__SNBF|__SWR|__SRW)) == (__SNBF|__SWR) &&
lib/libc/stdio/xprintf.c
623
fp->pub._fileno >= 0)
lib/libc/stdio/xprintf.c
624
return (__v3printf(fp, fmt0, u, ap));
lib/libc/stdio/xprintf.c
626
return (__v2printf(fp, fmt0, u, ap));
lib/libc/stdio/xprintf.c
93
FILE *fp;
lib/libc/stdtime/getdate.c
110
if (errno != 0 || ferror(fp)) {
lib/libc/stdtime/getdate.c
115
fclose(fp);
lib/libc/stdtime/getdate.c
118
if (feof(fp) || (rp != NULL && *rp != '\0')) {
lib/libc/stdtime/getdate.c
122
fclose(fp);
lib/libc/stdtime/getdate.c
67
FILE *fp;
lib/libc/stdtime/getdate.c
89
if ((fp = fopen(datemsk, "re")) == NULL) {
lib/libc/stdtime/getdate.c
97
while ((line = fparseln(fp, NULL, &lineno, NULL, 0)) != NULL) {
lib/libc/string/memccpy.c
41
const unsigned char *fp = f;
lib/libc/string/memccpy.c
44
if ((*tp++ = *fp++) == uc)
lib/libc/string/swab.c
43
char *fp, *tp;
lib/libc/string/swab.c
48
fp = (char *)from;
lib/libc/string/swab.c
50
#define STEP temp = *fp++,*tp++ = *fp++,*tp++ = temp
lib/libc/string/wcscoll.c
100
fp = tr2 + wcslen(tr2) - 1;
lib/libc/string/wcscoll.c
101
while (bp < fp) {
lib/libc/string/wcscoll.c
103
*bp++ = *fp;
lib/libc/string/wcscoll.c
104
*fp-- = c;
lib/libc/string/wcscoll.c
87
wchar_t *bp, *fp, c;
lib/libc/string/wcscoll.c
91
fp = tr1 + wcslen(tr1) - 1;
lib/libc/string/wcscoll.c
92
while (bp < fp) {
lib/libc/string/wcscoll.c
94
*bp++ = *fp;
lib/libc/string/wcscoll.c
95
*fp-- = c;
lib/libc/uuid/uuid_name_lookup.c
192
FILE *fp;
lib/libc/uuid/uuid_name_lookup.c
199
if ((fp = fopen(path, "r")) == NULL)
lib/libc/uuid/uuid_name_lookup.c
201
while ((line = fgetln(fp, &len)) != NULL) {
lib/libc/uuid/uuid_name_lookup.c
232
fclose(fp);
lib/libc/xdr/xdr_float.c
62
xdr_float(XDR *xdrs, float *fp)
lib/libc/xdr/xdr_float.c
67
return (XDR_PUTINT32(xdrs, (int32_t *)fp));
lib/libc/xdr/xdr_float.c
70
return (XDR_GETINT32(xdrs, (int32_t *)fp));
lib/libdmsg/crypto.c
349
FILE *fp;
lib/libdmsg/crypto.c
391
if ((fp = fopen(path, "r")) == NULL) {
lib/libdmsg/crypto.c
404
if (fp) {
lib/libdmsg/crypto.c
405
keys[0] = PEM_read_RSA_PUBKEY(fp, NULL, NULL, NULL);
lib/libdmsg/crypto.c
406
fclose(fp);
lib/libdmsg/crypto.c
420
if ((fp = fopen(path, "r")) == NULL) {
lib/libdmsg/crypto.c
425
keys[1] = PEM_read_RSA_PUBKEY(fp, NULL, NULL, NULL);
lib/libdmsg/crypto.c
426
fclose(fp);
lib/libdmsg/crypto.c
436
if ((fp = fopen(path, "r")) == NULL) {
lib/libdmsg/crypto.c
442
keys[2] = PEM_read_RSAPrivateKey(fp, NULL, NULL, NULL);
lib/libdmsg/crypto.c
443
fclose(fp);
lib/libefivar/efivar-dp-format.c
2466
const FILEPATH_DEVICE_PATH *fp;
lib/libefivar/efivar-dp-format.c
2469
fp = (const void *)dp;
lib/libefivar/efivar-dp-format.c
2470
ucs2_to_utf8(fp->PathName, &name);
lib/libefivar/efivar-dp-xlate.c
488
char *fp, *dptxt = NULL, *cp, *rp;
lib/libefivar/efivar-dp-xlate.c
497
fp = path_to_file_dp(rp);
lib/libefivar/efivar-dp-xlate.c
499
if (fp == NULL) {
lib/libefivar/efivar-dp-xlate.c
504
asprintf(&dptxt, "%s/%s", efimedia, fp);
lib/libefivar/efivar-dp-xlate.c
522
free(fp);
lib/libftpio/ftpio.c
1055
*fp = fdopen(fd, mode);
lib/libftpio/ftpio.c
1057
if (*fp)
lib/libftpio/ftpio.c
128
ftpAscii(FILE *fp)
lib/libftpio/ftpio.c
130
FTP_t ftp = fcookie(fp);
lib/libftpio/ftpio.c
143
ftpBinary(FILE *fp)
lib/libftpio/ftpio.c
145
FTP_t ftp = fcookie(fp);
lib/libftpio/ftpio.c
157
ftpVerbose(FILE *fp, int status)
lib/libftpio/ftpio.c
159
FTP_t ftp = fcookie(fp);
lib/libftpio/ftpio.c
164
ftpChdir(FILE *fp, char *dir)
lib/libftpio/ftpio.c
167
FTP_t ftp = fcookie(fp);
lib/libftpio/ftpio.c
176
ftpErrno(FILE *fp)
lib/libftpio/ftpio.c
178
FTP_t ftp = fcookie(fp);
lib/libftpio/ftpio.c
199
ftpGetSize(FILE *fp, const char *name)
lib/libftpio/ftpio.c
203
FTP_t ftp = fcookie(fp);
lib/libftpio/ftpio.c
206
check_passive(fp);
lib/libftpio/ftpio.c
225
ftpGetModtime(FILE *fp, const char *name)
lib/libftpio/ftpio.c
230
FTP_t ftp = fcookie(fp);
lib/libftpio/ftpio.c
233
check_passive(fp);
lib/libftpio/ftpio.c
258
ftpGet(FILE *fp, const char *file, off_t *seekto)
lib/libftpio/ftpio.c
261
FTP_t ftp = fcookie(fp);
lib/libftpio/ftpio.c
263
check_passive(fp);
lib/libftpio/ftpio.c
264
if (ftpBinary(fp) != SUCCESS)
lib/libftpio/ftpio.c
289
FILE *fp;
lib/libftpio/ftpio.c
297
fp = NULL;
lib/libftpio/ftpio.c
299
fp = funopen(n, ftp_read_method, ftp_write_method, NULL, ftp_close_method); /* BSD 4.4 function! */
lib/libftpio/ftpio.c
319
return fp;
lib/libftpio/ftpio.c
323
ftpPut(FILE *fp, const char *file)
lib/libftpio/ftpio.c
326
FTP_t ftp = fcookie(fp);
lib/libftpio/ftpio.c
328
check_passive(fp);
lib/libftpio/ftpio.c
335
ftpPassive(FILE *fp, int st)
lib/libftpio/ftpio.c
337
FTP_t ftp = fcookie(fp);
lib/libftpio/ftpio.c
360
static FILE *fp = NULL;
lib/libftpio/ftpio.c
367
if (fp && prev_host) {
lib/libftpio/ftpio.c
370
fp2 = ftpGet(fp, name, NULL);
lib/libftpio/ftpio.c
373
fclose(fp);
lib/libftpio/ftpio.c
382
fclose(fp);
lib/libftpio/ftpio.c
387
fp = ftpLoginAf(host, af, user, passwd, port, 0, retcode);
lib/libftpio/ftpio.c
388
if (fp) {
lib/libftpio/ftpio.c
389
fp2 = ftpGet(fp, name, NULL);
lib/libftpio/ftpio.c
393
*retcode = ftpErrno(fp);
lib/libftpio/ftpio.c
394
fclose(fp);
lib/libftpio/ftpio.c
395
fp = NULL;
lib/libftpio/ftpio.c
422
static FILE *fp = NULL;
lib/libftpio/ftpio.c
427
if (fp) { /* Close previous managed connection */
lib/libftpio/ftpio.c
428
fclose(fp);
lib/libftpio/ftpio.c
429
fp = NULL;
lib/libftpio/ftpio.c
433
fp = ftpLoginAf(host, af, user, passwd, port, 0, retcode);
lib/libftpio/ftpio.c
434
if (fp) {
lib/libftpio/ftpio.c
435
fp2 = ftpPut(fp, name);
lib/libftpio/ftpio.c
438
*retcode = ftpErrno(fp);
lib/libftpio/ftpio.c
439
fclose(fp);
lib/libftpio/ftpio.c
440
fp = NULL;
lib/libftpio/ftpio.c
54
static void check_passive(FILE *fp);
lib/libftpio/ftpio.c
543
check_passive(FILE *fp)
lib/libftpio/ftpio.c
548
ftpPassive(fp, strncasecmp(cp, "no", 2));
lib/libftpio/ftpio.c
67
FILE **fp, const char *mode, off_t *seekto);
lib/libftpio/ftpio.c
800
ftp_file_op(FTP_t ftp, const char *operation, const char *file, FILE **fp,
lib/libftpio/ftpio.c
812
if (!fp)
lib/libftpio/ftpio.c
814
*fp = NULL;
lib/libftpio/ftpio.c
946
*fp = fdopen(s, mode);
lib/libftpio/ftpio.h
56
extern int ftpChdir(FILE *fp, char *dir);
lib/libftpio/ftpio.h
57
extern int ftpErrno(FILE *fp);
lib/libftpio/ftpio.h
58
extern off_t ftpGetSize(FILE *fp, const char *file);
lib/libftpio/ftpio.h
59
extern FILE *ftpGet(FILE *fp, const char *file, off_t *seekto);
lib/libftpio/ftpio.h
60
extern FILE *ftpPut(FILE *fp, const char *file);
lib/libftpio/ftpio.h
61
extern int ftpAscii(FILE *fp);
lib/libftpio/ftpio.h
62
extern int ftpBinary(FILE *fp);
lib/libftpio/ftpio.h
63
extern int ftpPassive(FILE *fp, int status);
lib/libftpio/ftpio.h
64
extern void ftpVerbose(FILE *fp, int status);
lib/libftpio/ftpio.h
69
extern time_t ftpGetModtime(FILE *fp, const char *file);
lib/libkcore/kcore_file.c
103
if (kvm_read(kc->kd, (long)(&fdp.fd_files[n].fp), &fpp,
lib/libkcore/kcore_file.c
106
&fdp.fd_files[n].fp, procs->kp_pid);
lib/libkcore/kcore_file.c
110
if (kvm_read(kc->kd, (long)fpp, &fp,
lib/libkcore/kcore_file.c
111
sizeof(fp)) != sizeof(fp)) {
lib/libkcore/kcore_file.c
116
kcore_make_file(*files + *len, &fp, procs->kp_pid, 0, n);
lib/libkcore/kcore_file.c
59
struct file fp, *fpp;
lib/libkvm/kvm_file.c
143
if (fd_files[f].fp == NULL)
lib/libkvm/kvm_file.c
145
if (KREAD(kd, (uintptr_t)fd_files[f].fp, &kf)) {
lib/libpam/modules/pam_login_access/login_access.c
49
FILE *fp;
lib/libpam/modules/pam_login_access/login_access.c
66
if ((fp = fopen(_PATH_LOGACCESS, "r")) != NULL) {
lib/libpam/modules/pam_login_access/login_access.c
67
while (!match && fgets(line, sizeof(line), fp)) {
lib/libpam/modules/pam_login_access/login_access.c
97
fclose(fp);
lib/libtcplay/tcplay.c
78
FILE *fp;
lib/libtcplay/tcplay.c
81
fp = stderr;
lib/libtcplay/tcplay.c
83
fp = stdout;
lib/libtcplay/tcplay.c
92
fprintf(fp, "%s", tc_internal_log_buffer);
lib/libtelnet/rsaencpwd.c
144
FILE *fp;
lib/libtelnet/rsaencpwd.c
154
if ((fp=fopen(key_file, "r"))==NULL) return(0);
lib/libtelnet/rsaencpwd.c
155
fclose(fp);
lib/libtelnet/rsaencpwd.c
191
FILE *fp;
lib/libtelnet/rsaencpwd.c
200
if ((fp=fopen(key_file, "r"))==NULL) {
lib/libtelnet/rsaencpwd.c
208
fscanf(fp, "%x;", &len);
lib/libtelnet/rsaencpwd.c
210
j = getc(fp); key[i]=j;
lib/libtelnet/rsaencpwd.c
212
fclose(fp);
lib/libtelnet/rsaencpwd.c
255
if ((fp=fopen(key_file, "r"))==NULL) {
lib/libtelnet/rsaencpwd.c
263
fscanf(fp, "%x;", &len);
lib/libtelnet/rsaencpwd.c
265
j = getc(fp);
lib/libtelnet/rsaencpwd.c
270
fscanf(fp, "%x;", &len);
lib/libtelnet/rsaencpwd.c
272
j = getc(fp); key[i]=j;
lib/libtelnet/rsaencpwd.c
274
fclose(fp);
libexec/bootpd/dumptab.c
100
if ((fp = fopen(filename, "w")) == NULL) {
libexec/bootpd/dumptab.c
106
fprintf(fp, "\n# %s %s.%d\n", progname, VERSION, PATCHLEVEL);
libexec/bootpd/dumptab.c
107
fprintf(fp, "# %s: dump of bootp server database.\n", filename);
libexec/bootpd/dumptab.c
108
fprintf(fp, "# Dump taken %s", ctime(&t));
libexec/bootpd/dumptab.c
109
fwrite(legend, 1, sizeof(legend) - 1, fp);
libexec/bootpd/dumptab.c
114
dump_host(fp, hp);
libexec/bootpd/dumptab.c
115
fprintf(fp, "\n");
libexec/bootpd/dumptab.c
118
fclose(fp);
libexec/bootpd/dumptab.c
131
dump_host(FILE *fp, struct host *hp)
libexec/bootpd/dumptab.c
135
fprintf(fp, "%s:", (hp->hostname ?
libexec/bootpd/dumptab.c
138
fprintf(fp, "\\\n\t:bf=%s:", hp->bootfile->string);
libexec/bootpd/dumptab.c
141
fprintf(fp, "\\\n\t:bs=");
libexec/bootpd/dumptab.c
143
fprintf(fp, "auto:");
libexec/bootpd/dumptab.c
145
fprintf(fp, "%lu:", (u_long)hp->bootsize);
libexec/bootpd/dumptab.c
149
fprintf(fp, "\\\n\t:cs=");
libexec/bootpd/dumptab.c
150
list_ipaddresses(fp, hp->cookie_server);
libexec/bootpd/dumptab.c
151
fprintf(fp, ":");
libexec/bootpd/dumptab.c
154
fprintf(fp, "\\\n\t:df=%s:", hp->dump_file->string);
libexec/bootpd/dumptab.c
157
fprintf(fp, "\\\n\t:dn=%s:", hp->domain_name->string);
libexec/bootpd/dumptab.c
160
fprintf(fp, "\\\n\t:ds=");
libexec/bootpd/dumptab.c
161
list_ipaddresses(fp, hp->domain_server);
libexec/bootpd/dumptab.c
162
fprintf(fp, ":");
libexec/bootpd/dumptab.c
165
fprintf(fp, "\\\n\t:ef=%s:", hp->exten_file->string);
libexec/bootpd/dumptab.c
168
fprintf(fp, "\\\n\t:ex=%s:", hp->exec_file->string);
libexec/bootpd/dumptab.c
171
fprintf(fp, "\\\n\t:gw=");
libexec/bootpd/dumptab.c
172
list_ipaddresses(fp, hp->gateway);
libexec/bootpd/dumptab.c
173
fprintf(fp, ":");
libexec/bootpd/dumptab.c
177
fprintf(fp, "\\\n\t:hd=%s:", hp->homedir->string);
libexec/bootpd/dumptab.c
183
fprintf(fp, "\\\n\t:hn:");
libexec/bootpd/dumptab.c
187
fprintf(fp, "\\\n\t:ht=%u:", (unsigned) hp->htype);
libexec/bootpd/dumptab.c
189
fprintf(fp, "ha=\"%s\":",
libexec/bootpd/dumptab.c
194
fprintf(fp, "\\\n\t:im=");
libexec/bootpd/dumptab.c
195
list_ipaddresses(fp, hp->impress_server);
libexec/bootpd/dumptab.c
196
fprintf(fp, ":");
libexec/bootpd/dumptab.c
200
fprintf(fp, "\\\n\t:ip=%s:", inet_ntoa(hp->iaddr));
libexec/bootpd/dumptab.c
203
fprintf(fp, "\\\n\t:lg=");
libexec/bootpd/dumptab.c
204
list_ipaddresses(fp, hp->log_server);
libexec/bootpd/dumptab.c
205
fprintf(fp, ":");
libexec/bootpd/dumptab.c
208
fprintf(fp, "\\\n\t:lp=");
libexec/bootpd/dumptab.c
209
list_ipaddresses(fp, hp->lpr_server);
libexec/bootpd/dumptab.c
210
fprintf(fp, ":");
libexec/bootpd/dumptab.c
213
fprintf(fp, "\\\n\t:ms=%lu:", (u_long)hp->msg_size);
libexec/bootpd/dumptab.c
216
fprintf(fp, "\\\n\t:mw=%lu:", (u_long)hp->min_wait);
libexec/bootpd/dumptab.c
219
fprintf(fp, "\\\n\t:ns=");
libexec/bootpd/dumptab.c
220
list_ipaddresses(fp, hp->name_server);
libexec/bootpd/dumptab.c
221
fprintf(fp, ":");
libexec/bootpd/dumptab.c
224
fprintf(fp, "\\\n\t:nt=");
libexec/bootpd/dumptab.c
225
list_ipaddresses(fp, hp->ntp_server);
libexec/bootpd/dumptab.c
226
fprintf(fp, ":");
libexec/bootpd/dumptab.c
229
fprintf(fp, "\\\n\t:ra=%s:", inet_ntoa(hp->reply_addr));
libexec/bootpd/dumptab.c
232
fprintf(fp, "\\\n\t:rl=");
libexec/bootpd/dumptab.c
233
list_ipaddresses(fp, hp->rlp_server);
libexec/bootpd/dumptab.c
234
fprintf(fp, ":");
libexec/bootpd/dumptab.c
237
fprintf(fp, "\\\n\t:rp=%s:", hp->root_path->string);
libexec/bootpd/dumptab.c
240
fprintf(fp, "\\\n\t:sa=%s:", inet_ntoa(hp->bootserver));
libexec/bootpd/dumptab.c
243
fprintf(fp, "\\\n\t:sm=%s:", inet_ntoa(hp->subnet_mask));
libexec/bootpd/dumptab.c
246
fprintf(fp, "\\\n\t:sw=%s:", inet_ntoa(hp->subnet_mask));
libexec/bootpd/dumptab.c
249
fprintf(fp, "\\\n\t:td=%s:", hp->tftpdir->string);
libexec/bootpd/dumptab.c
255
fprintf(fp, "\\\n\t:to=%ld:", (long)hp->time_offset);
libexec/bootpd/dumptab.c
258
fprintf(fp, "\\\n\t:ts=");
libexec/bootpd/dumptab.c
259
list_ipaddresses(fp, hp->time_server);
libexec/bootpd/dumptab.c
260
fprintf(fp, ":");
libexec/bootpd/dumptab.c
263
fprintf(fp, "\\\n\t:vm=");
libexec/bootpd/dumptab.c
265
fprintf(fp, "rfc1048:");
libexec/bootpd/dumptab.c
267
fprintf(fp, "cmu:");
libexec/bootpd/dumptab.c
269
fprintf(fp, "%d.%d.%d.%d:",
libexec/bootpd/dumptab.c
277
fprintf(fp, "\\\n\t:yd=%s:",
libexec/bootpd/dumptab.c
281
fprintf(fp, "\\\n\t:ys=");
libexec/bootpd/dumptab.c
282
list_ipaddresses(fp, hp->nis_server);
libexec/bootpd/dumptab.c
283
fprintf(fp, ":");
libexec/bootpd/dumptab.c
291
dump_generic(fp, hp->generic);
libexec/bootpd/dumptab.c
298
dump_generic(FILE *fp, struct shared_bindata *generic)
libexec/bootpd/dumptab.c
313
fprintf(fp, " #junk in generic! :");
libexec/bootpd/dumptab.c
316
fprintf(fp, "\\\n\t:T%d=", tag);
libexec/bootpd/dumptab.c
318
fprintf(fp, "%02X", *bp);
libexec/bootpd/dumptab.c
322
fprintf(fp, ".");
libexec/bootpd/dumptab.c
324
fprintf(fp, ":");
libexec/bootpd/dumptab.c
341
list_ipaddresses(FILE *fp, struct in_addr_list *ipptr)
libexec/bootpd/dumptab.c
350
fprintf(fp, "%s", inet_ntoa(*addrptr++));
libexec/bootpd/dumptab.c
353
fprintf(fp, ", ");
libexec/bootpd/dumptab.c
55
FILE *fp;
libexec/bootpd/readfile.c
320
FILE *fp;
libexec/bootpd/readfile.c
359
if ((fp = fopen(bootptab, "r")) == NULL) {
libexec/bootpd/readfile.c
366
if (fstat(fileno(fp), &st) < 0) {
libexec/bootpd/readfile.c
368
fclose(fp);
libexec/bootpd/readfile.c
384
read_entry(fp, buffer, &buflen);
libexec/bootpd/readfile.c
470
fclose(fp);
libexec/bootpd/readfile.c
499
read_entry(FILE *fp, char *buffer, unsigned *bufsiz)
libexec/bootpd/readfile.c
509
c = fgetc(fp);
libexec/bootpd/readfile.c
518
c = fgetc(fp);
libexec/bootpd/readfile.c
527
ungetc(c, fp); /* Other character, push it back to reprocess it */
libexec/bootpd/readfile.c
537
c = fgetc(fp);
libexec/bootpd/readfile.c
543
c = fgetc(fp); /* Backslash, read a new character */
libexec/bootpd/readfile.c
561
c = fgetc(fp);
libexec/bootpd/readfile.c
574
if ((c = fgetc(fp)) < 0) { /* Backslash */
libexec/bootpd/readfile.c
592
c = fgetc(fp);
libexec/bootpd/readfile.c
599
c = fgetc(fp);
libexec/bootpd/tools/bootpef/bootpef.c
274
FILE *fp;
libexec/bootpd/tools/bootpef/bootpef.c
305
if ((fp = fopen(hp->exten_file->string, "w")) == NULL) {
libexec/bootpd/tools/bootpef/bootpef.c
311
if (len != fwrite(buffer, 1, len, fp)) {
libexec/bootpd/tools/bootpef/bootpef.c
315
fclose(fp);
libexec/diff3prog/diff3prog.c
113
FILE *fp[3];
libexec/diff3prog/diff3prog.c
187
if ((fp[i] = fopen(argv[i + 2], "r")) == NULL)
libexec/diff3prog/diff3prog.c
207
fp[0] = fopen(name, "r");
libexec/diff3prog/diff3prog.c
208
if (fp[0] == NULL)
libexec/diff3prog/diff3prog.c
210
for (i=0; (p = getchange(fp[0])); i++) {
libexec/diff3prog/diff3prog.c
239
(void)fclose(fp[0]);
libexec/diff3prog/diff3prog.c
466
if ((line = get_line(fp[i], &j)) == NULL)
libexec/diff3prog/diff3prog.c
493
c = getc(fp[0]);
libexec/diff3prog/diff3prog.c
494
d = getc(fp[1]);
libexec/diff3prog/diff3prog.c
516
(void)fseek(fp[i], (long)-nchar, SEEK_CUR);
libexec/diff3prog/diff3prog.c
557
(void)fseek(fp[2], (long)de[n].new.from, SEEK_SET);
libexec/diff3prog/diff3prog.c
561
r = fread(block, 1, j, fp[2]);
libexec/diff3prog/diff3prog.c
563
if (feof(fp[2]))
libexec/dma/util.c
75
FILE *fp;
libexec/dma/util.c
77
fp = fopen(config.mailname, "r");
libexec/dma/util.c
78
if (fp == NULL)
libexec/dma/util.c
81
s = fgets(name, sizeof(name), fp);
libexec/dma/util.c
82
fclose(fp);
libexec/fingerd/fingerd.c
186
if (!(fp = fdopen(p[0], "r")))
libexec/fingerd/fingerd.c
188
while ((ch = getc(fp)) != EOF) {
libexec/fingerd/fingerd.c
56
FILE *fp;
libexec/ftpd/ftpd.c
654
FILE *fp;
libexec/ftpd/ftpd.c
687
if ((fp = fopen(_PATH_FTPHOSTS, "r")) != NULL) {
libexec/ftpd/ftpd.c
692
while ((line = fgetln(fp, &len)) != NULL) {
libexec/ftpd/ftpd.c
854
fclose(fp);
libexec/getty/subr.c
147
for (fp = gettyflags; fp->field; fp++) {
libexec/getty/subr.c
148
if (cgetcap(buf, fp->field, ':') == NULL)
libexec/getty/subr.c
149
fp->set = 0;
libexec/getty/subr.c
151
fp->set = 1;
libexec/getty/subr.c
152
fp->value = 1 ^ fp->invrt;
libexec/getty/subr.c
162
struct gettyflags *fp;
libexec/getty/subr.c
170
for (fp = gettyflags; fp->field; fp++)
libexec/getty/subr.c
171
if (fp->set)
libexec/getty/subr.c
172
fp->defalt = fp->value;
libexec/getty/subr.c
174
fp->defalt = fp->invrt;
libexec/getty/subr.c
182
struct gettyflags *fp;
libexec/getty/subr.c
191
for (fp = gettyflags; fp->field; fp++)
libexec/getty/subr.c
192
if (!fp->set)
libexec/getty/subr.c
193
fp->value = fp->defalt;
libexec/getty/subr.c
62
struct gettyflags *fp;
libexec/pppoed/pppoed.c
622
FILE *fp;
libexec/pppoed/pppoed.c
624
if ((fp = fopen(pidfile, "w")) == NULL) {
libexec/pppoed/pppoed.c
630
fprintf(fp, "%d\n", (int)getpid());
libexec/pppoed/pppoed.c
631
fclose(fp);
libexec/rbootd/parseconf.c
120
while (fgets(line, C_LINELEN, fp) != NULL) {
libexec/rbootd/parseconf.c
205
(void) fclose(fp); /* close config file */
libexec/rbootd/parseconf.c
79
FILE *fp;
libexec/rbootd/parseconf.c
92
if ((fp = fopen(ConfigFile, "r")) == NULL) {
libexec/rbootd/rbootd.c
168
FILE *fp;
libexec/rbootd/rbootd.c
170
if ((fp = fopen(PidFile, "w")) != NULL) {
libexec/rbootd/rbootd.c
171
(void) fprintf(fp, "%d\n", (int) MyPid);
libexec/rbootd/rbootd.c
172
(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/ypxfr/ypxfrd_getmap.c
125
if ((fp = open(tmpname, O_RDWR|O_CREAT, PERM_SECURE)) == -1) {
libexec/ypxfr/ypxfrd_getmap.c
141
close(fp);
libexec/ypxfr/ypxfrd_getmap.c
49
static int fp = 0;
libexec/ypxfr/ypxfrd_getmap.c
58
if (write(fp, objp->xfr_u.xfrblock_buf.xfrblock_buf_val,
sbin/disklabel32/disklabel.c
703
FILE *fp;
sbin/disklabel32/disklabel.c
706
(fp = fdopen(fd, "w")) == NULL) {
sbin/disklabel32/disklabel.c
710
display(fp, lp);
sbin/disklabel32/disklabel.c
711
fclose(fp);
sbin/disklabel32/disklabel.c
715
fp = fopen(tmpfil, "r");
sbin/disklabel32/disklabel.c
716
if (fp == NULL) {
sbin/disklabel32/disklabel.c
721
if (getasciilabel(fp, &label)) {
sbin/disklabel32/disklabel.c
724
fclose(fp);
sbin/disklabel32/disklabel.c
729
fclose(fp);
sbin/disklabel64/disklabel64.c
753
FILE *fp;
sbin/disklabel64/disklabel64.c
756
(fp = fdopen(fd, "w")) == NULL) {
sbin/disklabel64/disklabel64.c
760
display(fp, lp);
sbin/disklabel64/disklabel64.c
761
fclose(fp);
sbin/disklabel64/disklabel64.c
765
fp = fopen(tmpfil, "r");
sbin/disklabel64/disklabel64.c
766
if (fp == NULL) {
sbin/disklabel64/disklabel64.c
771
if (getasciilabel(fp, &label)) {
sbin/disklabel64/disklabel64.c
774
fclose(fp);
sbin/disklabel64/disklabel64.c
779
fclose(fp);
sbin/dump/optr.c
154
FILE *fp;
sbin/dump/optr.c
161
if ((fp = popen(buf, "w")) == NULL)
sbin/dump/optr.c
164
fputs("\a\a\aMessage from the dump program to all operators\n\nDUMP: NEEDS ATTENTION: ", fp);
sbin/dump/optr.c
166
fputs(lastmsg, fp);
sbin/dump/optr.c
168
fputs(message, fp);
sbin/dump/optr.c
170
pclose(fp);
sbin/fdisk/fdisk.c
1321
FILE *fp = NULL;
sbin/fdisk/fdisk.c
1329
if ((fp = fopen(config_file, "r")) == NULL) {
sbin/fdisk/fdisk.c
1334
fp = stdin;
sbin/fdisk/fdisk.c
1338
while (!feof(fp)) {
sbin/fdisk/fdisk.c
1339
if (fgets(buf, sizeof(buf), fp) == NULL)
sbin/fdisk/fdisk.c
1350
if (fp) {
sbin/fdisk/fdisk.c
1355
fclose(fp);
sbin/fsck_hammer2/test.c
1168
print_media(FILE *fp, int tab, int idx, const hammer2_blockref_t *bref,
sbin/fsck_hammer2/test.c
1183
tfprintf(fp, tab, "filename \"%*.*s\"\n", namelen, namelen,
sbin/fsck_hammer2/test.c
1185
tfprintf(fp, tab, "version %d\n", ipdata->meta.version);
sbin/fsck_hammer2/test.c
1188
tfprintf(fp, tab, "pfs_subtype %d (%s)\n",
sbin/fsck_hammer2/test.c
1191
tfprintf(fp, tab, "uflags 0x%08x\n", ipdata->meta.uflags);
sbin/fsck_hammer2/test.c
1193
tfprintf(fp, tab, "rmajor %d\n", ipdata->meta.rmajor);
sbin/fsck_hammer2/test.c
1194
tfprintf(fp, tab, "rminor %d\n", ipdata->meta.rminor);
sbin/fsck_hammer2/test.c
1196
tfprintf(fp, tab, "ctime %s\n",
sbin/fsck_hammer2/test.c
1198
tfprintf(fp, tab, "mtime %s\n",
sbin/fsck_hammer2/test.c
1200
tfprintf(fp, tab, "atime %s\n",
sbin/fsck_hammer2/test.c
1202
tfprintf(fp, tab, "btime %s\n",
sbin/fsck_hammer2/test.c
1205
tfprintf(fp, tab, "uid %s\n", hammer2_uuid_to_str(&uuid, &str));
sbin/fsck_hammer2/test.c
1207
tfprintf(fp, tab, "gid %s\n", hammer2_uuid_to_str(&uuid, &str));
sbin/fsck_hammer2/test.c
1208
tfprintf(fp, tab, "type %s\n",
sbin/fsck_hammer2/test.c
1210
tfprintf(fp, tab, "op_flags 0x%02x\n", ipdata->meta.op_flags);
sbin/fsck_hammer2/test.c
1211
tfprintf(fp, tab, "cap_flags 0x%04x\n", ipdata->meta.cap_flags);
sbin/fsck_hammer2/test.c
1212
tfprintf(fp, tab, "mode %-7o\n", ipdata->meta.mode);
sbin/fsck_hammer2/test.c
1213
tfprintf(fp, tab, "inum 0x%016jx\n", ipdata->meta.inum);
sbin/fsck_hammer2/test.c
1214
tfprintf(fp, tab, "size %ju ", (uintmax_t)ipdata->meta.size);
sbin/fsck_hammer2/test.c
1217
fprintf(fp, "(embedded data)\n");
sbin/fsck_hammer2/test.c
1219
fprintf(fp, "\n");
sbin/fsck_hammer2/test.c
1220
tfprintf(fp, tab, "nlinks %ju\n",
sbin/fsck_hammer2/test.c
1222
tfprintf(fp, tab, "iparent 0x%016jx\n",
sbin/fsck_hammer2/test.c
1224
tfprintf(fp, tab, "name_key 0x%016jx\n",
sbin/fsck_hammer2/test.c
1226
tfprintf(fp, tab, "name_len %u\n", ipdata->meta.name_len);
sbin/fsck_hammer2/test.c
1227
tfprintf(fp, tab, "ncopies %u\n", ipdata->meta.ncopies);
sbin/fsck_hammer2/test.c
1228
tfprintf(fp, tab, "comp_algo %s\n",
sbin/fsck_hammer2/test.c
1230
tfprintf(fp, tab, "check_algo %s\n",
sbin/fsck_hammer2/test.c
1234
tfprintf(fp, tab, "pfs_nmasters %u\n",
sbin/fsck_hammer2/test.c
1236
tfprintf(fp, tab, "pfs_type %u (%s)\n",
sbin/fsck_hammer2/test.c
1239
tfprintf(fp, tab, "pfs_inum 0x%016jx\n",
sbin/fsck_hammer2/test.c
1242
tfprintf(fp, tab, "pfs_clid %s\n",
sbin/fsck_hammer2/test.c
1245
tfprintf(fp, tab, "pfs_fsid %s\n",
sbin/fsck_hammer2/test.c
1247
tfprintf(fp, tab, "pfs_lsnap_tid 0x%016jx\n",
sbin/fsck_hammer2/test.c
1250
tfprintf(fp, tab, "data_quota %ju\n",
sbin/fsck_hammer2/test.c
1252
tfprintf(fp, tab, "data_count %ju\n",
sbin/fsck_hammer2/test.c
1254
tfprintf(fp, tab, "inode_quota %ju\n",
sbin/fsck_hammer2/test.c
1256
tfprintf(fp, tab, "inode_count %ju\n",
sbin/fsck_hammer2/test.c
1265
tfprintf(fp, tab, "[%03d] %016jx %-12s %016jx/%-2d\n",
sbin/fsck_hammer2/test.c
1274
tfprintf(fp, tab, "filename \"%*.*s\"\n",
sbin/fsck_hammer2/test.c
1279
tfprintf(fp, tab, "filename \"%*.*s\"\n",
sbin/fsck_hammer2/test.c
1284
tfprintf(fp, tab, "inum 0x%016jx\n",
sbin/fsck_hammer2/test.c
1286
tfprintf(fp, tab, "namlen %d\n",
sbin/fsck_hammer2/test.c
1288
tfprintf(fp, tab, "type %s\n",
sbin/fsck_hammer2/test.c
1297
tfprintf(fp, tab, "[%03d] %016jx %-12s %016jx/%-2d\n",
sbin/fsck_hammer2/test.c
1313
tfprintf(fp, tab, "%016jx %04d.%04x (avail=%7d) "
sbin/fsck_hammer2/test.c
160
tfprintf(FILE *fp, int tab, const char *ctl, ...)
sbin/fsck_hammer2/test.c
165
ret = fprintf(fp, "%*s", tab * TAB, "");
sbin/fsck_hammer2/test.c
170
vfprintf(fp, ctl, va);
sbin/fsck_hammer2/test.c
492
__print_blockref(FILE *fp, int tab, int idx, const hammer2_blockref_t *bref,
sbin/fsck_hammer2/test.c
499
tfprintf(fp, tab, "%016jx.%02x %-12s %016jx/%-2d%s%s\n",
sbin/fsck_hammer2/test.c
516
print_blockref(FILE *fp, const hammer2_blockref_t *bref, const char *msg)
sbin/fsck_hammer2/test.c
518
__print_blockref(fp, 1, -1, bref, msg);
sbin/fsck_hammer2/test.c
522
print_blockref_debug_rev(FILE *fp, const recurse_info_t *info)
sbin/fsck_hammer2/test.c
525
print_blockref_debug_rev(fp, info->parent);
sbin/fsck_hammer2/test.c
527
__print_blockref(fp, info->depth, info->index, &info->bref, NULL);
sbin/fsck_hammer2/test.c
531
print_blockref_debug(FILE *fp, const recurse_info_t *info, const char *msg)
sbin/fsck_hammer2/test.c
534
print_blockref_debug_rev(fp, info->parent);
sbin/fsck_hammer2/test.c
535
__print_blockref(fp, info->depth, info->index, &info->bref, msg);
sbin/fsck_hammer2/test.c
548
tfprintf(fp, 1, buf);
sbin/fsck_hammer2/test.c
549
fprintf(fp, "%-2d %-3d ", depth, index);
sbin/fsck_hammer2/test.c
550
__print_blockref(fp, 0, -1, bref, msg);
sbin/fsck_hammer2/test.c
552
print_blockref(fp, bref, msg);
sbin/fsck_msdosfs/fat.c
720
readfat(int fs, struct bootblock *boot, struct fat_descriptor **fp)
sbin/fsck_msdosfs/fat.c
922
*fp = NULL;
sbin/fsck_msdosfs/fat.c
924
*fp = fat;
sbin/hammer/cmd_cleanup.c
164
FILE *fp = NULL;
sbin/hammer/cmd_cleanup.c
258
fp = fopen(config_path, "r");
sbin/hammer/cmd_cleanup.c
269
if (fp) {
sbin/hammer/cmd_cleanup.c
272
migrate_config(fp, &config);
sbin/hammer/cmd_cleanup.c
274
fclose(fp);
sbin/hammer/cmd_cleanup.c
307
if (fp == NULL) {
sbin/hammer/cmd_cleanup.c
309
fp = fopen(config_path, "w");
sbin/hammer/cmd_cleanup.c
310
if (fp) {
sbin/hammer/cmd_cleanup.c
312
strlen(config.config.text), fp);
sbin/hammer/cmd_cleanup.c
313
fclose(fp);
sbin/hammer/cmd_cleanup.c
316
migrate_config(fp, &config);
sbin/hammer/cmd_cleanup.c
317
fclose(fp);
sbin/hammer/cmd_cleanup.c
529
if ((fp = fopen(config_path, "r+")) != NULL) {
sbin/hammer/cmd_cleanup.c
530
fseek(fp, 0L, 2);
sbin/hammer/cmd_cleanup.c
531
fprintf(fp, "rebalance 1d 5m\n");
sbin/hammer/cmd_cleanup.c
532
fclose(fp);
sbin/hammer/cmd_cleanup.c
579
migrate_config(FILE *fp, struct hammer_ioc_config *config)
sbin/hammer/cmd_cleanup.c
583
n = fread(config->config.text, 1, sizeof(config->config.text) - 1, fp);
sbin/hammer/cmd_cleanup.c
72
static void migrate_config(FILE *fp, struct hammer_ioc_config *config);
sbin/hammer/cmd_cleanup.c
767
FILE *fp;
sbin/hammer/cmd_cleanup.c
784
fp = fopen(check_path, "r");
sbin/hammer/cmd_cleanup.c
786
if (fp == NULL)
sbin/hammer/cmd_cleanup.c
788
if (fgets(buf, sizeof(buf), fp) == NULL) {
sbin/hammer/cmd_cleanup.c
789
fclose(fp);
sbin/hammer/cmd_cleanup.c
792
fclose(fp);
sbin/hammer/cmd_cleanup.c
838
FILE *fp;
sbin/hammer/cmd_cleanup.c
842
fp = fopen(ncheck_path, "w");
sbin/hammer/cmd_cleanup.c
843
if (fp) {
sbin/hammer/cmd_cleanup.c
844
fprintf(fp, "0x%08llx\n", (long long)savet);
sbin/hammer/cmd_cleanup.c
845
if (fclose(fp) == 0)
sbin/hammer/cmd_mirror.c
1683
FILE *fp;
sbin/hammer/cmd_mirror.c
1686
fp = fopen("/dev/tty", "r");
sbin/hammer/cmd_mirror.c
1687
if (fp == NULL) {
sbin/hammer/cmd_mirror.c
1692
while (fgets(buf, sizeof(buf), fp) != NULL) {
sbin/hammer/cmd_mirror.c
1704
fclose(fp);
sbin/hammer2/cmd_rsa.c
132
FILE *fp;
sbin/hammer2/cmd_rsa.c
137
fp = fopen(keyfiles[i], "r");
sbin/hammer2/cmd_rsa.c
138
if (fp == NULL) {
sbin/hammer2/cmd_rsa.c
144
keys[i] = PEM_read_RSA_PUBKEY(fp, NULL, NULL, NULL);
sbin/hammer2/cmd_rsa.c
146
fclose(fp);
sbin/hammer2/cmd_rsa.c
155
fp = fopen(keyfiles[i], "r");
sbin/hammer2/cmd_rsa.c
156
if (fp == NULL) {
sbin/hammer2/cmd_rsa.c
162
keys[i] = PEM_read_RSAPrivateKey(fp, NULL, NULL, NULL);
sbin/hammer2/cmd_rsa.c
163
fclose(fp);
sbin/hammer2/cmd_rsa.c
267
FILE *fp;
sbin/hammer2/cmd_rsa.c
272
fp = fopen(keyfiles[i], "r");
sbin/hammer2/cmd_rsa.c
273
if (fp == NULL) {
sbin/hammer2/cmd_rsa.c
279
keys[i] = PEM_read_RSA_PUBKEY(fp, NULL, NULL, NULL);
sbin/hammer2/cmd_rsa.c
281
fclose(fp);
sbin/hammer2/cmd_rsa.c
290
fp = fopen(keyfiles[i], "r");
sbin/hammer2/cmd_rsa.c
291
if (fp == NULL) {
sbin/hammer2/cmd_rsa.c
297
keys[i] = PEM_read_RSAPrivateKey(fp, NULL, NULL, NULL);
sbin/hammer2/cmd_rsa.c
298
fclose(fp);
sbin/hammer2/cmd_service.c
533
FILE *fp;
sbin/hammer2/cmd_service.c
555
fp = fopen(HAMMER2_DEFAULT_DIR "/autoconn", "r");
sbin/hammer2/cmd_service.c
556
if (fp == NULL)
sbin/hammer2/cmd_service.c
561
fp = NULL;
sbin/hammer2/cmd_service.c
570
if (fp == NULL && found_last) {
sbin/hammer2/cmd_service.c
573
} else if (fp && found_last == 0) {
sbin/hammer2/cmd_service.c
574
fclose(fp);
sbin/hammer2/cmd_service.c
587
if (fp) {
sbin/hammer2/cmd_service.c
589
fclose(fp);
sbin/hammer2/cmd_service.c
602
while (fp && fgets(buf, sizeof(buf), fp) != NULL) {
sbin/hammer2/cmd_service.c
629
if (fp) {
sbin/hammer2/cmd_service.c
630
if (fstat(fileno(fp), &st) < 0) {
sbin/hammer2/cmd_service.c
631
fclose(fp);
sbin/hammer2/cmd_service.c
634
fclose(fp);
sbin/ifconfig/ifconfig.c
309
char **fp;
sbin/ifconfig/ifconfig.c
326
fp = NULL;
sbin/ifconfig/ifconfig.c
328
fp = &f_addr;
sbin/ifconfig/ifconfig.c
330
fp = &f_ether;
sbin/ifconfig/ifconfig.c
332
fp = &f_inet;
sbin/ifconfig/ifconfig.c
334
fp = &f_inet6;
sbin/ifconfig/ifconfig.c
336
if (fp != NULL) {
sbin/ifconfig/ifconfig.c
337
*fp = strdup(modifier);
sbin/ifconfig/ifconfig.c
338
if (*fp == NULL)
sbin/ifconfig/regdomain.c
423
struct freqband *fp;
sbin/ifconfig/regdomain.c
460
LIST_FOREACH(fp, &rdp->freqbands, next) {
sbin/ifconfig/regdomain.c
461
rdp->ident[i].id = fp->id;
sbin/ifconfig/regdomain.c
462
rdp->ident[i].p = fp;
sbin/ifconfig/regdomain.c
611
struct freqband *fp = LIST_FIRST(&rdp->freqbands);
sbin/ifconfig/regdomain.c
612
if (fp == NULL)
sbin/ifconfig/regdomain.c
614
LIST_REMOVE(fp, next);
sbin/ifconfig/regdomain.c
615
free(fp);
sbin/jscan/jscan.h
160
void stringout(FILE *fp, char c, int exact);
sbin/jscan/subs.c
219
stringout(FILE *fp, char c, int exact)
sbin/jscan/subs.c
225
putc(c, fp);
sbin/jscan/subs.c
227
putc(c, fp);
sbin/jscan/subs.c
229
putc('.', fp);
sbin/jscan/subs.c
231
fprintf(fp, "\\0");
sbin/jscan/subs.c
233
fprintf(fp, "\\n");
sbin/jscan/subs.c
235
fprintf(fp, "\\x%02x", (int)(unsigned char)c);
sbin/ldconfig/elfhints.c
146
FILE *fp;
sbin/ldconfig/elfhints.c
150
if ((fp = fopen(listfile, "r")) == NULL)
sbin/ldconfig/elfhints.c
154
while (fgets(buf, sizeof buf, fp) != NULL) {
sbin/ldconfig/elfhints.c
184
fclose(fp);
sbin/ldconfig/elfhints.c
258
FILE *fp;
sbin/ldconfig/elfhints.c
267
if ((fp = fdopen(fd, "wb")) == NULL)
sbin/ldconfig/elfhints.c
287
if (fwrite(&hdr, 1, sizeof hdr, fp) != sizeof hdr)
sbin/ldconfig/elfhints.c
291
if (fputs(dirs[0], fp) == EOF)
sbin/ldconfig/elfhints.c
294
if (fprintf(fp, ":%s", dirs[i]) < 0)
sbin/ldconfig/elfhints.c
297
if (putc('\0', fp) == EOF || fclose(fp) == EOF)
sbin/rconfig/server.c
174
FILE *fp;
sbin/rconfig/server.c
176
if ((fp = fopen(path, "r")) == NULL) {
sbin/rconfig/server.c
183
fseek(fp, 0L, 2);
sbin/rconfig/server.c
184
bytes = (size_t)ftell(fp);
sbin/rconfig/server.c
185
fseek(fp, 0L, 0);
sbin/rconfig/server.c
189
n = fread(buf, 1, n, fp);
sbin/rconfig/server.c
200
fclose(fp);
sbin/rcorder/rcorder.c
447
FILE *fp;
sbin/rcorder/rcorder.c
455
if ((fp = fopen(filename, "r")) == NULL) {
sbin/rcorder/rcorder.c
460
if (fstat(fileno(fp), &st) == -1) {
sbin/rcorder/rcorder.c
462
fclose(fp);
sbin/rcorder/rcorder.c
470
fclose(fp);
sbin/rcorder/rcorder.c
481
(buf = fparseln(fp, NULL, NULL, delims, 0)) != NULL; free(buf)) {
sbin/rcorder/rcorder.c
513
fclose(fp);
sbin/restore/interactive.c
485
struct afile *fp, *list, *listp = NULL;
sbin/restore/interactive.c
553
for (fp = listp - 1; fp >= list; fp--)
sbin/restore/interactive.c
554
freename(fp->fname);
sbin/restore/interactive.c
564
mkentry(const char *name, struct direct *dp, struct afile *fp)
sbin/restore/interactive.c
569
fp->fnum = dp->d_ino;
sbin/restore/interactive.c
570
fp->fname = savename(dp->d_name);
sbin/restore/interactive.c
571
for (cp = fp->fname; *cp; cp++)
sbin/restore/interactive.c
574
fp->len = cp - fp->fname;
sbin/restore/interactive.c
575
if (dflag && TSTINO(fp->fnum, dumpmap) == 0)
sbin/restore/interactive.c
576
fp->prefix = '^';
sbin/restore/interactive.c
578
fp->prefix = '*';
sbin/restore/interactive.c
580
fp->prefix = ' ';
sbin/restore/interactive.c
588
fp->postfix = ' ';
sbin/restore/interactive.c
592
fp->postfix = '@';
sbin/restore/interactive.c
597
fp->postfix = '=';
sbin/restore/interactive.c
602
fp->postfix = '#';
sbin/restore/interactive.c
606
fp->postfix = '%';
sbin/restore/interactive.c
612
fp->postfix = '/';
sbin/restore/interactive.c
614
fp->postfix = ' ';
sbin/restore/interactive.c
626
struct afile *fp, *endlist;
sbin/restore/interactive.c
636
for (fp = &list[0]; fp < endlist; fp++) {
sbin/restore/interactive.c
637
if (bigino < fp->fnum)
sbin/restore/interactive.c
638
bigino = fp->fnum;
sbin/restore/interactive.c
639
if (width < fp->len)
sbin/restore/interactive.c
640
width = fp->len;
sbin/restore/interactive.c
641
if (fp->prefix != ' ')
sbin/restore/interactive.c
643
if (fp->postfix != ' ')
sbin/restore/interactive.c
662
fp = &list[j * lines + i];
sbin/restore/interactive.c
664
fprintf(stderr, "%*d ", precision, fp->fnum);
sbin/restore/interactive.c
665
fp->len += precision + 1;
sbin/restore/interactive.c
668
putc(fp->prefix, stderr);
sbin/restore/interactive.c
669
fp->len++;
sbin/restore/interactive.c
671
fprintf(stderr, "%s", fp->fname);
sbin/restore/interactive.c
673
putc(fp->postfix, stderr);
sbin/restore/interactive.c
674
fp->len++;
sbin/restore/interactive.c
676
if (fp + lines >= endlist) {
sbin/restore/interactive.c
680
for (w = fp->len; w < width; w++)
sbin/route/route.c
1745
bprintf(FILE *fp, int b, u_char *str)
sbin/route/route.c
1758
putc(i, fp);
sbin/route/route.c
1761
putc(i, fp);
sbin/route/route.c
1767
putc('>', fp);
sbin/routed/parms.c
156
FILE *fp;
sbin/routed/parms.c
169
fp = fopen(_PATH_GATEWAYS, "r");
sbin/routed/parms.c
170
if (fp == NULL)
sbin/routed/parms.c
173
if (0 > fstat(fileno(fp), &sb)) {
sbin/routed/parms.c
175
fclose(fp);
sbin/routed/parms.c
180
if (0 == fgets(lbuf, sizeof(lbuf), fp))
sbin/routed/parms.c
351
fclose(fp);
sbin/savecore/savecore.c
134
FILE *fp;
sbin/savecore/savecore.c
140
if ((fp = fopen("bounds", "r")) == NULL) {
sbin/savecore/savecore.c
146
if (fgets(buf, sizeof buf, fp) == NULL) {
sbin/savecore/savecore.c
148
fclose(fp);
sbin/savecore/savecore.c
156
fclose(fp);
sbin/savecore/savecore.c
162
FILE *fp;
sbin/savecore/savecore.c
164
if ((fp = fopen("bounds", "w")) == NULL) {
sbin/savecore/savecore.c
172
fprintf(fp, "%d\n", bounds);
sbin/savecore/savecore.c
173
fclose(fp);
sbin/savecore/savecore.c
183
FILE *fp;
sbin/savecore/savecore.c
196
if ((fp = fopen(path, "r")) == NULL)
sbin/savecore/savecore.c
199
if (fgets(buf, sizeof(buf), fp) == NULL)
sbin/savecore/savecore.c
203
(void)fclose(fp);
sbin/savecore/savecore.c
230
FILE *info, *fp, *fpkern;
sbin/savecore/savecore.c
433
fp = zopen(buf, "w");
sbin/savecore/savecore.c
436
fp = fopen(buf, "w");
sbin/savecore/savecore.c
438
if (fp == NULL) {
sbin/savecore/savecore.c
478
nw = fwrite(buf, 1, wl, fp);
sbin/savecore/savecore.c
510
if (fwrite(buf + nw, hs - nw, 1, fp)
sbin/savecore/savecore.c
514
if (fseeko(fp, he - hs, SEEK_CUR) == -1)
sbin/savecore/savecore.c
536
if (fclose(fp) < 0) {
sbin/savecore/savecore.c
561
fclose(fp);
sbin/svc/execute.c
1006
n = fwrite(buf, 1, i - b, fp);
sbin/svc/execute.c
1013
n = fwrite(".", 1, 1, fp);
sbin/svc/execute.c
104
fprintf(cmd->fp, "Unable to create pipe: %s\n",
sbin/svc/execute.c
120
fprintf(cmd->fp, "fork failed: %s\n", strerror(errno));
sbin/svc/execute.c
214
if (cmd->fp != stdout)
sbin/svc/execute.c
215
fclose(cmd->fp);
sbin/svc/execute.c
216
cmd->fp = fdopen(cmd->logfds[1], "w");
sbin/svc/execute.c
236
fprintf(cmd->fp, "svc is unable to become the "
sbin/svc/execute.c
238
fflush(cmd->fp);
sbin/svc/execute.c
261
fflush(cmd->fp);
sbin/svc/execute.c
273
fprintf(cmd->fp,
sbin/svc/execute.c
276
fflush(cmd->fp);
sbin/svc/execute.c
287
fprintf(cmd->fp,
sbin/svc/execute.c
341
fprintf(cmd->fp,
sbin/svc/execute.c
395
fprintf(cmd->fp, "svc %s: sigterm %d\n",
sbin/svc/execute.c
404
fprintf(cmd->fp, "svc %s: sigkill %d\n",
sbin/svc/execute.c
433
fprintf(cmd->fp,
sbin/svc/execute.c
436
fflush(cmd->fp);
sbin/svc/execute.c
441
fprintf(cmd->fp,
sbin/svc/execute.c
444
fflush(cmd->fp);
sbin/svc/execute.c
449
fprintf(cmd->fp, "svc %s: Already started pid %d\n",
sbin/svc/execute.c
451
fflush(cmd->fp);
sbin/svc/execute.c
457
fflush(InitCmd->fp);
sbin/svc/execute.c
459
dup2(fileno(InitCmd->fp), 1); /* setup stdout */
sbin/svc/execute.c
460
dup2(fileno(InitCmd->fp), 2); /* setup stderr */
sbin/svc/execute.c
480
fprintf(cmd->fp, "svc %s: Starting pid %d\n", cmd->label, DirectPid);
sbin/svc/execute.c
481
fflush(cmd->fp);
sbin/svc/execute.c
512
fprintf(cmd->fp, "svc %s: Stopping\n", cmd->label);
sbin/svc/execute.c
513
fflush(cmd->fp);
sbin/svc/execute.c
539
fprintf(cmd->fp,
sbin/svc/execute.c
542
fflush(cmd->fp);
sbin/svc/execute.c
547
fprintf(cmd->fp,
sbin/svc/execute.c
55
static int escapewrite(FILE *fp, char *buf, int n, int *statep);
sbin/svc/execute.c
550
fflush(cmd->fp);
sbin/svc/execute.c
573
fprintf(cmd->fp, "svc %s: Stopping and Exiting\n", cmd->label);
sbin/svc/execute.c
582
fprintf(cmd->fp, "%-16s\n", cmd->label);
sbin/svc/execute.c
614
fprintf(cmd->fp, "%-16s %s\n", cmd->label, state);
sbin/svc/execute.c
653
fprintf(cmd->fp, "\n(LOG DATA LOST)\n");
sbin/svc/execute.c
678
n = escapewrite(cmd->fp, buf, n, &dotstate);
sbin/svc/execute.c
679
fflush(cmd->fp);
sbin/svc/execute.c
690
fprintf(cmd->fp, "\n");
sbin/svc/execute.c
718
fprintf(cmd->fp, "svc %s: Reopen logfile %s\n",
sbin/svc/execute.c
721
fprintf(cmd->fp, "svc %s: Change logfile to %s\n",
sbin/svc/execute.c
73
fprintf(cmd->fp, "init requires a label and command\n");
sbin/svc/execute.c
736
fprintf(cmd->fp,
sbin/svc/execute.c
751
fprintf(cmd->fp,
sbin/svc/execute.c
76
fprintf(cmd->fp, "initializing new service: %s\n", cmd->label);
sbin/svc/execute.c
79
fprintf(cmd->fp, "Unable to open /dev/null: %s\n",
sbin/svc/execute.c
827
fprintf(cmd->fp, "unable to setgid to \"%s\": %s\n",
sbin/svc/execute.c
837
fprintf(cmd->fp, "unable to setgroups to (");
sbin/svc/execute.c
840
fprintf(cmd->fp, ", ");
sbin/svc/execute.c
841
fprintf(cmd->fp, "%d", cmd->groups[i]);
sbin/svc/execute.c
843
fprintf(cmd->fp, "): %s\n", strerror(errno));
sbin/svc/execute.c
859
fprintf(cmd->fp, "unable to setgid for user \"%s\": %s\n",
sbin/svc/execute.c
866
fprintf(cmd->fp, "unable to setuid for user \"%s\": %s\n",
sbin/svc/execute.c
882
fprintf(cmd->fp, "gethostname() failed: %s\n", strerror(errno));
sbin/svc/execute.c
895
fprintf(cmd->fp, "unable to create jail \"%s\": %s\n",
sbin/svc/execute.c
908
fprintf(cmd->fp, "unable to chroot to \"%s\": %s\n",
sbin/svc/execute.c
932
fprintf(cmd->fp, "devfs already mounted\n");
sbin/svc/execute.c
935
fprintf(cmd->fp, "cannot mount devfs on %s: %s\n",
sbin/svc/execute.c
942
fprintf(cmd->fp, "devfs already unmounted\n");
sbin/svc/execute.c
945
fprintf(cmd->fp, "cannot unmount devfs from %s: %s\n",
sbin/svc/execute.c
959
escapewrite(FILE *fp, char *buf, int n, int *statep)
sbin/svc/remote.c
135
fwrite(ptr, 1, len, cmd->fp);
sbin/svc/remote.c
136
fflush(cmd->fp);
sbin/svc/remote.c
148
fprintf(cmd->fp,
sbin/svc/remote.c
154
fprintf(cmd->fp,
sbin/svc/subs.c
117
fprintf(cmd->fp, "Cannot init, %s is already active\n",
sbin/svc/subs.c
120
fprintf(cmd->fp,
sbin/svc/subs.c
144
fprintf(cmd->fp, "Unable to bind \"%s\"\n",
sbin/svc/subs.c
149
fprintf(cmd->fp, "Unable to listen on \"%s\"\n",
sbin/svc/subs.c
155
fprintf(cmd->fp, "Unable to create unix-domain socket\n");
sbin/svc/svc.c
132
fprintf(fp, "Cannot find user %s: %s\n",
sbin/svc/svc.c
160
fprintf(fp, "Cannot find group %s: %s\n",
sbin/svc/svc.c
186
fprintf(fp,
sbin/svc/svc.c
192
fprintf(fp,
sbin/svc/svc.c
231
fprintf(fp, "bad restart specification: %s\n",
sbin/svc/svc.c
237
fprintf(fp, "Unknown option %c\n", ch);
sbin/svc/svc.c
264
fprintf(fp, "No directive specified\n");
sbin/svc/svc.c
296
fprintf(cmd->fp,
sbin/svc/svc.c
349
fprintf(cmd->fp, "Unknown directive: %s\n", directive);
sbin/svc/svc.c
381
fprintf(cmd->fp, "Unable to scan \"%s\"\n", cmd->piddir);
sbin/svc/svc.c
478
fprintf(cmd->fp, "jail-spec '%s' not understood\n",
sbin/svc/svc.c
66
process_cmd(command_t *cmd, FILE *fp, int ac, char **av)
sbin/svc/svc.c
78
cmd->fp = fp; /* error and output reporting */
sbin/svc/svc.h
121
int process_cmd(command_t *cmd, FILE *fp, int ac, char **av);
sbin/svc/svc.h
79
FILE *fp; /* nominal output */
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
kprintf("%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
kprintf("%s", (const char *)fp->data);
share/examples/kld/firmware/fwconsumer/fw_consumer.c
62
firmware_put(fp, FIRMWARE_UNLOAD);
stand/boot/common/boot.c
100
fp->f_args = unargv(argc - 1, argv + 1);
stand/boot/common/boot.c
123
file_formats[fp->f_loader]->l_exec(fp);
stand/boot/common/boot.c
54
struct preloaded_file *fp;
stand/boot/common/boot.c
88
if ((fp = file_findfile(NULL, NULL)) == NULL) {
stand/boot/common/boot.c
98
if (fp->f_args != NULL)
stand/boot/common/boot.c
99
free(fp->f_args);
stand/boot/common/bootstrap.h
242
struct file_metadata *file_findmetadata(struct preloaded_file *fp, int type);
stand/boot/common/bootstrap.h
243
void file_discard(struct preloaded_file *fp);
stand/boot/common/bootstrap.h
244
void file_addmetadata(struct preloaded_file *fp, int type, size_t size, void *p);
stand/boot/common/bootstrap.h
245
int file_addmodule(struct preloaded_file *fp, char *modname, int version,
stand/boot/common/load_elf.c
101
fp = NULL;
stand/boot/common/load_elf.c
190
fp = file_alloc();
stand/boot/common/load_elf.c
191
if (fp == NULL) {
stand/boot/common/load_elf.c
197
fp->f_name = rel_rootpath(filename);
stand/boot/common/load_elf.c
198
fp->f_type = strdup(ef.kernel ? __elfN(kerneltype) : __elfN(moduletype));
stand/boot/common/load_elf.c
209
setenv("kernelname", fp->f_name, 1);
stand/boot/common/load_elf.c
212
snprintf(mptr, 256, "%s", fp->f_name);
stand/boot/common/load_elf.c
225
printf("%s (from %s) ", filename, fp->f_name);
stand/boot/common/load_elf.c
231
fp->f_size = __elfN(loadimage)(fp, &ef, dest);
stand/boot/common/load_elf.c
232
if (fp->f_size == 0 || fp->f_addr == 0)
stand/boot/common/load_elf.c
236
file_addmetadata(fp, MODINFOMD_ELFHDR, sizeof(*ehdr), ehdr);
stand/boot/common/load_elf.c
239
*result = (struct preloaded_file *)fp;
stand/boot/common/load_elf.c
246
file_discard(fp);
stand/boot/common/load_elf.c
259
__elfN(loadimage)(struct preloaded_file *fp, elf_file_t ef, u_int64_t off)
stand/boot/common/load_elf.c
461
file_addmetadata(fp, MODINFOMD_SSYM, sizeof(ssym), &ssym);
stand/boot/common/load_elf.c
462
file_addmetadata(fp, MODINFOMD_ESYM, sizeof(esym), &esym);
stand/boot/common/load_elf.c
468
fp->f_addr = firstaddr;
stand/boot/common/load_elf.c
475
file_addmetadata(fp, MODINFOMD_DYNAMIC, sizeof(adp), &adp);
stand/boot/common/load_elf.c
531
if (__elfN(parse_modmetadata)(fp, ef) == 0)
stand/boot/common/load_elf.c
551
char *fp;
stand/boot/common/load_elf.c
568
fp = malloc(len + 1);
stand/boot/common/load_elf.c
569
if (fp == NULL)
stand/boot/common/load_elf.c
571
memcpy(fp, sp, len);
stand/boot/common/load_elf.c
572
fp[len] = '\0';
stand/boot/common/load_elf.c
573
return fp;
stand/boot/common/load_elf.c
586
__elfN(parse_modmetadata)(struct preloaded_file *fp, elf_file_t ef)
stand/boot/common/load_elf.c
599
if (__elfN(lookup_symbol)(fp, ef, "__start_set_modmetadata_set", &sym) != 0)
stand/boot/common/load_elf.c
602
if (__elfN(lookup_symbol)(fp, ef, "__stop_set_modmetadata_set", &sym) != 0)
stand/boot/common/load_elf.c
609
error = __elfN(reloc_ptr)(fp, ef, p, &v, sizeof(v));
stand/boot/common/load_elf.c
616
error = __elfN(reloc_ptr)(fp, ef, v, &md64, sizeof(md64));
stand/boot/common/load_elf.c
628
error = __elfN(reloc_ptr)(fp, ef, v, &md, sizeof(md));
stand/boot/common/load_elf.c
648
file_addmetadata(fp, MODINFOMD_DEPLIST, minfolen, mdepend);
stand/boot/common/load_elf.c
654
file_addmodule(fp, s, mver.mv_version, NULL);
stand/boot/common/load_elf.c
661
s = fake_modname(fp->f_name);
stand/boot/common/load_elf.c
662
file_addmodule(fp, s, 1, NULL);
stand/boot/common/load_elf.c
685
__elfN(lookup_symbol)(struct preloaded_file *fp, elf_file_t ef, const char* name,
stand/boot/common/load_elf.c
94
struct preloaded_file *fp, *kfp;
stand/boot/common/load_elf_obj.c
149
fp = file_alloc();
stand/boot/common/load_elf_obj.c
150
if (fp == NULL) {
stand/boot/common/load_elf_obj.c
155
fp->f_name = rel_rootpath(filename);
stand/boot/common/load_elf_obj.c
156
fp->f_type = strdup(__elfN(obj_moduletype));
stand/boot/common/load_elf_obj.c
160
fp->f_size = __elfN(obj_loadimage)(fp, &ef, dest);
stand/boot/common/load_elf_obj.c
161
if (fp->f_size == 0 || fp->f_addr == 0)
stand/boot/common/load_elf_obj.c
165
file_addmetadata(fp, MODINFOMD_ELFHDR, sizeof(*hdr), hdr);
stand/boot/common/load_elf_obj.c
168
*result = (struct preloaded_file *)fp;
stand/boot/common/load_elf_obj.c
175
file_discard(fp);
stand/boot/common/load_elf_obj.c
189
__elfN(obj_loadimage)(struct preloaded_file *fp, elf_file_t ef, u_int64_t off)
stand/boot/common/load_elf_obj.c
296
file_addmetadata(fp, MODINFOMD_SHDR, shdrbytes, shdr);
stand/boot/common/load_elf_obj.c
298
res = __elfN(obj_parse_modmetadata)(fp, ef);
stand/boot/common/load_elf_obj.c
303
fp->f_addr = firstaddr;
stand/boot/common/load_elf_obj.c
322
__elfN(obj_parse_modmetadata)(struct preloaded_file *fp, elf_file_t ef)
stand/boot/common/load_elf_obj.c
334
if (__elfN(obj_lookup_set)(fp, ef, "modmetadata_set", &p, &p_stop,
stand/boot/common/load_elf_obj.c
341
error = __elfN(obj_reloc_ptr)(fp, ef, p, &v, sizeof(v));
stand/boot/common/load_elf_obj.c
346
error = __elfN(obj_reloc_ptr)(fp, ef, v, &md64, sizeof(md64));
stand/boot/common/load_elf_obj.c
355
error = __elfN(obj_reloc_ptr)(fp, ef, v, &md, sizeof(md));
stand/boot/common/load_elf_obj.c
371
file_addmetadata(fp, MODINFOMD_DEPLIST, minfolen,
stand/boot/common/load_elf_obj.c
378
file_addmodule(fp, s, mver.mv_version, NULL);
stand/boot/common/load_elf_obj.c
393
__elfN(obj_lookup_set)(struct preloaded_file *fp, elf_file_t ef,
stand/boot/common/load_elf_obj.c
85
struct preloaded_file *fp, *kfp;
stand/boot/common/load_elf_obj.c
91
fp = NULL;
stand/boot/common/module.c
166
struct preloaded_file *fp;
stand/boot/common/module.c
169
fp = preloaded_files;
stand/boot/common/module.c
171
file_discard(fp);
stand/boot/common/module.c
252
struct preloaded_file *fp;
stand/boot/common/module.c
274
for (fp = preloaded_files; fp; fp = fp->f_next) {
stand/boot/common/module.c
276
(void *) fp->f_addr, fp->f_name, fp->f_type, (long) fp->f_size);
stand/boot/common/module.c
278
if (fp->f_args != NULL) {
stand/boot/common/module.c
280
pager_output(fp->f_args);
stand/boot/common/module.c
283
if (fp->f_modules) {
stand/boot/common/module.c
285
for (mp = fp->f_modules; mp; mp = mp->m_next) {
stand/boot/common/module.c
293
for (md = fp->f_metadata; md != NULL; md = md->md_next) {
stand/boot/common/module.c
309
struct preloaded_file *fp;
stand/boot/common/module.c
314
for (i = 0, fp = NULL; file_formats[i] && fp == NULL; i++) {
stand/boot/common/module.c
315
error = (file_formats[i]->l_load)(filename, dest, &fp);
stand/boot/common/module.c
317
fp->f_loader = i; /* remember the loader */
stand/boot/common/module.c
318
*result = fp;
stand/boot/common/module.c
336
struct preloaded_file *fp;
stand/boot/common/module.c
375
fp = base_file;
stand/boot/common/module.c
377
file_discard(fp);
stand/boot/common/module.c
389
struct preloaded_file *fp;
stand/boot/common/module.c
442
fp = file_alloc();
stand/boot/common/module.c
443
fp->f_name = rel_rootpath(name);
stand/boot/common/module.c
444
fp->f_type = strdup(type);
stand/boot/common/module.c
445
fp->f_args = NULL;
stand/boot/common/module.c
446
fp->f_metadata = NULL;
stand/boot/common/module.c
447
fp->f_loader = -1;
stand/boot/common/module.c
448
fp->f_addr = loadaddr;
stand/boot/common/module.c
449
fp->f_size = laddr - loadaddr;
stand/boot/common/module.c
455
file_insert_tail(fp);
stand/boot/common/module.c
506
struct preloaded_file *fp, *last_file;
stand/boot/common/module.c
522
fp = file_findfile(filename, NULL);
stand/boot/common/module.c
523
if (fp) {
stand/boot/common/module.c
535
err = file_load(filename, loadaddr, &fp);
stand/boot/common/module.c
538
fp->f_args = unargv(argc, argv);
stand/boot/common/module.c
539
loadaddr = fp->f_addr + fp->f_size;
stand/boot/common/module.c
540
file_insert_tail(fp); /* Add to the list of loaded files */
stand/boot/common/module.c
541
if (file_load_dependencies(fp) != 0) {
stand/boot/common/module.c
545
fp = NULL;
stand/boot/common/module.c
552
if (err && fp)
stand/boot/common/module.c
553
file_discard(fp);
stand/boot/common/module.c
565
struct preloaded_file *fp;
stand/boot/common/module.c
572
for (fp = preloaded_files; fp != NULL; fp = fp->f_next) {
stand/boot/common/module.c
573
if (((rootpath == NULL) || !strcmp(rootpath, fp->f_name)) &&
stand/boot/common/module.c
574
((type == NULL) || !strcmp(type, fp->f_type)))
stand/boot/common/module.c
580
return (fp);
stand/boot/common/module.c
588
file_findmodule(struct preloaded_file *fp, char *modname,
stand/boot/common/module.c
594
if (fp == NULL) {
stand/boot/common/module.c
595
for (fp = preloaded_files; fp; fp = fp->f_next) {
stand/boot/common/module.c
596
mp = file_findmodule(fp, modname, verinfo);
stand/boot/common/module.c
60
static struct kernel_module * file_findmodule(struct preloaded_file *fp, char *modname, struct mod_depend *verinfo);
stand/boot/common/module.c
605
for (mp = fp->f_modules; mp; mp = mp->m_next) {
stand/boot/common/module.c
627
file_addmetadata(struct preloaded_file *fp, int type, size_t size, void *p)
stand/boot/common/module.c
635
md->md_next = fp->f_metadata;
stand/boot/common/module.c
636
fp->f_metadata = md;
stand/boot/common/module.c
643
file_findmetadata(struct preloaded_file *fp, int type)
stand/boot/common/module.c
647
for (md = fp->f_metadata; md != NULL; md = md->md_next)
stand/boot/common/module.c
867
file_addmodule(struct preloaded_file *fp, char *modname, int version,
stand/boot/common/module.c
875
mp = file_findmodule(fp, modname, &mdepend);
stand/boot/common/module.c
884
mp->m_fp = fp;
stand/boot/common/module.c
885
mp->m_next = fp->f_modules;
stand/boot/common/module.c
886
fp->f_modules = mp;
stand/boot/common/module.c
896
file_discard(struct preloaded_file *fp)
stand/boot/common/module.c
901
if (fp == NULL)
stand/boot/common/module.c
904
md = fp->f_metadata;
stand/boot/common/module.c
911
mp = fp->f_modules;
stand/boot/common/module.c
924
if (fp->f_name != NULL)
stand/boot/common/module.c
925
free(fp->f_name);
stand/boot/common/module.c
926
if (fp->f_type != NULL)
stand/boot/common/module.c
927
free(fp->f_type);
stand/boot/common/module.c
928
if (fp->f_args != NULL)
stand/boot/common/module.c
929
free(fp->f_args);
stand/boot/common/module.c
930
free(fp);
stand/boot/common/module.c
940
struct preloaded_file *fp;
stand/boot/common/module.c
942
if ((fp = malloc(sizeof(struct preloaded_file))) != NULL) {
stand/boot/common/module.c
943
bzero(fp, sizeof(struct preloaded_file));
stand/boot/common/module.c
945
return (fp);
stand/boot/common/module.c
952
file_insert_tail(struct preloaded_file *fp)
stand/boot/common/module.c
957
fp->f_next = NULL;
stand/boot/common/module.c
959
preloaded_files = fp;
stand/boot/common/module.c
963
cm->f_next = fp;
stand/boot/efi/loader/arch/x86_64/elf64_freebsd.c
126
if ((md = file_findmetadata(fp, MODINFOMD_ELFHDR)) == NULL)
stand/boot/efi/loader/arch/x86_64/elf64_freebsd.c
167
err = bi_load(fp->f_args, &modulep, &kernend);
stand/boot/efi/loader/arch/x86_64/elf64_freebsd.c
180
elf64_obj_exec(struct preloaded_file *fp)
stand/boot/efi/loader/arch/x86_64/elf64_freebsd.c
89
elf64_exec(struct preloaded_file *fp)
stand/boot/efi/loader/bootinfo.c
209
struct preloaded_file *fp;
stand/boot/efi/loader/bootinfo.c
216
for (fp = file_findfile(NULL, NULL); fp != NULL; fp = fp->f_next) {
stand/boot/efi/loader/bootinfo.c
217
MOD_NAME(addr, fp->f_name, c); /* This must come first. */
stand/boot/efi/loader/bootinfo.c
218
MOD_TYPE(addr, fp->f_type, c);
stand/boot/efi/loader/bootinfo.c
219
if (fp->f_args)
stand/boot/efi/loader/bootinfo.c
220
MOD_ARGS(addr, fp->f_args, c);
stand/boot/efi/loader/bootinfo.c
221
v = fp->f_addr;
stand/boot/efi/loader/bootinfo.c
223
v = fp->f_size;
stand/boot/efi/loader/bootinfo.c
225
for (md = fp->f_metadata; md != NULL; md = md->md_next)
stand/boot/pc32/libi386/bootinfo32.c
102
struct preloaded_file *fp;
stand/boot/pc32/libi386/bootinfo32.c
108
for (fp = file_findfile(NULL, NULL); fp != NULL; fp = fp->f_next) {
stand/boot/pc32/libi386/bootinfo32.c
110
MOD_NAME(addr, fp->f_name, c); /* this field must come first */
stand/boot/pc32/libi386/bootinfo32.c
111
MOD_TYPE(addr, fp->f_type, c);
stand/boot/pc32/libi386/bootinfo32.c
112
if (fp->f_args)
stand/boot/pc32/libi386/bootinfo32.c
113
MOD_ARGS(addr, fp->f_args, c);
stand/boot/pc32/libi386/bootinfo32.c
114
MOD_ADDR(addr, fp->f_addr, c);
stand/boot/pc32/libi386/bootinfo32.c
115
MOD_SIZE(addr, fp->f_size, c);
stand/boot/pc32/libi386/bootinfo32.c
116
for (md = fp->f_metadata; md != NULL; md = md->md_next)
stand/boot/pc32/libi386/bootinfo64.c
103
struct preloaded_file *fp;
stand/boot/pc32/libi386/bootinfo64.c
110
for (fp = file_findfile(NULL, NULL); fp != NULL; fp = fp->f_next) {
stand/boot/pc32/libi386/bootinfo64.c
112
MOD_NAME(addr, fp->f_name, c); /* this field must come first */
stand/boot/pc32/libi386/bootinfo64.c
113
MOD_TYPE(addr, fp->f_type, c);
stand/boot/pc32/libi386/bootinfo64.c
114
if (fp->f_args)
stand/boot/pc32/libi386/bootinfo64.c
115
MOD_ARGS(addr, fp->f_args, c);
stand/boot/pc32/libi386/bootinfo64.c
116
v = fp->f_addr;
stand/boot/pc32/libi386/bootinfo64.c
118
v = fp->f_size;
stand/boot/pc32/libi386/bootinfo64.c
120
for (md = fp->f_metadata; md != NULL; md = md->md_next)
stand/boot/pc32/libi386/elf32_freebsd.c
54
elf32_exec(struct preloaded_file *fp)
stand/boot/pc32/libi386/elf32_freebsd.c
61
if ((md = file_findmetadata(fp, MODINFOMD_ELFHDR)) == NULL)
stand/boot/pc32/libi386/elf32_freebsd.c
65
err = bi_load32(fp->f_args, &boothowto, &bootdev, &bootinfop, &modulep, &kernend);
stand/boot/pc32/libi386/elf32_freebsd.c
81
elf32_obj_exec(struct preloaded_file *fp)
stand/boot/pc32/libi386/elf64_freebsd.c
123
elf64_obj_exec(struct preloaded_file *fp)
stand/boot/pc32/libi386/elf64_freebsd.c
72
elf64_exec(struct preloaded_file *fp)
stand/boot/pc32/libi386/elf64_freebsd.c
80
if ((md = file_findmetadata(fp, MODINFOMD_ELFHDR)) == NULL)
stand/boot/pc32/libi386/elf64_freebsd.c
84
err = bi_load64(fp->f_args, &modulep, &kernend);
stand/lib/cd9660.c
276
struct file *fp = NULL;
stand/lib/cd9660.c
376
fp = malloc(sizeof(struct file));
stand/lib/cd9660.c
377
bzero(fp, sizeof(struct file));
stand/lib/cd9660.c
378
f->f_fsdata = (void *)fp;
stand/lib/cd9660.c
381
fp->f_flags = F_ISDIR;
stand/lib/cd9660.c
384
fp->f_flags |= F_ROOTDIR;
stand/lib/cd9660.c
401
fp->f_flags |= F_RR;
stand/lib/cd9660.c
402
fp->f_susp_skip = lenskip;
stand/lib/cd9660.c
404
fp->f_off = 0;
stand/lib/cd9660.c
405
fp->f_bno = isonum_733(rec.extent) + isonum_711(rec.ext_attr_length);
stand/lib/cd9660.c
406
fp->f_size = isonum_733(rec.size);
stand/lib/cd9660.c
413
if (fp)
stand/lib/cd9660.c
414
free(fp);
stand/lib/cd9660.c
423
struct file *fp = (struct file *)f->f_fsdata;
stand/lib/cd9660.c
426
if (fp)
stand/lib/cd9660.c
427
free(fp);
stand/lib/cd9660.c
435
struct file *fp = (struct file *)f->f_fsdata;
stand/lib/cd9660.c
440
blkno = fp->f_off / ISO_DEFAULT_BLOCK_SIZE + fp->f_bno;
stand/lib/cd9660.c
441
blkoff = fp->f_off % ISO_DEFAULT_BLOCK_SIZE;
stand/lib/cd9660.c
443
if (blkno != fp->f_buf_blkno) {
stand/lib/cd9660.c
444
if (fp->f_buf == NULL)
stand/lib/cd9660.c
445
fp->f_buf = malloc(ISO_DEFAULT_BLOCK_SIZE);
stand/lib/cd9660.c
449
cdb2devb(blkno), ISO_DEFAULT_BLOCK_SIZE, fp->f_buf, &read);
stand/lib/cd9660.c
455
fp->f_buf_blkno = blkno;
stand/lib/cd9660.c
458
*buf_p = fp->f_buf + blkoff;
stand/lib/cd9660.c
461
if (*size_p > fp->f_size - fp->f_off)
stand/lib/cd9660.c
462
*size_p = fp->f_size - fp->f_off;
stand/lib/cd9660.c
469
struct file *fp = (struct file *)f->f_fsdata;
stand/lib/cd9660.c
476
if (fp->f_off < 0 || fp->f_off >= fp->f_size)
stand/lib/cd9660.c
486
fp->f_off += csize;
stand/lib/cd9660.c
498
struct file *fp = (struct file *)f->f_fsdata;
stand/lib/cd9660.c
506
if (fp->f_off >= fp->f_size)
stand/lib/cd9660.c
517
blkno = fp->f_off / ISO_DEFAULT_BLOCK_SIZE;
stand/lib/cd9660.c
518
fp->f_off = (blkno + 1) * ISO_DEFAULT_BLOCK_SIZE;
stand/lib/cd9660.c
522
if (fp->f_flags & F_RR) {
stand/lib/cd9660.c
523
if (fp->f_flags & F_ROOTDIR && fp->f_off == 0)
stand/lib/cd9660.c
526
lenskip = fp->f_susp_skip;
stand/lib/cd9660.c
553
fp->f_off += isonum_711(ep->length);
stand/lib/cd9660.c
566
struct file *fp = (struct file *)f->f_fsdata;
stand/lib/cd9660.c
570
fp->f_off = offset;
stand/lib/cd9660.c
573
fp->f_off += offset;
stand/lib/cd9660.c
576
fp->f_off = fp->f_size - offset;
stand/lib/cd9660.c
581
return fp->f_off;
stand/lib/cd9660.c
587
struct file *fp = (struct file *)f->f_fsdata;
stand/lib/cd9660.c
591
if (fp->f_flags & F_ISDIR)
stand/lib/cd9660.c
596
sb->st_size = fp->f_size;
stand/lib/ext2fs.c
328
struct file *fp;
stand/lib/ext2fs.c
340
fp = malloc(sizeof(struct file));
stand/lib/ext2fs.c
341
if (fp == NULL)
stand/lib/ext2fs.c
343
bzero(fp, sizeof(struct file));
stand/lib/ext2fs.c
344
f->f_fsdata = (void *)fp;
stand/lib/ext2fs.c
348
fp->f_fs = fs;
stand/lib/ext2fs.c
390
fp->f_bg = malloc(len);
stand/lib/ext2fs.c
394
(char *)fp->f_bg, &buf_size);
stand/lib/ext2fs.c
409
fp->f_nindir[i] = mult;
stand/lib/ext2fs.c
434
if (! S_ISDIR(fp->f_di.di_mode)) {
stand/lib/ext2fs.c
474
if (S_ISLNK(fp->f_di.di_mode)) {
stand/lib/ext2fs.c
475
int link_len = fp->f_di.di_size;
stand/lib/ext2fs.c
486
if (fp->f_di.di_nblk == 0) {
stand/lib/ext2fs.c
487
bcopy(fp->f_di.di_shortlink,
stand/lib/ext2fs.c
493
struct ext2fs *fs = fp->f_fs;
stand/lib/ext2fs.c
539
if (fp->f_buf)
stand/lib/ext2fs.c
540
free(fp->f_buf);
stand/lib/ext2fs.c
541
free(fp->f_fs);
stand/lib/ext2fs.c
542
free(fp);
stand/lib/ext2fs.c
553
struct file *fp = (struct file *)f->f_fsdata;
stand/lib/ext2fs.c
554
struct ext2fs *fs = fp->f_fs;
stand/lib/ext2fs.c
566
ino_to_db(fs, fp->f_bg, inumber), fs->fs_bsize, buf, &rsize);
stand/lib/ext2fs.c
575
fp->f_di = dp[ino_to_bo(fs, inumber)];
stand/lib/ext2fs.c
579
fp->f_blkno[level] = -1;
stand/lib/ext2fs.c
580
fp->f_buf_blkno = -1;
stand/lib/ext2fs.c
594
struct file *fp = (struct file *)f->f_fsdata;
stand/lib/ext2fs.c
595
struct ext2fs *fs = fp->f_fs;
stand/lib/ext2fs.c
626
*disk_block_p = fp->f_di.di_db[file_block];
stand/lib/ext2fs.c
639
if (file_block < fp->f_nindir[level])
stand/lib/ext2fs.c
641
file_block -= fp->f_nindir[level];
stand/lib/ext2fs.c
648
ind_block_num = fp->f_di.di_ib[level];
stand/lib/ext2fs.c
656
if (fp->f_blkno[level] != ind_block_num) {
stand/lib/ext2fs.c
657
if (fp->f_blk[level] == NULL)
stand/lib/ext2fs.c
658
fp->f_blk[level] =
stand/lib/ext2fs.c
662
fsb_to_db(fp->f_fs, ind_block_num), fs->fs_bsize,
stand/lib/ext2fs.c
663
fp->f_blk[level], &fp->f_blksize[level]);
stand/lib/ext2fs.c
666
if (fp->f_blksize[level] != fs->fs_bsize)
stand/lib/ext2fs.c
668
fp->f_blkno[level] = ind_block_num;
stand/lib/ext2fs.c
671
ind_p = (daddr_t *)fp->f_blk[level];
stand/lib/ext2fs.c
674
idx = file_block / fp->f_nindir[level - 1];
stand/lib/ext2fs.c
675
file_block %= fp->f_nindir[level - 1];
stand/lib/ext2fs.c
694
struct file *fp = (struct file *)f->f_fsdata;
stand/lib/ext2fs.c
695
struct ext2fs *fs = fp->f_fs;
stand/lib/ext2fs.c
702
off = blkoff(fs, fp->f_seekp);
stand/lib/ext2fs.c
703
file_block = lblkno(fs, fp->f_seekp);
stand/lib/ext2fs.c
704
block_size = dblksize(fs, &fp->f_di, file_block);
stand/lib/ext2fs.c
706
if (file_block != fp->f_buf_blkno) {
stand/lib/ext2fs.c
711
if (fp->f_buf == NULL)
stand/lib/ext2fs.c
712
fp->f_buf = malloc(fs->fs_bsize);
stand/lib/ext2fs.c
715
bzero(fp->f_buf, block_size);
stand/lib/ext2fs.c
716
fp->f_buf_size = block_size;
stand/lib/ext2fs.c
721
fp->f_buf, &fp->f_buf_size);
stand/lib/ext2fs.c
725
fp->f_buf_blkno = file_block;
stand/lib/ext2fs.c
733
*buf_p = fp->f_buf + off;
stand/lib/ext2fs.c
739
if (*size_p > fp->f_di.di_size - fp->f_seekp)
stand/lib/ext2fs.c
740
*size_p = fp->f_di.di_size - fp->f_seekp;
stand/lib/ext2fs.c
752
struct file *fp = (struct file *)f->f_fsdata;
stand/lib/ext2fs.c
760
fp->f_seekp = 0;
stand/lib/ext2fs.c
761
while (fp->f_seekp < fp->f_di.di_size) {
stand/lib/ext2fs.c
780
fp->f_seekp += buf_size;
stand/lib/ext2fs.c
788
struct file *fp = (struct file *)f->f_fsdata;
stand/lib/ext2fs.c
792
if (fp == NULL)
stand/lib/ext2fs.c
796
if (fp->f_blk[level])
stand/lib/ext2fs.c
797
free(fp->f_blk[level]);
stand/lib/ext2fs.c
799
if (fp->f_buf)
stand/lib/ext2fs.c
800
free(fp->f_buf);
stand/lib/ext2fs.c
801
if (fp->f_bg)
stand/lib/ext2fs.c
802
free(fp->f_bg);
stand/lib/ext2fs.c
803
free(fp->f_fs);
stand/lib/ext2fs.c
804
free(fp);
stand/lib/ext2fs.c
811
struct file *fp = (struct file *)f->f_fsdata;
stand/lib/ext2fs.c
817
if (fp->f_seekp >= fp->f_di.di_size)
stand/lib/ext2fs.c
830
fp->f_seekp += csize;
stand/lib/ext2fs.c
842
struct file *fp = (struct file *)f->f_fsdata;
stand/lib/ext2fs.c
846
fp->f_seekp = offset;
stand/lib/ext2fs.c
849
fp->f_seekp += offset;
stand/lib/ext2fs.c
852
fp->f_seekp = fp->f_di.di_size - offset;
stand/lib/ext2fs.c
857
return (fp->f_seekp);
stand/lib/ext2fs.c
863
struct file *fp = (struct file *)f->f_fsdata;
stand/lib/ext2fs.c
866
sb->st_mode = fp->f_di.di_mode;
stand/lib/ext2fs.c
867
sb->st_uid = fp->f_di.di_uid;
stand/lib/ext2fs.c
868
sb->st_gid = fp->f_di.di_gid;
stand/lib/ext2fs.c
869
sb->st_size = fp->f_di.di_size;
stand/lib/ext2fs.c
876
struct file *fp = (struct file *)f->f_fsdata;
stand/lib/ext2fs.c
886
if (fp->f_seekp >= fp->f_di.di_size)
stand/lib/ext2fs.c
892
fp->f_seekp += ed->d_reclen;
stand/lib/nfs.c
572
struct nfs_iodesc *fp = (struct nfs_iodesc *)f->f_fsdata;
stand/lib/nfs.c
576
printf("nfs_close: fp=0x%lx\n", (u_long)fp);
stand/lib/nfs.c
580
if (fp && fp != &nfs_root_node)
stand/lib/nfs.c
581
free(fp);
stand/lib/nfs.c
595
struct nfs_iodesc *fp = (struct nfs_iodesc *)f->f_fsdata;
stand/lib/nfs.c
603
(int)fp->off);
stand/lib/nfs.c
608
cc = nfs_readdata(fp, fp->off, addr, size);
stand/lib/nfs.c
624
fp->off += cc;
stand/lib/nfs.c
677
struct nfs_iodesc *fp = (struct nfs_iodesc *)f->f_fsdata;
stand/lib/nfs.c
680
ftype = ntohl(fp->fa.fa_type);
stand/lib/nfs.c
681
mode = ntohl(fp->fa.fa_mode);
stand/lib/nfs.c
685
sb->st_nlink = ntohl(fp->fa.fa_nlink);
stand/lib/nfs.c
686
sb->st_uid = ntohl(fp->fa.fa_uid);
stand/lib/nfs.c
687
sb->st_gid = ntohl(fp->fa.fa_gid);
stand/lib/nfs.c
688
sb->st_size = ntohl(fp->fa.fa_size);
stand/lib/nfs.c
696
struct nfs_iodesc *fp = (struct nfs_iodesc *)f->f_fsdata;
stand/lib/nfs.c
719
bcopy(fp->fh, args->fh, NFS_FHSIZE);
stand/lib/nfs.c
723
cc = rpc_call(fp->iodesc, NFS_PROG, NFS_VER2, NFSPROC_READDIR,
stand/lib/ufs.c
128
struct file *fp = (struct file *)f->f_fsdata;
stand/lib/ufs.c
129
struct fs *fs = fp->f_fs;
stand/lib/ufs.c
156
fp->f_di = dp[ino_to_fsbo(fs, inumber)];
stand/lib/ufs.c
166
fp->f_blkno[level] = -1;
stand/lib/ufs.c
167
fp->f_buf_blkno = -1;
stand/lib/ufs.c
184
struct file *fp = (struct file *)f->f_fsdata;
stand/lib/ufs.c
185
struct fs *fs = fp->f_fs;
stand/lib/ufs.c
217
*disk_block_p = fp->f_di.di_db[file_block];
stand/lib/ufs.c
230
if (file_block < fp->f_nindir[level])
stand/lib/ufs.c
232
file_block -= fp->f_nindir[level];
stand/lib/ufs.c
239
ind_block_num = fp->f_di.di_ib[level];
stand/lib/ufs.c
247
if (fp->f_blkno[level] != ind_block_num) {
stand/lib/ufs.c
248
if (fp->f_blk[level] == NULL)
stand/lib/ufs.c
249
fp->f_blk[level] =
stand/lib/ufs.c
253
fsbtodb(fp->f_fs, ind_block_num),
stand/lib/ufs.c
255
fp->f_blk[level],
stand/lib/ufs.c
256
&fp->f_blksize[level]);
stand/lib/ufs.c
259
if (fp->f_blksize[level] != fs->fs_bsize)
stand/lib/ufs.c
261
fp->f_blkno[level] = ind_block_num;
stand/lib/ufs.c
264
ind_p = (daddr_t *)fp->f_blk[level];
stand/lib/ufs.c
267
idx = file_block / fp->f_nindir[level - 1];
stand/lib/ufs.c
268
file_block %= fp->f_nindir[level - 1];
stand/lib/ufs.c
291
struct file *fp = (struct file *)f->f_fsdata;
stand/lib/ufs.c
292
struct fs *fs = fp->f_fs;
stand/lib/ufs.c
299
off = blkoff(fs, fp->f_seekp);
stand/lib/ufs.c
300
file_block = lblkno(fs, fp->f_seekp);
stand/lib/ufs.c
301
block_size = dblksize(fs, &fp->f_di, file_block);
stand/lib/ufs.c
303
if (file_block != fp->f_buf_blkno) {
stand/lib/ufs.c
308
if (fp->f_buf == NULL)
stand/lib/ufs.c
309
fp->f_buf = malloc(fs->fs_bsize);
stand/lib/ufs.c
312
bzero(fp->f_buf, block_size);
stand/lib/ufs.c
313
fp->f_buf_size = block_size;
stand/lib/ufs.c
318
block_size, fp->f_buf, &fp->f_buf_size);
stand/lib/ufs.c
323
fp->f_buf_blkno = file_block;
stand/lib/ufs.c
331
*buf_p = fp->f_buf + off;
stand/lib/ufs.c
337
if (*size_p > fp->f_di.di_size - fp->f_seekp)
stand/lib/ufs.c
338
*size_p = fp->f_di.di_size - fp->f_seekp;
stand/lib/ufs.c
353
struct file *fp = (struct file *)f->f_fsdata;
stand/lib/ufs.c
363
fp->f_seekp = 0;
stand/lib/ufs.c
364
while (fp->f_seekp < fp->f_di.di_size) {
stand/lib/ufs.c
377
if (fp->f_fs->fs_maxsymlinklen <= 0)
stand/lib/ufs.c
391
fp->f_seekp += buf_size;
stand/lib/ufs.c
405
struct file *fp;
stand/lib/ufs.c
415
fp = malloc(sizeof(struct file));
stand/lib/ufs.c
416
bzero(fp, sizeof(struct file));
stand/lib/ufs.c
417
f->f_fsdata = (void *)fp;
stand/lib/ufs.c
421
fp->f_fs = fs;
stand/lib/ufs.c
451
fp->f_nindir[level] = mult;
stand/lib/ufs.c
478
if ((fp->f_di.di_mode & IFMT) != IFDIR) {
stand/lib/ufs.c
520
if ((fp->f_di.di_mode & IFMT) == IFLNK) {
stand/lib/ufs.c
521
int link_len = fp->f_di.di_size;
stand/lib/ufs.c
535
bcopy(fp->f_di.di_shortlink, namebuf,
stand/lib/ufs.c
543
struct fs *fs = fp->f_fs;
stand/lib/ufs.c
579
fp->f_seekp = 0;
stand/lib/ufs.c
588
if (fp->f_buf)
stand/lib/ufs.c
589
free(fp->f_buf);
stand/lib/ufs.c
590
free(fp->f_fs);
stand/lib/ufs.c
591
free(fp);
stand/lib/ufs.c
599
struct file *fp = (struct file *)f->f_fsdata;
stand/lib/ufs.c
603
if (fp == NULL)
stand/lib/ufs.c
607
if (fp->f_blk[level])
stand/lib/ufs.c
608
free(fp->f_blk[level]);
stand/lib/ufs.c
610
if (fp->f_buf)
stand/lib/ufs.c
611
free(fp->f_buf);
stand/lib/ufs.c
612
free(fp->f_fs);
stand/lib/ufs.c
613
free(fp);
stand/lib/ufs.c
627
struct file *fp = (struct file *)f->f_fsdata;
stand/lib/ufs.c
635
if (fp->f_seekp >= fp->f_di.di_size)
stand/lib/ufs.c
648
fp->f_seekp += csize;
stand/lib/ufs.c
660
struct file *fp = (struct file *)f->f_fsdata;
stand/lib/ufs.c
664
fp->f_seekp = offset;
stand/lib/ufs.c
667
fp->f_seekp += offset;
stand/lib/ufs.c
670
fp->f_seekp = fp->f_di.di_size - offset;
stand/lib/ufs.c
675
return (fp->f_seekp);
stand/lib/ufs.c
681
struct file *fp = (struct file *)f->f_fsdata;
stand/lib/ufs.c
684
sb->st_mode = fp->f_di.di_mode;
stand/lib/ufs.c
685
sb->st_uid = fp->f_di.di_uid;
stand/lib/ufs.c
686
sb->st_gid = fp->f_di.di_gid;
stand/lib/ufs.c
687
sb->st_size = fp->f_di.di_size;
stand/lib/ufs.c
694
struct file *fp = (struct file *)f->f_fsdata;
stand/lib/ufs.c
704
if (fp->f_seekp >= fp->f_di.di_size)
stand/lib/ufs.c
710
fp->f_seekp += dp->d_reclen;
sys/bus/firewire/firewire.c
1069
struct fw_pkt *fp;
sys/bus/firewire/firewire.c
1080
fp = &xfer->send.hdr;
sys/bus/firewire/firewire.c
1081
fp->mode.ld[1] = 0;
sys/bus/firewire/firewire.c
1083
fp->mode.ld[1] |= (root_node & 0x3f) << 24 | 1 << 23;
sys/bus/firewire/firewire.c
1085
fp->mode.ld[1] |= 1 << 22 | (gap_count & 0x3f) << 16;
sys/bus/firewire/firewire.c
1086
fp->mode.ld[2] = ~fp->mode.ld[1];
sys/bus/firewire/firewire.c
1088
fp->mode.common.tcode |= FWTCODE_PHY;
sys/bus/firewire/firewire.c
1268
struct fw_pkt *fp;
sys/bus/firewire/firewire.c
1355
fp = &xfer->send.hdr;
sys/bus/firewire/firewire.c
1356
fp->mode.rreqq.dest_hi = 0xffff;
sys/bus/firewire/firewire.c
1357
fp->mode.rreqq.tlrt = 0;
sys/bus/firewire/firewire.c
1358
fp->mode.rreqq.tcode = FWTCODE_RREQQ;
sys/bus/firewire/firewire.c
1359
fp->mode.rreqq.pri = 0;
sys/bus/firewire/firewire.c
1360
fp->mode.rreqq.src = 0;
sys/bus/firewire/firewire.c
1361
fp->mode.rreqq.dst = FWLOCALBUS | fc->ongonode;
sys/bus/firewire/firewire.c
1362
fp->mode.rreqq.dest_lo = addr;
sys/bus/firewire/firewire.c
1392
struct fw_pkt *fp;
sys/bus/firewire/firewire.c
1400
fp = &xfer->send.hdr;
sys/bus/firewire/firewire.c
1401
fp->mode.rreqq.dest_hi = addr_hi & 0xffff;
sys/bus/firewire/firewire.c
1403
fp->mode.rreqq.tlrt = (tl & 0x3f) << 2;
sys/bus/firewire/firewire.c
1405
fp->mode.rreqq.tlrt = 0;
sys/bus/firewire/firewire.c
1407
fp->mode.rreqq.tlrt |= rt & 0x3;
sys/bus/firewire/firewire.c
1408
fp->mode.rreqq.tcode = FWTCODE_RREQQ;
sys/bus/firewire/firewire.c
1409
fp->mode.rreqq.pri = 0;
sys/bus/firewire/firewire.c
1410
fp->mode.rreqq.src = 0;
sys/bus/firewire/firewire.c
1411
fp->mode.rreqq.dst = addr_hi >> 16;
sys/bus/firewire/firewire.c
1412
fp->mode.rreqq.dest_lo = addr_lo;
sys/bus/firewire/firewire.c
1733
struct fw_pkt *fp, *resfp;
sys/bus/firewire/firewire.c
1750
fp = (struct fw_pkt *)rb->vec[0].iov_base;
sys/bus/firewire/firewire.c
1751
tcode = fp->mode.common.tcode;
sys/bus/firewire/firewire.c
1757
rb->xfer = fw_tl2xfer(rb->fc, fp->mode.hdr.src,
sys/bus/firewire/firewire.c
1758
fp->mode.hdr.tlrt >> 2);
sys/bus/firewire/firewire.c
1763
fp->mode.hdr.src,
sys/bus/firewire/firewire.c
1764
fp->mode.hdr.tlrt >> 2,
sys/bus/firewire/firewire.c
1765
fp->mode.hdr.tlrt & 3,
sys/bus/firewire/firewire.c
1766
fp->mode.rresq.data);
sys/bus/firewire/firewire.c
1769
rb->xfer = fw_tl2xfer(rb->fc, fp->mode.hdr.src,
sys/bus/firewire/firewire.c
1770
(fp->mode.hdr.tlrt >> 2)^3);
sys/bus/firewire/firewire.c
1806
bind = fw_bindlookup(rb->fc, fp->mode.rreqq.dest_hi,
sys/bus/firewire/firewire.c
1807
fp->mode.rreqq.dest_lo);
sys/bus/firewire/firewire.c
1811
fp->mode.wreqq.dest_hi, fp->mode.wreqq.dest_lo,
sys/bus/firewire/firewire.c
1813
fp->mode.hdr.src, ntohl(fp->mode.wreqq.data));
sys/bus/firewire/firewire.c
1840
resfp->mode.hdr.dst = fp->mode.hdr.src;
sys/bus/firewire/firewire.c
1841
resfp->mode.hdr.tlrt = fp->mode.hdr.tlrt;
sys/bus/firewire/firewire.c
1842
resfp->mode.hdr.pri = fp->mode.hdr.pri;
sys/bus/firewire/firewire.c
188
struct fw_pkt *fp;
sys/bus/firewire/firewire.c
197
fp = &xfer->send.hdr;
sys/bus/firewire/firewire.c
199
tcode = fp->mode.common.tcode & 0xf;
sys/bus/firewire/firewire.c
1995
struct fw_pkt *fp;
sys/bus/firewire/firewire.c
2005
fp = &xfer->send.hdr;
sys/bus/firewire/firewire.c
2006
fp->mode.lreq.dest_hi = 0xffff;
sys/bus/firewire/firewire.c
2007
fp->mode.lreq.tlrt = 0;
sys/bus/firewire/firewire.c
2008
fp->mode.lreq.tcode = FWTCODE_LREQ;
sys/bus/firewire/firewire.c
2009
fp->mode.lreq.pri = 0;
sys/bus/firewire/firewire.c
2010
fp->mode.lreq.src = 0;
sys/bus/firewire/firewire.c
2011
fp->mode.lreq.len = 8;
sys/bus/firewire/firewire.c
2012
fp->mode.lreq.extcode = EXTCODE_CMP_SWAP;
sys/bus/firewire/firewire.c
2013
fp->mode.lreq.dst = FWLOCALBUS | fc->irm;
sys/bus/firewire/firewire.c
2014
fp->mode.lreq.dest_lo = 0xf0000000 | BUS_MGR_ID;
sys/bus/firewire/firewire.c
215
len = fp->mode.stream.len;
sys/bus/firewire/firewire.c
217
len = fp->mode.rresb.len;
sys/bus/firewire/firewire.c
240
fp->mode.hdr.tlrt = tl << 2;
sys/bus/firewire/fwdev.c
269
struct fw_pkt *fp;
sys/bus/firewire/fwdev.c
311
fp = &xfer->recv.hdr;
sys/bus/firewire/fwdev.c
313
sc->fc->irx_post(sc->fc, fp->mode.ld);
sys/bus/firewire/fwdev.c
314
err = uiomove((void *)fp, 1 /* XXX header size */, uio);
sys/bus/firewire/fwdev.c
321
fp = (struct fw_pkt *)fwdma_v_addr(ir->buf,
sys/bus/firewire/fwdev.c
324
sc->fc->irx_post(sc->fc, fp->mode.ld);
sys/bus/firewire/fwdev.c
325
if(fp->mode.stream.len == 0){
sys/bus/firewire/fwdev.c
329
err = uiomove((caddr_t)fp,
sys/bus/firewire/fwdev.c
330
fp->mode.stream.len + sizeof(u_int32_t), uio);
sys/bus/firewire/fwdev.c
356
struct fw_pkt *fp;
sys/bus/firewire/fwdev.c
388
fp = (struct fw_pkt *)fwdma_v_addr(it->buf,
sys/bus/firewire/fwdev.c
390
err = uiomove((caddr_t)fp, sizeof(struct fw_isohdr), uio);
sys/bus/firewire/fwdev.c
391
err = uiomove((caddr_t)fp->mode.stream.payload,
sys/bus/firewire/fwdev.c
392
fp->mode.stream.len, uio);
sys/bus/firewire/fwdev.c
423
struct fw_pkt *fp;
sys/bus/firewire/fwdev.c
526
fp = &asyreq->pkt;
sys/bus/firewire/fwdev.c
527
tinfo = &sc->fc->tcode[fp->mode.hdr.tcode];
sys/bus/firewire/fwdev.c
548
fp->mode.hdr.dst = FWLOCALBUS | fwdev->dst;
sys/bus/firewire/fwdev.c
558
bcopy(fp, (void *)&xfer->send.hdr, tinfo->hdr_len);
sys/bus/firewire/fwdev.c
560
bcopy((char *)fp + tinfo->hdr_len,
sys/bus/firewire/fwdev.c
582
bcopy(&xfer->recv.hdr, fp, tinfo->hdr_len);
sys/bus/firewire/fwdev.c
583
bcopy(xfer->recv.payload, (char *)fp + tinfo->hdr_len,
sys/bus/firewire/fwmem.c
121
struct fw_pkt *fp;
sys/bus/firewire/fwmem.c
128
fp = &xfer->send.hdr;
sys/bus/firewire/fwmem.c
129
fp->mode.rreqq.tcode = FWTCODE_RREQQ;
sys/bus/firewire/fwmem.c
130
fp->mode.rreqq.dest_hi = dst_hi;
sys/bus/firewire/fwmem.c
131
fp->mode.rreqq.dest_lo = dst_lo;
sys/bus/firewire/fwmem.c
158
struct fw_pkt *fp;
sys/bus/firewire/fwmem.c
164
fp = &xfer->send.hdr;
sys/bus/firewire/fwmem.c
165
fp->mode.wreqq.tcode = FWTCODE_WREQQ;
sys/bus/firewire/fwmem.c
166
fp->mode.wreqq.dest_hi = dst_hi;
sys/bus/firewire/fwmem.c
167
fp->mode.wreqq.dest_lo = dst_lo;
sys/bus/firewire/fwmem.c
168
fp->mode.wreqq.data = *(u_int32_t *)data;
sys/bus/firewire/fwmem.c
195
struct fw_pkt *fp;
sys/bus/firewire/fwmem.c
201
fp = &xfer->send.hdr;
sys/bus/firewire/fwmem.c
202
fp->mode.rreqb.tcode = FWTCODE_RREQB;
sys/bus/firewire/fwmem.c
203
fp->mode.rreqb.dest_hi = dst_hi;
sys/bus/firewire/fwmem.c
204
fp->mode.rreqb.dest_lo = dst_lo;
sys/bus/firewire/fwmem.c
205
fp->mode.rreqb.len = len;
sys/bus/firewire/fwmem.c
206
fp->mode.rreqb.extcode = 0;
sys/bus/firewire/fwmem.c
233
struct fw_pkt *fp;
sys/bus/firewire/fwmem.c
239
fp = &xfer->send.hdr;
sys/bus/firewire/fwmem.c
240
fp->mode.wreqb.tcode = FWTCODE_WREQB;
sys/bus/firewire/fwmem.c
241
fp->mode.wreqb.dest_hi = dst_hi;
sys/bus/firewire/fwmem.c
242
fp->mode.wreqb.dest_lo = dst_lo;
sys/bus/firewire/fwmem.c
243
fp->mode.wreqb.len = len;
sys/bus/firewire/fwmem.c
244
fp->mode.wreqb.extcode = 0;
sys/bus/firewire/fwohci.c
2439
struct fw_pkt *fp;
sys/bus/firewire/fwohci.c
2455
fp = (struct fw_pkt *)db_tr->buf;
sys/bus/firewire/fwohci.c
2457
ohcifp->mode.ld[0] = fp->mode.ld[0];
sys/bus/firewire/fwohci.c
2459
ohcifp->mode.stream.len = fp->mode.stream.len;
sys/bus/firewire/fwohci.c
2468
FWOHCI_DMA_SET(db[2].db.desc.cmd, fp->mode.stream.len);
sys/bus/firewire/fwohci.c
2583
fwohci_arcv_swap(struct fw_pkt *fp, int len)
sys/bus/firewire/fwohci.c
2592
ld0 = FWOHCI_DMA_READ(fp->mode.ld[0]);
sys/bus/firewire/fwohci.c
2629
fp->mode.ld[i] = FWOHCI_DMA_READ(fp->mode.ld[i]);
sys/bus/firewire/fwohci.c
2635
fwohci_get_plen(struct fwohci_softc *sc, struct fwohci_dbch *dbch, struct fw_pkt *fp)
sys/bus/firewire/fwohci.c
2640
info = &tinfo[fp->mode.common.tcode];
sys/bus/firewire/fwohci.c
2643
r += roundup2(fp->mode.wreqb.len, sizeof(u_int32_t));
sys/bus/firewire/fwohci.c
2648
fp->mode.common.tcode);
sys/bus/firewire/fwohci.c
2677
struct fw_pkt *fp;
sys/bus/firewire/fwohci.c
2751
fp=(struct fw_pkt *)vec[0].iov_base;
sys/bus/firewire/fwohci.c
2755
fp=(struct fw_pkt *)ld;
sys/bus/firewire/fwohci.c
2756
hlen = fwohci_arcv_swap(fp, len);
sys/bus/firewire/fwohci.c
2773
plen = fwohci_get_plen(sc, dbch, fp) - offset;
sys/bus/firewire/fwohci.c
2819
kprintf("fwohci_arcv: ack pending tcode=0x%x..\n", fp->mode.common.tcode);
sys/bus/firewire/fwohci.c
833
struct fw_pkt *fp;
sys/bus/firewire/fwohci.c
866
fp = &xfer->send.hdr;
sys/bus/firewire/fwohci.c
867
tcode = fp->mode.common.tcode;
sys/bus/firewire/fwohci.c
876
ld[i/4] = fp->mode.ld[i/4];
sys/bus/firewire/fwohci.c
881
ohcifp->mode.stream.len = fp->mode.stream.len;
sys/bus/firewire/fwohci.c
884
ld[1] = fp->mode.ld[1];
sys/bus/firewire/fwohci.c
885
ld[2] = fp->mode.ld[2];
sys/bus/firewire/fwohci.c
889
ohcifp->mode.asycomm.dst = fp->mode.hdr.dst;
sys/bus/u4b/audio/uaudio.c
5498
sub->fifo.fp[USB_FIFO_RX],
sys/bus/u4b/audio/uaudio.c
5698
usb_fifo_get_data_linear(sub->fifo.fp[USB_FIFO_TX],
sys/bus/u4b/audio/uaudio.c
5768
if ((sub->fifo.fp[USB_FIFO_RX] == fifo) ||
sys/bus/u4b/audio/uaudio.c
5769
(sub->fifo.fp[USB_FIFO_TX] == fifo)) {
sys/bus/u4b/input/uep.c
261
if (usb_fifo_put_bytes_max(sc->fifo.fp[USB_FIFO_RX]) != 0) {
sys/bus/u4b/input/uep.c
391
usb_fifo_put_data_linear(sc->fifo.fp[USB_FIFO_RX], buf,
sys/bus/u4b/input/uhid.c
162
if (usb_fifo_get_data(sc->sc_fifo.fp[USB_FIFO_TX], pc,
sys/bus/u4b/input/uhid.c
203
usb_fifo_put_data(sc->sc_fifo.fp[USB_FIFO_RX], pc,
sys/bus/u4b/input/uhid.c
213
sc->sc_fifo.fp[USB_FIFO_RX]) != 0) {
sys/bus/u4b/input/uhid.c
269
if (usb_fifo_get_data(sc->sc_fifo.fp[USB_FIFO_TX], pc,
sys/bus/u4b/input/uhid.c
287
if (usb_fifo_get_data(sc->sc_fifo.fp[USB_FIFO_TX], pc,
sys/bus/u4b/input/uhid.c
309
usb_fifo_get_data_error(sc->sc_fifo.fp[USB_FIFO_TX]);
sys/bus/u4b/input/uhid.c
325
usb_fifo_put_data(sc->sc_fifo.fp[USB_FIFO_RX], pc, sizeof(req),
sys/bus/u4b/input/uhid.c
331
if (usb_fifo_put_bytes_max(sc->sc_fifo.fp[USB_FIFO_RX]) > 0) {
sys/bus/u4b/input/uhid.c
348
usb_fifo_put_data_error(sc->sc_fifo.fp[USB_FIFO_RX]);
sys/bus/u4b/input/ums.c
371
if (usb_fifo_put_bytes_max(sc->sc_fifo.fp[USB_FIFO_RX]) == 0) {
sys/bus/u4b/input/ums.c
922
usb_fifo_put_data_linear(sc->sc_fifo.fp[USB_FIFO_RX], buf,
sys/bus/u4b/input/ums.c
955
usb_fifo_reset(sc->sc_fifo.fp[USB_FIFO_RX]);
sys/bus/u4b/input/wsp.c
1165
sc->sc_fifo.fp[USB_FIFO_RX]) != 0) {
sys/bus/u4b/input/wsp.c
1217
usb_fifo_put_data_linear(sc->sc_fifo.fp[USB_FIFO_RX], buf,
sys/bus/u4b/input/wsp.c
1225
usb_fifo_reset(sc->sc_fifo.fp[USB_FIFO_RX]);
sys/bus/u4b/storage/urio.c
261
struct usb_fifo *f = sc->sc_fifo.fp[USB_FIFO_TX];
sys/bus/u4b/storage/urio.c
308
struct usb_fifo *f = sc->sc_fifo.fp[USB_FIFO_RX];
sys/bus/u4b/usb_dev.c
1869
f_sc->fp[USB_FIFO_TX] = NULL;
sys/bus/u4b/usb_dev.c
1870
f_sc->fp[USB_FIFO_RX] = NULL;
sys/bus/u4b/usb_dev.c
1926
f_sc->fp[USB_FIFO_TX] = f_tx;
sys/bus/u4b/usb_dev.c
1927
f_sc->fp[USB_FIFO_RX] = f_rx;
sys/bus/u4b/usb_dev.c
2028
usb_fifo_free(f_sc->fp[USB_FIFO_TX]);
sys/bus/u4b/usb_dev.c
2029
usb_fifo_free(f_sc->fp[USB_FIFO_RX]);
sys/bus/u4b/usb_dev.c
2031
f_sc->fp[USB_FIFO_TX] = NULL;
sys/bus/u4b/usb_dev.c
2032
f_sc->fp[USB_FIFO_RX] = NULL;
sys/bus/u4b/usb_dev.c
873
struct file *fp;
sys/bus/u4b/usb_dev.c
928
fp = ap->a_fpp ? *ap->a_fpp : NULL;
sys/bus/u4b/usb_dev.c
929
err = devfs_set_cdevpriv(fp, cpd, &usb_cdevpriv_dtor);
sys/bus/u4b/usbdi.h
468
struct usb_fifo *fp[2];
sys/cpu/x86_64/misc/db_disasm.c
1074
const struct finst * fp;
sys/cpu/x86_64/misc/db_disasm.c
1080
fp = &db_Esc_inst[inst - 0xd8][f_reg(rex, regmodrm)];
sys/cpu/x86_64/misc/db_disasm.c
1083
if (*fp->f_name == '\0') {
sys/cpu/x86_64/misc/db_disasm.c
1091
db_printf("%s", fp->f_name);
sys/cpu/x86_64/misc/db_disasm.c
1092
switch(fp->f_size) {
sys/cpu/x86_64/misc/db_disasm.c
1121
switch (fp->f_rrmode) {
sys/cpu/x86_64/misc/db_disasm.c
1123
name = (fp->f_rrname) ? fp->f_rrname : fp->f_name;
sys/cpu/x86_64/misc/db_disasm.c
1127
name = (fp->f_rrname) ? fp->f_rrname : fp->f_name;
sys/cpu/x86_64/misc/db_disasm.c
1131
name = (fp->f_rrname) ? fp->f_rrname : fp->f_name;
sys/cpu/x86_64/misc/db_disasm.c
1135
name = ((const char * const *)fp->f_rrname)[f_rm(rex, regmodrm)];
sys/cpu/x86_64/misc/db_disasm.c
1141
name = ((const char * const *)fp->f_rrname)[f_rm(rex, regmodrm)];
sys/ddb/db_examine.c
79
char * fp;
sys/ddb/db_examine.c
83
fp = fmt;
sys/ddb/db_examine.c
86
while ((c = *fp++) != 0) {
sys/dev/disk/dm/dm_ioctl.c
100
prop_dictionary_get_uint32(dp, DM_IOCTL_FLAGS, fp);
sys/dev/disk/dm/dm_ioctl.c
101
(*fp) |= val;
sys/dev/disk/dm/dm_ioctl.c
102
prop_dictionary_set_uint32(dp, DM_IOCTL_FLAGS, *fp);
sys/dev/disk/dm/dm_ioctl.c
103
KKASSERT((*fp) & val);
sys/dev/disk/dm/dm_ioctl.c
107
void dm_remove_flag(prop_dictionary_t dp, uint32_t *fp, const uint32_t val)
sys/dev/disk/dm/dm_ioctl.c
110
prop_dictionary_get_uint32(dp, DM_IOCTL_FLAGS, fp);
sys/dev/disk/dm/dm_ioctl.c
111
(*fp) &= ~val;
sys/dev/disk/dm/dm_ioctl.c
112
prop_dictionary_set_uint32(dp, DM_IOCTL_FLAGS, *fp);
sys/dev/disk/dm/dm_ioctl.c
113
KKASSERT(!((*fp) & val));
sys/dev/disk/dm/dm_ioctl.c
97
void dm_add_flag(prop_dictionary_t dp, uint32_t *fp, const uint32_t val)
sys/dev/disk/iscsi/initiator/isc_soc.c
656
if (sp->fp != NULL) {
sys/dev/disk/iscsi/initiator/isc_soc.c
657
fdrop(sp->fp);
sys/dev/disk/iscsi/initiator/isc_soc.c
658
sp->fp = NULL;
sys/dev/disk/iscsi/initiator/iscsi.c
416
struct file *fp;
sys/dev/disk/iscsi/initiator/iscsi.c
420
if (sp->fp) {
sys/dev/disk/iscsi/initiator/iscsi.c
421
fdrop(sp->fp);
sys/dev/disk/iscsi/initiator/iscsi.c
422
sp->fp = NULL;
sys/dev/disk/iscsi/initiator/iscsi.c
427
if ((error = holdsock(td, fd, &fp)) == 0) {
sys/dev/disk/iscsi/initiator/iscsi.c
428
sp->soc = fp->f_data;
sys/dev/disk/iscsi/initiator/iscsi.c
429
sp->fp = fp;
sys/dev/disk/iscsi/initiator/iscsivar.h
121
struct file *fp;
sys/dev/disk/nata/atapi-cd.c
1191
param.fp = 0;
sys/dev/disk/nata/atapi-cd.c
1334
param.fp = 0;
sys/dev/disk/nata/atapi-cd.h
210
u_int8_t fp :1; /* fixed packet type */
sys/dev/disk/nata/atapi-cd.h
254
u_int8_t fp :1; /* fixed packet */
sys/dev/disk/sbp/sbp.c
1064
struct fw_pkt *fp;
sys/dev/disk/sbp/sbp.c
1077
fp = &xfer->send.hdr;
sys/dev/disk/sbp/sbp.c
1078
fp->mode.wreqq.data = htonl(0xf);
sys/dev/disk/sbp/sbp.c
1100
struct fw_pkt *fp;
sys/dev/disk/sbp/sbp.c
1109
fp = &xfer->send.hdr;
sys/dev/disk/sbp/sbp.c
1110
fp->mode.wreqq.dest_hi = 0xffff;
sys/dev/disk/sbp/sbp.c
1111
fp->mode.wreqq.dest_lo = 0xf0000000 | BUSY_TIMEOUT;
sys/dev/disk/sbp/sbp.c
1112
fp->mode.wreqq.data = htonl((1 << (13+12)) | 0xf);
sys/dev/disk/sbp/sbp.c
1148
struct fw_pkt *fp;
sys/dev/disk/sbp/sbp.c
1168
fp = &xfer->send.hdr;
sys/dev/disk/sbp/sbp.c
1169
fp->mode.wreqb.len = 8;
sys/dev/disk/sbp/sbp.c
1170
fp->mode.wreqb.extcode = 0;
sys/dev/disk/sbp/sbp.c
1204
struct fw_pkt *fp;
sys/dev/disk/sbp/sbp.c
1214
fp = (struct fw_pkt *)xfer->send.buf;
sys/dev/disk/sbp/sbp.c
1215
fp->mode.wreqq.data = htonl(0xf);
sys/dev/disk/sbp/sbp.c
1224
struct fw_pkt *fp;
sys/dev/disk/sbp/sbp.c
1267
fp = &xfer->send.hdr;
sys/dev/disk/sbp/sbp.c
1268
fp->mode.wreqq.dest_hi = sdev->login->cmd_hi;
sys/dev/disk/sbp/sbp.c
1269
fp->mode.wreqq.dest_lo = sdev->login->cmd_lo + offset;
sys/dev/disk/sbp/sbp.c
1270
fp->mode.wreqq.tlrt = 0;
sys/dev/disk/sbp/sbp.c
1271
fp->mode.wreqq.tcode = tcode;
sys/dev/disk/sbp/sbp.c
1272
fp->mode.wreqq.pri = 0;
sys/dev/disk/sbp/sbp.c
1273
fp->mode.wreqq.dst = FWLOCALBUS | sdev->target->fwdev->dst;
sys/dev/disk/sbp/sbp.c
1283
struct fw_pkt *fp;
sys/dev/disk/sbp/sbp.c
1359
fp = &xfer->send.hdr;
sys/dev/disk/sbp/sbp.c
1360
fp->mode.wreqb.dest_hi = sdev->target->mgm_hi;
sys/dev/disk/sbp/sbp.c
1361
fp->mode.wreqb.dest_lo = sdev->target->mgm_lo;
sys/dev/disk/sbp/sbp.c
1362
fp->mode.wreqb.len = 8;
sys/dev/disk/sbp/sbp.c
1363
fp->mode.wreqb.extcode = 0;
sys/dev/disk/sbp/sbp.c
875
struct fw_pkt *fp;
sys/dev/disk/sbp/sbp.c
884
fp = &xfer->send.hdr;
sys/dev/disk/sbp/sbp.c
885
fp->mode.wreqq.dest_hi = 0xffff;
sys/dev/disk/sbp/sbp.c
886
fp->mode.wreqq.dest_lo = 0xf0000000 | RESET_START;
sys/dev/disk/sbp/sbp.c
887
fp->mode.wreqq.data = htonl(0xf);
sys/dev/disk/xdisk/xdisk.c
292
struct file *fp;
sys/dev/disk/xdisk/xdisk.c
297
fp = holdfp(curthread, xaioc->fd, -1);
sys/dev/disk/xdisk/xdisk.c
298
if (fp == NULL)
sys/dev/disk/xdisk/xdisk.c
300
xa_printf(1, "xdisk_attach fp=%p\n", fp);
sys/dev/disk/xdisk/xdisk.c
316
kdmsg_iocom_reconnect(&xaio->iocom, fp, "xdisk");
sys/dev/drm/drm_vm.c
177
vm_page_t fp;
sys/dev/drm/drm_vm.c
183
fp = kmalloc(page_count * sizeof(struct vm_page), M_DRM,
sys/dev/drm/drm_vm.c
187
vm_page_initfake(&fp[i], start + PAGE_SIZE * i, memattr);
sys/dev/drm/drm_vm.c
188
atomic_clear_int(&fp[i].busy_count, PBUSY_LOCKED);
sys/dev/drm/drm_vm.c
196
seg->first_page = fp;
sys/dev/drm/drm_vm.c
202
kfree(fp);
sys/dev/drm/drm_vm.c
210
vm_page_t fp;
sys/dev/drm/drm_vm.c
218
fp = seg->first_page;
sys/dev/drm/drm_vm.c
221
kfree(fp);
sys/dev/drm/i915/i915_drv.h
135
uint_fixed_16_16_t fp; \
sys/dev/drm/i915/i915_drv.h
136
fp.val = UINT_MAX; \
sys/dev/drm/i915/i915_drv.h
137
fp; \
sys/dev/drm/i915/i915_drv.h
149
uint_fixed_16_16_t fp;
sys/dev/drm/i915/i915_drv.h
153
fp.val = val << 16;
sys/dev/drm/i915/i915_drv.h
154
return fp;
sys/dev/drm/i915/i915_drv.h
157
static inline uint32_t fixed16_to_u32_round_up(uint_fixed_16_16_t fp)
sys/dev/drm/i915/i915_drv.h
159
return DIV_ROUND_UP(fp.val, 1 << 16);
sys/dev/drm/i915/i915_drv.h
162
static inline uint32_t fixed16_to_u32(uint_fixed_16_16_t fp)
sys/dev/drm/i915/i915_drv.h
164
return fp.val >> 16;
sys/dev/drm/i915/i915_drv.h
187
uint_fixed_16_16_t fp;
sys/dev/drm/i915/i915_drv.h
189
fp.val = (uint32_t) val;
sys/dev/drm/i915/i915_drv.h
190
return fp;
sys/dev/drm/i915/intel_display.c
10506
u32 fp;
sys/dev/drm/i915/intel_display.c
10512
fp = pipe_config->dpll_hw_state.fp0;
sys/dev/drm/i915/intel_display.c
10514
fp = pipe_config->dpll_hw_state.fp1;
sys/dev/drm/i915/intel_display.c
10516
clock.m1 = (fp & FP_M1_DIV_MASK) >> FP_M1_DIV_SHIFT;
sys/dev/drm/i915/intel_display.c
10518
clock.n = ffs((fp & FP_N_PINEVIEW_DIV_MASK) >> FP_N_DIV_SHIFT) - 1;
sys/dev/drm/i915/intel_display.c
10519
clock.m2 = (fp & FP_M2_PINEVIEW_DIV_MASK) >> FP_M2_DIV_SHIFT;
sys/dev/drm/i915/intel_display.c
10521
clock.n = (fp & FP_N_DIV_MASK) >> FP_N_DIV_SHIFT;
sys/dev/drm/i915/intel_display.c
10522
clock.m2 = (fp & FP_M2_DIV_MASK) >> FP_M2_DIV_SHIFT;
sys/dev/drm/i915/intel_display.c
15489
u32 dpll, fp;
sys/dev/drm/i915/intel_display.c
15497
fp = i9xx_dpll_compute_fp(&clock);
sys/dev/drm/i915/intel_display.c
15505
I915_WRITE(FP0(pipe), fp);
sys/dev/drm/i915/intel_display.c
15506
I915_WRITE(FP1(pipe), fp);
sys/dev/drm/i915/intel_display.c
6878
u32 fp, fp2 = 0;
sys/dev/drm/i915/intel_display.c
6881
fp = pnv_dpll_compute_fp(&crtc_state->dpll);
sys/dev/drm/i915/intel_display.c
6885
fp = i9xx_dpll_compute_fp(&crtc_state->dpll);
sys/dev/drm/i915/intel_display.c
6890
crtc_state->dpll_hw_state.fp0 = fp;
sys/dev/drm/i915/intel_display.c
6896
crtc_state->dpll_hw_state.fp1 = fp;
sys/dev/drm/i915/intel_display.c
8633
u32 dpll, fp, fp2;
sys/dev/drm/i915/intel_display.c
8646
fp = i9xx_dpll_compute_fp(&crtc_state->dpll);
sys/dev/drm/i915/intel_display.c
8649
fp |= FP_CB_TUNE;
sys/dev/drm/i915/intel_display.c
8657
fp2 = fp;
sys/dev/drm/i915/intel_display.c
8724
crtc_state->dpll_hw_state.fp0 = fp;
sys/dev/drm/include/drm/drmP.h
194
int ttm_bo_mmap_single(struct file *fp, struct drm_device *dev, vm_ooffset_t *offset,
sys/dev/drm/linux_dma-buf.c
100
fp->f_offset = newoff;
sys/dev/drm/linux_dma-buf.c
101
spin_unlock(&fp->f_spin);
sys/dev/drm/linux_dma-buf.c
121
struct file *fp;
sys/dev/drm/linux_dma-buf.c
123
falloc(curthread->td_lwp, &fp, NULL);
sys/dev/drm/linux_dma-buf.c
124
if (fp == NULL)
sys/dev/drm/linux_dma-buf.c
128
fp->f_type = DTYPE_DMABUF;
sys/dev/drm/linux_dma-buf.c
129
fp->f_ops = &dmabuf_fileops;
sys/dev/drm/linux_dma-buf.c
130
fp->private_data = dmabuf;
sys/dev/drm/linux_dma-buf.c
134
dmabuf->file = fp;
sys/dev/drm/linux_dma-buf.c
171
struct file *fp;
sys/dev/drm/linux_dma-buf.c
174
if ((fp = holdfp(curthread, fd, -1)) == NULL)
sys/dev/drm/linux_dma-buf.c
177
if (fp->f_ops != &dmabuf_fileops) {
sys/dev/drm/linux_dma-buf.c
179
dropfp(curthread, fd, fp);
sys/dev/drm/linux_dma-buf.c
183
dmabuf = fp->private_data;
sys/dev/drm/linux_dma-buf.c
184
dropfp(curthread, fd, fp);
sys/dev/drm/linux_dma-buf.c
41
dmabuf_stat(struct file *fp, struct stat *sb, struct ucred *cred)
sys/dev/drm/linux_dma-buf.c
44
KASSERT(fp->f_type == DTYPE_DMABUF, ("fp is not DMABUF"));
sys/dev/drm/linux_dma-buf.c
45
struct dma_buf *dmabuf = fp->private_data;
sys/dev/drm/linux_dma-buf.c
55
dmabuf_close(struct file *fp)
sys/dev/drm/linux_dma-buf.c
58
if (fp->f_ops != &dmabuf_fileops) {
sys/dev/drm/linux_dma-buf.c
62
dmabuf = fp->private_data;
sys/dev/drm/linux_dma-buf.c
71
dmabuf_ioctl(struct file *fp, u_long com, caddr_t data,
sys/dev/drm/linux_dma-buf.c
79
dmabuf_seek(struct file *fp, off_t offset, int whence, off_t *res)
sys/dev/drm/linux_dma-buf.c
81
KASSERT(fp->f_type == DTYPE_DMABUF, ("fp is not DMABUF"));
sys/dev/drm/linux_dma-buf.c
82
struct dma_buf *dmabuf = fp->private_data;
sys/dev/drm/linux_dma-buf.c
99
spin_lock(&fp->f_spin);
sys/dev/drm/ttm/ttm_bo_vm.c
773
ttm_bo_mmap_single(struct file *fp, struct drm_device *dev,
sys/dev/drm/ttm/ttm_bo_vm.c
797
ret = ttm_bo_mmap(fp, &vma, bdev);
sys/dev/misc/cuse/cuse.c
1630
cuse_client_kqfilter_poll(struct file *fp, struct cdev *dev, struct cuse_client *pcc)
sys/dev/misc/cuse/cuse.c
1644
temp = cuse_client_poll(fp, dev, 0);
sys/dev/misc/cuse/cuse.c
1907
cuse_client_poll(struct file *fp, struct cdev *dev, int events)
sys/dev/misc/cuse/cuse.c
1916
error = cuse_client_get(fp, &pcc);
sys/dev/misc/cuse/cuse.c
331
cuse_server_get(struct file *fp, struct cuse_server **ppcs)
sys/dev/misc/cuse/cuse.c
336
error = devfs_get_cdevpriv(fp, (void **)&pcs);
sys/dev/misc/cuse/cuse.c
516
cuse_client_get(struct file *fp, struct cuse_client **ppcc)
sys/dev/misc/cuse/cuse.c
522
error = devfs_get_cdevpriv(fp, (void **)&pcc);
sys/dev/misc/evdev/cdev.c
147
struct file *fp;
sys/dev/misc/evdev/cdev.c
149
fp = (ap->a_fpp) ? *ap->a_fpp : NULL;
sys/dev/misc/evdev/cdev.c
150
ret = devfs_set_cdevpriv(fp, client, &evdev_dtor);
sys/dev/misc/ipmi/ipmi.c
128
struct file *fp = ap->a_fp;
sys/dev/misc/ipmi/ipmi.c
138
if (devfs_get_cdevpriv(fp, (void **)&dev))
sys/dev/misc/ipmi/ipmi.c
328
struct file *fp = ap->a_fp;
sys/dev/misc/ipmi/ipmi.c
348
error = devfs_get_cdevpriv(fp, (void **)&dev);
sys/dev/misc/ipmi/ipmi.c
88
struct file *fp = ap->a_fpp ? *ap->a_fpp : NULL;
sys/dev/misc/ipmi/ipmi.c
99
error = devfs_set_cdevpriv(fp, dev, ipmi_dtor);
sys/dev/netif/fwe/if_fwe.c
488
struct fw_pkt *fp;
sys/dev/netif/fwe/if_fwe.c
507
fp = &xfer->send.hdr;
sys/dev/netif/fwe/if_fwe.c
509
fp->mode.stream.len = m->m_pkthdr.len;
sys/dev/netif/fwe/if_fwe.c
539
struct fw_pkt *fp;
sys/dev/netif/fwe/if_fwe.c
546
fp = mtod(sxfer->mbuf, struct fw_pkt *);
sys/dev/netif/fwe/if_fwe.c
548
fwe->fd.fc->irx_post(fwe->fd.fc, fp->mode.ld);
sys/dev/netif/fwe/if_fwe.c
560
if (sxfer->resp != 0 || fp->mode.stream.len <
sys/dev/netif/fwe/if_fwe.c
569
fp->mode.stream.len - ETHER_ALIGN;
sys/dev/netif/iwi/if_iwi.c
2211
const struct firmware *fp = fw->fp;
sys/dev/netif/iwi/if_iwi.c
2214
if (fp->datasize < sizeof (struct iwi_firmware_ohdr)) {
sys/dev/netif/iwi/if_iwi.c
2215
device_printf(sc->sc_dev, "image '%s' too small\n", fp->name);
sys/dev/netif/iwi/if_iwi.c
2218
hdr = (const struct iwi_firmware_ohdr *)fp->data;
sys/dev/netif/iwi/if_iwi.c
2222
fp->name, IWI_FW_GET_MAJOR(le32toh(hdr->version)),
sys/dev/netif/iwi/if_iwi.c
2227
fw->data = ((const char *) fp->data) + sizeof(struct iwi_firmware_ohdr);
sys/dev/netif/iwi/if_iwi.c
2228
fw->size = fp->datasize - sizeof(struct iwi_firmware_ohdr);
sys/dev/netif/iwi/if_iwi.c
2229
fw->name = fp->name;
sys/dev/netif/iwi/if_iwi.c
2251
if (fw->fp == NULL)
sys/dev/netif/iwi/if_iwi.c
2252
fw->fp = firmware_get(fwname);
sys/dev/netif/iwi/if_iwi.c
2254
if (uc->fp == NULL && fw->fp != NULL && fw->fp->version < 300)
sys/dev/netif/iwi/if_iwi.c
2255
uc->fp = firmware_get(ucname);
sys/dev/netif/iwi/if_iwi.c
2276
const struct firmware *fp;
sys/dev/netif/iwi/if_iwi.c
2297
fp = sc->fw_fw.fp;
sys/dev/netif/iwi/if_iwi.c
2298
if (fp == NULL) {
sys/dev/netif/iwi/if_iwi.c
2302
if (fp->version < 300) {
sys/dev/netif/iwi/if_iwi.c
2312
if (sc->fw_uc.fp == NULL) {
sys/dev/netif/iwi/if_iwi.c
2316
if (sc->fw_boot.fp == NULL) {
sys/dev/netif/iwi/if_iwi.c
2317
sc->fw_boot.fp = firmware_get("iwi_boot");
sys/dev/netif/iwi/if_iwi.c
2318
if (sc->fw_boot.fp == NULL) {
sys/dev/netif/iwi/if_iwi.c
2324
if (sc->fw_boot.fp->version != sc->fw_fw.fp->version ||
sys/dev/netif/iwi/if_iwi.c
2325
sc->fw_boot.fp->version != sc->fw_uc.fp->version) {
sys/dev/netif/iwi/if_iwi.c
2329
sc->fw_boot.fp->name, sc->fw_boot.fp->version,
sys/dev/netif/iwi/if_iwi.c
2330
sc->fw_uc.fp->name, sc->fw_uc.fp->version,
sys/dev/netif/iwi/if_iwi.c
2331
sc->fw_fw.fp->name, sc->fw_fw.fp->version
sys/dev/netif/iwi/if_iwi.c
2346
if (fp->datasize < sizeof(struct iwi_firmware_hdr)) {
sys/dev/netif/iwi/if_iwi.c
2348
fp->name);
sys/dev/netif/iwi/if_iwi.c
2351
hdr = (const struct iwi_firmware_hdr *)fp->data;
sys/dev/netif/iwi/if_iwi.c
2352
if (fp->datasize < sizeof(*hdr) + le32toh(hdr->bsize) + le32toh(hdr->usize)
sys/dev/netif/iwi/if_iwi.c
2355
fp->name);
sys/dev/netif/iwi/if_iwi.c
2358
sc->fw_boot.data = ((const char *) fp->data) + sizeof(*hdr);
sys/dev/netif/iwi/if_iwi.c
2360
sc->fw_boot.name = fp->name;
sys/dev/netif/iwi/if_iwi.c
2363
sc->fw_uc.name = fp->name;
sys/dev/netif/iwi/if_iwi.c
2366
sc->fw_fw.name = fp->name;
sys/dev/netif/iwi/if_iwi.c
2383
if (fw->fp != NULL) {
sys/dev/netif/iwi/if_iwi.c
2384
firmware_put(fw->fp, FIRMWARE_UNLOAD);
sys/dev/netif/iwi/if_iwi.c
2385
fw->fp = NULL;
sys/dev/netif/iwi/if_iwivar.h
113
const struct firmware *fp; /* image handle */
sys/dev/netif/ral/rt2661.c
2527
const struct firmware *fp;
sys/dev/netif/ral/rt2661.c
2544
fp = firmware_get(imagename);
sys/dev/netif/ral/rt2661.c
2546
if (fp == NULL) {
sys/dev/netif/ral/rt2661.c
2566
RAL_WRITE_REGION_1(sc, RT2661_MCU_CODE_BASE, fp->data, fp->datasize);
sys/dev/netif/ral/rt2661.c
2585
firmware_put(fp, FIRMWARE_UNLOAD);
sys/dev/netif/ral/rt2860.c
4179
const struct firmware *fp;
sys/dev/netif/ral/rt2860.c
4185
fp = firmware_get("rt2860fw");
sys/dev/netif/ral/rt2860.c
4187
if (fp == NULL) {
sys/dev/netif/ral/rt2860.c
4196
RAL_WRITE_REGION_1(sc, RT2860_FW_BASE, fp->data, fp->datasize);
sys/dev/netif/ral/rt2860.c
4219
firmware_put(fp, FIRMWARE_UNLOAD);
sys/dev/netif/wpi/if_wpi.c
5068
const struct firmware *fp;
sys/dev/netif/wpi/if_wpi.c
5079
fp = firmware_get(WPI_FW_NAME);
sys/dev/netif/wpi/if_wpi.c
5082
if (fp == NULL) {
sys/dev/netif/wpi/if_wpi.c
5088
sc->fw_fp = fp;
sys/dev/netif/wpi/if_wpi.c
5090
if (fp->datasize < sizeof (struct wpi_firmware_hdr)) {
sys/dev/netif/wpi/if_wpi.c
5092
"firmware file too short: %zu bytes\n", fp->datasize);
sys/dev/netif/wpi/if_wpi.c
5097
fw->size = fp->datasize;
sys/dev/netif/wpi/if_wpi.c
5098
fw->data = (const uint8_t *)fp->data;
sys/dev/raid/mly/mly.c
1281
char *fp, *tp;
sys/dev/raid/mly/mly.c
1300
fp = mly_describe_code(mly_table_event, event);
sys/dev/raid/mly/mly.c
1305
class = fp[0];
sys/dev/raid/mly/mly.c
1310
action = fp[1];
sys/dev/raid/mly/mly.c
1311
tp = &fp[2];
sys/dev/video/bktr/bktr_core.c
3308
struct format_params *fp;
sys/dev/video/bktr/bktr_core.c
3312
fp = &format_params[bktr->format_params];
sys/dev/video/bktr/bktr_core.c
3321
temp = ((quad_t ) fp->htotal* (quad_t) bktr->capture_area_x_size * 4096
sys/dev/video/bktr/bktr_core.c
3322
/ fp->scaled_htotal / bktr->cols) - 4096;
sys/dev/video/bktr/bktr_core.c
3324
temp = ((quad_t ) fp->htotal* (quad_t) fp->scaled_hactive * 4096
sys/dev/video/bktr/bktr_core.c
3325
/ fp->scaled_htotal / bktr->cols) - 4096;
sys/dev/video/bktr/bktr_core.c
3345
temp = ( (fp->hdelay* fp->scaled_hactive + bktr->capture_area_x_offset* fp->scaled_htotal)
sys/dev/video/bktr/bktr_core.c
3346
* bktr->cols) / (bktr->capture_area_x_size * fp->hactive);
sys/dev/video/bktr/bktr_core.c
3348
temp = (fp->hdelay * bktr->cols) / fp->hactive;
sys/dev/video/bktr/bktr_core.c
3375
(((fp->vactive * 256 + (bktr->rows/2)) / bktr->rows) - 512);
sys/dev/video/bktr/bktr_core.c
3378
(((fp->vactive * 512 + (bktr->rows / 2)) / bktr->rows) - 512);
sys/dev/video/bktr/bktr_core.c
3396
temp = fp->vactive;
sys/dev/video/bktr/bktr_core.c
3407
temp = fp->vdelay + (bktr->capture_area_y_offset);
sys/dev/video/bktr/bktr_core.c
3409
temp = fp->vdelay;
sys/dev/video/bktr/bktr_core.c
3421
&& (fp->iform_xtsel==BT848_IFORM_X_XT1)) {
sys/dev/video/bktr/bktr_core.c
3515
struct format_params *fp;
sys/dev/video/bktr/bktr_core.c
3517
fp = &format_params[bktr->format_params];
sys/dev/video/bktr/bktr_core.c
3550
set_fps(bktr, fp->frame_rate);
sys/dev/video/bktr/bktr_core.c
3573
struct format_params *fp;
sys/dev/video/bktr/bktr_core.c
3576
fp = &format_params[bktr->format_params];
sys/dev/video/bktr/bktr_core.c
3599
if (fps < fp->frame_rate)
sys/dev/video/bktr/bktr_core.c
3600
OUTB(bktr, BKTR_TDEC, i_flag*(fp->frame_rate - fps) & 0x3f);
sys/dev/virtual/nvmm/nvmm_dragonfly.c
295
struct file *fp;
sys/dev/virtual/nvmm/nvmm_dragonfly.c
303
fp = ap->a_fpp ? *ap->a_fpp : NULL;
sys/dev/virtual/nvmm/nvmm_dragonfly.c
304
if (fp == NULL)
sys/dev/virtual/nvmm/nvmm_dragonfly.c
315
error = devfs_set_cdevpriv(fp, owner, dfbsd_nvmm_dtor);
sys/dev/virtual/nvmm/nvmm_dragonfly.c
342
struct file *fp = ap->a_fp;
sys/dev/virtual/nvmm/nvmm_dragonfly.c
345
devfs_get_cdevpriv(fp, (void **)&owner);
sys/dev/virtual/nvmm/nvmm_netbsd.c
279
struct file *fp;
sys/dev/virtual/nvmm/nvmm_netbsd.c
288
error = fd_allocfile(&fp, &fd);
sys/dev/virtual/nvmm/nvmm_netbsd.c
300
return fd_clone(fp, fd, flags, &nvmm_fileops, owner);
sys/dev/virtual/nvmm/nvmm_netbsd.c
304
nbsd_nvmm_ioctl(file_t *fp, u_long cmd, void *data)
sys/dev/virtual/nvmm/nvmm_netbsd.c
306
struct nvmm_owner *owner = fp->f_data;
sys/dev/virtual/nvmm/nvmm_netbsd.c
314
nbsd_nvmm_close(file_t *fp)
sys/dev/virtual/nvmm/nvmm_netbsd.c
316
struct nvmm_owner *owner = fp->f_data;
sys/dev/virtual/nvmm/nvmm_netbsd.c
323
fp->f_data = NULL;
sys/kern/imgact_elf.c
1012
__elfN(puthdr)(lp, &target, sig, DRYRUN, seginfo.count, fp);
sys/kern/imgact_elf.c
1025
error = __elfN(corehdr)(lp, sig, fp, cred, seginfo.count, &target);
sys/kern/imgact_elf.c
1035
error = fp_write(fp, (caddr_t)php->p_vaddr,
sys/kern/imgact_elf.c
1282
__elfN(corehdr)(struct lwp *lp, int sig, struct file *fp, struct ucred *cred,
sys/kern/imgact_elf.c
1293
error = __elfN(puthdr)(lp, target, sig, WRITE, numsegs, fp);
sys/kern/imgact_elf.c
1297
error = fp_write(fp, target->buf, target->off, &nbytes,
sys/kern/imgact_elf.c
1305
int numsegs, struct file *fp)
sys/kern/imgact_elf.c
1337
error = elf_putfiles(p, target, fp);
sys/kern/imgact_elf.c
1566
struct file *fp;
sys/kern/imgact_elf.c
1583
fp = holdfp(td, i, -1);
sys/kern/imgact_elf.c
1584
if (fp == NULL)
sys/kern/imgact_elf.c
1589
if (fp->f_type != DTYPE_VNODE) {
sys/kern/imgact_elf.c
1590
fdrop(fp);
sys/kern/imgact_elf.c
1596
fdrop(fp);
sys/kern/imgact_elf.c
1600
cfi->cfi_type = fp->f_type;
sys/kern/imgact_elf.c
1601
cfi->cfi_flags = fp->f_flag;
sys/kern/imgact_elf.c
1602
cfi->cfi_offset = fp->f_offset;
sys/kern/imgact_elf.c
1605
if (fp == ckfp)
sys/kern/imgact_elf.c
1610
switch(fp->f_type) {
sys/kern/imgact_elf.c
1612
vp = (struct vnode *)fp->f_data;
sys/kern/imgact_elf.c
1629
fdrop(fp);
sys/kern/imgact_elf.c
962
struct file *fp;
sys/kern/imgact_elf.c
965
if ((error = falloc(NULL, &fp, NULL)) != 0)
sys/kern/imgact_elf.c
967
fsetcred(fp, lp->lwp_proc->p_ucred);
sys/kern/imgact_elf.c
972
fp->f_type = DTYPE_VNODE;
sys/kern/imgact_elf.c
973
fp->f_flag = O_CREAT|O_WRONLY|O_NOFOLLOW;
sys/kern/imgact_elf.c
974
fp->f_ops = &vnode_fileops;
sys/kern/imgact_elf.c
975
fp->f_data = vp;
sys/kern/imgact_elf.c
977
error = generic_elf_coredump(lp, sig, fp, limit);
sys/kern/imgact_elf.c
979
fp->f_type = 0;
sys/kern/imgact_elf.c
980
fp->f_flag = 0;
sys/kern/imgact_elf.c
981
fp->f_ops = &badfileops;
sys/kern/imgact_elf.c
982
fp->f_data = NULL;
sys/kern/imgact_elf.c
983
fdrop(fp);
sys/kern/imgact_elf.c
988
generic_elf_coredump(struct lwp *lp, int sig, struct file *fp, off_t limit)
sys/kern/imgact_elf.c
996
if (!fp)
sys/kern/kern_acl.c
203
struct file *fp;
sys/kern/kern_acl.c
206
if ((error = holdvnode(td, uap->filedes, &fp)) != 0)
sys/kern/kern_acl.c
208
error = vacl_get_acl((struct vnode *)fp->f_data, uap->type, uap->aclp);
sys/kern/kern_acl.c
209
fdrop(fp);
sys/kern/kern_acl.c
222
struct file *fp;
sys/kern/kern_acl.c
225
if ((error = holdvnode(td, uap->filedes, &fp)) != 0)
sys/kern/kern_acl.c
227
error = vacl_set_acl((struct vnode *)fp->f_data, uap->type, uap->aclp);
sys/kern/kern_acl.c
228
fdrop(fp);
sys/kern/kern_acl.c
266
struct file *fp;
sys/kern/kern_acl.c
270
if ((error = holdvnode(td, uap->filedes, &fp)) != 0)
sys/kern/kern_acl.c
272
error = vacl_delete((struct vnode *)fp->f_data, uap->type);
sys/kern/kern_acl.c
273
fdrop(fp);
sys/kern/kern_acl.c
311
struct file *fp;
sys/kern/kern_acl.c
315
if ((error = holdvnode(td, uap->filedes, &fp)) != 0)
sys/kern/kern_acl.c
317
error = vacl_aclcheck((struct vnode *)fp->f_data, uap->type, uap->aclp);
sys/kern/kern_acl.c
318
fdrop(fp);
sys/kern/kern_checkpoint.c
110
elf_gethdr(struct file *fp, Elf_Ehdr *ehdr)
sys/kern/kern_checkpoint.c
115
if ((error = read_check(fp, ehdr, nbyte)) != 0)
sys/kern/kern_checkpoint.c
152
elf_getphdrs(struct file *fp, Elf_Phdr *phdr, size_t nbyte)
sys/kern/kern_checkpoint.c
159
if ((error = read_check(fp, phdr, nbyte)) != 0)
sys/kern/kern_checkpoint.c
176
elf_getnotes(struct lwp *lp, struct file *fp, size_t notesz)
sys/kern/kern_checkpoint.c
198
if ((error = read_check(fp, note, notesz)) != 0)
sys/kern/kern_checkpoint.c
218
ckpt_thaw_proc(struct lwp *lp, struct file *fp)
sys/kern/kern_checkpoint.c
230
if ((error = elf_gethdr(fp, ehdr)) != 0)
sys/kern/kern_checkpoint.c
236
if ((error = elf_getphdrs(fp, phdr, nbyte)) != 0)
sys/kern/kern_checkpoint.c
240
if ((error = elf_getnotes(lp, fp, phdr->p_filesz)) != 0)
sys/kern/kern_checkpoint.c
244
if ((error = elf_gettextvp(p, fp)) != 0)
sys/kern/kern_checkpoint.c
248
if ((error = elf_getsigs(lp, fp)) != 0) {
sys/kern/kern_checkpoint.c
254
if ((error = elf_getfiles(lp, fp)) != 0)
sys/kern/kern_checkpoint.c
258
error = elf_loadphdrs(fp, phdr, ehdr->e_phnum);
sys/kern/kern_checkpoint.c
267
if (error == 0 && fp->f_data && fp->f_type == DTYPE_VNODE) {
sys/kern/kern_checkpoint.c
270
p->p_textvp = (struct vnode *)fp->f_data;
sys/kern/kern_checkpoint.c
399
mmap_phdr(struct file *fp, Elf_Phdr *phdr)
sys/kern/kern_checkpoint.c
420
if ((error = fp_mmap(addr, len, prot, flags, fp, pos, &addr)) != 0) {
sys/kern/kern_checkpoint.c
434
elf_loadphdrs(struct file *fp, Elf_Phdr *phdr, int numsegs)
sys/kern/kern_checkpoint.c
441
if ((error = mmap_phdr(fp, &phdr[i])) != 0)
sys/kern/kern_checkpoint.c
449
elf_getsigs(struct lwp *lp, struct file *fp)
sys/kern/kern_checkpoint.c
457
if ((error = read_check(fp, csi, sizeof(struct ckpt_siginfo))) != 0)
sys/kern/kern_checkpoint.c
511
struct file *fp;
sys/kern/kern_checkpoint.c
522
if ((error = fp_vpopen(vp, O_RDONLY, &fp)) != 0) {
sys/kern/kern_checkpoint.c
526
error = mmap_phdr(fp, phdr);
sys/kern/kern_checkpoint.c
527
fp_close(fp);
sys/kern/kern_checkpoint.c
534
elf_gettextvp(struct proc *p, struct file *fp)
sys/kern/kern_checkpoint.c
543
if ((error = read_check(fp, &vminfo, sizeof(vminfo))) != 0)
sys/kern/kern_checkpoint.c
561
if ((error = read_check(fp, &vpcount, sizeof(int))) != 0)
sys/kern/kern_checkpoint.c
564
if ((error = read_check(fp, vnh, sizeof(struct vn_hdr)*vpcount)) != 0)
sys/kern/kern_checkpoint.c
582
elf_getfiles(struct lwp *lp, struct file *fp)
sys/kern/kern_checkpoint.c
596
if ((error = read_check(fp, &filehdr, sizeof(filehdr))) != 0)
sys/kern/kern_checkpoint.c
600
error = read_check(fp, cfi_base, filecount*sizeof(struct ckpt_fileinfo));
sys/kern/kern_checkpoint.c
635
fhold(fp);
sys/kern/kern_checkpoint.c
636
tempfp = fp;
sys/kern/kern_checkpoint.c
657
(ofp = fdp->fd_files[cfi->cfi_index].fp) != NULL) {
sys/kern/kern_checkpoint.c
667
fp_close(fp);
sys/kern/kern_checkpoint.c
685
ckpt_freeze_proc(struct lwp *lp, struct file *fp)
sys/kern/kern_checkpoint.c
700
error = generic_elf_coredump(lp, SIGCKPT, fp, limit);
sys/kern/kern_checkpoint.c
722
struct file *fp;
sys/kern/kern_checkpoint.c
74
static int elf_loadphdrs(struct file *fp, Elf_Phdr *phdr, int numsegs);
sys/kern/kern_checkpoint.c
741
fp = NULL;
sys/kern/kern_checkpoint.c
744
else if ((fp = holdfp(td, uap->fd, FWRITE)) == NULL)
sys/kern/kern_checkpoint.c
747
error = ckpt_freeze_proc(td->td_lwp, fp);
sys/kern/kern_checkpoint.c
748
if (fp)
sys/kern/kern_checkpoint.c
749
dropfp(td, uap->fd, fp);
sys/kern/kern_checkpoint.c
75
static int elf_getnotes(struct lwp *lp, struct file *fp, size_t notesz);
sys/kern/kern_checkpoint.c
756
if ((fp = holdfp(td, uap->fd, FREAD)) == NULL) {
sys/kern/kern_checkpoint.c
761
error = ckpt_thaw_proc(td->td_lwp, fp);
sys/kern/kern_checkpoint.c
762
dropfp(td, uap->fd, fp);
sys/kern/kern_checkpoint.c
778
struct file *fp;
sys/kern/kern_checkpoint.c
80
static int elf_getsigs(struct lwp *lp, struct file *fp);
sys/kern/kern_checkpoint.c
81
static int elf_getfiles(struct lwp *lp, struct file *fp);
sys/kern/kern_checkpoint.c
818
error = fp_open(buf, O_WRONLY|O_CREAT|O_TRUNC|O_NOFOLLOW, 0600, &fp);
sys/kern/kern_checkpoint.c
82
static int elf_gettextvp(struct proc *p, struct file *fp);
sys/kern/kern_checkpoint.c
820
error = ckpt_freeze_proc(lp, fp);
sys/kern/kern_checkpoint.c
821
fp_close(fp);
sys/kern/kern_checkpoint.c
93
read_check(struct file *fp, void *buf, size_t nbyte)
sys/kern/kern_checkpoint.c
99
error = fp_read(fp, buf, nbyte, &nread, 1, UIO_SYSSPACE);
sys/kern/kern_descrip.c
104
static void fsetfd_locked(struct filedesc *fdp, struct file *fp, int fd);
sys/kern/kern_descrip.c
1047
struct file *fp;
sys/kern/kern_descrip.c
107
static void ffree(struct file *fp);
sys/kern/kern_descrip.c
1077
if ((unsigned)old >= fdp->fd_nfiles || fdp->fd_files[old].fp == NULL) {
sys/kern/kern_descrip.c
1090
fp = fdp->fd_files[old].fp;
sys/kern/kern_descrip.c
1092
fhold(fp);
sys/kern/kern_descrip.c
1109
fdrop(fp);
sys/kern/kern_descrip.c
1115
if (old >= fdp->fd_nfiles || fdp->fd_files[old].fp != fp) {
sys/kern/kern_descrip.c
1118
fdrop(fp);
sys/kern/kern_descrip.c
1127
fdrop(fp);
sys/kern/kern_descrip.c
1137
fdrop(fp);
sys/kern/kern_descrip.c
1145
fdrop(fp);
sys/kern/kern_descrip.c
1162
delfp = fdp->fd_files[new].fp;
sys/kern/kern_descrip.c
1163
fdp->fd_files[new].fp = NULL;
sys/kern/kern_descrip.c
1198
fsetfd_locked(fdp, fp, new);
sys/kern/kern_descrip.c
1205
fdrop(fp);
sys/kern/kern_descrip.c
1438
if (fdp->fd_files[fd].fp != NULL) {
sys/kern/kern_descrip.c
1471
struct file *fp;
sys/kern/kern_descrip.c
1482
if ((fp = funsetfd_locked(fdp, fd)) == NULL) {
sys/kern/kern_descrip.c
1501
if (SLIST_FIRST(&fp->f_klist))
sys/kern/kern_descrip.c
1502
knote_fdclose(fp, fdp, fd);
sys/kern/kern_descrip.c
1503
error = closef(fp, p);
sys/kern/kern_descrip.c
1526
struct file *fp;
sys/kern/kern_descrip.c
1529
if ((fp = holdfp(td, fd, -1)) == NULL)
sys/kern/kern_descrip.c
1531
error = fo_shutdown(fp, how);
sys/kern/kern_descrip.c
1532
fdrop(fp);
sys/kern/kern_descrip.c
1557
struct file *fp;
sys/kern/kern_descrip.c
1560
if ((fp = holdfp(td, fd, -1)) == NULL)
sys/kern/kern_descrip.c
1562
error = fo_stat(fp, ub, td->td_ucred);
sys/kern/kern_descrip.c
1563
fdrop(fp);
sys/kern/kern_descrip.c
159
fdp->fd_files[fdp->fd_lastfile].fp == NULL &&
sys/kern/kern_descrip.c
1593
struct file *fp;
sys/kern/kern_descrip.c
1597
if ((fp = holdfp(td, uap->fd, -1)) == NULL)
sys/kern/kern_descrip.c
1600
switch (fp->f_type) {
sys/kern/kern_descrip.c
1612
vp = (struct vnode *)fp->f_data;
sys/kern/kern_descrip.c
1619
fdrop(fp);
sys/kern/kern_descrip.c
1847
KKASSERT(fdp->fd_files[fd].fp == NULL);
sys/kern/kern_descrip.c
188
struct file *fp;
sys/kern/kern_descrip.c
1899
if (fdnode->fp == NULL && --n <= 0) {
sys/kern/kern_descrip.c
1925
static int fdrevoke_check_callback(struct file *fp, void *vinfo);
sys/kern/kern_descrip.c
1973
fdrevoke_check_callback(struct file *fp, void *vinfo)
sys/kern/kern_descrip.c
1980
if (fp->f_flag & FREVOKED)
sys/kern/kern_descrip.c
1988
(fp->f_cred == NULL ||
sys/kern/kern_descrip.c
1989
info->cred->cr_prison != fp->f_cred->cr_prison)) {
sys/kern/kern_descrip.c
1999
if (info->data == fp->f_data && info->type == fp->f_type) {
sys/kern/kern_descrip.c
2000
atomic_set_int(&fp->f_flag, FREVOKED);
sys/kern/kern_descrip.c
2014
struct file *fp;
sys/kern/kern_descrip.c
203
fp = fdn->fp;
sys/kern/kern_descrip.c
2054
if ((fp = fdp->fd_files[n].fp) == NULL)
sys/kern/kern_descrip.c
2056
if (fp->f_flag & FREVOKED) {
sys/kern/kern_descrip.c
2061
fdp->fd_files[n].fp = info->nfp;
sys/kern/kern_descrip.c
2063
knote_fdclose(fp, fdp, n); /* XXX */
sys/kern/kern_descrip.c
2064
closef(fp, p);
sys/kern/kern_descrip.c
2094
struct file *fp;
sys/kern/kern_descrip.c
2098
fp = NULL;
sys/kern/kern_descrip.c
2117
fp = kmalloc_obj(sizeof(*fp), M_FILE, M_WAITOK|M_ZERO);
sys/kern/kern_descrip.c
2118
spin_init(&fp->f_spin, "falloc");
sys/kern/kern_descrip.c
2119
SLIST_INIT(&fp->f_klist);
sys/kern/kern_descrip.c
2120
fp->f_count = 1;
sys/kern/kern_descrip.c
2121
fp->f_ops = &badfileops;
sys/kern/kern_descrip.c
2122
fp->f_seqcount = 1;
sys/kern/kern_descrip.c
2123
fsetcred(fp, cred);
sys/kern/kern_descrip.c
2126
head = fp2filelist(fp);
sys/kern/kern_descrip.c
2128
LIST_INSERT_HEAD(&head->list, fp, f_list);
sys/kern/kern_descrip.c
2133
fdrop(fp);
sys/kern/kern_descrip.c
2134
fp = NULL;
sys/kern/kern_descrip.c
2140
*resultfp = fp;
sys/kern/kern_descrip.c
2150
checkfdclosed(thread_t td, struct filedesc *fdp, int fd, struct file *fp,
sys/kern/kern_descrip.c
2163
if (fdc->fd == fd && fdc->fp == fp)
sys/kern/kern_descrip.c
2169
if ((unsigned)fd >= fdp->fd_nfiles || fp != fdp->fd_files[fd].fp)
sys/kern/kern_descrip.c
2186
fsetfd_locked(struct filedesc *fdp, struct file *fp, int fd)
sys/kern/kern_descrip.c
2190
if (fp) {
sys/kern/kern_descrip.c
2191
fhold(fp);
sys/kern/kern_descrip.c
2193
fdp->fd_files[fd].fp = fp;
sys/kern/kern_descrip.c
2206
fsetfd(struct filedesc *fdp, struct file *fp, int fd)
sys/kern/kern_descrip.c
2209
fsetfd_locked(fdp, fp, fd);
sys/kern/kern_descrip.c
222
KASSERT(fp == fdc->fp,
sys/kern/kern_descrip.c
2220
struct file *fp;
sys/kern/kern_descrip.c
2224
if ((fp = fdp->fd_files[fd].fp) == NULL)
sys/kern/kern_descrip.c
2228
fdp->fd_files[fd].fp = NULL;
sys/kern/kern_descrip.c
2235
return(fp);
sys/kern/kern_descrip.c
224
fp, fdc->fp));
sys/kern/kern_descrip.c
2249
} else if (fdp->fd_files[fd].fp == NULL) {
sys/kern/kern_descrip.c
225
fdc->fp = NULL;
sys/kern/kern_descrip.c
2271
} else if (fdp->fd_files[fd].fp == NULL) {
sys/kern/kern_descrip.c
2293
} else if (fdp->fd_files[fd].fp == NULL) {
sys/kern/kern_descrip.c
2316
} else if (fdp->fd_files[fd].fp == NULL) {
sys/kern/kern_descrip.c
2331
fsetcred(struct file *fp, struct ucred *ncr)
sys/kern/kern_descrip.c
2339
ocr = fp->f_cred;
sys/kern/kern_descrip.c
234
atomic_add_int(&fp->f_count, -1);
sys/kern/kern_descrip.c
2364
fp->f_cred = ncr;
sys/kern/kern_descrip.c
2374
ffree(struct file *fp)
sys/kern/kern_descrip.c
2376
KASSERT((fp->f_count == 0), ("ffree: fp_fcount not 0!"));
sys/kern/kern_descrip.c
2377
fsetcred(fp, NULL);
sys/kern/kern_descrip.c
2378
if (fp->f_nchandle.ncp)
sys/kern/kern_descrip.c
2379
cache_drop(&fp->f_nchandle);
sys/kern/kern_descrip.c
2380
kfree_obj(fp, M_FILE);
sys/kern/kern_descrip.c
253
KASSERT(fp == fdc->fp,
sys/kern/kern_descrip.c
255
fp, fdc->fp));
sys/kern/kern_descrip.c
256
fdc->fp = NULL;
sys/kern/kern_descrip.c
2572
} else if (fdnode->fp) {
sys/kern/kern_descrip.c
2574
if (fdnode->fp->f_type == DTYPE_KQUEUE ||
sys/kern/kern_descrip.c
2578
fhold(fdnode->fp);
sys/kern/kern_descrip.c
259
atomic_add_int(&fp->f_count, -1);
sys/kern/kern_descrip.c
2599
struct file *fp;
sys/kern/kern_descrip.c
2633
if (fdnode->fp == NULL ||
sys/kern/kern_descrip.c
2634
fdnode->fp->f_type != DTYPE_VNODE) {
sys/kern/kern_descrip.c
2637
fp = fdnode->fp;
sys/kern/kern_descrip.c
2638
fhold(fp);
sys/kern/kern_descrip.c
2645
vp = (struct vnode *)fp->f_data;
sys/kern/kern_descrip.c
2648
fdrop(fp);
sys/kern/kern_descrip.c
2708
if (fdp->fd_files[i].fp) {
sys/kern/kern_descrip.c
2709
fp = funsetfd_locked(fdp, i);
sys/kern/kern_descrip.c
2710
if (fp) {
sys/kern/kern_descrip.c
2712
if (SLIST_FIRST(&fp->f_klist))
sys/kern/kern_descrip.c
2713
knote_fdclose(fp, fdp, i);
sys/kern/kern_descrip.c
2714
closef(fp, p);
sys/kern/kern_descrip.c
2767
struct file *fp;
sys/kern/kern_descrip.c
2769
fp = _holdfp_cache(td, fd);
sys/kern/kern_descrip.c
2770
if (fp) {
sys/kern/kern_descrip.c
2771
if ((fp->f_flag & flag) == 0 && flag != -1) {
sys/kern/kern_descrip.c
2772
fdrop(fp);
sys/kern/kern_descrip.c
2773
fp = NULL;
sys/kern/kern_descrip.c
2776
return fp;
sys/kern/kern_descrip.c
278
struct file *fp;
sys/kern/kern_descrip.c
2789
struct file *fp;
sys/kern/kern_descrip.c
2795
fp = _holdfp_cache(td, fd);
sys/kern/kern_descrip.c
2796
if (fp) {
sys/kern/kern_descrip.c
2797
if (fp->f_type != DTYPE_SOCKET) {
sys/kern/kern_descrip.c
2798
fdrop(fp);
sys/kern/kern_descrip.c
2799
fp = NULL;
sys/kern/kern_descrip.c
2807
*fpp = fp;
sys/kern/kern_descrip.c
282
fp = fdp->fd_files[fd].fp; /* can be NULL */
sys/kern/kern_descrip.c
2820
struct file *fp;
sys/kern/kern_descrip.c
2823
fp = _holdfp_cache(td, fd);
sys/kern/kern_descrip.c
2824
if (fp) {
sys/kern/kern_descrip.c
2825
if (fp->f_type != DTYPE_VNODE && fp->f_type != DTYPE_FIFO) {
sys/kern/kern_descrip.c
2826
fdrop(fp);
sys/kern/kern_descrip.c
2827
fp = NULL;
sys/kern/kern_descrip.c
283
if (fp) {
sys/kern/kern_descrip.c
2835
*fpp = fp;
sys/kern/kern_descrip.c
284
if ((fp->f_flag & flag) == 0 && flag != -1) {
sys/kern/kern_descrip.c
2848
struct file *fp;
sys/kern/kern_descrip.c
285
fp = NULL;
sys/kern/kern_descrip.c
2851
fp = _holdfp2(td, fd, fflagsp);
sys/kern/kern_descrip.c
2852
if (fp) {
sys/kern/kern_descrip.c
2853
if (fp->f_type != DTYPE_VNODE && fp->f_type != DTYPE_FIFO) {
sys/kern/kern_descrip.c
2854
fdrop(fp);
sys/kern/kern_descrip.c
2855
fp = NULL;
sys/kern/kern_descrip.c
2863
*fpp = fp;
sys/kern/kern_descrip.c
287
fhold(fp);
sys/kern/kern_descrip.c
2881
is_unsafe(struct file *fp)
sys/kern/kern_descrip.c
2883
if (fp->f_type == DTYPE_VNODE &&
sys/kern/kern_descrip.c
2884
((struct vnode *)(fp->f_data))->v_tag == VT_PROCFS)
sys/kern/kern_descrip.c
291
fp = NULL;
sys/kern/kern_descrip.c
2911
if (fdp->fd_files[i].fp && is_unsafe(fdp->fd_files[i].fp)) {
sys/kern/kern_descrip.c
2912
struct file *fp;
sys/kern/kern_descrip.c
2918
if ((fp = funsetfd_locked(fdp, i)) != NULL) {
sys/kern/kern_descrip.c
2919
knote_fdclose(fp, fdp, i);
sys/kern/kern_descrip.c
2920
closef(fp, p);
sys/kern/kern_descrip.c
295
return fp;
sys/kern/kern_descrip.c
2954
if (fdp->fd_files[i].fp != NULL &&
sys/kern/kern_descrip.c
2956
struct file *fp;
sys/kern/kern_descrip.c
2964
if ((fp = funsetfd_locked(fdp, i)) != NULL) {
sys/kern/kern_descrip.c
2965
knote_fdclose(fp, fdp, i);
sys/kern/kern_descrip.c
2966
closef(fp, p);
sys/kern/kern_descrip.c
2986
struct file *fp;
sys/kern/kern_descrip.c
2996
if (fdp->fd_files[i].fp != NULL)
sys/kern/kern_descrip.c
2999
if ((error = falloc(lp, &fp, &devnull)) != 0)
sys/kern/kern_descrip.c
3006
error = vn_open(&nd, &fp, flags, 0);
sys/kern/kern_descrip.c
3008
fsetfd(fdp, fp, devnull);
sys/kern/kern_descrip.c
301
struct file *fp;
sys/kern/kern_descrip.c
3011
fdrop(fp);
sys/kern/kern_descrip.c
3034
closef(struct file *fp, struct proc *p)
sys/kern/kern_descrip.c
304
fp = fdp->fd_files[fd].fp; /* can be NULL */
sys/kern/kern_descrip.c
3040
if (fp == NULL)
sys/kern/kern_descrip.c
305
if (fp) {
sys/kern/kern_descrip.c
3051
if (p != NULL && fp->f_type == DTYPE_VNODE &&
sys/kern/kern_descrip.c
3052
(((struct vnode *)fp->f_data)->v_flag & VMAYHAVELOCKS)
sys/kern/kern_descrip.c
3059
vp = (struct vnode *)fp->f_data;
sys/kern/kern_descrip.c
306
if ((fp->f_flag & flag) == 0 && flag != -1) {
sys/kern/kern_descrip.c
307
fp = NULL;
sys/kern/kern_descrip.c
3081
vp = (struct vnode *)fp->f_data;
sys/kern/kern_descrip.c
309
fhold(fp);
sys/kern/kern_descrip.c
3094
return (fdrop(fp));
sys/kern/kern_descrip.c
3107
fhold(struct file *fp)
sys/kern/kern_descrip.c
3110
KASSERT(fp->f_count > 0, ("fhold: invalid f_count %d", fp->f_count));
sys/kern/kern_descrip.c
3111
atomic_add_int(&fp->f_count, 1);
sys/kern/kern_descrip.c
3118
fdrop(struct file *fp)
sys/kern/kern_descrip.c
313
fp = NULL;
sys/kern/kern_descrip.c
3131
int count = fp->f_count;
sys/kern/kern_descrip.c
3136
struct filelist_head *head = fp2filelist(fp);
sys/kern/kern_descrip.c
3145
if (atomic_cmpset_int(&fp->f_count, count, 0)) {
sys/kern/kern_descrip.c
3146
LIST_REMOVE(fp, f_list);
sys/kern/kern_descrip.c
315
return fp;
sys/kern/kern_descrip.c
3154
} else if (atomic_cmpset_int(&fp->f_count, count, count - 1)) {
sys/kern/kern_descrip.c
3162
KKASSERT(SLIST_FIRST(&fp->f_klist) == NULL);
sys/kern/kern_descrip.c
3168
if (fp->f_count < 0)
sys/kern/kern_descrip.c
3170
if ((fp->f_flag & FHASLOCK) && fp->f_type == DTYPE_VNODE &&
sys/kern/kern_descrip.c
3171
(((struct vnode *)fp->f_data)->v_flag & VMAYHAVELOCKS)
sys/kern/kern_descrip.c
3177
vp = (struct vnode *)fp->f_data;
sys/kern/kern_descrip.c
3178
VOP_ADVLOCK(vp, (caddr_t)fp, F_UNLCK, &lf, 0);
sys/kern/kern_descrip.c
3180
if (fp->f_ops != &badfileops)
sys/kern/kern_descrip.c
3181
error = fo_close(fp);
sys/kern/kern_descrip.c
3184
ffree(fp);
sys/kern/kern_descrip.c
3200
struct file *fp;
sys/kern/kern_descrip.c
3205
if ((fp = holdfp(td, uap->fd, -1)) == NULL)
sys/kern/kern_descrip.c
3207
if (fp->f_type != DTYPE_VNODE) {
sys/kern/kern_descrip.c
3211
vp = (struct vnode *)fp->f_data;
sys/kern/kern_descrip.c
3217
atomic_clear_int(&fp->f_flag, FHASLOCK); /* race ok */
sys/kern/kern_descrip.c
3218
error = VOP_ADVLOCK(vp, (caddr_t)fp, F_UNLCK, &lf, 0);
sys/kern/kern_descrip.c
3230
error = VOP_ADVLOCK(vp, (caddr_t)fp, F_SETLK, &lf, 0);
sys/kern/kern_descrip.c
3232
error = VOP_ADVLOCK(vp, (caddr_t)fp, F_SETLK, &lf, F_WAIT);
sys/kern/kern_descrip.c
3233
atomic_set_int(&fp->f_flag, FHASLOCK); /* race ok */
sys/kern/kern_descrip.c
3235
fdrop(fp);
sys/kern/kern_descrip.c
3303
struct file *fp;
sys/kern/kern_descrip.c
3306
fp = *ap->a_fpp;
sys/kern/kern_descrip.c
332
struct file *fp;
sys/kern/kern_descrip.c
3320
fp->f_type = DTYPE_VNODE;
sys/kern/kern_descrip.c
3322
fp->f_flag = (fp->f_flag & ~FMASK) | (ap->a_oflags & FMASK);
sys/kern/kern_descrip.c
3323
fp->f_ops = &vnode_fileops;
sys/kern/kern_descrip.c
3324
fp->f_data = vp;
sys/kern/kern_descrip.c
3381
struct file *fp;
sys/kern/kern_descrip.c
3384
LIST_FOREACH(fp, &head->list, f_list) {
sys/kern/kern_descrip.c
3387
res = callback(fp, data);
sys/kern/kern_descrip.c
341
if (fdc->fd != fd || fdc->fp == NULL)
sys/kern/kern_descrip.c
3458
struct file *fp;
sys/kern/kern_descrip.c
3484
if ((fp = fdp->fd_files[n].fp) == NULL)
sys/kern/kern_descrip.c
3490
kcore_make_file(&kf, fp, p->p_pid, uid, n);
sys/kern/kern_descrip.c
3552
struct file *fp,
sys/kern/kern_descrip.c
356
if (fdc->fd != fd || fdc->fp == NULL) {
sys/kern/kern_descrip.c
3561
badfo_ioctl(struct file *fp, u_long com, caddr_t data,
sys/kern/kern_descrip.c
3572
badfo_kqfilter(struct file *fp, struct knote *kn)
sys/kern/kern_descrip.c
3578
badfo_stat(struct file *fp, struct stat *sb, struct ucred *cred)
sys/kern/kern_descrip.c
3584
badfo_close(struct file *fp)
sys/kern/kern_descrip.c
3590
badfo_shutdown(struct file *fp, int how)
sys/kern/kern_descrip.c
3596
nofo_shutdown(struct file *fp, int how)
sys/kern/kern_descrip.c
3602
badfo_seek(struct file *fp, off_t offset, int whence, off_t *res)
sys/kern/kern_descrip.c
367
fp = fdc->fp;
sys/kern/kern_descrip.c
371
return fp;
sys/kern/kern_descrip.c
374
fp = fdc->fp;
sys/kern/kern_descrip.c
375
fhold(fp);
sys/kern/kern_descrip.c
379
return fp;
sys/kern/kern_descrip.c
393
fp = fdp->fd_files[fd].fp; /* can be NULL */
sys/kern/kern_descrip.c
394
if (fp) {
sys/kern/kern_descrip.c
395
fhold(fp);
sys/kern/kern_descrip.c
400
fp = NULL;
sys/kern/kern_descrip.c
404
return fp;
sys/kern/kern_descrip.c
417
if (fdc->fp == NULL) {
sys/kern/kern_descrip.c
438
if (best->fp) {
sys/kern/kern_descrip.c
448
best->fp = fp;
sys/kern/kern_descrip.c
461
best->fp = NULL;
sys/kern/kern_descrip.c
466
return fp;
sys/kern/kern_descrip.c
478
struct file *fp;
sys/kern/kern_descrip.c
489
fp = fdp->fd_files[fd].fp; /* can be NULL */
sys/kern/kern_descrip.c
490
if (fp) {
sys/kern/kern_descrip.c
492
fhold(fp);
sys/kern/kern_descrip.c
495
fp = NULL;
sys/kern/kern_descrip.c
499
return fp;
sys/kern/kern_descrip.c
510
dropfp(thread_t td, int fd, struct file *fp)
sys/kern/kern_descrip.c
524
if (fdc->fp != fp || fdc->fd != fd)
sys/kern/kern_descrip.c
547
if (fdc->fp == fp && fdc->fd == fd) {
sys/kern/kern_descrip.c
559
fdrop(fp);
sys/kern/kern_descrip.c
590
if (fdc->fp) {
sys/kern/kern_descrip.c
597
if (fdc->fp) {
sys/kern/kern_descrip.c
609
fp2filelist(const struct file *fp)
sys/kern/kern_descrip.c
613
i = (u_int)(uintptr_t)fp % NFILELIST_HEADS;
sys/kern/kern_descrip.c
703
struct file *fp;
sys/kern/kern_descrip.c
779
if ((fp = holdfp(td, fd, -1)) == NULL)
sys/kern/kern_descrip.c
784
dat->fc_flags = OFLAGS(fp->f_flag);
sys/kern/kern_descrip.c
789
oflags = fp->f_flag;
sys/kern/kern_descrip.c
798
error = fo_ioctl(fp, FIOASYNC, (caddr_t)&tmp,
sys/kern/kern_descrip.c
806
oflags = fp->f_flag;
sys/kern/kern_descrip.c
809
if (atomic_cmpset_int(&fp->f_flag, oflags, nflags))
sys/kern/kern_descrip.c
816
error = fo_ioctl(fp, FIOGETOWN, (caddr_t)&dat->fc_owner,
sys/kern/kern_descrip.c
821
error = fo_ioctl(fp, FIOSETOWN, (caddr_t)&dat->fc_owner,
sys/kern/kern_descrip.c
830
if (fp->f_type != DTYPE_VNODE) {
sys/kern/kern_descrip.c
834
vp = (struct vnode *)fp->f_data;
sys/kern/kern_descrip.c
840
dat->fc_flock.l_start += fp->f_offset;
sys/kern/kern_descrip.c
844
if ((fp->f_flag & FREAD) == 0) {
sys/kern/kern_descrip.c
854
if ((fp->f_flag & FWRITE) == 0) {
sys/kern/kern_descrip.c
877
if (checkfdclosed(td, p->p_fd, fd, fp, closedcounter)) {
sys/kern/kern_descrip.c
888
if (fp->f_type != DTYPE_VNODE) {
sys/kern/kern_descrip.c
892
vp = (struct vnode *)fp->f_data;
sys/kern/kern_descrip.c
903
dat->fc_flock.l_start += fp->f_offset;
sys/kern/kern_descrip.c
909
if (fp->f_type != DTYPE_VNODE) {
sys/kern/kern_descrip.c
919
error = cache_fullpath(p, &fp->f_nchandle, NULL,
sys/kern/kern_descrip.c
930
fdrop(fp);
sys/kern/kern_device.c
171
dev_dclose(cdev_t dev, int fflag, int devtype, struct file *fp)
sys/kern/kern_device.c
181
ap.a_fp = fp;
sys/kern/kern_device.c
192
dev_dread(cdev_t dev, struct uio *uio, int ioflag, struct file *fp)
sys/kern/kern_device.c
202
ap.a_fp = fp;
sys/kern/kern_device.c
215
dev_dwrite(cdev_t dev, struct uio *uio, int ioflag, struct file *fp)
sys/kern/kern_device.c
226
ap.a_fp = fp;
sys/kern/kern_device.c
238
struct sysmsg *msg, struct file *fp)
sys/kern/kern_device.c
251
ap.a_fp = fp;
sys/kern/kern_device.c
262
dev_dmmap(cdev_t dev, vm_offset_t offset, int nprot, struct file *fp)
sys/kern/kern_device.c
272
ap.a_fp = fp;
sys/kern/kern_device.c
287
struct vm_object **object, int nprot, struct file *fp)
sys/kern/kern_device.c
299
ap.a_fp = fp;
sys/kern/kern_device.c
476
dev_dkqfilter(cdev_t dev, struct knote *kn, struct file *fp)
sys/kern/kern_device.c
486
ap.a_fp = fp;
sys/kern/kern_dmsg.c
133
kdmsg_iocom_reconnect(kdmsg_iocom_t *iocom, struct file *fp,
sys/kern/kern_dmsg.c
158
iocom->msg_fp = fp;
sys/kern/kern_event.c
1059
struct file *fp = NULL;
sys/kern/kern_event.c
1071
fp = holdfp(td, uap->fd, -1);
sys/kern/kern_event.c
1072
if (fp == NULL)
sys/kern/kern_event.c
1074
if (fp->f_type != DTYPE_KQUEUE) {
sys/kern/kern_event.c
1075
fdrop(fp);
sys/kern/kern_event.c
1079
kq = (struct kqueue *)fp->f_data;
sys/kern/kern_event.c
1090
dropfp(td, uap->fd, fp);
sys/kern/kern_event.c
1103
struct file **fp, int climit)
sys/kern/kern_event.c
1116
*fp = NULL;
sys/kern/kern_event.c
1122
*fp = holdfp(td, kev->ident, -1);
sys/kern/kern_event.c
1124
*fp = holdfp_fdp_locked(fdp,
sys/kern/kern_event.c
1130
++fp;
sys/kern/kern_event.c
1158
struct file *fp[KQ_NEVENTS];
sys/kern/kern_event.c
1173
floadkevfps(td, fdp, kev, fp, climit);
sys/kern/kern_event.c
1227
if (fp[count] == NULL) {
sys/kern/kern_event.c
1245
if (fp[count] != NULL) {
sys/kern/kern_event.c
1246
list = &fp[count]->f_klist;
sys/kern/kern_event.c
1294
kn->kn_fp = fp[count];
sys/kern/kern_event.c
1303
fp[count] = NULL; /* safety */
sys/kern/kern_event.c
1439
if (fp[count-1]) /* drop unprocessed fp */
sys/kern/kern_event.c
1440
fdrop(fp[count-1]);
sys/kern/kern_event.c
1461
if (count && fp[count-1])
sys/kern/kern_event.c
1462
fdrop(fp[count-1]);
sys/kern/kern_event.c
1464
if (fp[count])
sys/kern/kern_event.c
1465
fdrop(fp[count]);
sys/kern/kern_event.c
1642
kqueue_read(struct file *fp, struct uio *uio, struct ucred *cred, int flags)
sys/kern/kern_event.c
1651
kqueue_write(struct file *fp, struct uio *uio, struct ucred *cred, int flags)
sys/kern/kern_event.c
1660
kqueue_ioctl(struct file *fp, u_long com, caddr_t data,
sys/kern/kern_event.c
1666
kq = (struct kqueue *)fp->f_data;
sys/kern/kern_event.c
1691
kqueue_stat(struct file *fp, struct stat *st, struct ucred *cred)
sys/kern/kern_event.c
1693
struct kqueue *kq = (struct kqueue *)fp->f_data;
sys/kern/kern_event.c
1706
kqueue_close(struct file *fp)
sys/kern/kern_event.c
1708
struct kqueue *kq = (struct kqueue *)fp->f_data;
sys/kern/kern_event.c
1712
fp->f_data = NULL;
sys/kern/kern_event.c
1944
knote_fdclose(struct file *fp, struct filedesc *fdp, int fd)
sys/kern/kern_event.c
1950
lwkt_getpooltoken(&fp->f_klist);
sys/kern/kern_event.c
1952
SLIST_FOREACH(kn, &fp->f_klist, kn_link) {
sys/kern/kern_event.c
1958
SLIST_FOREACH(kntmp, &fp->f_klist, kn_link) {
sys/kern/kern_event.c
1973
lwkt_relpooltoken(&fp->f_klist);
sys/kern/kern_event.c
262
kqueue_kqfilter(struct file *fp, struct knote *kn)
sys/kern/kern_event.c
727
struct file *fp;
sys/kern/kern_event.c
730
error = falloc(td->td_lwp, &fp, &fd);
sys/kern/kern_event.c
733
fp->f_flag = FREAD | FWRITE;
sys/kern/kern_event.c
734
fp->f_type = DTYPE_KQUEUE;
sys/kern/kern_event.c
735
fp->f_ops = &kqueueops;
sys/kern/kern_event.c
739
fp->f_data = kq;
sys/kern/kern_event.c
741
fsetfd(kq->kq_fdp, fp, fd);
sys/kern/kern_event.c
743
fdrop(fp);
sys/kern/kern_event.c
80
static int kqueue_read(struct file *fp, struct uio *uio,
sys/kern/kern_event.c
82
static int kqueue_write(struct file *fp, struct uio *uio,
sys/kern/kern_event.c
84
static int kqueue_ioctl(struct file *fp, u_long com, caddr_t data,
sys/kern/kern_event.c
86
static int kqueue_kqfilter(struct file *fp, struct knote *kn);
sys/kern/kern_event.c
87
static int kqueue_stat(struct file *fp, struct stat *st,
sys/kern/kern_event.c
89
static int kqueue_close(struct file *fp);
sys/kern/kern_exec.c
200
kern_execve(struct nlookupdata *nd, struct file *fp, char fileflags,
sys/kern/kern_exec.c
274
nch = &fp->f_nchandle;
sys/kern/kern_exec.c
275
imgp->vp = fp->f_data;
sys/kern/kern_exec.c
355
if (fp && (fileflags & UF_EXCLOSE)) {
sys/kern/kern_exec.c
711
struct file *fp;
sys/kern/kern_exec.c
725
if ((error = holdvnode2(td, uap->fd, &fp, &fileflags)) != 0)
sys/kern/kern_exec.c
732
if ((fp->f_flag & FWRITE) != 0 || (fp->f_flag & FREAD) == 0) {
sys/kern/kern_exec.c
747
error = kern_execve(NULL, fp, fileflags, &args);
sys/kern/kern_exec.c
765
fdrop(fp);
sys/kern/kern_fp.c
133
struct file *fp;
sys/kern/kern_fp.c
187
fp = *fpp;
sys/kern/kern_fp.c
188
fp->f_ops = &badfileops; /* open failed, don't close */
sys/kern/kern_fp.c
189
fp->f_data = NULL;
sys/kern/kern_fp.c
190
fdrop(fp);
sys/kern/kern_fp.c
204
fp_pread(file_t fp, void *buf, size_t nbytes, off_t offset, ssize_t *res,
sys/kern/kern_fp.c
228
error = fo_read(fp, &auio, fp->f_cred, O_FOFFSET);
sys/kern/kern_fp.c
243
fp_read(file_t fp, void *buf, size_t nbytes, ssize_t *res, int all,
sys/kern/kern_fp.c
273
error = fo_read(fp, &auio, fp->f_cred, 0);
sys/kern/kern_fp.c
301
fp_pwrite(file_t fp, void *buf, size_t nbytes, off_t offset, ssize_t *res,
sys/kern/kern_fp.c
325
error = fo_write(fp, &auio, fp->f_cred, O_FOFFSET);
sys/kern/kern_fp.c
341
fp_write(file_t fp, void *buf, size_t nbytes, ssize_t *res, enum uio_seg seg)
sys/kern/kern_fp.c
364
error = fo_write(fp, &auio, fp->f_cred, 0);
sys/kern/kern_fp.c
379
fp_stat(file_t fp, struct stat *ub)
sys/kern/kern_fp.c
383
error = fo_stat(fp, ub, fp->f_cred);
sys/kern/kern_fp.c
393
fp_mmap(void *addr_arg, size_t size, int prot, int flags, struct file *fp,
sys/kern/kern_fp.c
459
if (fp->f_type != DTYPE_VNODE)
sys/kern/kern_fp.c
470
if (fp->f_flag & FPOSIXSHM)
sys/kern/kern_fp.c
472
vp = (struct vnode *) fp->f_data;
sys/kern/kern_fp.c
513
if (fp->f_flag & FREAD) {
sys/kern/kern_fp.c
530
if ((fp->f_flag & FWRITE) != 0) {
sys/kern/kern_fp.c
532
if ((error = VOP_GETATTR_FP(vp, &va, fp))) {
sys/kern/kern_fp.c
551
maxprot, flags, handle, pos, fp);
sys/kern/kern_fp.c
559
fp_close(file_t fp)
sys/kern/kern_fp.c
561
return(fdrop(fp));
sys/kern/kern_fp.c
565
fp_shutdown(file_t fp, int how)
sys/kern/kern_fp.c
567
return(fo_shutdown(fp, how));
sys/kern/subr_diskiocom.c
111
struct file *fp;
sys/kern/subr_diskiocom.c
118
fp = holdfp(curthread, recl->fd, -1);
sys/kern/subr_diskiocom.c
119
if (fp) {
sys/kern/subr_diskiocom.c
120
error = disk_iocom_reconnect(dp, fp);
sys/kern/subr_diskiocom.c
134
disk_iocom_reconnect(struct disk *dp, struct file *fp)
sys/kern/subr_diskiocom.c
141
kdmsg_iocom_reconnect(&dp->d_iocom, fp, devname);
sys/kern/subr_diskiocom.c
77
static int disk_iocom_reconnect(struct disk *dp, struct file *fp);
sys/kern/subr_firmware.c
149
struct priv_fw *fp = NULL;
sys/kern/subr_firmware.c
157
fp = &firmware_table[i];
sys/kern/subr_firmware.c
158
if (fp->fw.name != NULL && strcasecmp(name, fp->fw.name) == 0)
sys/kern/subr_firmware.c
160
else if (!FW_INUSE(fp))
sys/kern/subr_firmware.c
161
*empty_slot = fp;
sys/kern/subr_firmware.c
163
return (i < FIRMWARE_MAX ) ? fp : NULL;
sys/kern/subr_firmware.c
219
struct priv_fw *fp;
sys/kern/subr_firmware.c
223
fp = lookup(imagename, NULL);
sys/kern/subr_firmware.c
224
if (fp == NULL) {
sys/kern/subr_firmware.c
232
} else if (fp->refcnt != 0) { /* cannot unregister */
sys/kern/subr_firmware.c
235
linker_file_t x = fp->file; /* save value */
sys/kern/subr_firmware.c
237
if (fp->parent != NULL) /* release parent reference */
sys/kern/subr_firmware.c
238
fp->parent->refcnt--;
sys/kern/subr_firmware.c
244
bzero(fp, sizeof(struct priv_fw));
sys/kern/subr_firmware.c
245
fp->file = x;
sys/kern/subr_firmware.c
259
struct priv_fw *fp;
sys/kern/subr_firmware.c
282
fp = lookup(imagename, NULL);
sys/kern/subr_firmware.c
283
if (fp == NULL || fp->file != NULL) {
sys/kern/subr_firmware.c
285
if (fp == NULL)
sys/kern/subr_firmware.c
291
fp->file = result; /* record the module identity */
sys/kern/subr_firmware.c
308
struct priv_fw *fp;
sys/kern/subr_firmware.c
311
fp = lookup(imagename, NULL);
sys/kern/subr_firmware.c
312
if (fp != NULL)
sys/kern/subr_firmware.c
338
fp = lookup(imagename, NULL);
sys/kern/subr_firmware.c
339
if (fp == NULL) {
sys/kern/subr_firmware.c
344
fp->refcnt++;
sys/kern/subr_firmware.c
346
return &fp->fw;
sys/kern/subr_firmware.c
361
struct priv_fw *fp = PRIV_FW(p);
sys/kern/subr_firmware.c
364
fp->refcnt--;
sys/kern/subr_firmware.c
365
if (fp->refcnt == 0) {
sys/kern/subr_firmware.c
367
fp->flags |= FW_UNLOAD;
sys/kern/subr_firmware.c
368
if (fp->file)
sys/kern/subr_firmware.c
439
struct priv_fw *fp;
sys/kern/subr_firmware.c
442
fp = &firmware_table[i % FIRMWARE_MAX];
sys/kern/subr_firmware.c
443
if (fp->fw.name == NULL || fp->file == NULL ||
sys/kern/subr_firmware.c
444
fp->refcnt != 0 || (fp->flags & FW_UNLOAD) == 0)
sys/kern/subr_firmware.c
457
fp->flags &= ~FW_UNLOAD; /* do not try again */
sys/kern/subr_firmware.c
460
err = linker_release_module(NULL, NULL, fp->file);
sys/kern/subr_firmware.c
472
fp->file = NULL;
sys/kern/subr_firmware.c
483
struct priv_fw *fp;
sys/kern/subr_firmware.c
510
fp = &firmware_table[i];
sys/kern/subr_firmware.c
511
fp->flags |= FW_UNLOAD;
sys/kern/subr_firmware.c
518
fp = &firmware_table[i];
sys/kern/subr_firmware.c
519
if (fp->fw.name != NULL) {
sys/kern/subr_firmware.c
521
__func__, fp->fw.name,
sys/kern/subr_firmware.c
522
fp->refcnt, i);
sys/kern/sys_generic.c
1693
struct file *fp;
sys/kern/sys_generic.c
1699
if ((error = falloc(td->td_lwp, &fp, &fd)) != 0)
sys/kern/sys_generic.c
1702
fp->f_type = DTYPE_SOCKET;
sys/kern/sys_generic.c
1703
fp->f_flag = FREAD | FWRITE;
sys/kern/sys_generic.c
1704
fp->f_ops = &socketops;
sys/kern/sys_generic.c
1705
fp->f_data = so;
sys/kern/sys_generic.c
1706
fsetfd(td->td_lwp->lwp_proc->p_fd, fp, fd);
sys/kern/sys_generic.c
1714
fdrop(fp);
sys/kern/sys_generic.c
1724
fp->f_ops = &badfileops;
sys/kern/sys_generic.c
1725
fdrop(fp);
sys/kern/sys_generic.c
255
struct file *fp;
sys/kern/sys_generic.c
258
fp = holdfp(td, fd, FREAD);
sys/kern/sys_generic.c
259
if (fp == NULL)
sys/kern/sys_generic.c
261
if (flags & O_FOFFSET && fp->f_type != DTYPE_VNODE) {
sys/kern/sys_generic.c
264
error = dofileread(fd, fp, auio, flags, res);
sys/kern/sys_generic.c
266
dropfp(td, fd, fp);
sys/kern/sys_generic.c
278
dofileread(int fd, struct file *fp, struct uio *auio, int flags, size_t *res)
sys/kern/sys_generic.c
301
error = fo_read(fp, auio, fp->f_cred, flags);
sys/kern/sys_generic.c
459
struct file *fp;
sys/kern/sys_generic.c
462
fp = holdfp(td, fd, FWRITE);
sys/kern/sys_generic.c
463
if (fp == NULL)
sys/kern/sys_generic.c
465
else if ((flags & O_FOFFSET) && fp->f_type != DTYPE_VNODE) {
sys/kern/sys_generic.c
468
error = dofilewrite(fd, fp, auio, flags, res);
sys/kern/sys_generic.c
470
dropfp(td, fd, fp);
sys/kern/sys_generic.c
482
dofilewrite(int fd, struct file *fp, struct uio *auio, int flags, size_t *res)
sys/kern/sys_generic.c
506
error = fo_write(fp, auio, fp->f_cred, flags);
sys/kern/sys_generic.c
512
if (error == EPIPE && fp->f_type != DTYPE_SOCKET)
sys/kern/sys_generic.c
565
struct file *fp;
sys/kern/sys_generic.c
582
fp = holdfp(td, fd, FREAD|FWRITE);
sys/kern/sys_generic.c
583
if (fp == NULL)
sys/kern/sys_generic.c
702
atomic_set_int(&fp->f_flag, FNONBLOCK);
sys/kern/sys_generic.c
704
atomic_clear_int(&fp->f_flag, FNONBLOCK);
sys/kern/sys_generic.c
710
atomic_set_int(&fp->f_flag, FASYNC);
sys/kern/sys_generic.c
712
atomic_clear_int(&fp->f_flag, FASYNC);
sys/kern/sys_generic.c
713
error = fo_ioctl(fp, FIOASYNC, (caddr_t)&tmp, cred, msg);
sys/kern/sys_generic.c
722
error = iomc->wrapfunc(fp, com, ocom, data, cred);
sys/kern/sys_generic.c
724
error = fo_ioctl(fp, com, data, cred, msg);
sys/kern/sys_generic.c
736
dropfp(td, fd, fp);
sys/kern/sys_mqueue.c
1010
file_t *fp = NULL;
sys/kern/sys_mqueue.c
1016
error = mqueue_get(curthread->td_lwp, uap->mqdes, &fp);
sys/kern/sys_mqueue.c
1019
mq = fp->f_data;
sys/kern/sys_mqueue.c
1022
fdrop(fp);
sys/kern/sys_mqueue.c
1035
file_t *fp = NULL;
sys/kern/sys_mqueue.c
1046
error = mqueue_get(curthread->td_lwp, uap->mqdes, &fp);
sys/kern/sys_mqueue.c
1049
mq = fp->f_data;
sys/kern/sys_mqueue.c
1063
fdrop(fp);
sys/kern/sys_mqueue.c
182
file_t *fp;
sys/kern/sys_mqueue.c
184
fp = holdfp(curthread, (int)mqd, -1); /* XXX: Why -1 ? */
sys/kern/sys_mqueue.c
185
if (__predict_false(fp == NULL))
sys/kern/sys_mqueue.c
188
if (__predict_false(fp->f_type != DTYPE_MQUEUE)) {
sys/kern/sys_mqueue.c
189
fdrop(fp);
sys/kern/sys_mqueue.c
192
mq = fp->f_data;
sys/kern/sys_mqueue.c
195
*fpr = fp;
sys/kern/sys_mqueue.c
262
mq_stat_fop(file_t *fp, struct stat *st, struct ucred *cred)
sys/kern/sys_mqueue.c
264
struct mqueue *mq = fp->f_data;
sys/kern/sys_mqueue.c
275
st->st_uid = fp->f_cred->cr_uid;
sys/kern/sys_mqueue.c
276
st->st_gid = fp->f_cred->cr_svgid;
sys/kern/sys_mqueue.c
288
mq_kqfilter_fop(struct file *fp, struct knote *kn)
sys/kern/sys_mqueue.c
290
struct mqueue *mq = fp->f_data;
sys/kern/sys_mqueue.c
374
mq_close_fop(file_t *fp)
sys/kern/sys_mqueue.c
377
struct mqueue *mq = fp->f_data;
sys/kern/sys_mqueue.c
427
file_t *fp;
sys/kern/sys_mqueue.c
517
error = falloc(td->td_lwp, &fp, &mqd);
sys/kern/sys_mqueue.c
524
fp->f_type = DTYPE_MQUEUE;
sys/kern/sys_mqueue.c
525
fp->f_flag = FFLAGS(oflag) & (FREAD | FWRITE);
sys/kern/sys_mqueue.c
526
fp->f_ops = &mqops;
sys/kern/sys_mqueue.c
552
if (fp->f_flag & FREAD) {
sys/kern/sys_mqueue.c
555
if (fp->f_flag & FWRITE) {
sys/kern/sys_mqueue.c
570
fp->f_ops = &badfileops;
sys/kern/sys_mqueue.c
571
fdrop(fp);
sys/kern/sys_mqueue.c
594
fp->f_data = mq;
sys/kern/sys_mqueue.c
603
fp->f_ops = &badfileops;
sys/kern/sys_mqueue.c
605
fsetfd(fdp, fp, mqd);
sys/kern/sys_mqueue.c
608
fdrop(fp);
sys/kern/sys_mqueue.c
627
file_t *fp = NULL;
sys/kern/sys_mqueue.c
635
error = mqueue_get(l, mqdes, &fp);
sys/kern/sys_mqueue.c
639
mq = fp->f_data;
sys/kern/sys_mqueue.c
640
if ((fp->f_flag & FREAD) == 0) {
sys/kern/sys_mqueue.c
709
fdrop(fp);
sys/kern/sys_mqueue.c
786
file_t *fp = NULL;
sys/kern/sys_mqueue.c
818
error = mqueue_get(l, mqdes, &fp);
sys/kern/sys_mqueue.c
823
mq = fp->f_data;
sys/kern/sys_mqueue.c
824
if ((fp->f_flag & FWRITE) == 0) {
sys/kern/sys_mqueue.c
87
static int mq_kqfilter_fop(struct file *fp, struct knote *kn);
sys/kern/sys_mqueue.c
897
fdrop(fp);
sys/kern/sys_mqueue.c
902
fdrop(fp);
sys/kern/sys_mqueue.c
909
fdrop(fp);
sys/kern/sys_mqueue.c
962
file_t *fp = NULL;
sys/kern/sys_mqueue.c
978
error = mqueue_get(curthread->td_lwp, uap->mqdes, &fp);
sys/kern/sys_mqueue.c
981
mq = fp->f_data;
sys/kern/sys_mqueue.c
998
fdrop(fp);
sys/kern/sys_pipe.c
1000
pipe = (struct pipe *)((intptr_t)fp->f_data & ~(intptr_t)1);
sys/kern/sys_pipe.c
1001
if ((intptr_t)fp->f_data & 1) {
sys/kern/sys_pipe.c
1054
pipe_stat(struct file *fp, struct stat *ub, struct ucred *cred)
sys/kern/sys_pipe.c
1059
pipe = (struct pipe *)((intptr_t)fp->f_data & ~(intptr_t)1);
sys/kern/sys_pipe.c
1060
if ((intptr_t)fp->f_data & 1) {
sys/kern/sys_pipe.c
1074
ub->st_uid = fp->f_cred->cr_uid;
sys/kern/sys_pipe.c
1075
ub->st_gid = fp->f_cred->cr_gid;
sys/kern/sys_pipe.c
1087
pipe_close(struct file *fp)
sys/kern/sys_pipe.c
1093
pipe = (struct pipe *)((intptr_t)fp->f_data & ~(intptr_t)1);
sys/kern/sys_pipe.c
1094
if ((intptr_t)fp->f_data & 1) {
sys/kern/sys_pipe.c
1102
fp->f_ops = &badfileops;
sys/kern/sys_pipe.c
1103
fp->f_data = NULL;
sys/kern/sys_pipe.c
1114
pipe_shutdown(struct file *fp, int how)
sys/kern/sys_pipe.c
1121
pipe = (struct pipe *)((intptr_t)fp->f_data & ~(intptr_t)1);
sys/kern/sys_pipe.c
1122
if ((intptr_t)fp->f_data & 1) {
sys/kern/sys_pipe.c
1291
pipe_kqfilter(struct file *fp, struct knote *kn)
sys/kern/sys_pipe.c
1297
pipe = (struct pipe *)((intptr_t)fp->f_data & ~(intptr_t)1);
sys/kern/sys_pipe.c
1298
if ((intptr_t)fp->f_data & 1) {
sys/kern/sys_pipe.c
454
pipe_read(struct file *fp, struct uio *uio, struct ucred *cred, int fflags)
sys/kern/sys_pipe.c
469
pipe = (struct pipe *)((intptr_t)fp->f_data & ~(intptr_t)1);
sys/kern/sys_pipe.c
470
if ((intptr_t)fp->f_data & 1) {
sys/kern/sys_pipe.c
489
else if (fp->f_flag & O_NONBLOCK)
sys/kern/sys_pipe.c
701
pipe_write(struct file *fp, struct uio *uio, struct ucred *cred, int fflags)
sys/kern/sys_pipe.c
715
pipe = (struct pipe *)((intptr_t)fp->f_data & ~(intptr_t)1);
sys/kern/sys_pipe.c
716
if ((intptr_t)fp->f_data & 1) {
sys/kern/sys_pipe.c
731
else if (fp->f_flag & O_NONBLOCK)
sys/kern/sys_pipe.c
78
static int pipe_read (struct file *fp, struct uio *uio,
sys/kern/sys_pipe.c
80
static int pipe_write (struct file *fp, struct uio *uio,
sys/kern/sys_pipe.c
82
static int pipe_close (struct file *fp);
sys/kern/sys_pipe.c
83
static int pipe_shutdown (struct file *fp, int how);
sys/kern/sys_pipe.c
84
static int pipe_kqfilter (struct file *fp, struct knote *kn);
sys/kern/sys_pipe.c
85
static int pipe_stat (struct file *fp, struct stat *sb, struct ucred *cred);
sys/kern/sys_pipe.c
86
static int pipe_ioctl (struct file *fp, u_long cmd, caddr_t data,
sys/kern/sys_pipe.c
993
pipe_ioctl(struct file *fp, u_long cmd, caddr_t data,
sys/kern/sys_socket.c
104
so = (struct socket *)fp->f_data;
sys/kern/sys_socket.c
110
else if (fp->f_flag & FNONBLOCK)
sys/kern/sys_socket.c
128
soo_ioctl(struct file *fp, u_long cmd, caddr_t data,
sys/kern/sys_socket.c
134
so = (struct socket *)fp->f_data;
sys/kern/sys_socket.c
196
soo_stat(struct file *fp, struct stat *ub, struct ucred *cred)
sys/kern/sys_socket.c
203
so = (struct socket *)fp->f_data;
sys/kern/sys_socket.c
227
soo_close(struct file *fp)
sys/kern/sys_socket.c
231
fp->f_ops = &badfileops;
sys/kern/sys_socket.c
232
if (fp->f_data)
sys/kern/sys_socket.c
233
error = soclose((struct socket *)fp->f_data, fp->f_flag);
sys/kern/sys_socket.c
236
fp->f_data = NULL;
sys/kern/sys_socket.c
244
soo_shutdown(struct file *fp, int how)
sys/kern/sys_socket.c
248
if (fp->f_data)
sys/kern/sys_socket.c
249
error = soshutdown((struct socket *)fp->f_data, how);
sys/kern/sys_socket.c
71
soo_read(struct file *fp, struct uio *uio, struct ucred *cred, int fflags)
sys/kern/sys_socket.c
79
so = (struct socket *)fp->f_data;
sys/kern/sys_socket.c
85
else if (fp->f_flag & FNONBLOCK)
sys/kern/sys_socket.c
98
soo_write(struct file *fp, struct uio *uio, struct ucred *cred, int fflags)
sys/kern/uipc_socket.c
2550
sokqfilter(struct file *fp, struct knote *kn)
sys/kern/uipc_syscalls.c
1025
dropfp(td, s, fp);
sys/kern/uipc_syscalls.c
119
error = falloc(td->td_lwp, &fp, &fd);
sys/kern/uipc_syscalls.c
1216
struct file *fp;
sys/kern/uipc_syscalls.c
1226
error = holdsock(td, s, &fp);
sys/kern/uipc_syscalls.c
1230
error = sosetopt((struct socket *)fp->f_data, sopt);
sys/kern/uipc_syscalls.c
1231
dropfp(td, s, fp);
sys/kern/uipc_syscalls.c
126
fp->f_type = DTYPE_SOCKET;
sys/kern/uipc_syscalls.c
127
fp->f_flag = FREAD | FWRITE | fflags;
sys/kern/uipc_syscalls.c
1279
struct file *fp;
sys/kern/uipc_syscalls.c
128
fp->f_ops = &socketops;
sys/kern/uipc_syscalls.c
1287
error = holdsock(td, s, &fp);
sys/kern/uipc_syscalls.c
129
fp->f_data = so;
sys/kern/uipc_syscalls.c
1291
error = sogetopt((struct socket *)fp->f_data, sopt);
sys/kern/uipc_syscalls.c
1292
dropfp(td, s, fp);
sys/kern/uipc_syscalls.c
135
fsetfd(fdp, fp, fd);
sys/kern/uipc_syscalls.c
1366
struct file *fp;
sys/kern/uipc_syscalls.c
137
fdrop(fp);
sys/kern/uipc_syscalls.c
1371
error = holdsock(td, s, &fp);
sys/kern/uipc_syscalls.c
1375
fdrop(fp);
sys/kern/uipc_syscalls.c
1378
so = (struct socket *)fp->f_data;
sys/kern/uipc_syscalls.c
1388
dropfp(td, s, fp);
sys/kern/uipc_syscalls.c
1451
struct file *fp;
sys/kern/uipc_syscalls.c
1456
error = holdsock(td, s, &fp);
sys/kern/uipc_syscalls.c
1460
fdrop(fp);
sys/kern/uipc_syscalls.c
1463
so = (struct socket *)fp->f_data;
sys/kern/uipc_syscalls.c
1465
fdrop(fp);
sys/kern/uipc_syscalls.c
1477
dropfp(td, s, fp);
sys/kern/uipc_syscalls.c
1585
struct file *fp;
sys/kern/uipc_syscalls.c
159
struct file *fp;
sys/kern/uipc_syscalls.c
1601
fp = holdfp(td, uap->fd, FREAD);
sys/kern/uipc_syscalls.c
1602
if (fp == NULL) {
sys/kern/uipc_syscalls.c
1605
if (fp->f_type != DTYPE_VNODE) {
sys/kern/uipc_syscalls.c
1606
fdrop(fp);
sys/kern/uipc_syscalls.c
1609
vp = (struct vnode *)fp->f_data;
sys/kern/uipc_syscalls.c
1611
dropfp(td, uap->fd, fp);
sys/kern/uipc_syscalls.c
162
error = holdsock(td, s, &fp);
sys/kern/uipc_syscalls.c
165
error = sobind((struct socket *)fp->f_data, sa, td);
sys/kern/uipc_syscalls.c
166
dropfp(td, s, fp);
sys/kern/uipc_syscalls.c
1691
struct file *fp;
sys/kern/uipc_syscalls.c
1707
error = holdsock(td, sfd, &fp);
sys/kern/uipc_syscalls.c
1710
so = (struct socket *)fp->f_data;
sys/kern/uipc_syscalls.c
1784
if ((fp->f_flag & FNONBLOCK) && space <= 0) {
sys/kern/uipc_syscalls.c
1835
td->td_ucred, fp);
sys/kern/uipc_syscalls.c
1917
if (fp->f_flag & FNONBLOCK) {
sys/kern/uipc_syscalls.c
1968
dropfp(td, sfd, fp);
sys/kern/uipc_syscalls.c
199
struct file *fp;
sys/kern/uipc_syscalls.c
202
error = holdsock(td, s, &fp);
sys/kern/uipc_syscalls.c
205
error = solisten((struct socket *)fp->f_data, backlog, td);
sys/kern/uipc_syscalls.c
206
dropfp(td, s, fp);
sys/kern/uipc_syscalls.c
574
struct file *fp;
sys/kern/uipc_syscalls.c
578
error = holdsock(td, s, &fp);
sys/kern/uipc_syscalls.c
581
so = (struct socket *)fp->f_data;
sys/kern/uipc_syscalls.c
588
fflags = fp->f_flag;
sys/kern/uipc_syscalls.c
625
dropfp(td, s, fp);
sys/kern/uipc_syscalls.c
790
struct file *fp;
sys/kern/uipc_syscalls.c
799
error = holdsock(td, s, &fp);
sys/kern/uipc_syscalls.c
812
so = (struct socket *)fp->f_data;
sys/kern/uipc_syscalls.c
814
if (fp->f_flag & FNONBLOCK)
sys/kern/uipc_syscalls.c
838
dropfp(td, s, fp);
sys/kern/uipc_syscalls.c
971
struct file *fp;
sys/kern/uipc_syscalls.c
981
error = holdsock(td, s, &fp);
sys/kern/uipc_syscalls.c
99
struct file *fp;
sys/kern/uipc_syscalls.c
994
so = (struct socket *)fp->f_data;
sys/kern/uipc_syscalls.c
997
if (fp->f_flag & FNONBLOCK) {
sys/kern/uipc_usrreq.c
119
struct file *fp;
sys/kern/uipc_usrreq.c
1552
struct file *fp;
sys/kern/uipc_usrreq.c
1565
fp = *rp;
sys/kern/uipc_usrreq.c
1571
unp_discard(fp, NULL);
sys/kern/uipc_usrreq.c
1617
fp = rp[i];
sys/kern/uipc_usrreq.c
1618
unp_fp_externalize(lp, fp, f, flags);
sys/kern/uipc_usrreq.c
1636
unp_fp_externalize(struct lwp *lp, struct file *fp, int fd, int flags)
sys/kern/uipc_usrreq.c
1642
if (fp->f_flag & FREVOKED) {
sys/kern/uipc_usrreq.c
1663
fsetfd(fdp, fp, fd);
sys/kern/uipc_usrreq.c
1666
unp_del_right(fp);
sys/kern/uipc_usrreq.c
1667
fdrop(fp);
sys/kern/uipc_usrreq.c
167
static void unp_fp_externalize(struct lwp *lp, struct file *fp, int fd,
sys/kern/uipc_usrreq.c
1708
struct file *fp;
sys/kern/uipc_usrreq.c
1795
fdescp->fd_files[fd].fp == NULL) {
sys/kern/uipc_usrreq.c
1799
if (fdescp->fd_files[fd].fp->f_type == DTYPE_KQUEUE) {
sys/kern/uipc_usrreq.c
1821
fp = fdescp->fd_files[*fdp--].fp;
sys/kern/uipc_usrreq.c
1822
*rp-- = fp;
sys/kern/uipc_usrreq.c
1823
fhold(fp);
sys/kern/uipc_usrreq.c
1824
unp_add_right(fp);
sys/kern/uipc_usrreq.c
1948
unp_gc_checkrefs(struct file *fp, void *data)
sys/kern/uipc_usrreq.c
1952
if (fp->f_count == 0)
sys/kern/uipc_usrreq.c
1963
if (fp->f_count == fp->f_msgcount && !(fp->f_flag & FMARK)) {
sys/kern/uipc_usrreq.c
1964
info->extra_ref[info->index++] = fp;
sys/kern/uipc_usrreq.c
1965
fhold(fp);
sys/kern/uipc_usrreq.c
1974
unp_gc_clearmarks(struct file *fp, void *data __unused)
sys/kern/uipc_usrreq.c
1976
atomic_clear_int(&fp->f_flag, FMARK | FDEFER);
sys/kern/uipc_usrreq.c
1984
unp_gc_checkmarks(struct file *fp, void *data)
sys/kern/uipc_usrreq.c
1994
if (fp->f_count == 0) {
sys/kern/uipc_usrreq.c
1995
if (fp->f_flag & FDEFER)
sys/kern/uipc_usrreq.c
1996
atomic_clear_int(&fp->f_flag, FDEFER);
sys/kern/uipc_usrreq.c
2004
if (fp->f_flag & FDEFER) {
sys/kern/uipc_usrreq.c
2005
atomic_clear_int(&fp->f_flag, FDEFER);
sys/kern/uipc_usrreq.c
2011
if (fp->f_flag & FMARK)
sys/kern/uipc_usrreq.c
2018
if (fp->f_count == fp->f_msgcount)
sys/kern/uipc_usrreq.c
2024
atomic_set_int(&fp->f_flag, FMARK);
sys/kern/uipc_usrreq.c
2032
if (fp->f_type != DTYPE_SOCKET ||
sys/kern/uipc_usrreq.c
2033
(so = (struct socket *)fp->f_data) == NULL) {
sys/kern/uipc_usrreq.c
2050
info->locked_fp = fp;
sys/kern/uipc_usrreq.c
2055
atomic_set_int(&fp->f_flag, FDEFER);
sys/kern/uipc_usrreq.c
2065
unp_mark(struct file *fp, void *data)
sys/kern/uipc_usrreq.c
2069
if ((fp->f_flag & FMARK) == 0) {
sys/kern/uipc_usrreq.c
2071
atomic_set_int(&fp->f_flag, FMARK | FDEFER);
sys/kern/uipc_usrreq.c
2072
} else if (fp->f_flag & FDEFER) {
sys/kern/uipc_usrreq.c
2086
unp_accessable(struct file *fp, void *data __unused)
sys/kern/uipc_usrreq.c
2090
if ((unp = unp_fp2unpcb(fp)) == NULL)
sys/kern/uipc_usrreq.c
2102
struct file *fp;
sys/kern/uipc_usrreq.c
2107
fp = unp->unp_fp;
sys/kern/uipc_usrreq.c
2114
if ((unp->unp_gcflags & UNPGC_REF) == 0 && fp &&
sys/kern/uipc_usrreq.c
2115
unp->unp_msgcount != 0 && fp->f_count == unp->unp_msgcount) {
sys/kern/uipc_usrreq.c
2259
struct file *fp;
sys/kern/uipc_usrreq.c
2265
fp = unp->unp_fp;
sys/kern/uipc_usrreq.c
2266
if (unp->unp_msgcount == 0 || fp == NULL ||
sys/kern/uipc_usrreq.c
2267
fp->f_count != unp->unp_msgcount)
sys/kern/uipc_usrreq.c
2269
fhold(fp);
sys/kern/uipc_usrreq.c
2274
unref[fileidx++] = fp;
sys/kern/uipc_usrreq.c
2372
unp_discard(struct file *fp, void *data __unused)
sys/kern/uipc_usrreq.c
2374
unp_del_right(fp);
sys/kern/uipc_usrreq.c
2375
if (unp_fp2unpcb(fp) != NULL) {
sys/kern/uipc_usrreq.c
2385
d->fp = fp;
sys/kern/uipc_usrreq.c
2394
fdrop(fp);
sys/kern/uipc_usrreq.c
2565
fdrop(d->fp);
sys/kern/uipc_usrreq.c
268
unp_fp2unpcb(struct file *fp)
sys/kern/uipc_usrreq.c
272
if (fp->f_type != DTYPE_SOCKET)
sys/kern/uipc_usrreq.c
275
so = fp->f_data;
sys/kern/uipc_usrreq.c
286
unp_add_right(struct file *fp)
sys/kern/uipc_usrreq.c
291
KASSERT(fp->f_count > 0, ("invalid f_count %d", fp->f_count));
sys/kern/uipc_usrreq.c
293
unp = unp_fp2unpcb(fp);
sys/kern/uipc_usrreq.c
295
unp->unp_fp = fp;
sys/kern/uipc_usrreq.c
298
fp->f_msgcount++;
sys/kern/uipc_usrreq.c
303
unp_del_right(struct file *fp)
sys/kern/uipc_usrreq.c
308
KASSERT(fp->f_count > 0, ("invalid f_count %d", fp->f_count));
sys/kern/uipc_usrreq.c
310
unp = unp_fp2unpcb(fp);
sys/kern/uipc_usrreq.c
318
fp->f_msgcount--;
sys/kern/vfs_default.c
1167
struct file *fp;
sys/kern/vfs_default.c
1170
fp = *ap->a_fpp;
sys/kern/vfs_default.c
1174
fp->f_type = DTYPE_FIFO;
sys/kern/vfs_default.c
1177
fp->f_type = DTYPE_VNODE;
sys/kern/vfs_default.c
1181
fp->f_flag = (fp->f_flag & ~FMASK) | (ap->a_mode & FMASK);
sys/kern/vfs_default.c
1182
fp->f_ops = &vnode_fileops;
sys/kern/vfs_default.c
1183
fp->f_data = vp;
sys/kern/vfs_jops.c
262
journal_install_vfs_journal(struct mount *mp, struct file *fp,
sys/kern/vfs_jops.c
304
jo->fp = fp;
sys/kern/vfs_jops.c
320
fhold(fp);
sys/kern/vfs_jops.c
337
journal_restart_vfs_journal(struct mount *mp, struct file *fp,
sys/kern/vfs_jops.c
348
error = journal_restart(mp, fp, jo, info->flags);
sys/kern/vfs_jops.c
355
journal_restart(struct mount *mp, struct file *fp,
sys/kern/vfs_jops.c
377
kprintf("RESTART WITH FP %p KILLING %p\n", fp, jo->fp);
sys/kern/vfs_jops.c
380
if (jo->fp)
sys/kern/vfs_jops.c
381
fdrop(jo->fp);
sys/kern/vfs_jops.c
387
fhold(fp);
sys/kern/vfs_jops.c
388
jo->fp = fp;
sys/kern/vfs_jops.c
445
if (jo->fp)
sys/kern/vfs_jops.c
446
fdrop(jo->fp);
sys/kern/vfs_jops.c
77
static int journal_install_vfs_journal(struct mount *mp, struct file *fp,
sys/kern/vfs_jops.c
79
static int journal_restart_vfs_journal(struct mount *mp, struct file *fp,
sys/kern/vfs_jops.c
83
static int journal_restart(struct mount *mp, struct file *fp,
sys/kern/vfs_journal.c
262
error = fp_write(jo->fp,
sys/kern/vfs_journal.c
290
fp_shutdown(jo->fp, SHUT_WR);
sys/kern/vfs_journal.c
330
error = fp_read(jo->fp, &ack, sizeof(ack), &count,
sys/kern/vfs_nlookup.c
203
struct file* fp;
sys/kern/vfs_nlookup.c
230
if ((error = holdvnode(td, fd, &fp)) != 0)
sys/kern/vfs_nlookup.c
232
vp = (struct vnode*)fp->f_data;
sys/kern/vfs_nlookup.c
233
if (vp->v_type != VDIR || fp->f_nchandle.ncp == NULL) {
sys/kern/vfs_nlookup.c
234
fdrop(fp);
sys/kern/vfs_nlookup.c
235
fp = NULL;
sys/kern/vfs_nlookup.c
239
nd->nl_basench = &fp->f_nchandle;
sys/kern/vfs_nlookup.c
240
*fpp = fp;
sys/kern/vfs_nlookup.c
408
nlookup_done_at(struct nlookupdata *nd, struct file *fp)
sys/kern/vfs_nlookup.c
411
if (fp != NULL)
sys/kern/vfs_nlookup.c
412
fdrop(fp);
sys/kern/vfs_syscalls.c
1270
struct file *fp;
sys/kern/vfs_syscalls.c
1318
fp = holdfp(td, uap->fd, -1);
sys/kern/vfs_syscalls.c
1319
if (fp == NULL) {
sys/kern/vfs_syscalls.c
1324
fp = NULL;
sys/kern/vfs_syscalls.c
1330
error = kern_mountctl(path, uap->op, fp, ctl, uap->ctllen,
sys/kern/vfs_syscalls.c
1332
if (fp)
sys/kern/vfs_syscalls.c
1333
dropfp(td, uap->fd, fp);
sys/kern/vfs_syscalls.c
1354
kern_mountctl(const char *path, int op, struct file *fp,
sys/kern/vfs_syscalls.c
1408
error = vop_mountctl(mp->mnt_vn_use_ops, vp, op, fp, ctl, ctllen,
sys/kern/vfs_syscalls.c
1480
struct file *fp;
sys/kern/vfs_syscalls.c
1487
if ((error = holdvnode(td, fd, &fp)) != 0)
sys/kern/vfs_syscalls.c
1495
if ((mp = fp->f_nchandle.mount) == NULL)
sys/kern/vfs_syscalls.c
1496
mp = ((struct vnode *)fp->f_data)->v_mount;
sys/kern/vfs_syscalls.c
1501
if (fp->f_cred == NULL) {
sys/kern/vfs_syscalls.c
1512
error = VFS_STATFS(mp, sp, fp->f_cred);
sys/kern/vfs_syscalls.c
1528
fdrop(fp);
sys/kern/vfs_syscalls.c
1598
struct file *fp;
sys/kern/vfs_syscalls.c
1603
if ((error = holdvnode(td, fd, &fp)) != 0)
sys/kern/vfs_syscalls.c
1605
if ((mp = fp->f_nchandle.mount) == NULL)
sys/kern/vfs_syscalls.c
1606
mp = ((struct vnode *)fp->f_data)->v_mount;
sys/kern/vfs_syscalls.c
1611
if (fp->f_cred == NULL) {
sys/kern/vfs_syscalls.c
1616
if ((error = VFS_STATVFS(mp, sp, fp->f_cred)) != 0)
sys/kern/vfs_syscalls.c
1628
fdrop(fp);
sys/kern/vfs_syscalls.c
1863
struct file *fp;
sys/kern/vfs_syscalls.c
1867
if ((error = holdvnode(td, uap->fd, &fp)) != 0)
sys/kern/vfs_syscalls.c
1870
vp = (struct vnode *)fp->f_data;
sys/kern/vfs_syscalls.c
1873
if (fp->f_nchandle.ncp == NULL)
sys/kern/vfs_syscalls.c
1881
cache_copy(&fp->f_nchandle, &nch);
sys/kern/vfs_syscalls.c
1917
fdrop(fp);
sys/kern/vfs_syscalls.c
1988
struct file *fp;
sys/kern/vfs_syscalls.c
1993
if ((error = holdvnode(td, fd, &fp)) != 0)
sys/kern/vfs_syscalls.c
1995
vp = (struct vnode *)fp->f_data;
sys/kern/vfs_syscalls.c
1997
fdrop(fp);
sys/kern/vfs_syscalls.c
2000
fdrop(fp);
sys/kern/vfs_syscalls.c
2172
struct file *fp;
sys/kern/vfs_syscalls.c
2182
fp = nfp;
sys/kern/vfs_syscalls.c
2213
nfp = fp;
sys/kern/vfs_syscalls.c
2215
fp = nfp;
sys/kern/vfs_syscalls.c
2222
fdrop(fp); /* our ref */
sys/kern/vfs_syscalls.c
2232
fdrop(fp);
sys/kern/vfs_syscalls.c
2240
if ((flags & (O_EXLOCK | O_SHLOCK)) && fp->f_type == DTYPE_VNODE) {
sys/kern/vfs_syscalls.c
2243
vp = (struct vnode *)fp->f_data;
sys/kern/vfs_syscalls.c
2258
error = VOP_ADVLOCK(vp, (caddr_t)fp, F_SETLK, &lf, type);
sys/kern/vfs_syscalls.c
2266
fdrop(fp);
sys/kern/vfs_syscalls.c
2269
atomic_set_int(&fp->f_flag, FHASLOCK); /* race ok */
sys/kern/vfs_syscalls.c
2281
fsetfd(fdp, fp, indx);
sys/kern/vfs_syscalls.c
2282
fdrop(fp);
sys/kern/vfs_syscalls.c
2317
struct file *fp;
sys/kern/vfs_syscalls.c
2319
error = nlookup_init_at(&nd, &fp, uap->fd, uap->path, UIO_USERSPACE, 0);
sys/kern/vfs_syscalls.c
2324
nlookup_done_at(&nd, fp);
sys/kern/vfs_syscalls.c
2431
struct file *fp;
sys/kern/vfs_syscalls.c
2434
error = nlookup_init_at(&nd, &fp, uap->fd, uap->path, UIO_USERSPACE, 0);
sys/kern/vfs_syscalls.c
2439
nlookup_done_at(&nd, fp);
sys/kern/vfs_syscalls.c
2502
struct file *fp;
sys/kern/vfs_syscalls.c
2505
error = nlookup_init_at(&nd, &fp, uap->fd, uap->path, UIO_USERSPACE, 0);
sys/kern/vfs_syscalls.c
2508
nlookup_done_at(&nd, fp);
sys/kern/vfs_syscalls.c
2748
struct file *fp;
sys/kern/vfs_syscalls.c
2756
error = nlookup_init_at(&nd, &fp, uap->fd, uap->path2,
sys/kern/vfs_syscalls.c
2762
nlookup_done_at(&nd, fp);
sys/kern/vfs_syscalls.c
2841
struct file *fp;
sys/kern/vfs_syscalls.c
2847
error = nlookup_init_at(&nd, &fp, uap->fd, uap->path, UIO_USERSPACE, 0);
sys/kern/vfs_syscalls.c
2854
nlookup_done_at(&nd, fp);
sys/kern/vfs_syscalls.c
2862
struct file *fp;
sys/kern/vfs_syscalls.c
2865
fp = holdfp(td, fd, -1);
sys/kern/vfs_syscalls.c
2866
if (fp == NULL)
sys/kern/vfs_syscalls.c
2869
error = fo_seek(fp, offset, whence, res);
sys/kern/vfs_syscalls.c
2870
dropfp(td, fd, fp);
sys/kern/vfs_syscalls.c
3000
struct file *fp;
sys/kern/vfs_syscalls.c
3003
error = nlookup_init_at(&nd, &fp, uap->fd, uap->path, UIO_USERSPACE,
sys/kern/vfs_syscalls.c
3007
nlookup_done_at(&nd, fp);
sys/kern/vfs_syscalls.c
3118
struct file *fp;
sys/kern/vfs_syscalls.c
3125
error = nlookup_init_at(&nd, &fp, uap->fd, uap->path,
sys/kern/vfs_syscalls.c
3132
nlookup_done_at(&nd, fp);
sys/kern/vfs_syscalls.c
3249
struct file *fp;
sys/kern/vfs_syscalls.c
3252
error = nlookup_init_at(&nd, &fp, uap->fd, uap->path, UIO_USERSPACE, 0);
sys/kern/vfs_syscalls.c
3257
nlookup_done_at(&nd, fp);
sys/kern/vfs_syscalls.c
3359
struct file *fp;
sys/kern/vfs_syscalls.c
3362
if ((error = holdvnode(td, uap->fd, &fp)) != 0)
sys/kern/vfs_syscalls.c
3364
if (fp->f_nchandle.ncp)
sys/kern/vfs_syscalls.c
3365
error = ncp_writechk(&fp->f_nchandle);
sys/kern/vfs_syscalls.c
3367
error = setfflags((struct vnode *) fp->f_data, uap->flags);
sys/kern/vfs_syscalls.c
3368
fdrop(fp);
sys/kern/vfs_syscalls.c
3381
struct file *fp;
sys/kern/vfs_syscalls.c
3391
error = nlookup_init_at(&nd, &fp, uap->fd, uap->path, UIO_USERSPACE, lookupflags);
sys/kern/vfs_syscalls.c
3398
nlookup_done_at(&nd, fp);
sys/kern/vfs_syscalls.c
3489
struct file *fp;
sys/kern/vfs_syscalls.c
3492
if ((error = holdvnode(td, uap->fd, &fp)) != 0)
sys/kern/vfs_syscalls.c
3494
if (fp->f_nchandle.ncp)
sys/kern/vfs_syscalls.c
3495
error = ncp_writechk(&fp->f_nchandle);
sys/kern/vfs_syscalls.c
3497
error = setfmode((struct vnode *)fp->f_data, uap->mode);
sys/kern/vfs_syscalls.c
3498
fdrop(fp);
sys/kern/vfs_syscalls.c
3511
struct file *fp;
sys/kern/vfs_syscalls.c
3519
error = nlookup_init_at(&nd, &fp, uap->fd, uap->path,
sys/kern/vfs_syscalls.c
3523
nlookup_done_at(&nd, fp);
sys/kern/vfs_syscalls.c
3629
struct file *fp;
sys/kern/vfs_syscalls.c
3632
if ((error = holdvnode(td, uap->fd, &fp)) != 0)
sys/kern/vfs_syscalls.c
3634
if (fp->f_nchandle.ncp)
sys/kern/vfs_syscalls.c
3635
error = ncp_writechk(&fp->f_nchandle);
sys/kern/vfs_syscalls.c
3638
(struct vnode *)fp->f_data, uap->uid, uap->gid);
sys/kern/vfs_syscalls.c
3639
fdrop(fp);
sys/kern/vfs_syscalls.c
3652
struct file *fp;
sys/kern/vfs_syscalls.c
3660
error = nlookup_init_at(&nd, &fp, uap->fd, uap->path,
sys/kern/vfs_syscalls.c
3664
nlookup_done_at(&nd, fp);
sys/kern/vfs_syscalls.c
3819
struct file *fp;
sys/kern/vfs_syscalls.c
3829
if ((error = holdvnode(td, fd, &fp)) != 0)
sys/kern/vfs_syscalls.c
3831
if (fp->f_nchandle.ncp)
sys/kern/vfs_syscalls.c
3832
error = ncp_writechk(&fp->f_nchandle);
sys/kern/vfs_syscalls.c
3834
vp = fp->f_data;
sys/kern/vfs_syscalls.c
3837
error = VOP_GETATTR_FP(vp, &vattr, fp);
sys/kern/vfs_syscalls.c
3848
fp->f_cred);
sys/kern/vfs_syscalls.c
3856
fdrop(fp);
sys/kern/vfs_syscalls.c
3924
struct file *fp;
sys/kern/vfs_syscalls.c
3936
error = nlookup_init_at(&nd, &fp, uap->fd, uap->path,
sys/kern/vfs_syscalls.c
3940
nlookup_done_at(&nd, fp);
sys/kern/vfs_syscalls.c
3989
struct file *fp;
sys/kern/vfs_syscalls.c
4000
error = nlookup_init_at(&nd, &fp, uap->fd, uap->path,
sys/kern/vfs_syscalls.c
4004
nlookup_done_at(&nd, fp);
sys/kern/vfs_syscalls.c
4079
struct file *fp;
sys/kern/vfs_syscalls.c
4088
if ((error = holdvnode(td, fd, &fp)) != 0)
sys/kern/vfs_syscalls.c
4090
if (fp->f_nchandle.ncp) {
sys/kern/vfs_syscalls.c
4091
error = ncp_writechk(&fp->f_nchandle);
sys/kern/vfs_syscalls.c
4095
if ((fp->f_flag & FWRITE) == 0) {
sys/kern/vfs_syscalls.c
4099
if (fp->f_flag & FAPPENDONLY) { /* inode was set s/uapnd */
sys/kern/vfs_syscalls.c
4103
vp = (struct vnode *)fp->f_data;
sys/kern/vfs_syscalls.c
4112
error = VOP_GETATTR_FP(vp, &vattr, fp);
sys/kern/vfs_syscalls.c
4122
error = VOP_SETATTR_FP(vp, &vattr, fp->f_cred, fp);
sys/kern/vfs_syscalls.c
4128
fdrop(fp);
sys/kern/vfs_syscalls.c
4152
struct file *fp;
sys/kern/vfs_syscalls.c
4156
if ((error = holdvnode(td, fd, &fp)) != 0)
sys/kern/vfs_syscalls.c
4158
vp = (struct vnode *)fp->f_data;
sys/kern/vfs_syscalls.c
4167
VOP_FSYNC_FP(vp, MNT_WAIT, VOP_FSYNC_SYSCALL, fp) :
sys/kern/vfs_syscalls.c
4168
VOP_FDATASYNC_FP(vp, MNT_WAIT, VOP_FSYNC_SYSCALL, fp);
sys/kern/vfs_syscalls.c
4172
fdrop(fp);
sys/kern/vfs_syscalls.c
4560
struct file *fp;
sys/kern/vfs_syscalls.c
4563
error = nlookup_init_at(&nd, &fp, uap->fd, uap->path, UIO_USERSPACE, 0);
sys/kern/vfs_syscalls.c
4566
nlookup_done_at(&nd, fp);
sys/kern/vfs_syscalls.c
4619
struct file *fp;
sys/kern/vfs_syscalls.c
4625
if ((error = holdvnode(td, fd, &fp)) != 0)
sys/kern/vfs_syscalls.c
4627
if ((fp->f_flag & FREAD) == 0) {
sys/kern/vfs_syscalls.c
4631
vp = (struct vnode *)fp->f_data;
sys/kern/vfs_syscalls.c
4644
loff = auio.uio_offset = fp->f_offset;
sys/kern/vfs_syscalls.c
4645
error = VOP_READDIR_FP(vp, &auio, fp->f_cred, &eofflag, NULL, NULL, fp);
sys/kern/vfs_syscalls.c
4646
fp->f_offset = auio.uio_offset;
sys/kern/vfs_syscalls.c
4660
fdrop(fp);
sys/kern/vfs_syscalls.c
4826
struct file *fp;
sys/kern/vfs_syscalls.c
4915
fp = nfp;
sys/kern/vfs_syscalls.c
4923
fp->f_ops = &badfileops;
sys/kern/vfs_syscalls.c
4924
fp->f_data = NULL;
sys/kern/vfs_syscalls.c
4956
if ((error = VOP_ADVLOCK(vp, (caddr_t)fp, F_SETLK,
sys/kern/vfs_syscalls.c
4962
fdrop(fp);
sys/kern/vfs_syscalls.c
4967
atomic_set_int(&fp->f_flag, FHASLOCK); /* race ok */
sys/kern/vfs_syscalls.c
4979
fsetfd(fdp, fp, indx);
sys/kern/vfs_syscalls.c
4980
fdrop(fp);
sys/kern/vfs_syscalls.c
4988
fdrop(fp);
sys/kern/vfs_syscalls.c
5478
struct file *fp;
sys/kern/vfs_syscalls.c
5487
fp = holdfp(td, fd, -1);
sys/kern/vfs_syscalls.c
5488
if (fp == NULL)
sys/kern/vfs_syscalls.c
5491
switch (fp->f_type) {
sys/kern/vfs_syscalls.c
5503
if ((fp->f_flag & FWRITE) == 0) {
sys/kern/vfs_syscalls.c
5508
vp = fp->f_data;
sys/kern/vfs_syscalls.c
5518
dropfp(td, fd, fp);
sys/kern/vfs_syscalls.c
731
struct file *fp;
sys/kern/vfs_syscalls.c
748
fp = fdp->fd_files[n].fp;
sys/kern/vfs_syscalls.c
749
if (fp && fp->f_nchandle.mount == mp) {
sys/kern/vfs_vnops.c
1001
size -= vn_poll_fpf_offset(fp);
sys/kern/vfs_vnops.c
1029
error = VOP_IOCTL(vp, com, data, fp->f_flag, ucred, msg);
sys/kern/vfs_vnops.c
110
struct file *fp = fpp ? *fpp : NULL;
sys/kern/vfs_vnops.c
1184
vn_closefile(struct file *fp)
sys/kern/vfs_vnops.c
1188
fp->f_ops = &badfileops;
sys/kern/vfs_vnops.c
1189
error = vn_close(((struct vnode *)fp->f_data), fp->f_flag, fp);
sys/kern/vfs_vnops.c
1197
vn_kqfilter(struct file *fp, struct knote *kn)
sys/kern/vfs_vnops.c
1201
error = VOP_KQFILTER(((struct vnode *)fp->f_data), kn);
sys/kern/vfs_vnops.c
1279
vn_seek(struct file *fp, off_t offset, int whence, off_t *res)
sys/kern/vfs_vnops.c
1290
vp = (struct vnode *)fp->f_data;
sys/kern/vfs_vnops.c
1294
spin_lock(&fp->f_spin);
sys/kern/vfs_vnops.c
1295
new_offset = fp->f_offset + offset;
sys/kern/vfs_vnops.c
1300
spin_lock(&fp->f_spin);
sys/kern/vfs_vnops.c
1306
spin_lock(&fp->f_spin);
sys/kern/vfs_vnops.c
1309
error = fo_ioctl(fp, FIOSEEKDATA, (caddr_t)&offset,
sys/kern/vfs_vnops.c
1314
spin_lock(&fp->f_spin);
sys/kern/vfs_vnops.c
1317
error = fo_ioctl(fp, FIOSEEKHOLE, (caddr_t)&offset,
sys/kern/vfs_vnops.c
1322
spin_lock(&fp->f_spin);
sys/kern/vfs_vnops.c
1327
spin_lock(&fp->f_spin);
sys/kern/vfs_vnops.c
1345
fp->f_offset = new_offset;
sys/kern/vfs_vnops.c
1348
*res = fp->f_offset;
sys/kern/vfs_vnops.c
1349
spin_unlock(&fp->f_spin);
sys/kern/vfs_vnops.c
319
error = VOP_SETATTR_FP(vp, vap, cred, fp);
sys/kern/vfs_vnops.c
353
if (fp) {
sys/kern/vfs_vnops.c
356
fp->f_nchandle = nd->nl_nch;
sys/kern/vfs_vnops.c
358
cache_unlock(&fp->f_nchandle);
sys/kern/vfs_vnops.c
376
fp = fpp ? *fpp : NULL;
sys/kern/vfs_vnops.c
384
if (fp) {
sys/kern/vfs_vnops.c
385
fp->f_data = NULL;
sys/kern/vfs_vnops.c
386
fp->f_ops = &badfileops;
sys/kern/vfs_vnops.c
405
if (fp == NULL) {
sys/kern/vfs_vnops.c
493
vn_close(struct vnode *vp, int flags, struct file *fp)
sys/kern/vfs_vnops.c
499
error = VOP_CLOSE(vp, flags, fp);
sys/kern/vfs_vnops.c
513
sequential_heuristic(struct uio *uio, struct file *fp)
sys/kern/vfs_vnops.c
520
if ((uio->uio_offset == 0 && fp->f_seqcount > 0) ||
sys/kern/vfs_vnops.c
521
uio->uio_offset == fp->f_nextoff) {
sys/kern/vfs_vnops.c
522
int tmpseq = fp->f_seqcount;
sys/kern/vfs_vnops.c
527
fp->f_seqcount = tmpseq;
sys/kern/vfs_vnops.c
528
return(fp->f_seqcount << IO_SEQSHIFT);
sys/kern/vfs_vnops.c
536
if (fp->f_seqcount > 1)
sys/kern/vfs_vnops.c
537
fp->f_seqcount = 1;
sys/kern/vfs_vnops.c
539
fp->f_seqcount = 0;
sys/kern/vfs_vnops.c
554
vn_get_fpf_offset(struct file *fp)
sys/kern/vfs_vnops.c
562
flags = fp->f_flag & ~FOFFSETLOCK;
sys/kern/vfs_vnops.c
563
if (atomic_cmpset_int(&fp->f_flag, flags, flags | FOFFSETLOCK))
sys/kern/vfs_vnops.c
564
return(fp->f_offset);
sys/kern/vfs_vnops.c
570
flags = fp->f_flag;
sys/kern/vfs_vnops.c
573
tsleep_interlock(&fp->f_flag, 0);
sys/kern/vfs_vnops.c
574
if (atomic_cmpset_int(&fp->f_flag, flags, nflags))
sys/kern/vfs_vnops.c
575
tsleep(&fp->f_flag, PINTERLOCKED, "fpoff", 0);
sys/kern/vfs_vnops.c
578
if (atomic_cmpset_int(&fp->f_flag, flags, nflags))
sys/kern/vfs_vnops.c
582
return(fp->f_offset);
sys/kern/vfs_vnops.c
589
vn_set_fpf_offset(struct file *fp, off_t offset)
sys/kern/vfs_vnops.c
597
fp->f_offset = offset;
sys/kern/vfs_vnops.c
603
flags = fp->f_flag;
sys/kern/vfs_vnops.c
605
if (atomic_cmpset_int(&fp->f_flag, flags, nflags)) {
sys/kern/vfs_vnops.c
607
wakeup(&fp->f_flag);
sys/kern/vfs_vnops.c
617
vn_poll_fpf_offset(struct file *fp)
sys/kern/vfs_vnops.c
620
return(fp->f_offset);
sys/kern/vfs_vnops.c
622
off_t off = vn_get_fpf_offset(fp);
sys/kern/vfs_vnops.c
623
vn_set_fpf_offset(fp, off);
sys/kern/vfs_vnops.c
66
static int vn_closefile (struct file *fp);
sys/kern/vfs_vnops.c
67
static int vn_ioctl (struct file *fp, u_long com, caddr_t data,
sys/kern/vfs_vnops.c
69
static int vn_read (struct file *fp, struct uio *uio,
sys/kern/vfs_vnops.c
71
static int vn_kqfilter (struct file *fp, struct knote *kn);
sys/kern/vfs_vnops.c
72
static int vn_statfile (struct file *fp, struct stat *sb, struct ucred *cred);
sys/kern/vfs_vnops.c
729
vn_read(struct file *fp, struct uio *uio, struct ucred *cred, int flags)
sys/kern/vfs_vnops.c
73
static int vn_write (struct file *fp, struct uio *uio,
sys/kern/vfs_vnops.c
736
vp = (struct vnode *)fp->f_data;
sys/kern/vfs_vnops.c
743
} else if (fp->f_flag & FNONBLOCK) {
sys/kern/vfs_vnops.c
746
if (fp->f_flag & O_DIRECT) {
sys/kern/vfs_vnops.c
75
static int vn_seek (struct file *fp, off_t offset, int whence, off_t *res);
sys/kern/vfs_vnops.c
750
uio->uio_offset = vn_get_fpf_offset(fp);
sys/kern/vfs_vnops.c
752
ioflag |= sequential_heuristic(uio, fp);
sys/kern/vfs_vnops.c
754
error = VOP_READ_FP(vp, uio, ioflag, cred, fp);
sys/kern/vfs_vnops.c
755
fp->f_nextoff = uio->uio_offset;
sys/kern/vfs_vnops.c
758
vn_set_fpf_offset(fp, uio->uio_offset);
sys/kern/vfs_vnops.c
766
vn_write(struct file *fp, struct uio *uio, struct ucred *cred, int flags)
sys/kern/vfs_vnops.c
773
vp = (struct vnode *)fp->f_data;
sys/kern/vfs_vnops.c
777
((fp->f_flag & O_APPEND) || (flags & O_FAPPEND))) {
sys/kern/vfs_vnops.c
785
} else if (fp->f_flag & FNONBLOCK) {
sys/kern/vfs_vnops.c
788
if (fp->f_flag & O_DIRECT) {
sys/kern/vfs_vnops.c
795
} else if (fp->f_flag & O_FSYNC) {
sys/kern/vfs_vnops.c
802
uio->uio_offset = vn_get_fpf_offset(fp);
sys/kern/vfs_vnops.c
806
ioflag |= sequential_heuristic(uio, fp);
sys/kern/vfs_vnops.c
807
error = VOP_WRITE_FP(vp, uio, ioflag, cred, fp);
sys/kern/vfs_vnops.c
808
fp->f_nextoff = uio->uio_offset;
sys/kern/vfs_vnops.c
811
vn_set_fpf_offset(fp, uio->uio_offset);
sys/kern/vfs_vnops.c
819
vn_statfile(struct file *fp, struct stat *sb, struct ucred *cred)
sys/kern/vfs_vnops.c
824
vp = (struct vnode *)fp->f_data;
sys/kern/vfs_vnops.c
983
vn_ioctl(struct file *fp, u_long com, caddr_t data, struct ucred *ucred,
sys/kern/vfs_vnops.c
986
struct vnode *vp = ((struct vnode *)fp->f_data);
sys/kern/vfs_vopops.c
1293
vop_mountctl(struct vop_ops *ops, struct vnode *vp, int op, struct file *fp,
sys/kern/vfs_vopops.c
1304
ap.a_fp = fp;
sys/kern/vfs_vopops.c
305
vop_close(struct vop_ops *ops, struct vnode *vp, int fflag, struct file *fp)
sys/kern/vfs_vopops.c
314
ap.a_fp = fp;
sys/kern/vfs_vopops.c
354
struct file *fp)
sys/kern/vfs_vopops.c
364
ap.a_fp = fp;
sys/kern/vfs_vopops.c
401
struct ucred *cred, struct file *fp)
sys/kern/vfs_vopops.c
412
ap.a_fp = fp;
sys/kern/vfs_vopops.c
426
struct ucred *cred, struct file *fp)
sys/kern/vfs_vopops.c
438
ap.a_fp = fp;
sys/kern/vfs_vopops.c
452
struct ucred *cred, struct file *fp)
sys/kern/vfs_vopops.c
468
ap.a_fp = fp;
sys/kern/vfs_vopops.c
604
struct file *fp)
sys/kern/vfs_vopops.c
615
ap.a_fp = fp;
sys/kern/vfs_vopops.c
629
struct file *fp)
sys/kern/vfs_vopops.c
640
ap.a_fp = fp;
sys/kern/vfs_vopops.c
807
struct file *fp)
sys/kern/vfs_vopops.c
821
ap.a_fp = fp;
sys/net/altq/altq_rmclass.c
1693
struct rmc_funcs *fp;
sys/net/altq/altq_rmclass.c
1695
for (fp = rmc_funcs; fp->func != NULL; fp++) {
sys/net/altq/altq_rmclass.c
1696
if (fp->func == func)
sys/net/altq/altq_rmclass.c
1697
return (fp->name);
sys/net/bpf.c
1045
bpf_setf(struct bpf_d *d, struct bpf_program *fp, u_long cmd)
sys/net/bpf.c
1057
if (fp->bf_insns == NULL) {
sys/net/bpf.c
1058
if (fp->bf_len != 0)
sys/net/bpf.c
1069
flen = fp->bf_len;
sys/net/bpf.c
1073
size = flen * sizeof *fp->bf_insns;
sys/net/bpf.c
1075
if (copyin(fp->bf_insns, fcode, size) == 0 &&
sys/net/pf/pf_osfp.c
116
struct pf_os_fingerprint fp, *fpresult;
sys/net/pf/pf_osfp.c
132
memset(&fp, 0, sizeof(fp));
sys/net/pf/pf_osfp.c
139
fp.fp_psize = ntohs(ip->ip_len);
sys/net/pf/pf_osfp.c
140
fp.fp_ttl = ip->ip_ttl;
sys/net/pf/pf_osfp.c
142
fp.fp_flags |= PF_OSFP_DF;
sys/net/pf/pf_osfp.c
162
fp.fp_psize = sizeof(struct ip6_hdr) + ntohs(ip6->ip6_plen);
sys/net/pf/pf_osfp.c
163
fp.fp_ttl = ip6->ip6_hlim;
sys/net/pf/pf_osfp.c
164
fp.fp_flags |= PF_OSFP_DF;
sys/net/pf/pf_osfp.c
165
fp.fp_flags |= PF_OSFP_INET6;
sys/net/pf/pf_osfp.c
181
fp.fp_wsize = ntohs(tcp->th_win);
sys/net/pf/pf_osfp.c
190
fp.fp_optcnt++;
sys/net/pf/pf_osfp.c
192
fp.fp_tcpopts = (fp.fp_tcpopts << PF_OSFP_TCPOPT_BITS) |
sys/net/pf/pf_osfp.c
204
memcpy(&fp.fp_mss, &optp[2],
sys/net/pf/pf_osfp.c
205
sizeof(fp.fp_mss));
sys/net/pf/pf_osfp.c
206
fp.fp_tcpopts = (fp.fp_tcpopts <<
sys/net/pf/pf_osfp.c
208
fp.fp_mss = ntohs(fp.fp_mss);
sys/net/pf/pf_osfp.c
212
memcpy(&fp.fp_wscale, &optp[2],
sys/net/pf/pf_osfp.c
213
sizeof(fp.fp_wscale));
sys/net/pf/pf_osfp.c
214
fp.fp_tcpopts = (fp.fp_tcpopts <<
sys/net/pf/pf_osfp.c
219
fp.fp_tcpopts = (fp.fp_tcpopts <<
sys/net/pf/pf_osfp.c
227
fp.fp_flags |= PF_OSFP_TS0;
sys/net/pf/pf_osfp.c
230
fp.fp_tcpopts = (fp.fp_tcpopts <<
sys/net/pf/pf_osfp.c
243
fp.fp_wsize, fp.fp_ttl, (fp.fp_flags & PF_OSFP_DF) != 0,
sys/net/pf/pf_osfp.c
244
fp.fp_psize, (long long int)fp.fp_tcpopts, fp.fp_optcnt,
sys/net/pf/pf_osfp.c
245
(fp.fp_flags & PF_OSFP_TS0) ? "0" : "",
sys/net/pf/pf_osfp.c
246
(fp.fp_flags & PF_OSFP_MSS_MOD) ? "%" :
sys/net/pf/pf_osfp.c
247
(fp.fp_flags & PF_OSFP_MSS_DC) ? "*" : "",
sys/net/pf/pf_osfp.c
248
fp.fp_mss,
sys/net/pf/pf_osfp.c
249
(fp.fp_flags & PF_OSFP_WSCALE_MOD) ? "%" :
sys/net/pf/pf_osfp.c
250
(fp.fp_flags & PF_OSFP_WSCALE_DC) ? "*" : "",
sys/net/pf/pf_osfp.c
251
fp.fp_wscale);
sys/net/pf/pf_osfp.c
253
if ((fpresult = pf_osfp_find(&pf_osfp_list, &fp,
sys/net/pf/pf_osfp.c
300
struct pf_os_fingerprint *fp;
sys/net/pf/pf_osfp.c
303
while ((fp = SLIST_FIRST(&pf_osfp_list))) {
sys/net/pf/pf_osfp.c
305
while ((entry = SLIST_FIRST(&fp->fp_oses))) {
sys/net/pf/pf_osfp.c
306
SLIST_REMOVE_HEAD(&fp->fp_oses, fp_entry);
sys/net/pf/pf_osfp.c
309
kfree(fp, M_PFOSFPPL);
sys/net/pf/pf_osfp.c
318
struct pf_os_fingerprint *fp, fpadd;
sys/net/pf/pf_osfp.c
357
if ((fp = pf_osfp_find_exact(&pf_osfp_list, &fpadd))) {
sys/net/pf/pf_osfp.c
358
SLIST_FOREACH(entry, &fp->fp_oses, fp_entry) {
sys/net/pf/pf_osfp.c
366
if ((fp = kmalloc(sizeof(struct pf_os_fingerprint),
sys/net/pf/pf_osfp.c
369
memset(fp, 0, sizeof(*fp));
sys/net/pf/pf_osfp.c
370
fp->fp_tcpopts = fpioc->fp_tcpopts;
sys/net/pf/pf_osfp.c
371
fp->fp_wsize = fpioc->fp_wsize;
sys/net/pf/pf_osfp.c
372
fp->fp_psize = fpioc->fp_psize;
sys/net/pf/pf_osfp.c
373
fp->fp_mss = fpioc->fp_mss;
sys/net/pf/pf_osfp.c
374
fp->fp_flags = fpioc->fp_flags;
sys/net/pf/pf_osfp.c
375
fp->fp_optcnt = fpioc->fp_optcnt;
sys/net/pf/pf_osfp.c
376
fp->fp_wscale = fpioc->fp_wscale;
sys/net/pf/pf_osfp.c
377
fp->fp_ttl = fpioc->fp_ttl;
sys/net/pf/pf_osfp.c
378
SLIST_INIT(&fp->fp_oses);
sys/net/pf/pf_osfp.c
381
kfree(fp, M_PFOSFPPL);
sys/net/pf/pf_osfp.c
384
pf_osfp_insert(&pf_osfp_list, fp);
sys/net/pf/pf_osfp.c
393
SLIST_INSERT_HEAD(&fp->fp_oses, entry, fp_entry);
sys/net/pf/pf_osfp.c
396
if ((fp = pf_osfp_validate()))
sys/net/pf/pf_osfp.c
518
struct pf_os_fingerprint *fp;
sys/net/pf/pf_osfp.c
525
SLIST_FOREACH(fp, &pf_osfp_list, fp_next) {
sys/net/pf/pf_osfp.c
526
SLIST_FOREACH(entry, &fp->fp_oses, fp_entry) {
sys/net/pf/pf_osfp.c
528
fpioc->fp_mss = fp->fp_mss;
sys/net/pf/pf_osfp.c
529
fpioc->fp_wsize = fp->fp_wsize;
sys/net/pf/pf_osfp.c
530
fpioc->fp_flags = fp->fp_flags;
sys/net/pf/pf_osfp.c
531
fpioc->fp_psize = fp->fp_psize;
sys/net/pf/pf_osfp.c
532
fpioc->fp_ttl = fp->fp_ttl;
sys/net/pf/pf_osfp.c
533
fpioc->fp_wscale = fp->fp_wscale;
sys/netgraph/socket/ng_socket.c
590
struct file *fp;
sys/netgraph/socket/ng_socket.c
612
|| (fp = fdp->fd_files[fd].fp) == NULL) {
sys/netgraph/socket/ng_socket.c
619
switch (fp->f_type) {
sys/netgraph/socket/ng_socket.c
621
vn = (struct vnode *) fp->f_data;
sys/netgraph/socket/ng_socket.c
624
fhold(fp);
sys/netgraph7/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c
269
struct usb_fifo *f = sc->sc_fifo.fp[USB_FIFO_TX];
sys/netgraph7/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c
303
struct usb_fifo *fifo = sc->sc_fifo.fp[USB_FIFO_RX];
sys/netgraph7/socket/ng_socket.c
698
struct file *fp;
sys/netgraph7/socket/ng_socket.c
719
if ((error = fget(td, fd, &fp)) != 0)
sys/netgraph7/socket/ng_socket.c
725
switch (fp->f_type) {
sys/netgraph7/socket/ng_socket.c
727
vn = fp->f_data;
sys/netgraph7/socket/ng_socket.c
730
fhold(fp);
sys/netgraph7/socket/ng_socket.c
734
fdrop(fp, td);
sys/netgraph7/socket/ng_socket.c
740
fdrop(fp, td);
sys/netgraph7/socket/ng_socket.c
744
fdrop(fp, td);
sys/netinet/ip_input.c
1004
TAILQ_FOREACH(fp, head, ipq_list) {
sys/netinet/ip_input.c
1005
if (ip->ip_id == fp->ipq_id &&
sys/netinet/ip_input.c
1006
ip->ip_src.s_addr == fp->ipq_src.s_addr &&
sys/netinet/ip_input.c
1007
ip->ip_dst.s_addr == fp->ipq_dst.s_addr &&
sys/netinet/ip_input.c
1008
ip->ip_p == fp->ipq_p)
sys/netinet/ip_input.c
1014
fp = NULL;
sys/netinet/ip_input.c
1094
if (fp == NULL) {
sys/netinet/ip_input.c
1095
if ((fp = mpipe_alloc_nowait(&ipq_mpipe)) == NULL)
sys/netinet/ip_input.c
1097
TAILQ_INSERT_HEAD(head, fp, ipq_list);
sys/netinet/ip_input.c
1099
fp->ipq_nfrags = 1;
sys/netinet/ip_input.c
1100
fp->ipq_ttl = IPFRAGTTL;
sys/netinet/ip_input.c
1101
fp->ipq_p = ip->ip_p;
sys/netinet/ip_input.c
1102
fp->ipq_id = ip->ip_id;
sys/netinet/ip_input.c
1103
fp->ipq_src = ip->ip_src;
sys/netinet/ip_input.c
1104
fp->ipq_dst = ip->ip_dst;
sys/netinet/ip_input.c
1105
fp->ipq_frags = m;
sys/netinet/ip_input.c
1109
fp->ipq_nfrags++;
sys/netinet/ip_input.c
1118
for (p = NULL, q = fp->ipq_frags; q; p = q, q = q->m_nextpkt) {
sys/netinet/ip_input.c
1179
m->m_nextpkt = fp->ipq_frags;
sys/netinet/ip_input.c
1180
fp->ipq_frags = m;
sys/netinet/ip_input.c
1214
fp->ipq_nfrags--;
sys/netinet/ip_input.c
1233
for (p = NULL, q = fp->ipq_frags; q; p = q, q = q->m_nextpkt) {
sys/netinet/ip_input.c
1242
if (fp->ipq_nfrags > maxfragsperpacket) {
sys/netinet/ip_input.c
1243
ipstat.ips_fragdropped += fp->ipq_nfrags;
sys/netinet/ip_input.c
1244
ip_freef(fragq, head, fp);
sys/netinet/ip_input.c
1252
if (fp->ipq_nfrags > maxfragsperpacket) {
sys/netinet/ip_input.c
1253
ipstat.ips_fragdropped += fp->ipq_nfrags;
sys/netinet/ip_input.c
1254
ip_freef(fragq, head, fp);
sys/netinet/ip_input.c
1262
q = fp->ipq_frags;
sys/netinet/ip_input.c
1267
ipstat.ips_fragdropped += fp->ipq_nfrags;
sys/netinet/ip_input.c
1268
ip_freef(fragq, head, fp);
sys/netinet/ip_input.c
1308
ip->ip_src = fp->ipq_src;
sys/netinet/ip_input.c
1309
ip->ip_dst = fp->ipq_dst;
sys/netinet/ip_input.c
1311
TAILQ_REMOVE(head, fp, ipq_list);
sys/netinet/ip_input.c
1313
mpipe_free(&ipq_mpipe, fp);
sys/netinet/ip_input.c
1341
if (fp != NULL)
sys/netinet/ip_input.c
1342
fp->ipq_nfrags--;
sys/netinet/ip_input.c
1355
ip_freef(struct ipfrag_queue *fragq, struct ipqhead *fhp, struct ipq *fp)
sys/netinet/ip_input.c
1362
TAILQ_REMOVE(fhp, fp, ipq_list);
sys/netinet/ip_input.c
1367
while (fp->ipq_frags) {
sys/netinet/ip_input.c
1368
q = fp->ipq_frags;
sys/netinet/ip_input.c
1369
fp->ipq_frags = q->m_nextpkt;
sys/netinet/ip_input.c
1373
mpipe_free(&ipq_mpipe, fp);
sys/netinet/ip_input.c
1384
struct ipq *fp, *fp_temp;
sys/netinet/ip_input.c
1397
TAILQ_FOREACH_MUTABLE(fp, head, ipq_list, fp_temp) {
sys/netinet/ip_input.c
1398
if (--fp->ipq_ttl == 0) {
sys/netinet/ip_input.c
1399
ipstat.ips_fragtimeout += fp->ipq_nfrags;
sys/netinet/ip_input.c
1400
ip_freef(fragq, head, fp);
sys/netinet/ip_input.c
983
struct ipq *fp = NULL;
sys/netproto/smb/smb_dev.c
382
struct file *fp;
sys/netproto/smb/smb_dev.c
391
fp = holdfp_fdp(scred->scr_td->td_proc->p_fd, fd, FREAD|FWRITE);
sys/netproto/smb/smb_dev.c
392
if (fp == NULL)
sys/netproto/smb/smb_dev.c
395
vp = (struct vnode*)fp->f_data;
sys/netproto/smb/smb_dev.c
415
fdrop(fp);
sys/platform/pc64/x86_64/db_trace.c
163
db_numargs(struct x86_64_frame *fp)
sys/platform/pc64/x86_64/db_trace.c
173
argp = (int *)db_get_value((int)&fp->f_retaddr, 4, FALSE);
sys/platform/pc64/x86_64/db_trace.c
219
db_nextframe(struct x86_64_frame **fp, db_addr_t *ip)
sys/platform/pc64/x86_64/db_trace.c
227
if ((unsigned long)*fp < PAGE_SIZE) {
sys/platform/pc64/x86_64/db_trace.c
228
*fp = NULL;
sys/platform/pc64/x86_64/db_trace.c
231
rip = db_get_value((long) &(*fp)->f_retaddr, 8, FALSE);
sys/platform/pc64/x86_64/db_trace.c
232
rbp = db_get_value((long) &(*fp)->f_frame, 8, FALSE);
sys/platform/pc64/x86_64/db_trace.c
258
*fp = (struct x86_64_frame *) rbp;
sys/platform/pc64/x86_64/db_trace.c
268
tf = (struct trapframe *)((long)*fp + 16);
sys/platform/pc64/x86_64/db_trace.c
295
tf = (struct trapframe *)((long)*fp + 16);
sys/platform/pc64/x86_64/db_trace.c
309
*fp = (struct x86_64_frame *) rbp;
sys/platform/vkernel64/x86_64/db_trace.c
164
db_numargs(struct x86_64_frame *fp)
sys/platform/vkernel64/x86_64/db_trace.c
174
argp = (int *)db_get_value((int)&fp->f_retaddr, 4, FALSE);
sys/platform/vkernel64/x86_64/db_trace.c
219
db_nextframe(struct x86_64_frame **fp, db_addr_t *ip)
sys/platform/vkernel64/x86_64/db_trace.c
227
if ((unsigned long)*fp < PAGE_SIZE) {
sys/platform/vkernel64/x86_64/db_trace.c
228
*fp = NULL;
sys/platform/vkernel64/x86_64/db_trace.c
231
rip = db_get_value((long) &(*fp)->f_retaddr, 8, FALSE);
sys/platform/vkernel64/x86_64/db_trace.c
232
rbp = db_get_value((long) &(*fp)->f_frame, 8, FALSE);
sys/platform/vkernel64/x86_64/db_trace.c
258
*fp = (struct x86_64_frame *) rbp;
sys/platform/vkernel64/x86_64/db_trace.c
268
tf = (struct trapframe *)((long)*fp + 16);
sys/platform/vkernel64/x86_64/db_trace.c
295
tf = (struct trapframe *)((long)*fp + 16);
sys/platform/vkernel64/x86_64/db_trace.c
309
*fp = (struct x86_64_frame *) rbp;
sys/sys/devfs.h
447
int devfs_get_cdevpriv(struct file *fp, void **datap);
sys/sys/devfs.h
448
int devfs_set_cdevpriv(struct file *fp, void *priv, d_priv_dtor_t *dtr);
sys/sys/devfs.h
449
void devfs_clear_cdevpriv(struct file *fp);
sys/sys/device.h
339
int dev_dclose(cdev_t dev, int fflag, int devtype, struct file *fp);
sys/sys/device.h
343
int fflag, struct ucred *cred, struct sysmsg *msg, struct file *fp);
sys/sys/device.h
347
int dev_dread(cdev_t dev, struct uio *uio, int ioflag, struct file *fp);
sys/sys/device.h
348
int dev_dwrite(cdev_t dev, struct uio *uio, int ioflag, struct file *fp);
sys/sys/device.h
349
int dev_dkqfilter(cdev_t dev, struct knote *kn, struct file *fp);
sys/sys/device.h
350
int64_t dev_dmmap(cdev_t dev, vm_offset_t offset, int nprot, struct file *fp);
sys/sys/device.h
352
struct vm_object **object, int nprot, struct file *fp);
sys/sys/dmsg.h
851
void kdmsg_iocom_reconnect(kdmsg_iocom_t *iocom, struct file *fp,
sys/sys/file.h
167
int badfo_readwrite(struct file *fp, struct uio *uio,
sys/sys/file.h
169
int badfo_ioctl(struct file *fp, u_long com, caddr_t data,
sys/sys/file.h
171
int badfo_kqfilter(struct file *fp, struct knote *kn);
sys/sys/file.h
172
int badfo_stat(struct file *fp, struct stat *sb, struct ucred *cred);
sys/sys/file.h
173
int badfo_close(struct file *fp);
sys/sys/file.h
174
int badfo_shutdown(struct file *fp, int how);
sys/sys/file.h
175
int badfo_seek(struct file *fp, off_t offset, int whence, off_t *res);
sys/sys/file.h
77
int (*fo_read) (struct file *fp, struct uio *uio,
sys/sys/file.h
79
int (*fo_write) (struct file *fp, struct uio *uio,
sys/sys/file.h
81
int (*fo_ioctl) (struct file *fp, u_long com, caddr_t data,
sys/sys/file.h
83
int (*fo_kqfilter)(struct file *fp, struct knote *kn);
sys/sys/file.h
84
int (*fo_stat) (struct file *fp, struct stat *sb,
sys/sys/file.h
86
int (*fo_close) (struct file *fp);
sys/sys/file.h
87
int (*fo_shutdown)(struct file *fp, int how);
sys/sys/file.h
88
int (*fo_seek) (struct file *fp, off_t offset, int whence, off_t *res);
sys/sys/file2.h
101
fo_close(struct file *fp)
sys/sys/file2.h
103
return ((*fp->f_ops->fo_close)(fp));
sys/sys/file2.h
107
fo_shutdown(struct file *fp, int how)
sys/sys/file2.h
109
return ((*fp->f_ops->fo_shutdown)(fp, how));
sys/sys/file2.h
113
fo_kqfilter(struct file *fp, struct knote *kn)
sys/sys/file2.h
115
return ((*fp->f_ops->fo_kqfilter)(fp, kn));
sys/sys/file2.h
119
fo_seek(struct file *fp, off_t offset, int whence, off_t *res)
sys/sys/file2.h
121
return ((*fp->f_ops->fo_seek)(fp, offset, whence, res));
sys/sys/file2.h
45
struct file *fp,
sys/sys/file2.h
52
fhold(fp);
sys/sys/file2.h
53
error = (*fp->f_ops->fo_read)(fp, uio, cred, flags);
sys/sys/file2.h
54
fdrop(fp);
sys/sys/file2.h
60
struct file *fp,
sys/sys/file2.h
67
fhold(fp);
sys/sys/file2.h
68
error = (*fp->f_ops->fo_write)(fp, uio, cred, flags);
sys/sys/file2.h
69
fdrop(fp);
sys/sys/file2.h
75
struct file *fp,
sys/sys/file2.h
83
fhold(fp);
sys/sys/file2.h
84
error = (*fp->f_ops->fo_ioctl)(fp, com, data, cred, msg);
sys/sys/file2.h
85
fdrop(fp);
sys/sys/file2.h
90
fo_stat(struct file *fp, struct stat *sb, struct ucred *cred)
sys/sys/file2.h
94
fhold(fp);
sys/sys/file2.h
95
error = (*fp->f_ops->fo_stat)(fp, sb, cred);
sys/sys/file2.h
96
fdrop(fp);
sys/sys/filedesc.h
167
void fsetfd (struct filedesc *fdp, struct file *fp, int fd);
sys/sys/filedesc.h
172
void fsetcred (struct file *fp, struct ucred *cr);
sys/sys/filedesc.h
179
int closef (struct file *fp, struct proc *p);
sys/sys/filedesc.h
189
void dropfp(struct thread *td, int fd, struct file *fp);
sys/sys/filedesc.h
72
struct file *fp;
sys/sys/imgact_elf.h
95
int generic_elf_coredump (struct lwp *lp, int sig, struct file *fp,
sys/sys/kern_syscall.h
151
int kern_mountctl(const char *path, int op, struct file *fp,
sys/sys/kern_syscall.h
76
int kern_execve(struct nlookupdata *nd, struct file *fp, char fileflags,
sys/sys/mountctl.h
168
struct file *fp;
sys/sys/socketvar.h
399
int soo_read (struct file *fp, struct uio *uio, struct ucred *cred,
sys/sys/socketvar.h
401
int soo_write (struct file *fp, struct uio *uio, struct ucred *cred,
sys/sys/socketvar.h
403
int soo_close (struct file *fp);
sys/sys/socketvar.h
404
int soo_shutdown (struct file *fp, int how);
sys/sys/socketvar.h
405
int soo_ioctl (struct file *fp, u_long cmd, caddr_t data,
sys/sys/socketvar.h
407
int soo_stat (struct file *fp, struct stat *ub, struct ucred *cred);
sys/sys/socketvar.h
408
int sokqfilter (struct file *fp, struct knote *kn);
sys/sys/thread.h
265
struct file *fp; /* cached referenced fp */
sys/sys/vfsops.h
1038
#define VOP_CLOSE(vp, fflag, fp) \
sys/sys/vfsops.h
1039
vop_close(*(vp)->v_ops, vp, fflag, fp)
sys/sys/vfsops.h
1046
#define VOP_GETATTR_FP(vp, vap, fp) \
sys/sys/vfsops.h
1047
vop_getattr(*(vp)->v_ops, vp, vap, fp) /* FUSE */
sys/sys/vfsops.h
1052
#define VOP_SETATTR_FP(vp, vap, cred, fp) \
sys/sys/vfsops.h
1053
vop_setattr(*(vp)->v_ops, vp, vap, cred, fp) /* FUSE */
sys/sys/vfsops.h
1056
#define VOP_READ_FP(vp, uio, ioflag, cred, fp) \
sys/sys/vfsops.h
1057
vop_read(*(vp)->v_ops, vp, uio, ioflag, cred, fp) /* FUSE */
sys/sys/vfsops.h
1060
#define VOP_WRITE_FP(vp, uio, ioflag, cred, fp) \
sys/sys/vfsops.h
1061
vop_write(*(vp)->v_ops, vp, uio, ioflag, cred, fp) /* FUSE */
sys/sys/vfsops.h
1072
#define VOP_FSYNC_FP(vp, waitfor, flags, fp) \
sys/sys/vfsops.h
1073
vop_fsync(*(vp)->v_ops, vp, waitfor, flags, fp) /* FUSE*/
sys/sys/vfsops.h
1076
#define VOP_FDATASYNC_FP(vp, waitfor, flags, fp) \
sys/sys/vfsops.h
1077
vop_fdatasync(*(vp)->v_ops, vp, waitfor, flags, fp) /* FUSE*/
sys/sys/vfsops.h
1080
#define VOP_READDIR_FP(vp, uio, cred, eofflag, ncookies, cookies, fp) \
sys/sys/vfsops.h
1081
vop_readdir(*(vp)->v_ops, vp, uio, cred, eofflag, ncookies, cookies, fp) /* FUSE */
sys/sys/vfsops.h
786
struct file *fp);
sys/sys/vfsops.h
790
struct ucred *cred, struct file *fp);
sys/sys/vfsops.h
792
int ioflag, struct ucred *cred, struct file *fp);
sys/sys/vfsops.h
794
int ioflag, struct ucred *cred, struct file *fp);
sys/sys/vfsops.h
804
struct file *fp);
sys/sys/vfsops.h
806
struct file *fp);
sys/sys/vfsops.h
825
int *ncookies, off_t **cookies, struct file *fp);
sys/sys/vfsops.h
861
struct file *fp, const void *ctl, int ctllen,
sys/sys/vnode.h
490
int vn_close (struct vnode *vp, int flags, struct file *fp);
sys/sys/vnode.h
508
void vn_setspecops (struct file *fp);
sys/vfs/devfs/devfs_core.c
2938
devfs_get_cdevpriv(struct file *fp, void **datap)
sys/vfs/devfs/devfs_core.c
2942
if (fp == NULL)
sys/vfs/devfs/devfs_core.c
2945
spin_lock_shared(&fp->f_spin);
sys/vfs/devfs/devfs_core.c
2946
if (fp->f_data1 == NULL) {
sys/vfs/devfs/devfs_core.c
2950
struct cdev_privdata *p = fp->f_data1;
sys/vfs/devfs/devfs_core.c
2955
spin_unlock_shared(&fp->f_spin);
sys/vfs/devfs/devfs_core.c
2961
devfs_set_cdevpriv(struct file *fp, void *priv, d_priv_dtor_t *dtr)
sys/vfs/devfs/devfs_core.c
2966
if (fp == NULL)
sys/vfs/devfs/devfs_core.c
2973
spin_lock(&fp->f_spin);
sys/vfs/devfs/devfs_core.c
2974
if (fp->f_data1 == NULL) {
sys/vfs/devfs/devfs_core.c
2975
fp->f_data1 = p;
sys/vfs/devfs/devfs_core.c
2980
spin_unlock(&fp->f_spin);
sys/vfs/devfs/devfs_core.c
2989
devfs_clear_cdevpriv(struct file *fp)
sys/vfs/devfs/devfs_core.c
2993
if (fp == NULL)
sys/vfs/devfs/devfs_core.c
2996
spin_lock(&fp->f_spin);
sys/vfs/devfs/devfs_core.c
2997
p = fp->f_data1;
sys/vfs/devfs/devfs_core.c
2998
fp->f_data1 = NULL;
sys/vfs/devfs/devfs_core.c
2999
spin_unlock(&fp->f_spin);
sys/vfs/devfs/devfs_vnops.c
1074
struct file *fp = *ap->a_fpp;
sys/vfs/devfs/devfs_vnops.c
1076
KKASSERT(fp->f_type == DTYPE_VNODE);
sys/vfs/devfs/devfs_vnops.c
1077
KKASSERT((fp->f_flag & FMASK) == (ap->a_mode & FMASK));
sys/vfs/devfs/devfs_vnops.c
1078
fp->f_ops = &devfs_dev_fileops;
sys/vfs/devfs/devfs_vnops.c
1079
KKASSERT(fp->f_data == (void *)vp);
sys/vfs/devfs/devfs_vnops.c
1231
devfs_fo_close(struct file *fp)
sys/vfs/devfs/devfs_vnops.c
1233
struct vnode *vp = (struct vnode *)fp->f_data;
sys/vfs/devfs/devfs_vnops.c
1236
fp->f_ops = &badfileops;
sys/vfs/devfs/devfs_vnops.c
1237
error = vn_close(vp, fp->f_flag, fp);
sys/vfs/devfs/devfs_vnops.c
1238
devfs_clear_cdevpriv(fp);
sys/vfs/devfs/devfs_vnops.c
1251
devfs_fo_read(struct file *fp, struct uio *uio,
sys/vfs/devfs/devfs_vnops.c
1266
vp = (struct vnode *)fp->f_data;
sys/vfs/devfs/devfs_vnops.c
1278
uio->uio_offset = fp->f_offset;
sys/vfs/devfs/devfs_vnops.c
1285
} else if (fp->f_flag & FNONBLOCK) {
sys/vfs/devfs/devfs_vnops.c
1288
if (fp->f_flag & O_DIRECT) {
sys/vfs/devfs/devfs_vnops.c
1291
ioflag |= sequential_heuristic(uio, fp);
sys/vfs/devfs/devfs_vnops.c
1293
error = dev_dread(dev, uio, ioflag, fp);
sys/vfs/devfs/devfs_vnops.c
1299
fp->f_offset = uio->uio_offset;
sys/vfs/devfs/devfs_vnops.c
1300
fp->f_nextoff = uio->uio_offset;
sys/vfs/devfs/devfs_vnops.c
1307
devfs_fo_write(struct file *fp, struct uio *uio,
sys/vfs/devfs/devfs_vnops.c
1319
vp = (struct vnode *)fp->f_data;
sys/vfs/devfs/devfs_vnops.c
1328
vp = (struct vnode *)fp->f_data;
sys/vfs/devfs/devfs_vnops.c
1336
uio->uio_offset = fp->f_offset;
sys/vfs/devfs/devfs_vnops.c
1340
((fp->f_flag & O_APPEND) || (flags & O_FAPPEND))) {
sys/vfs/devfs/devfs_vnops.c
1348
} else if (fp->f_flag & FNONBLOCK) {
sys/vfs/devfs/devfs_vnops.c
1351
if (fp->f_flag & O_DIRECT) {
sys/vfs/devfs/devfs_vnops.c
1358
} else if (fp->f_flag & O_FSYNC) {
sys/vfs/devfs/devfs_vnops.c
1364
ioflag |= sequential_heuristic(uio, fp);
sys/vfs/devfs/devfs_vnops.c
1366
error = dev_dwrite(dev, uio, ioflag, fp);
sys/vfs/devfs/devfs_vnops.c
1375
fp->f_offset = uio->uio_offset;
sys/vfs/devfs/devfs_vnops.c
1376
fp->f_nextoff = uio->uio_offset;
sys/vfs/devfs/devfs_vnops.c
1383
devfs_fo_stat(struct file *fp, struct stat *sb, struct ucred *cred)
sys/vfs/devfs/devfs_vnops.c
1392
vp = (struct vnode *)fp->f_data;
sys/vfs/devfs/devfs_vnops.c
1492
devfs_fo_kqfilter(struct file *fp, struct knote *kn)
sys/vfs/devfs/devfs_vnops.c
1498
vp = (struct vnode *)fp->f_data;
sys/vfs/devfs/devfs_vnops.c
1509
error = dev_dkqfilter(dev, kn, fp);
sys/vfs/devfs/devfs_vnops.c
1518
devfs_fo_ioctl(struct file *fp, u_long com, caddr_t data,
sys/vfs/devfs/devfs_vnops.c
1532
vp = ((struct vnode *)fp->f_data);
sys/vfs/devfs/devfs_vnops.c
1569
error = dev_dioctl(dev, com, data, fp->f_flag, ucred, msg, fp);
sys/vfs/devfs/devfs_vnops.c
1620
devfs_fo_seek(struct file *fp, off_t offset, int whence, off_t *res)
sys/vfs/devfs/devfs_vnops.c
1630
vp = (struct vnode *)fp->f_data;
sys/vfs/devfs/devfs_vnops.c
1634
spin_lock(&fp->f_spin);
sys/vfs/devfs/devfs_vnops.c
1635
new_offset = fp->f_offset + offset;
sys/vfs/devfs/devfs_vnops.c
1640
spin_lock(&fp->f_spin);
sys/vfs/devfs/devfs_vnops.c
1646
spin_lock(&fp->f_spin);
sys/vfs/devfs/devfs_vnops.c
1651
spin_lock(&fp->f_spin);
sys/vfs/devfs/devfs_vnops.c
1669
fp->f_offset = new_offset;
sys/vfs/devfs/devfs_vnops.c
1672
*res = fp->f_offset;
sys/vfs/devfs/devfs_vnops.c
1673
spin_unlock(&fp->f_spin);
sys/vfs/devfs/devfs_vnops.c
2279
sequential_heuristic(struct uio *uio, struct file *fp)
sys/vfs/devfs/devfs_vnops.c
2284
if ((uio->uio_offset == 0 && fp->f_seqcount > 0) ||
sys/vfs/devfs/devfs_vnops.c
2285
uio->uio_offset == fp->f_nextoff) {
sys/vfs/devfs/devfs_vnops.c
2292
int tmpseq = fp->f_seqcount;
sys/vfs/devfs/devfs_vnops.c
2297
fp->f_seqcount = tmpseq;
sys/vfs/devfs/devfs_vnops.c
2298
return(fp->f_seqcount << IO_SEQSHIFT);
sys/vfs/devfs/devfs_vnops.c
2304
if (fp->f_seqcount > 1)
sys/vfs/devfs/devfs_vnops.c
2305
fp->f_seqcount = 1;
sys/vfs/devfs/devfs_vnops.c
2307
fp->f_seqcount = 0;
sys/vfs/fuse/fuse_device.c
51
struct file *fp = ap->a_fpp ? *ap->a_fpp : NULL;
sys/vfs/fuse/fuse_device.c
57
devfs_set_cdevpriv(fp, fmp, fuse_cdevpriv_dtor);
sys/vfs/hammer2/hammer2.h
1931
void hammer2_cluster_reconnect(hammer2_dev_t *hmp, struct file *fp);
sys/vfs/hammer2/hammer2_iocom.c
78
hammer2_cluster_reconnect(hammer2_dev_t *hmp, struct file *fp)
sys/vfs/hammer2/hammer2_iocom.c
85
kdmsg_iocom_reconnect(&hmp->iocom, fp, "hammer2");
sys/vfs/hammer2/hammer2_ioctl.c
208
struct file *fp;
sys/vfs/hammer2/hammer2_ioctl.c
212
fp = holdfp(curthread, recl->fd, -1);
sys/vfs/hammer2/hammer2_ioctl.c
213
if (fp) {
sys/vfs/hammer2/hammer2_ioctl.c
219
fp);
sys/vfs/hammer2/hammer2_ioctl.c
224
cluster->array[0].chain->hmp, fp);
sys/vfs/hammer2/hammer2_vfsops.c
1351
fp = holdfp(curthread, info.cluster_fd, -1);
sys/vfs/hammer2/hammer2_vfsops.c
1352
if (fp) {
sys/vfs/hammer2/hammer2_vfsops.c
1353
hammer2_cluster_reconnect(hmp, fp);
sys/vfs/hammer2/hammer2_vfsops.c
929
struct file *fp;
sys/vfs/msdosfs/msdosfs_vfsops.c
532
struct fsinfo *fp;
sys/vfs/msdosfs/msdosfs_vfsops.c
537
fp = (struct fsinfo *)bp->b_data;
sys/vfs/msdosfs/msdosfs_vfsops.c
538
if (!memcmp(fp->fsisig1, "RRaA", 4) &&
sys/vfs/msdosfs/msdosfs_vfsops.c
539
!memcmp(fp->fsisig2, "rrAa", 4) &&
sys/vfs/msdosfs/msdosfs_vfsops.c
540
!memcmp(fp->fsisig3, "\0\0\125\252", 4)) {
sys/vfs/msdosfs/msdosfs_vfsops.c
541
pmp->pm_nxtfree = getulong(fp->fsinxtfree);
sys/vfs/msdosfs/msdosfs_vfsops.c
754
struct fsinfo *fp;
sys/vfs/msdosfs/msdosfs_vfsops.c
770
fp = (struct fsinfo *)bp->b_data;
sys/vfs/msdosfs/msdosfs_vfsops.c
771
putulong(fp->fsinfree, pmp->pm_freeclustercount);
sys/vfs/msdosfs/msdosfs_vfsops.c
772
putulong(fp->fsinxtfree, pmp->pm_nxtfree);
sys/vfs/nfs/nfs_serv.c
1005
struct nfs_fattr *fp;
sys/vfs/nfs/nfs_serv.c
1198
fp = nfsm_build(&info, NFSX_V2FATTR);
sys/vfs/nfs/nfs_serv.c
1199
nfsm_srvfattr(nfsd, vap, fp);
sys/vfs/nfs/nfs_serv.c
1221
struct nfs_fattr *fp;
sys/vfs/nfs/nfs_serv.c
1489
fp = nfsm_build(&info, NFSX_V2FATTR);
sys/vfs/nfs/nfs_serv.c
1490
nfsm_srvfattr(nfsd, &va, fp);
sys/vfs/nfs/nfs_serv.c
1596
struct nfs_fattr *fp;
sys/vfs/nfs/nfs_serv.c
1854
fp = nfsm_build(&info, NFSX_V2FATTR);
sys/vfs/nfs/nfs_serv.c
1855
nfsm_srvfattr(nfsd, vap, fp);
sys/vfs/nfs/nfs_serv.c
2667
struct nfs_fattr *fp;
sys/vfs/nfs/nfs_serv.c
2762
fp = nfsm_build(&info, NFSX_V2FATTR);
sys/vfs/nfs/nfs_serv.c
2763
nfsm_srvfattr(nfsd, vap, fp);
sys/vfs/nfs/nfs_serv.c
283
struct nfs_fattr *fp;
sys/vfs/nfs/nfs_serv.c
317
fp = nfsm_build(&info, NFSX_FATTR(nfsd->nd_flag & ND_NFSV3));
sys/vfs/nfs/nfs_serv.c
318
nfsm_srvfattr(nfsd, vap, fp);
sys/vfs/nfs/nfs_serv.c
3251
struct nfs_fattr *fp;
sys/vfs/nfs/nfs_serv.c
340
struct nfs_fattr *fp;
sys/vfs/nfs/nfs_serv.c
3489
fp = (struct nfs_fattr *)&fl.fl_fattr;
sys/vfs/nfs/nfs_serv.c
3490
nfsm_srvfattr(nfsd, vap, fp);
sys/vfs/nfs/nfs_serv.c
472
fp = nfsm_build(&info, NFSX_V2FATTR);
sys/vfs/nfs/nfs_serv.c
473
nfsm_srvfattr(nfsd, vap, fp);
sys/vfs/nfs/nfs_serv.c
492
struct nfs_fattr *fp;
sys/vfs/nfs/nfs_serv.c
660
fp = nfsm_build(&info, NFSX_V2FATTR);
sys/vfs/nfs/nfs_serv.c
661
nfsm_srvfattr(nfsd, vap, fp);
sys/vfs/nfs/nfs_serv.c
801
struct nfs_fattr *fp;
sys/vfs/nfs/nfs_serv.c
894
fp = (struct nfs_fattr *)tl;
sys/vfs/nfs/nfs_serv.c
898
fp = (struct nfs_fattr *)tl;
sys/vfs/nfs/nfs_serv.c
972
nfsm_srvfattr(nfsd, vap, fp);
sys/vfs/nfs/nfs_subs.c
655
struct nfs_fattr *fp;
sys/vfs/nfs/nfs_subs.c
672
fp = (struct nfs_fattr *)cp2;
sys/vfs/nfs/nfs_subs.c
674
vtyp = nfsv3tov_type(fp->fa_type);
sys/vfs/nfs/nfs_subs.c
675
vmode = fxdr_unsigned(u_short, fp->fa_mode);
sys/vfs/nfs/nfs_subs.c
676
rmajor = (int)fxdr_unsigned(int, fp->fa3_rdev.specdata1);
sys/vfs/nfs/nfs_subs.c
677
rminor = (int)fxdr_unsigned(int, fp->fa3_rdev.specdata2);
sys/vfs/nfs/nfs_subs.c
678
fxdr_nfsv3time(&fp->fa3_mtime, &mtime);
sys/vfs/nfs/nfs_subs.c
680
vtyp = nfsv2tov_type(fp->fa_type);
sys/vfs/nfs/nfs_subs.c
681
vmode = fxdr_unsigned(u_short, fp->fa_mode);
sys/vfs/nfs/nfs_subs.c
703
rdev = fxdr_unsigned(int32_t, fp->fa2_rdev);
sys/vfs/nfs/nfs_subs.c
706
fxdr_nfsv2time(&fp->fa2_mtime, &mtime);
sys/vfs/nfs/nfs_subs.c
761
vap->va_nlink = fxdr_unsigned(u_short, fp->fa_nlink);
sys/vfs/nfs/nfs_subs.c
762
vap->va_uid = fxdr_unsigned(uid_t, fp->fa_uid);
sys/vfs/nfs/nfs_subs.c
763
vap->va_gid = fxdr_unsigned(gid_t, fp->fa_gid);
sys/vfs/nfs/nfs_subs.c
764
vap->va_size = fxdr_hyper(&fp->fa3_size);
sys/vfs/nfs/nfs_subs.c
766
vap->va_bytes = fxdr_hyper(&fp->fa3_used);
sys/vfs/nfs/nfs_subs.c
767
vap->va_fileid = fxdr_hyper(&fp->fa3_fileid);
sys/vfs/nfs/nfs_subs.c
768
fxdr_nfsv3time(&fp->fa3_atime, &vap->va_atime);
sys/vfs/nfs/nfs_subs.c
769
fxdr_nfsv3time(&fp->fa3_ctime, &vap->va_ctime);
sys/vfs/nfs/nfs_subs.c
773
vap->va_nlink = fxdr_unsigned(u_short, fp->fa_nlink);
sys/vfs/nfs/nfs_subs.c
774
vap->va_uid = fxdr_unsigned(uid_t, fp->fa_uid);
sys/vfs/nfs/nfs_subs.c
775
vap->va_gid = fxdr_unsigned(gid_t, fp->fa_gid);
sys/vfs/nfs/nfs_subs.c
776
vap->va_size = fxdr_unsigned(u_int32_t, fp->fa2_size);
sys/vfs/nfs/nfs_subs.c
777
vap->va_blocksize = fxdr_unsigned(int32_t, fp->fa2_blocksize);
sys/vfs/nfs/nfs_subs.c
778
vap->va_bytes = (u_quad_t)fxdr_unsigned(int32_t, fp->fa2_blocks)
sys/vfs/nfs/nfs_subs.c
780
vap->va_fileid = fxdr_unsigned(int32_t, fp->fa2_fileid);
sys/vfs/nfs/nfs_subs.c
781
fxdr_nfsv2time(&fp->fa2_atime, &vap->va_atime);
sys/vfs/nfs/nfs_subs.c
784
fp->fa2_ctime.nfsv2_sec);
sys/vfs/nfs/nfs_subs.c
786
vap->va_gen = fxdr_unsigned(u_int32_t,fp->fa2_ctime.nfsv2_usec);
sys/vfs/nfs/nfs_syscalls.c
127
struct file *fp;
sys/vfs/nfs/nfs_syscalls.c
193
error = holdsock(td, nfsdarg.sock, &fp);
sys/vfs/nfs/nfs_syscalls.c
205
fdrop(fp);
sys/vfs/nfs/nfs_syscalls.c
209
error = nfssvc_addsock(fp, nam, td);
sys/vfs/nfs/nfs_syscalls.c
210
fdrop(fp);
sys/vfs/nfs/nfs_syscalls.c
315
nfssvc_addsock(struct file *fp, struct sockaddr *mynam, struct thread *td)
sys/vfs/nfs/nfs_syscalls.c
322
so = (struct socket *)fp->f_data;
sys/vfs/nfs/nfs_syscalls.c
423
fhold(fp);
sys/vfs/nfs/nfs_syscalls.c
424
slp->ns_fp = fp;
sys/vfs/nfs/nfs_syscalls.c
885
struct file *fp;
sys/vfs/nfs/nfs_syscalls.c
892
fp = slp->ns_fp;
sys/vfs/nfs/nfs_syscalls.c
895
if (fp)
sys/vfs/nfs/nfs_syscalls.c
896
closef(fp, NULL);
sys/vfs/nfs/nfsm_subs.c
1544
struct nfs_fattr *fp;
sys/vfs/nfs/nfsm_subs.c
1553
fp = (struct nfs_fattr *)tl;
sys/vfs/nfs/nfsm_subs.c
1554
nfsm_srvfattr(nfsd, after_vap, fp);
sys/vfs/nfs/nfsm_subs.c
1560
struct nfs_fattr *fp)
sys/vfs/nfs/nfsm_subs.c
1566
fp->fa_nlink = 65535;
sys/vfs/nfs/nfsm_subs.c
1568
fp->fa_nlink = txdr_unsigned(vap->va_nlink);
sys/vfs/nfs/nfsm_subs.c
1569
fp->fa_uid = txdr_unsigned(vap->va_uid);
sys/vfs/nfs/nfsm_subs.c
1570
fp->fa_gid = txdr_unsigned(vap->va_gid);
sys/vfs/nfs/nfsm_subs.c
1572
fp->fa_type = vtonfsv3_type(vap->va_type);
sys/vfs/nfs/nfsm_subs.c
1573
fp->fa_mode = vtonfsv3_mode(vap->va_mode);
sys/vfs/nfs/nfsm_subs.c
1574
txdr_hyper(vap->va_size, &fp->fa3_size);
sys/vfs/nfs/nfsm_subs.c
1575
txdr_hyper(vap->va_bytes, &fp->fa3_used);
sys/vfs/nfs/nfsm_subs.c
1576
fp->fa3_rdev.specdata1 = txdr_unsigned(vap->va_rmajor);
sys/vfs/nfs/nfsm_subs.c
1577
fp->fa3_rdev.specdata2 = txdr_unsigned(vap->va_rminor);
sys/vfs/nfs/nfsm_subs.c
1578
fp->fa3_fsid.nfsuquad[0] = 0;
sys/vfs/nfs/nfsm_subs.c
1579
fp->fa3_fsid.nfsuquad[1] = txdr_unsigned(vap->va_fsid);
sys/vfs/nfs/nfsm_subs.c
1580
txdr_hyper(vap->va_fileid, &fp->fa3_fileid);
sys/vfs/nfs/nfsm_subs.c
1581
txdr_nfsv3time(&vap->va_atime, &fp->fa3_atime);
sys/vfs/nfs/nfsm_subs.c
1582
txdr_nfsv3time(&vap->va_mtime, &fp->fa3_mtime);
sys/vfs/nfs/nfsm_subs.c
1583
txdr_nfsv3time(&vap->va_ctime, &fp->fa3_ctime);
sys/vfs/nfs/nfsm_subs.c
1585
fp->fa_type = vtonfsv2_type(vap->va_type);
sys/vfs/nfs/nfsm_subs.c
1586
fp->fa_mode = vtonfsv2_mode(vap->va_type, vap->va_mode);
sys/vfs/nfs/nfsm_subs.c
1587
fp->fa2_size = txdr_unsigned(vap->va_size);
sys/vfs/nfs/nfsm_subs.c
1588
fp->fa2_blocksize = txdr_unsigned(vap->va_blocksize);
sys/vfs/nfs/nfsm_subs.c
1590
fp->fa2_rdev = 0xffffffff;
sys/vfs/nfs/nfsm_subs.c
1592
fp->fa2_rdev = txdr_unsigned(makeudev(vap->va_rmajor, vap->va_rminor));
sys/vfs/nfs/nfsm_subs.c
1593
fp->fa2_blocks = txdr_unsigned(vap->va_bytes / NFS_FABLKSIZE);
sys/vfs/nfs/nfsm_subs.c
1594
fp->fa2_fsid = txdr_unsigned(vap->va_fsid);
sys/vfs/nfs/nfsm_subs.c
1595
fp->fa2_fileid = txdr_unsigned(vap->va_fileid);
sys/vfs/nfs/nfsm_subs.c
1596
txdr_nfsv2time(&vap->va_atime, &fp->fa2_atime);
sys/vfs/nfs/nfsm_subs.c
1597
txdr_nfsv2time(&vap->va_mtime, &fp->fa2_mtime);
sys/vfs/nfs/nfsm_subs.c
1598
txdr_nfsv2time(&vap->va_ctime, &fp->fa2_ctime);
sys/vfs/nfs/nfsm_subs.h
196
struct nfs_fattr *fp);
sys/vfs/ntfs/ntfs_subr.c
1076
ntfs_ntreaddir(struct ntfsmount *ntmp, struct fnode *fp,
sys/vfs/ntfs/ntfs_subr.c
1079
struct ntnode *ip = FTONT(fp);
sys/vfs/ntfs/ntfs_subr.c
1103
if (fp->f_dirblbuf == NULL) {
sys/vfs/ntfs/ntfs_subr.c
1104
fp->f_dirblsz = vap->va_a_iroot->ir_size;
sys/vfs/ntfs/ntfs_subr.c
1105
fp->f_dirblbuf = kmalloc(max(vap->va_datalen, fp->f_dirblsz),
sys/vfs/ntfs/ntfs_subr.c
1109
blsize = fp->f_dirblsz;
sys/vfs/ntfs/ntfs_subr.c
1110
rdbuf = fp->f_dirblbuf;
sys/vfs/ntfs/ntfs_subr.c
1143
if ((fp->f_lastdnum < num) && (fp->f_lastdnum != 0)) {
sys/vfs/ntfs/ntfs_subr.c
1144
attrnum = fp->f_lastdattr;
sys/vfs/ntfs/ntfs_subr.c
1145
aoff = fp->f_lastdoff;
sys/vfs/ntfs/ntfs_subr.c
1146
blnum = fp->f_lastdblnum;
sys/vfs/ntfs/ntfs_subr.c
1147
cnum = fp->f_lastdnum;
sys/vfs/ntfs/ntfs_subr.c
1183
fp->f_lastdnum = cnum;
sys/vfs/ntfs/ntfs_subr.c
1184
fp->f_lastdoff = aoff;
sys/vfs/ntfs/ntfs_subr.c
1185
fp->f_lastdblnum = blnum;
sys/vfs/ntfs/ntfs_subr.c
1186
fp->f_lastdattr = attrnum;
sys/vfs/ntfs/ntfs_subr.c
1217
fp->f_lastdnum = 0;
sys/vfs/ntfs/ntfs_subr.c
1282
ntfs_filesize(struct ntfsmount *ntmp, struct fnode *fp, u_int64_t *size,
sys/vfs/ntfs/ntfs_subr.c
1286
struct ntnode *ip = FTONT(fp);
sys/vfs/ntfs/ntfs_subr.c
1293
fp->f_attrtype, fp->f_attrname, 0, &vap);
sys/vfs/ntfs/ntfs_subr.c
718
struct fnode *fp;
sys/vfs/ntfs/ntfs_subr.c
723
for (fp = ip->i_fnlist.lh_first; fp != NULL; fp = fp->f_fnlist.le_next){
sys/vfs/ntfs/ntfs_subr.c
725
fp->f_attrtype, fp->f_attrname?fp->f_attrname:""));
sys/vfs/ntfs/ntfs_subr.c
727
if ((attrtype == fp->f_attrtype) &&
sys/vfs/ntfs/ntfs_subr.c
728
((!attrname && !fp->f_attrname) ||
sys/vfs/ntfs/ntfs_subr.c
729
(attrname && fp->f_attrname &&
sys/vfs/ntfs/ntfs_subr.c
730
!strcmp(attrname,fp->f_attrname)))){
sys/vfs/ntfs/ntfs_subr.c
731
dprintf(("ntfs_fget: found existed: %p\n",fp));
sys/vfs/ntfs/ntfs_subr.c
732
*fpp = fp;
sys/vfs/ntfs/ntfs_subr.c
739
fp = kmalloc(sizeof(struct fnode), M_NTFSFNODE, M_WAITOK | M_ZERO);
sys/vfs/ntfs/ntfs_subr.c
740
dprintf(("ntfs_fget: allocating fnode: %p\n",fp));
sys/vfs/ntfs/ntfs_subr.c
742
fp->f_ip = ip;
sys/vfs/ntfs/ntfs_subr.c
744
fp->f_flag |= FN_AATTRNAME;
sys/vfs/ntfs/ntfs_subr.c
745
fp->f_attrname = kmalloc(strlen(attrname) + 1, M_TEMP,
sys/vfs/ntfs/ntfs_subr.c
747
strcpy(fp->f_attrname, attrname);
sys/vfs/ntfs/ntfs_subr.c
749
fp->f_attrname = NULL;
sys/vfs/ntfs/ntfs_subr.c
750
fp->f_attrtype = attrtype;
sys/vfs/ntfs/ntfs_subr.c
754
LIST_INSERT_HEAD(&ip->i_fnlist, fp, f_fnlist);
sys/vfs/ntfs/ntfs_subr.c
756
*fpp = fp;
sys/vfs/ntfs/ntfs_subr.c
767
ntfs_frele(struct fnode *fp)
sys/vfs/ntfs/ntfs_subr.c
769
struct ntnode *ip = FTONT(fp);
sys/vfs/ntfs/ntfs_subr.c
771
dprintf(("ntfs_frele: fnode: %p for %"PRId64": %p\n", fp, ip->i_number, ip));
sys/vfs/ntfs/ntfs_subr.c
774
LIST_REMOVE(fp,f_fnlist);
sys/vfs/ntfs/ntfs_subr.c
775
if (fp->f_flag & FN_AATTRNAME)
sys/vfs/ntfs/ntfs_subr.c
776
kfree(fp->f_attrname, M_TEMP);
sys/vfs/ntfs/ntfs_subr.c
777
if (fp->f_dirblbuf)
sys/vfs/ntfs/ntfs_subr.c
778
kfree(fp->f_dirblbuf, M_NTFSDIR);
sys/vfs/ntfs/ntfs_subr.c
779
kfree(fp, M_NTFSFNODE);
sys/vfs/ntfs/ntfs_subr.c
842
struct fnode *fp = VTOF(vp);
sys/vfs/ntfs/ntfs_subr.c
843
struct ntnode *ip = FTONT(fp);
sys/vfs/ntfs/ntfs_subr.c
934
(attrtype == fp->f_attrtype) &&
sys/vfs/ntfs/ntfs_subr.c
935
((!attrname && !fp->f_attrname) ||
sys/vfs/ntfs/ntfs_subr.c
936
(attrname && fp->f_attrname &&
sys/vfs/ntfs/ntfs_subr.c
937
!strcmp(attrname, fp->f_attrname))))
sys/vfs/ntfs/ntfs_vfsops.c
699
struct fnode *fp;
sys/vfs/ntfs/ntfs_vfsops.c
727
error = ntfs_fget(ntmp, ip, attrtype, attrname, &fp);
sys/vfs/ntfs/ntfs_vfsops.c
735
if (!(flags & VG_DONTVALIDFN) && !(fp->f_flag & FN_VALID)) {
sys/vfs/ntfs/ntfs_vfsops.c
737
(fp->f_attrtype == NTFS_A_DATA && fp->f_attrname == NULL)) {
sys/vfs/ntfs/ntfs_vfsops.c
741
fp->f_size = fp->f_allocated = 0;
sys/vfs/ntfs/ntfs_vfsops.c
745
error = ntfs_filesize(ntmp, fp,
sys/vfs/ntfs/ntfs_vfsops.c
746
&fp->f_size, &fp->f_allocated);
sys/vfs/ntfs/ntfs_vfsops.c
753
fp->f_flag |= FN_VALID;
sys/vfs/ntfs/ntfs_vfsops.c
756
if (FTOV(fp)) {
sys/vfs/ntfs/ntfs_vfsops.c
757
VGET(FTOV(fp), lkflags);
sys/vfs/ntfs/ntfs_vfsops.c
758
*vpp = FTOV(fp);
sys/vfs/ntfs/ntfs_vfsops.c
765
ntfs_frele(fp);
sys/vfs/ntfs/ntfs_vfsops.c
771
fp->f_vp = vp;
sys/vfs/ntfs/ntfs_vfsops.c
772
vp->v_data = fp;
sys/vfs/ntfs/ntfs_vfsops.c
782
vinitvmio(vp, fp->f_size, PAGE_SIZE, -1);
sys/vfs/ntfs/ntfs_vnops.c
118
struct fnode *fp = VTOF(vp);
sys/vfs/ntfs/ntfs_vnops.c
119
struct ntnode *ip = FTONT(fp);
sys/vfs/ntfs/ntfs_vnops.c
131
dprintf(("ntfs_read: filesize: %ju", (uintmax_t)fp->f_size));
sys/vfs/ntfs/ntfs_vnops.c
134
if (uio->uio_offset > fp->f_size)
sys/vfs/ntfs/ntfs_vnops.c
137
resid = (int)szmin(uio->uio_resid, fp->f_size - uio->uio_offset);
sys/vfs/ntfs/ntfs_vnops.c
174
struct fnode *fp = VTOF(vp);
sys/vfs/ntfs/ntfs_vnops.c
175
struct ntnode *ip = FTONT(fp);
sys/vfs/ntfs/ntfs_vnops.c
189
vap->va_size = fp->f_size;
sys/vfs/ntfs/ntfs_vnops.c
190
vap->va_bytes = fp->f_allocated;
sys/vfs/ntfs/ntfs_vnops.c
191
vap->va_atime = ntfs_nttimetounix(fp->f_times.t_access);
sys/vfs/ntfs/ntfs_vnops.c
192
vap->va_mtime = ntfs_nttimetounix(fp->f_times.t_write);
sys/vfs/ntfs/ntfs_vnops.c
193
vap->va_ctime = ntfs_nttimetounix(fp->f_times.t_create);
sys/vfs/ntfs/ntfs_vnops.c
237
struct fnode *fp = VTOF(vp);
sys/vfs/ntfs/ntfs_vnops.c
238
struct ntnode *ip = FTONT(fp);
sys/vfs/ntfs/ntfs_vnops.c
249
ntfs_frele(fp);
sys/vfs/ntfs/ntfs_vnops.c
277
struct fnode *fp = VTOF(vp);
sys/vfs/ntfs/ntfs_vnops.c
278
struct ntnode *ip = FTONT(fp);
sys/vfs/ntfs/ntfs_vnops.c
295
if (bio->bio_offset >= fp->f_size) {
sys/vfs/ntfs/ntfs_vnops.c
300
fp->f_size - bio->bio_offset);
sys/vfs/ntfs/ntfs_vnops.c
302
toread, (uintmax_t)fp->f_size));
sys/vfs/ntfs/ntfs_vnops.c
304
error = ntfs_readattr(ntmp, ip, fp->f_attrtype,
sys/vfs/ntfs/ntfs_vnops.c
305
fp->f_attrname, bio->bio_offset,
sys/vfs/ntfs/ntfs_vnops.c
318
if (bio->bio_offset + bp->b_bcount >= fp->f_size) {
sys/vfs/ntfs/ntfs_vnops.c
324
fp->f_size - bio->bio_offset);
sys/vfs/ntfs/ntfs_vnops.c
326
towrite, (uintmax_t)fp->f_size));
sys/vfs/ntfs/ntfs_vnops.c
328
error = ntfs_writeattr_plain(ntmp, ip, fp->f_attrtype,
sys/vfs/ntfs/ntfs_vnops.c
329
fp->f_attrname, bio->bio_offset,towrite,
sys/vfs/ntfs/ntfs_vnops.c
354
struct fnode *fp = VTOF(vp);
sys/vfs/ntfs/ntfs_vnops.c
355
struct ntnode *ip = FTONT(fp);
sys/vfs/ntfs/ntfs_vnops.c
365
dprintf(("ntfs_write: filesize: %ju ", (uintmax_t)fp->f_size));
sys/vfs/ntfs/ntfs_vnops.c
367
if (uio->uio_resid + uio->uio_offset > fp->f_size) {
sys/vfs/ntfs/ntfs_vnops.c
371
if (uio->uio_offset > fp->f_size)
sys/vfs/ntfs/ntfs_vnops.c
374
towrite = szmin(uio->uio_resid, fp->f_size - uio->uio_offset);
sys/vfs/ntfs/ntfs_vnops.c
378
error = ntfs_writeattr_plain(ntmp, ip, fp->f_attrtype,
sys/vfs/ntfs/ntfs_vnops.c
379
fp->f_attrname, uio->uio_offset, towrite, NULL, &written, uio);
sys/vfs/ntfs/ntfs_vnops.c
509
struct fnode *fp = VTOF(vp);
sys/vfs/ntfs/ntfs_vnops.c
510
struct ntnode *ip = FTONT(fp);
sys/vfs/ntfs/ntfs_vnops.c
577
error = ntfs_ntreaddir(ntmp, fp, num - faked, &iep);
sys/vfs/tmpfs/tmpfs.h
269
int (*tn_fo_read) (struct file *fp, struct uio *uio,
sys/vfs/tmpfs/tmpfs.h
271
int (*tn_fo_write) (struct file *fp, struct uio *uio,
sys/vm/vm_extern.h
97
struct file *fp);
sys/vm/vm_mmap.c
1216
struct file *fp)
sys/vm/vm_mmap.c
132
struct file *fp = NULL;
sys/vm/vm_mmap.c
1378
&object, prot, fp);
sys/vm/vm_mmap.c
244
fp = holdfp(td, fd, -1);
sys/vm/vm_mmap.c
245
if (fp == NULL)
sys/vm/vm_mmap.c
247
if (fp->f_type != DTYPE_VNODE) {
sys/vm/vm_mmap.c
249
if (fp->f_type == DTYPE_DMABUF) {
sys/vm/vm_mmap.c
262
if (fp->f_flag & FPOSIXSHM)
sys/vm/vm_mmap.c
264
vp = (struct vnode *) fp->f_data;
sys/vm/vm_mmap.c
326
if (fp->f_flag & FREAD) {
sys/vm/vm_mmap.c
344
if ((fp->f_flag & FWRITE) != 0) {
sys/vm/vm_mmap.c
392
flags, handle, pos, fp);
sys/vm/vm_mmap.c
398
if (fp)
sys/vm/vm_mmap.c
399
dropfp(td, fd, fp);
test/debug/checkhammer.c
107
parseBTree(FILE *fp)
test/debug/checkhammer.c
114
while (fgets(buf, sizeof(buf), fp) != NULL) {
test/debug/checkhammer.c
17
static void parseBlockMap(FILE *fp);
test/debug/checkhammer.c
18
static void parseBTree(FILE *fp);
test/debug/checkhammer.c
55
FILE *fp;
test/debug/checkhammer.c
61
if ((fp = fopen(av[1], "r")) == NULL) {
test/debug/checkhammer.c
67
parseBlockMap(fp);
test/debug/checkhammer.c
68
fclose(fp);
test/debug/checkhammer.c
69
if ((fp = fopen(av[2], "r")) == NULL) {
test/debug/checkhammer.c
73
parseBTree(fp);
test/debug/checkhammer.c
74
fclose(fp);
test/debug/checkhammer.c
81
parseBlockMap(FILE *fp)
test/debug/checkhammer.c
90
while (fgets(buf, sizeof(buf), fp) != NULL) {
test/interbench/interbench.c
1102
FILE *fp;
test/interbench/interbench.c
1125
if (!(fp = fopen(name, "w")))
test/interbench/interbench.c
1128
terminal_fileopen_error(fp, "stat");
test/interbench/interbench.c
1133
terminal_fileopen_error(fp, "calloc");
test/interbench/interbench.c
1137
if (fwrite(buf, bsize, 1, fp) != 1)
test/interbench/interbench.c
1138
terminal_fileopen_error(fp, "fwrite");
test/interbench/interbench.c
1140
if (fclose(fp) == -1)
test/interbench/interbench.c
140
void terminal_fileopen_error(FILE *fp, char *name)
test/interbench/interbench.c
142
if (fclose(fp) == -1)
test/interbench/interbench.c
1481
FILE *fp;
test/interbench/interbench.c
1644
if ((fp = fopen(fname, "r"))) {
test/interbench/interbench.c
1645
fscanf(fp, "%lu", &ud.loops_per_ms);
test/interbench/interbench.c
1646
if (fclose(fp) == -1)
test/interbench/interbench.c
1670
if (!(fp = fopen(fname, "w"))) {
test/interbench/interbench.c
1676
fprintf(fp, "%lu", ud.loops_per_ms);
test/interbench/interbench.c
1679
if (fclose(fp) == -1)
test/interbench/interbench.c
637
FILE *fp;
test/interbench/interbench.c
643
if (!(fp = fopen(name, "w")))
test/interbench/interbench.c
646
terminal_fileopen_error(fp, "stat");
test/interbench/interbench.c
651
terminal_fileopen_error(fp, "calloc");
test/interbench/interbench.c
652
if (fclose(fp) == -1)
test/interbench/interbench.c
658
if (!(fp = fopen(name, "w")))
test/interbench/interbench.c
661
terminal_fileopen_error(fp, "stat");
test/interbench/interbench.c
663
if (fwrite(buf, statbuf.st_blksize, 1, fp) != 1)
test/interbench/interbench.c
664
terminal_fileopen_error(fp, "fwrite");
test/interbench/interbench.c
668
if (fclose(fp) == -1)
test/interbench/interbench.c
673
if (fclose(fp) == -1)
test/stress/webstress/webstress.c
296
FILE *fp;
test/stress/webstress/webstress.c
350
if ((fp = fdopen(fd, "r+")) == NULL) {
test/stress/webstress/webstress.c
354
fprintf(fp, "GET /%s HTTP/1.1\r\n"
test/stress/webstress/webstress.c
358
fflush(fp);
test/stress/webstress/webstress.c
359
shutdown(fileno(fp), SHUT_WR);
test/stress/webstress/webstress.c
360
while (fgets(buf, sizeof(buf), fp) != NULL)
test/stress/webstress/webstress.c
362
fclose(fp);
test/sysperf/cmp.c
21
struct f *fp = &foo;
test/sysperf/cmp.c
27
struct f *fp = &foo;
test/sysperf/cmp.c
41
if (fp->nop_ptr == NULL)
tools/regression/lib/libc-regex/testregex.c
1036
get_line(FILE* fp)
tools/regression/lib/libc-regex/testregex.c
1046
if (!(b = fgets(s, e - s, fp)))
tools/regression/lib/libc-regex/testregex.c
1250
FILE* fp;
tools/regression/lib/libc-regex/testregex.c
1345
fp = stdin;
tools/regression/lib/libc-regex/testregex.c
1347
else if (!(fp = fopen(state.file, "r")))
tools/regression/lib/libc-regex/testregex.c
1449
while (p = get_line(fp))
tools/regression/lib/libc-regex/testregex.c
2282
if (fp != stdin)
tools/regression/lib/libc-regex/testregex.c
2283
fclose(fp);
tools/tools/ath/athstats/statfoo.c
42
char *fp, *tok;
tools/tools/ath/athstats/statfoo.c
47
for (fp = fmt; (tok = strsep(&fp, ", ")) != NULL;) {
tools/tools/net80211/wlanstats/statfoo.c
42
char *fp, *tok;
tools/tools/net80211/wlanstats/statfoo.c
47
for (fp = fmt; (tok = strsep(&fp, ", ")) != NULL;) {
tools/tools/net80211/wlanwatch/wlanwatch.c
105
(void) putc(i, fp);
tools/tools/net80211/wlanwatch/wlanwatch.c
108
(void) putc(i, fp);
tools/tools/net80211/wlanwatch/wlanwatch.c
114
putc('>', fp);
tools/tools/net80211/wlanwatch/wlanwatch.c
92
bprintf(FILE *fp, int b, char *s)
tools/tools/netrate/netperf/tcp_cc/tcp_cc.c
124
FILE *fp;
tools/tools/netrate/netperf/tcp_cc/tcp_cc.c
126
fp = fdopen(instance[i].pipes[0], "r");
tools/tools/netrate/netperf/tcp_cc/tcp_cc.c
127
if (fp == NULL)
tools/tools/netrate/netperf/tcp_cc/tcp_cc.c
130
while (fgets(line, sizeof(line), fp) != NULL) {
tools/tools/netrate/netperf/tcp_cc/tcp_cc.c
141
fclose(fp);
tools/tools/netrate/netperf/tcp_stream/tcp_stream.c
252
FILE *fp;
tools/tools/netrate/netperf/tcp_stream/tcp_stream.c
254
fp = fdopen(instance[i].pipes[0], "r");
tools/tools/netrate/netperf/tcp_stream/tcp_stream.c
255
if (fp == NULL)
tools/tools/netrate/netperf/tcp_stream/tcp_stream.c
258
while (fgets(line, sizeof(line), fp) != NULL) {
tools/tools/netrate/netperf/tcp_stream/tcp_stream.c
280
fclose(fp);
usr.bin/asa/asa.c
46
FILE *fp;
usr.bin/asa/asa.c
65
if ((fp = fopen(fn, "r")) == NULL) {
usr.bin/asa/asa.c
70
asa(fp);
usr.bin/asa/asa.c
71
fclose(fp);
usr.bin/at/at.c
217
FILE *fp, *fpin;
usr.bin/at/at.c
311
if((fp = fdopen(fdes, "w")) == NULL)
usr.bin/at/at.c
335
fprintf(fp, "#!/bin/sh\n# atrun uid=%ld gid=%ld\n# mail %*s %d\n",
usr.bin/at/at.c
341
fprintf(fp, "umask %lo\n", (unsigned long) cmask);
usr.bin/at/at.c
370
fwrite(*atenv, sizeof(char), eqp-*atenv, fp);
usr.bin/at/at.c
374
fprintf(fp, "\"\n\"");
usr.bin/at/at.c
385
fputc('\\', fp);
usr.bin/at/at.c
389
fputc(*ap, fp);
usr.bin/at/at.c
392
fputs("; export ", fp);
usr.bin/at/at.c
393
fwrite(*atenv, sizeof(char), eqp-*atenv -1, 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
588
FILE *fp;
usr.bin/at/at.c
593
fp = fopen(dirent->d_name,"r");
usr.bin/at/at.c
597
if (!fp) {
usr.bin/at/at.c
600
while((ch = getc(fp)) != EOF) {
usr.bin/at/at.c
603
fclose(fp);
usr.bin/at/perm.c
100
fp = fopen(PERM_PATH "at.allow","r");
usr.bin/at/perm.c
104
if (fp != NULL)
usr.bin/at/perm.c
106
return check_for_user(fp, pentry->pw_name);
usr.bin/at/perm.c
113
fp = fopen(PERM_PATH "at.deny", "r");
usr.bin/at/perm.c
117
if (fp != NULL)
usr.bin/at/perm.c
119
return !check_for_user(fp, pentry->pw_name);
usr.bin/at/perm.c
55
static int check_for_user(FILE *fp, const char *name);
usr.bin/at/perm.c
60
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
88
FILE *fp;
usr.bin/calendar/calendar.c
182
FILE *fp = NULL;
usr.bin/calendar/calendar.c
336
if ((fp = fopen(calendarFile, "r")) == NULL)
usr.bin/calendar/calendar.c
356
ret = cal(fp);
usr.bin/calendar/calendar.c
357
fclose(fp);
usr.bin/calendar/calendar.c
422
if (calfile && (fp = fopen(calfile, "r")) == NULL)
usr.bin/calendar/calendar.c
426
if (fp == NULL)
usr.bin/calendar/calendar.c
427
fp = fopen(calendarFile, "r");
usr.bin/calendar/calendar.c
433
if (fp == NULL)
usr.bin/calendar/calendar.c
434
fp = fopen(calendarFile, "r");
usr.bin/calendar/calendar.c
437
if (fp == NULL)
usr.bin/calendar/calendar.c
438
fp = fopen(calendarFile, "r");
usr.bin/calendar/calendar.c
448
if (fp == NULL) {
usr.bin/calendar/calendar.c
452
fp = fopen(calendarFileSys, "r");
usr.bin/calendar/calendar.c
453
if (fp == NULL)
usr.bin/calendar/calendar.c
457
ret = cal(fp);
usr.bin/calendar/calendar.c
458
fclose(fp);
usr.bin/calendar/dates.c
208
event_print_all(FILE *fp)
usr.bin/calendar/dates.c
217
fprintf(fp, "%s%c\t", e->date, e->variable ? '*' : ' ');
usr.bin/calendar/dates.c
219
fprintf(fp, "[%s] ", e->date_user);
usr.bin/calendar/dates.c
223
fprintf(fp, "%s%s%s",
usr.bin/calendar/dates.c
229
fprintf(fp, " (%s)", e->extra);
usr.bin/calendar/dates.c
231
fputc('\n', fp);
usr.bin/calendar/dates.c
232
fflush(fp);
usr.bin/calendar/dates.h
60
void event_print_all(FILE *fp);
usr.bin/calendar/io.c
152
FILE *fp = NULL;
usr.bin/calendar/io.c
158
if ((fp = fopen(fpath, "r")) != NULL)
usr.bin/calendar/io.c
159
return (fp);
usr.bin/calendar/io.c
286
cfile.fp = in;
usr.bin/calendar/io.c
506
if (getline(&cfile->line, &cfile->line_cap, cfile->fp) <= 0)
usr.bin/calendar/io.c
649
send_mail(FILE *fp)
usr.bin/calendar/io.c
656
if (fseek(fp, 0L, SEEK_END) == -1 || ftell(fp) == 0) {
usr.bin/calendar/io.c
692
rewind(fp);
usr.bin/calendar/io.c
693
while ((ch = fgetc(fp)) != EOF)
usr.bin/calendar/io.c
698
fclose(fp);
usr.bin/calendar/io.c
704
write_mailheader(FILE *fp)
usr.bin/calendar/io.c
718
fprintf(fp,
usr.bin/calendar/io.c
725
fflush(fp);
usr.bin/calendar/io.c
79
FILE *fp;
usr.bin/calendar/io.c
93
static void send_mail(FILE *fp);
usr.bin/calendar/io.c
95
static void write_mailheader(FILE *fp);
usr.bin/calendar/io.h
50
int cal(FILE *fp);
usr.bin/chpass/edit.c
102
FILE *fp;
usr.bin/chpass/edit.c
105
if ((fp = fopen(tfn, "w")) == NULL) {
usr.bin/chpass/edit.c
110
fprintf(fp, "#Changing user information for %s.\n", pw->pw_name);
usr.bin/chpass/edit.c
112
fprintf(fp, "Login: %s\n", pw->pw_name);
usr.bin/chpass/edit.c
113
fprintf(fp, "Password: %s\n", pw->pw_passwd);
usr.bin/chpass/edit.c
114
fprintf(fp, "Uid [#]: %lu\n", (unsigned long)pw->pw_uid);
usr.bin/chpass/edit.c
115
fprintf(fp, "Gid [# or name]: %lu\n",
usr.bin/chpass/edit.c
117
fprintf(fp, "Change [month day year]: %s\n",
usr.bin/chpass/edit.c
119
fprintf(fp, "Expire [month day year]: %s\n",
usr.bin/chpass/edit.c
121
fprintf(fp, "Class: %s\n", pw->pw_class);
usr.bin/chpass/edit.c
122
fprintf(fp, "Home directory: %s\n", pw->pw_dir);
usr.bin/chpass/edit.c
123
fprintf(fp, "Shell: %s\n",
usr.bin/chpass/edit.c
141
fprintf(fp, "Shell: %s\n",
usr.bin/chpass/edit.c
148
fclose(fp);
usr.bin/chpass/edit.c
156
fprintf(fp, "Full Name: %s\n", p);
usr.bin/chpass/edit.c
162
fprintf(fp, "Office Location: %s\n", p);
usr.bin/chpass/edit.c
168
fprintf(fp, "Office Phone: %s\n", p);
usr.bin/chpass/edit.c
174
fprintf(fp, "Home Phone: %s\n", p);
usr.bin/chpass/edit.c
179
fprintf(fp, "Other information: %s\n", bp);
usr.bin/chpass/edit.c
183
fchown(fileno(fp), getuid(), getgid());
usr.bin/chpass/edit.c
184
fclose(fp);
usr.bin/chpass/edit.c
195
FILE *fp;
usr.bin/chpass/edit.c
201
if ((fp = fopen(tfn, "r")) == NULL ||
usr.bin/chpass/edit.c
202
fstat(fileno(fp), &sb) == -1) {
usr.bin/chpass/edit.c
209
fclose(fp);
usr.bin/chpass/edit.c
214
for (line = 1; (buf = fgetln(fp, &len)) != NULL; ++line) {
usr.bin/chpass/edit.c
257
fclose(fp);
usr.bin/chpass/edit.c
284
fclose(fp);
usr.bin/column/column.c
119
if ((fp = fopen(*argv, "r"))) {
usr.bin/column/column.c
120
input(fp);
usr.bin/column/column.c
121
(void)fclose(fp);
usr.bin/column/column.c
268
input(FILE *fp)
usr.bin/column/column.c
278
while (fgetws(buf, MAXLINELEN, fp)) {
usr.bin/column/column.c
71
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
210
if ((n = getline(bufp, buflenp, fp)) < 0)
usr.bin/comm/comm.c
215
if (ferror(fp))
usr.bin/comm/comm.c
222
FILE *fp;
usr.bin/comm/comm.c
226
if ((fp = fopen(name, "r")) == NULL) {
usr.bin/comm/comm.c
229
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
585
size = fread(gbuf, 1, n_bits, fp);
usr.bin/compress/zopen.c
710
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
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
142
if (!(fp = fopen(*argv, "r"))) {
usr.bin/cut/cut.c
147
fcn(fp, *argv);
usr.bin/cut/cut.c
148
(void)fclose(fp);
usr.bin/cut/cut.c
231
b_cut(FILE *fp, const char *fname __unused)
usr.bin/cut/cut.c
240
if ((ch = getc(fp)) == EOF)
usr.bin/cut/cut.c
249
while ((ch = getc(fp)) != EOF && ch != '\n')
usr.bin/cut/cut.c
252
while ((ch = getc(fp)) != EOF && ch != '\n');
usr.bin/cut/cut.c
265
b_n_cut(FILE *fp, const char *fname)
usr.bin/cut/cut.c
274
while ((lbuf = fgetln(fp, &lbuflen)) != NULL) {
usr.bin/cut/cut.c
327
c_cut(FILE *fp, const char *fname)
usr.bin/cut/cut.c
337
if ((ch = getwc(fp)) == WEOF)
usr.bin/cut/cut.c
346
while ((ch = getwc(fp)) != WEOF && ch != '\n')
usr.bin/cut/cut.c
349
while ((ch = getwc(fp)) != WEOF && ch != '\n');
usr.bin/cut/cut.c
354
if (ferror(fp)) {
usr.bin/cut/cut.c
375
f_cut(FILE *fp, const char *fname)
usr.bin/cut/cut.c
385
while ((lbuf = fgetln(fp, &lbuflen)) != NULL) {
usr.bin/cut/cut.c
73
FILE *fp;
usr.bin/diff/diff.c
294
FILE *fp;
usr.bin/diff/diff.c
299
fp = stdin;
usr.bin/diff/diff.c
300
else if ((fp = fopen(file, "r")) == NULL)
usr.bin/diff/diff.c
302
while ((buf = fgetln(fp, &len)) != NULL) {
usr.bin/diff/diff.c
311
fclose(fp);
usr.bin/diff/diffreg.c
1247
match_function(const long *f, int pos, FILE *fp)
usr.bin/diff/diffreg.c
1256
fseek(fp, f[pos - 1], SEEK_SET);
usr.bin/diff/diffreg.c
1260
nc = fread(buf, 1, nc, fp);
usr.bin/dsynth/build.c
1704
FILE *fp;
usr.bin/dsynth/build.c
1710
fp = fopen(buf, "w");
usr.bin/dsynth/build.c
1711
ddassert(fp != NULL);
usr.bin/dsynth/build.c
1712
fprintf(fp, "#!/bin/sh\n");
usr.bin/dsynth/build.c
1713
fprintf(fp, "#\n");
usr.bin/dsynth/build.c
1714
fchmod(fileno(fp), 0755);
usr.bin/dsynth/build.c
1716
childInstallPkgDeps_recurse(fp, &work->pkg->idepon_list, 0, 1, 0);
usr.bin/dsynth/build.c
1717
childInstallPkgDeps_recurse(fp, &work->pkg->idepon_list, 1, 1, 0);
usr.bin/dsynth/build.c
1718
fprintf(fp, "\nexit 0\n");
usr.bin/dsynth/build.c
1719
fclose(fp);
usr.bin/dsynth/build.c
1739
childInstallPkgDeps_recurse(FILE *fp, pkglink_t *list, int undoit,
usr.bin/dsynth/build.c
1784
if (fp) {
usr.bin/dsynth/build.c
1785
fprintf(fp,
usr.bin/dsynth/build.c
1794
if (fp) {
usr.bin/dsynth/build.c
1795
fprintf(fp,
usr.bin/dsynth/build.c
1806
tot += childInstallPkgDeps_recurse(fp,
usr.bin/dsynth/build.c
1817
if (DebugOpt >= 2 && pkg->pkgfile && fp) {
usr.bin/dsynth/build.c
1818
fprintf(fp, "echo 'AlreadyHave %s'\n",
usr.bin/dsynth/build.c
1826
tot += childInstallPkgDeps_recurse(fp, &pkg->idepon_list,
usr.bin/dsynth/build.c
1838
if (fp && pkg->pkgfile) {
usr.bin/dsynth/build.c
1839
fprintf(fp, "echo 'Installing /packages/All/%s'\n",
usr.bin/dsynth/build.c
1841
fprintf(fp, "pkg install -q -U -y /packages/All/%s "
usr.bin/dsynth/build.c
1844
} else if (fp) {
usr.bin/dsynth/build.c
1845
fprintf(fp, "echo 'CANNOT FIND PKG FOR %s'\n",
usr.bin/dsynth/build.c
1967
FILE *fp;
usr.bin/dsynth/build.c
2166
fp = fopen(buf, "w");
usr.bin/dsynth/build.c
2167
dassert_errno(fp, "Unable to create %s\n", buf);
usr.bin/dsynth/build.c
2176
fprintf(fp, "%s=%s\n", benv->label, benv->data);
usr.bin/dsynth/build.c
2179
fclose(fp);
usr.bin/dsynth/build.c
2386
FILE *fp;
usr.bin/dsynth/build.c
2835
fp = fdopen(fdlog, "a");
usr.bin/dsynth/build.c
2836
if (fp == NULL) {
usr.bin/dsynth/build.c
2844
fprintf(fp, "\n");
usr.bin/dsynth/build.c
2846
fprintf(fp, "FAILED %02d:%02d:%02d\n", h, m, s);
usr.bin/dsynth/build.c
2849
fprintf(fp, "Extracted Memory Use: %6.2fM\n",
usr.bin/dsynth/build.c
2852
fprintf(fp, "SUCCEEDED %02d:%02d:%02d\n", h, m, s);
usr.bin/dsynth/build.c
2859
fprintf(fp, "TOTAL TIME %02d:%02d:%02d\n", h, m, s);
usr.bin/dsynth/build.c
2861
fprintf(fp, "\n");
usr.bin/dsynth/build.c
2862
fclose(fp);
usr.bin/dsynth/build.c
3137
FILE *fp;
usr.bin/dsynth/build.c
3261
fp = dexec_open(bulk->s1, cav, cac, &pid, benv, 0, 0);
usr.bin/dsynth/build.c
3262
while ((ptr = fgetln(fp, &len)) != NULL)
usr.bin/dsynth/build.c
3265
if (dexec_close(fp, pid)) {
usr.bin/dsynth/build.c
66
static size_t childInstallPkgDeps_recurse(FILE *fp, pkglink_t *list,
usr.bin/dsynth/config.c
285
FILE *fp;
usr.bin/dsynth/config.c
288
fp = fopen(buf, "r");
usr.bin/dsynth/config.c
289
if (fp == NULL)
usr.bin/dsynth/config.c
291
while ((ptr = fgetln(fp, &len)) != NULL) {
usr.bin/dsynth/config.c
302
fclose(fp);
usr.bin/dsynth/config.c
345
FILE *fp;
usr.bin/dsynth/config.c
352
fp = fopen(path, "r");
usr.bin/dsynth/config.c
353
if (fp == NULL) {
usr.bin/dsynth/config.c
366
while (fgets(buf, sizeof(buf), fp) != NULL) {
usr.bin/dsynth/config.c
524
fclose(fp);
usr.bin/dsynth/config.c
536
FILE *fp;
usr.bin/dsynth/config.c
553
fp = fopen(ppath, "r");
usr.bin/dsynth/config.c
554
if (fp == NULL) {
usr.bin/dsynth/config.c
562
while (fgets(buf, sizeof(buf), fp) != NULL) {
usr.bin/dsynth/config.c
613
fclose(fp);
usr.bin/dsynth/config.c
680
FILE *fp;
usr.bin/dsynth/config.c
688
fp = popen(cmd, "r");
usr.bin/dsynth/config.c
689
dassert_errno(fp, "Cannot run: %s", cmd);
usr.bin/dsynth/config.c
693
(base = fgetln(fp, &size)) != NULL && size) {
usr.bin/dsynth/config.c
711
pclose(fp);
usr.bin/dsynth/dsynth.c
396
FILE *fp;
usr.bin/dsynth/dsynth.c
409
if ((fp = fopen("build.txt", "w")) != NULL) {
usr.bin/dsynth/dsynth.c
411
fprintf(fp, "%s\t%s\n",
usr.bin/dsynth/dsynth.c
415
fclose(fp);
usr.bin/dsynth/dsynth.c
418
FILE *fp;
usr.bin/dsynth/dsynth.c
423
if ((fp = fopen("build.txt", "w")) != NULL) {
usr.bin/dsynth/dsynth.c
425
fprintf(fp, "%s\n", pkgs->portdir);
usr.bin/dsynth/dsynth.c
428
fclose(fp);
usr.bin/dsynth/dsynth.c
611
FILE *fp;
usr.bin/dsynth/dsynth.c
624
fp = fopen(path, "w");
usr.bin/dsynth/dsynth.c
625
dassert_errno(fp, "Unable to create %s", path);
usr.bin/dsynth/dsynth.c
626
fprintf(fp, "%s",
usr.bin/dsynth/dsynth.c
655
if (fclose(fp))
usr.bin/dsynth/dsynth.c
660
fp = fopen(path, "w");
usr.bin/dsynth/dsynth.c
661
dassert_errno(fp, "Unable to create %s", path);
usr.bin/dsynth/dsynth.c
662
fprintf(fp, "%s",
usr.bin/dsynth/dsynth.c
679
if (fclose(fp))
usr.bin/dsynth/dsynth.h
622
int dexec_close(FILE *fp, pid_t pid);
usr.bin/dsynth/html.c
273
FILE *fp;
usr.bin/dsynth/html.c
307
fp = fopen(path, "we");
usr.bin/dsynth/html.c
308
if (!fp)
usr.bin/dsynth/html.c
310
if (fp) {
usr.bin/dsynth/html.c
311
fprintf(fp,
usr.bin/dsynth/html.c
349
fprintf(fp,
usr.bin/dsynth/html.c
355
fprintf(fp, ",");
usr.bin/dsynth/html.c
357
strlen(HtmlSlots[i]), fp);
usr.bin/dsynth/html.c
359
fprintf(fp,
usr.bin/dsynth/html.c
372
fprintf(fp,
usr.bin/dsynth/html.c
375
fflush(fp);
usr.bin/dsynth/html.c
376
fclose(fp);
usr.bin/dsynth/html.c
392
FILE *fp;
usr.bin/dsynth/html.c
463
fp = fopen(path, "we");
usr.bin/dsynth/html.c
468
fp = fopen(path, "we");
usr.bin/dsynth/html.c
470
fp = fopen(path, "r+e");
usr.bin/dsynth/html.c
471
fseek(fp, 0, SEEK_END);
usr.bin/dsynth/html.c
474
if (fp) {
usr.bin/dsynth/html.c
475
if (ftell(fp) == 0) {
usr.bin/dsynth/html.c
476
fprintf(fp, "[\n");
usr.bin/dsynth/html.c
478
fseek(fp, -2, SEEK_END);
usr.bin/dsynth/html.c
480
fprintf(fp,
usr.bin/dsynth/html.c
491
((ftell(fp) > 10) ? "," : ""),
usr.bin/dsynth/html.c
501
fclose(fp);
usr.bin/dsynth/pkglist.c
1033
fp = dexec_open(portpath + strlen(DPortsPath) + 1, cav, cac,
usr.bin/dsynth/pkglist.c
1045
while ((ptr = fgetln(fp, &len)) != NULL) {
usr.bin/dsynth/pkglist.c
1120
if (dexec_close(fp, pid)) {
usr.bin/dsynth/pkglist.c
1181
FILE *fp;
usr.bin/dsynth/pkglist.c
1200
fp = dexec_open(NULL, cav, cac, &pid, NULL, 1, 0);
usr.bin/dsynth/pkglist.c
1203
while ((ptr = fgetln(fp, &len)) != NULL) {
usr.bin/dsynth/pkglist.c
1232
if (dexec_close(fp, pid)) {
usr.bin/dsynth/pkglist.c
1249
FILE *fp;
usr.bin/dsynth/pkglist.c
1272
fp = dexec_open(portpath + strlen(DPortsPath) + 1, cav, cac,
usr.bin/dsynth/pkglist.c
1278
while ((ptr = fgetln(fp, &len)) != NULL) {
usr.bin/dsynth/pkglist.c
1300
if (dexec_close(fp, pid)) {
usr.bin/dsynth/pkglist.c
246
FILE *fp;
usr.bin/dsynth/pkglist.c
254
if ((fp = fopen(path, "r")) == NULL) {
usr.bin/dsynth/pkglist.c
262
while ((base = fgetln(fp, &len)) != NULL) {
usr.bin/dsynth/pkglist.c
283
fclose(fp);
usr.bin/dsynth/pkglist.c
295
FILE *fp;
usr.bin/dsynth/pkglist.c
313
fp = popen("pkg info -a -o -A", "r");
usr.bin/dsynth/pkglist.c
321
while ((base = fgetln(fp, &len)) != NULL) {
usr.bin/dsynth/pkglist.c
385
pclose(fp);
usr.bin/dsynth/pkglist.c
971
FILE *fp;
usr.bin/dsynth/repo.c
126
FILE *fp;
usr.bin/dsynth/repo.c
160
fp = dexec_open(NULL, cav, cac, &pid, NULL, 1, 0);
usr.bin/dsynth/repo.c
161
while ((ptr = fgetln(fp, &len)) != NULL)
usr.bin/dsynth/repo.c
163
if (dexec_close(fp, pid) == 0)
usr.bin/dsynth/repo.c
174
fp = dexec_open(NULL, cav, cac, &pid, NULL, 1, 0);
usr.bin/dsynth/repo.c
175
if ((ptr = fgetln(fp, &len)) != NULL && len > 0) {
usr.bin/dsynth/repo.c
186
dexec_close(fp, pid);
usr.bin/dsynth/repo.c
275
FILE *fp;
usr.bin/dsynth/repo.c
285
fp = fopen(path, "w");
usr.bin/dsynth/repo.c
286
if (fp) {
usr.bin/dsynth/repo.c
287
fprintf(fp,
usr.bin/dsynth/repo.c
295
fclose(fp);
usr.bin/dsynth/repo.c
66
FILE *fp;
usr.bin/dsynth/repo.c
96
fp = fdopen(fd, "w");
usr.bin/dsynth/repo.c
97
fprintf(fp, "version = %d;\n", MetaVersion);
usr.bin/dsynth/repo.c
98
fprintf(fp, "packing_format = \"%s\";\n", sufx + 1);
usr.bin/dsynth/repo.c
99
fclose(fp);
usr.bin/dsynth/subs.c
457
FILE *fp;
usr.bin/dsynth/subs.c
589
fp = fdopen(fds[0], "r");
usr.bin/dsynth/subs.c
610
return fp;
usr.bin/dsynth/subs.c
614
dexec_close(FILE *fp, pid_t pid)
usr.bin/dsynth/subs.c
621
fclose(fp);
usr.bin/evtranalyze/plotter.c
145
if (!(plot->fp = fopen(datapath, "w"))) {
usr.bin/evtranalyze/plotter.c
175
fprintf(plot->fp, "%lf\n", val);
usr.bin/evtranalyze/plotter.c
19
FILE *fp;
usr.bin/evtranalyze/plotter.c
192
fprintf(plot->fp, "%lf %lf\n", x, y);
usr.bin/evtranalyze/plotter.c
260
fclose(plot->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
103
FILE *fp;
usr.bin/finger/net.c
166
if ((fp = fdopen(s, "r")) != NULL) {
usr.bin/finger/net.c
169
while ((c = getc(fp)) != EOF) {
usr.bin/finger/net.c
201
if (ferror(fp)) {
usr.bin/finger/net.c
210
fclose(fp);
usr.bin/fstat/fstat.c
357
if (ofiles[i].fp == NULL)
usr.bin/fstat/fstat.c
359
if (!kread(ofiles[i].fp, &file, sizeof (struct file))) {
usr.bin/fstat/fstat.c
361
i, (void *)ofiles[i].fp, Pid);
usr.bin/head/head.c
108
head(fp, linecnt);
usr.bin/head/head.c
110
head_bytes(fp, bytecnt);
usr.bin/head/head.c
111
fclose(fp);
usr.bin/head/head.c
122
head(FILE *fp, size_t cnt)
usr.bin/head/head.c
127
while (cnt && (cp = fgetln(fp, &readlen)) != NULL) {
usr.bin/head/head.c
136
head_bytes(FILE *fp, size_t cnt)
usr.bin/head/head.c
146
readlen = fread(buf, sizeof(char), readlen, fp);
usr.bin/head/head.c
56
FILE *fp;
usr.bin/head/head.c
97
if ((fp = fopen(*argv, "r")) == NULL) {
usr.bin/hexdump/parse.c
49
FILE *fp;
usr.bin/hexdump/parse.c
53
if ((fp = fopen(name, "r")) == NULL)
usr.bin/hexdump/parse.c
55
while (fgets(buf, sizeof(buf), fp)) {
usr.bin/hexdump/parse.c
67
(void)fclose(fp);
usr.bin/iconv/iconv.c
108
INBUFSIZE - inbytes, fp);
usr.bin/iconv/iconv.c
111
if (feof(fp))
usr.bin/iconv/iconv.c
157
FILE *fp;
usr.bin/iconv/iconv.c
207
fp = (strcmp(argv[i], "-") != 0) ?
usr.bin/iconv/iconv.c
209
if (fp == NULL)
usr.bin/iconv/iconv.c
212
do_conv(fp, opt_f, opt_t, opt_s,
usr.bin/iconv/iconv.c
214
(void)fclose(fp);
usr.bin/iconv/iconv.c
72
do_conv(FILE *fp, const char *from, const char *to, bool silent,
usr.bin/iconv/iconv.c
88
while ((inbytes = fread(inbuf, 1, INBUFSIZE, fp)) > 0) {
usr.bin/join/join.c
212
F1->fp = stdin;
usr.bin/join/join.c
213
else if ((F1->fp = fopen(*argv, "r")) == NULL)
usr.bin/join/join.c
217
F2->fp = stdin;
usr.bin/join/join.c
218
else if ((F2->fp = fopen(*argv, "r")) == NULL)
usr.bin/join/join.c
220
if (F1->fp == stdin && F2->fp == stdin)
usr.bin/join/join.c
312
if ((bp = fgetln(F->fp, &len)) == NULL)
usr.bin/join/join.c
65
FILE *fp; /* file descriptor */
usr.bin/killall/killall.c
101
fprintf(fp, "\n");
usr.bin/killall/killall.c
88
printsig(FILE *fp)
usr.bin/killall/killall.c
95
offset += fprintf(fp, "%s ", upper(*p));
usr.bin/killall/killall.c
98
fprintf(fp, "\n");
usr.bin/ktrdump/ktrdump.c
1017
kvmfprintf(FILE *fp, const char *ctl, va_list va)
usr.bin/ktrdump/ktrdump.c
1055
fprintf(fp, fmt,
usr.bin/ktrdump/ktrdump.c
1059
fprintf(fp, fmt,
usr.bin/ktrdump/ktrdump.c
1063
fprintf(fp, fmt,
usr.bin/ktrdump/ktrdump.c
1067
fprintf(fp, fmt,
usr.bin/ktrdump/ktrdump.c
1075
fprintf(fp, "%c", va_arg(va, int));
usr.bin/ktrdump/ktrdump.c
1084
fwrite(s, 1, strlen(s), fp);
usr.bin/ktrdump/ktrdump.c
1092
fprintf(fp, fmt,
usr.bin/ktrdump/ktrdump.c
1137
fprintf(fp, fmt, NULL);
usr.bin/ktrdump/ktrdump.c
158
static void kvmfprintf(FILE *fp, const char *ctl, va_list va);
usr.bin/ktrdump/ktrdump.c
765
FILE *fp;
usr.bin/ktrdump/ktrdump.c
780
if ((fp = popen(cmd, "r")) != NULL) {
usr.bin/ktrdump/ktrdump.c
781
while (fgets(buf, sizeof(buf), fp) != NULL) {
usr.bin/ktrdump/ktrdump.c
797
pclose(fp);
usr.bin/lam/lam.c
104
ip->fp = stdin;
usr.bin/lam/lam.c
105
else if ((ip->fp = fopen(p, "r")) == NULL) {
usr.bin/lam/lam.c
161
ip->fp = NULL;
usr.bin/lam/lam.c
191
for (p = s; (c = fgetc(ip->fp)) != EOF && p < end; p++)
usr.bin/lam/lam.c
197
if (ip->fp == stdin)
usr.bin/lam/lam.c
50
FILE *fp; /* file pointer */
usr.bin/lam/lam.c
78
for (ip = input; ip->fp != NULL; ip++)
usr.bin/lastcomm/lastcomm.c
119
fp = stdin;
usr.bin/lastcomm/lastcomm.c
122
if ((fp = fopen(acctfile, "r")) == NULL ||
usr.bin/lastcomm/lastcomm.c
123
fstat(fileno(fp), &sb))
usr.bin/lastcomm/lastcomm.c
140
if (fp != stdin) {
usr.bin/lastcomm/lastcomm.c
142
if (fseeko(fp, size, SEEK_SET) == -1)
usr.bin/lastcomm/lastcomm.c
146
if ((rv = fread(&ab, sizeof(struct acct), 1, fp)) != 1) {
usr.bin/lastcomm/lastcomm.c
147
if (feof(fp))
usr.bin/lastcomm/lastcomm.c
70
FILE *fp;
usr.bin/limits/limits.c
667
FILE * fp;
usr.bin/limits/limits.c
682
if (stat(procdir, &st) == 0 && (fp = fopen(procdir, "r")) != NULL) {
usr.bin/limits/limits.c
683
char * p = fgets(buf, sizeof buf, fp)==NULL ? NULL : strtok(buf, " \t");
usr.bin/limits/limits.c
684
fclose(fp);
usr.bin/locate/code/locate.code.c
122
FILE *fp;
usr.bin/locate/code/locate.code.c
136
if ((fp = fopen(argv[0], "r")) == NULL)
usr.bin/locate/code/locate.code.c
140
(void)fgets(bigrams, BGBUFSIZE + 1, fp);
usr.bin/locate/code/locate.code.c
144
(void)fclose(fp);
usr.bin/locate/locate/fastfind.c
126
(FILE *fp, char *pathpart, char *database)
usr.bin/locate/locate/fastfind.c
156
p[c] = check_bigram_char(getc(fp));
usr.bin/locate/locate/fastfind.c
157
s[c] = check_bigram_char(getc(fp));
usr.bin/locate/locate/fastfind.c
193
c = getc(fp);
usr.bin/locate/locate/fastfind.c
203
count += getwf(fp) - OFFSET;
usr.bin/locate/locate/fastfind.c
219
c = getc(fp);
usr.bin/locate/locate/fastfind.c
236
c = getc(fp);
usr.bin/locate/locate/fastfind.c
45
statistic (FILE *fp, char *path_fcodes)
usr.bin/locate/locate/fastfind.c
54
p[c] = check_bigram_char(getc(fp));
usr.bin/locate/locate/fastfind.c
55
s[c] = check_bigram_char(getc(fp));
usr.bin/locate/locate/fastfind.c
61
for (c = getc(fp), count = 0; c != EOF; size++) {
usr.bin/locate/locate/fastfind.c
63
count += getwf(fp) - OFFSET;
usr.bin/locate/locate/fastfind.c
69
for (p = path + count; (c = getc(fp)) > SWITCH; size++)
usr.bin/locate/locate/fastfind.c
72
c = getc(fp);
usr.bin/locate/locate/locate.c
221
FILE *fp;
usr.bin/locate/locate/locate.c
228
fp = stdin;
usr.bin/locate/locate/locate.c
234
else if ((fp = fopen(path_fcodes, "r")) == NULL)
usr.bin/locate/locate/locate.c
239
statistic(fp, path_fcodes);
usr.bin/locate/locate/locate.c
240
(void)fclose(fp);
usr.bin/locate/locate/locate.c
250
fseek(fp, (long)0, SEEK_SET) == -1)
usr.bin/locate/locate/locate.c
254
fastfind_icase(fp, *s, path_fcodes);
usr.bin/locate/locate/locate.c
256
fastfind(fp, *s, path_fcodes);
usr.bin/locate/locate/locate.c
262
(void)fclose(fp);
usr.bin/locate/locate/util.c
251
getwf(FILE *fp)
usr.bin/locate/locate/util.c
255
word = getw(fp);
usr.bin/login/login_fbtab.c
116
fclose(fp);
usr.bin/login/login_fbtab.c
84
FILE *fp;
usr.bin/login/login_fbtab.c
91
if ((fp = fopen(table = _PATH_FBTAB, "r")) == NULL
usr.bin/login/login_fbtab.c
92
&& (fp = fopen(table = _PATH_LOGINDEVPERM, "r")) == NULL)
usr.bin/login/login_fbtab.c
95
while (fgets(buf, sizeof(buf), fp)) {
usr.bin/m4/extern.h
157
extern int fp; /* m4 call frame pointer */
usr.bin/m4/main.c
232
fp = 0; /* frame pointer initialized */
usr.bin/m4/main.c
244
fp = 0;
usr.bin/m4/main.c
383
pushf(fp); /* previous call frm */
usr.bin/m4/main.c
388
fp = sp; /* new frame pointer */
usr.bin/m4/main.c
404
eval((const char **) mstack + fp + 1, 2,
usr.bin/m4/main.c
409
fp = PREVFP; /* rewind stack...*/
usr.bin/m4/main.c
449
eval((const char **) mstack + fp + 1, sp-fp,
usr.bin/m4/main.c
454
fp = PREVFP; /* rewind stack...*/
usr.bin/m4/main.c
65
int fp; /* m4 call frame pointer */
usr.bin/m4/mdef.h
217
#define PARLEV (mstack[fp].sfra)
usr.bin/m4/mdef.h
218
#define CALTYP (mstack[fp - 2].sfra)
usr.bin/m4/mdef.h
219
#define TRACESTATUS (mstack[fp - 1].sfra)
usr.bin/m4/mdef.h
220
#define PREVEP (mstack[fp + 3].sstr)
usr.bin/m4/mdef.h
221
#define PREVSP (fp - 4)
usr.bin/m4/mdef.h
222
#define PREVFP (mstack[fp - 3].sfra)
usr.bin/m4/trace.c
128
for (framep = fp, level = 0; framep != 0;
usr.bin/mail/collect.c
491
exwrite(char *name, FILE *fp, int f)
usr.bin/mail/collect.c
514
while ((c = getc(fp)) != EOF) {
usr.bin/mail/collect.c
536
mesedit(FILE *fp, int c)
usr.bin/mail/collect.c
539
FILE *nf = run_editor(fp, (off_t)-1, c, 0);
usr.bin/mail/collect.c
544
Fclose(fp);
usr.bin/mail/collect.c
556
mespipe(FILE *fp, char *cmd)
usr.bin/mail/collect.c
576
if (run_command(sh, 0, fileno(fp), fileno(nf), "-c", cmd, NULL) < 0) {
usr.bin/mail/collect.c
590
Fclose(fp);
usr.bin/mail/collect.c
604
forward(char *ms, FILE *fp, char *fn, int f)
usr.bin/mail/collect.c
634
if (sendmessage(mp, fp, ig, tabst) < 0) {
usr.bin/mail/collect.c
707
savedeadletter(FILE *fp)
usr.bin/mail/collect.c
713
if (fsize(fp) == 0)
usr.bin/mail/collect.c
721
while ((c = getc(fp)) != EOF)
usr.bin/mail/collect.c
724
rewind(fp);
usr.bin/mail/edit.c
103
mp->m_size = (long)fsize(fp);
usr.bin/mail/edit.c
106
rewind(fp);
usr.bin/mail/edit.c
107
while ((c = getc(fp)) != EOF) {
usr.bin/mail/edit.c
115
Fclose(fp);
usr.bin/mail/edit.c
129
run_editor(FILE *fp, off_t size, int type, int readonly)
usr.bin/mail/edit.c
149
while (--size >= 0 && (t = getc(fp)) != EOF)
usr.bin/mail/edit.c
152
while ((t = getc(fp)) != EOF)
usr.bin/mail/edit.c
70
FILE *fp;
usr.bin/mail/edit.c
97
fp = run_editor(setinput(mp), mp->m_size, type, readonly);
usr.bin/mail/edit.c
98
if (fp != NULL) {
usr.bin/mail/popen.c
100
FILE *fp;
usr.bin/mail/popen.c
122
if ((fp = fdopen(myside, mode)) != NULL)
usr.bin/mail/popen.c
123
register_file(fp, 1, pid);
usr.bin/mail/popen.c
124
return (fp);
usr.bin/mail/popen.c
151
(void)Pclose(fp_head->fp);
usr.bin/mail/popen.c
153
(void)Fclose(fp_head->fp);
usr.bin/mail/popen.c
157
register_file(FILE *fp, int pipe, int pid)
usr.bin/mail/popen.c
159
struct fp *fpp;
usr.bin/mail/popen.c
163
fpp->fp = fp;
usr.bin/mail/popen.c
171
unregister_file(FILE *fp)
usr.bin/mail/popen.c
173
struct fp **pp, *p;
usr.bin/mail/popen.c
176
if (p->fp == fp) {
usr.bin/mail/popen.c
186
file_pid(FILE *fp)
usr.bin/mail/popen.c
188
struct fp *p;
usr.bin/mail/popen.c
191
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
65
FILE *fp;
usr.bin/mail/popen.c
67
if ((fp = fopen(path, mode)) != NULL) {
usr.bin/mail/popen.c
68
register_file(fp, 0, 0);
usr.bin/mail/popen.c
69
fcntl(fileno(fp), F_SETFD, 1);
usr.bin/mail/popen.c
71
return (fp);
usr.bin/mail/popen.c
77
FILE *fp;
usr.bin/mail/popen.c
79
if ((fp = fdopen(fd, mode)) != NULL) {
usr.bin/mail/popen.c
80
register_file(fp, 0, 0);
usr.bin/mail/popen.c
81
fcntl(fileno(fp), F_SETFD, 1);
usr.bin/mail/popen.c
83
return (fp);
usr.bin/mail/popen.c
87
Fclose(FILE *fp)
usr.bin/mail/popen.c
89
unregister_file(fp);
usr.bin/mail/popen.c
90
return (fclose(fp));
usr.bin/mkcsmapper/yacc.y
367
FILE *fp;
usr.bin/mkcsmapper/yacc.y
398
fp = output ? fopen(output, "wb") : stdout;
usr.bin/mkcsmapper/yacc.y
400
if (fp == NULL) {
usr.bin/mkcsmapper/yacc.y
411
if (fwrite(serialized, size, 1, fp) != 1)
usr.bin/mkcsmapper/yacc.y
414
fclose(fp);
usr.bin/mkesdb/yacc.y
134
FILE *fp;
usr.bin/mkesdb/yacc.y
198
fp = fopen(output, "wb");
usr.bin/mkesdb/yacc.y
200
fp = stdout;
usr.bin/mkesdb/yacc.y
202
if (fp == NULL) {
usr.bin/mkesdb/yacc.y
212
if (fwrite(serialized, size, 1, fp) != 1)
usr.bin/mkesdb/yacc.y
215
fclose(fp);
usr.bin/paste/paste.c
112
FILE *fp;
usr.bin/paste/paste.c
132
lp->fp = stdin;
usr.bin/paste/paste.c
133
else if (!(lp->fp = fopen(p, "r")))
usr.bin/paste/paste.c
148
if (!lp->fp) {
usr.bin/paste/paste.c
154
if ((ich = getwc(lp->fp)) == WEOF) {
usr.bin/paste/paste.c
157
lp->fp = NULL;
usr.bin/paste/paste.c
178
} while ((ich = getwc(lp->fp)) != WEOF && ich != '\n');
usr.bin/paste/paste.c
190
FILE *fp;
usr.bin/paste/paste.c
198
fp = stdin;
usr.bin/paste/paste.c
199
else if (!(fp = fopen(p, "r"))) {
usr.bin/paste/paste.c
205
while ((ch = getwc(fp)) != WEOF) {
usr.bin/paste/paste.c
220
if (fp != stdin)
usr.bin/paste/paste.c
221
(void)fclose(fp);
usr.bin/pctrack/pctrack.c
247
FILE *fp;
usr.bin/pctrack/pctrack.c
266
if ((fp = popen(cmd, "r")) != NULL) {
usr.bin/pctrack/pctrack.c
267
while (fgets(buf, sizeof(buf), fp) != NULL) {
usr.bin/pctrack/pctrack.c
285
pclose(fp);
usr.bin/rev/rev.c
102
if (ferror(fp)) {
usr.bin/rev/rev.c
105
clearerr(fp);
usr.bin/rev/rev.c
48
FILE *fp;
usr.bin/rev/rev.c
69
if ((fp = fopen(argv[i], "r")) != NULL) {
usr.bin/rev/rev.c
70
rval += dorev(fp, argv[i]);
usr.bin/rev/rev.c
71
fclose(fp);
usr.bin/rev/rev.c
89
dorev(FILE *fp, const char *filepath)
usr.bin/rev/rev.c
94
while ((p = fgetwln(fp, &len)) != NULL) {
usr.bin/rwall/rwall.c
131
FILE *fp;
usr.bin/rwall/rwall.c
138
if ((fd = mkstemp(tmpname)) == -1 || (fp = fdopen(fd, "r+")) == NULL)
usr.bin/rwall/rwall.c
158
fprintf(fp, "Remote Broadcast Message from %s@%s\n", whom, hostname);
usr.bin/rwall/rwall.c
162
fprintf(fp, " (%s) at %d:%02d ...\n", tty,
usr.bin/rwall/rwall.c
165
putc('\n', fp);
usr.bin/rwall/rwall.c
170
fputs(lbuf, fp);
usr.bin/rwall/rwall.c
171
rewind(fp);
usr.bin/rwall/rwall.c
178
if (fread(mbuf, sizeof(*mbuf), mbufsize, fp) != (u_int)mbufsize)
usr.bin/script/script.c
338
record(FILE *fp, char *buf, size_t cc, int direction)
usr.bin/script/script.c
353
if (writev(fileno(fp), &iov[0], 2) == -1)
usr.bin/script/script.c
358
consume(FILE *fp, off_t len, char *buf, int reg)
usr.bin/script/script.c
363
if (fseeko(fp, len, SEEK_CUR) == -1)
usr.bin/script/script.c
369
if (fread(buf, sizeof(char), l, fp) != l)
usr.bin/script/script.c
386
playback(FILE *fp)
usr.bin/script/script.c
397
if (fstat(fileno(fp), &pst) == -1)
usr.bin/script/script.c
403
if (fread(&stamp, sizeof(stamp), 1, fp) != 1) {
usr.bin/script/script.c
427
consume(fp, stamp.scr_len, buf, reg);
usr.bin/script/script.c
433
consume(fp, stamp.scr_len, buf, reg);
usr.bin/script/script.c
437
consume(fp, stamp.scr_len, buf, reg);
usr.bin/script/script.c
451
if (fread(buf, sizeof(char), l, fp) != l)
usr.bin/script/script.c
462
fclose(fp);
usr.bin/sed/compile.c
160
struct s_format *fp;
usr.bin/sed/compile.c
215
for (fp = cmd_fmts; fp->code; fp++)
usr.bin/sed/compile.c
216
if (fp->code == *p)
usr.bin/sed/compile.c
218
if (!fp->code)
usr.bin/sed/compile.c
220
if (naddr > fp->naddr)
usr.bin/sed/compile.c
223
linenum, fname, *p, fp->naddr, naddr);
usr.bin/sed/compile.c
224
switch (fp->args) {
usr.bin/sed/main.c
495
struct s_flist *fp;
usr.bin/sed/main.c
497
if ((fp = malloc(sizeof(struct s_flist))) == NULL)
usr.bin/sed/main.c
499
fp->next = NULL;
usr.bin/sed/main.c
500
*fl_nextp = fp;
usr.bin/sed/main.c
501
fp->fname = s;
usr.bin/sed/main.c
502
fl_nextp = &fp->next;
usr.bin/sort/sort.c
959
FILE* fp;
usr.bin/sort/sort.c
965
fp = openfile(filename, "r");
usr.bin/sort/sort.c
966
if (fp == NULL)
usr.bin/sort/sort.c
968
if (fstat(fileno(fp), &st) < 0) {
usr.bin/sort/sort.c
976
while (size > 0 && (bytes = fread(buffer, 1, sizeof(buffer), fp)) > 0) {
usr.bin/sort/sort.c
982
closefile(fp, NULL);
usr.bin/strfile/strfile.c
139
STR *fp;
usr.bin/strfile/strfile.c
189
fp = &Firstch[Num_pts - 1];
usr.bin/strfile/strfile.c
191
fp->first = tolower((unsigned char)*nsp);
usr.bin/strfile/strfile.c
193
fp->first = *nsp;
usr.bin/strfile/strfile.c
194
fp->pos = Seekpts[Num_pts - 1];
usr.bin/strfile/strfile.c
314
add_offset(FILE *fp, off_t off)
usr.bin/strfile/strfile.c
320
fwrite(&beoff, 1, sizeof(beoff), fp);
usr.bin/strfile/strfile.c
337
STR *fp;
usr.bin/strfile/strfile.c
344
fp = Firstch;
usr.bin/strfile/strfile.c
346
*lp++ = fp++->pos;
usr.bin/systat/symbols.c
118
pclose(fp);
usr.bin/systat/symbols.c
80
FILE *fp;
usr.bin/systat/symbols.c
96
if ((fp = popen(cmd, "r")) != NULL) {
usr.bin/systat/symbols.c
98
while (fgets(buf, sizeof(buf), fp) != NULL) {
usr.bin/tail/extern.h
54
FILE *fp;
usr.bin/tail/forward.c
105
if (fseeko(fp, off, SEEK_SET) == -1) {
usr.bin/tail/forward.c
111
if ((ch = getc(fp)) == EOF) {
usr.bin/tail/forward.c
112
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
146
if (ferror(fp)) {
usr.bin/tail/forward.c
151
if (display_bytes(fp, fn, off))
usr.bin/tail/forward.c
158
if (fseeko(fp, 0, SEEK_END) == -1) {
usr.bin/tail/forward.c
163
rlines(fp, fn, off, sbp);
usr.bin/tail/forward.c
166
while (getc(fp) != EOF)
usr.bin/tail/forward.c
168
if (ferror(fp)) {
usr.bin/tail/forward.c
173
if (display_lines(fp, fn, off))
usr.bin/tail/forward.c
182
while ((ch = getc(fp)) != EOF) {
usr.bin/tail/forward.c
186
if (ferror(fp)) {
usr.bin/tail/forward.c
197
rlines(FILE *fp, const char *fn, off_t off, struct stat *sbp)
usr.bin/tail/forward.c
207
map.fd = fileno(fp);
usr.bin/tail/forward.c
235
if (fseeko(fp, sbp->st_size, SEEK_SET) == -1) {
usr.bin/tail/forward.c
251
while ((ch = getc(file->fp)) != EOF) {
usr.bin/tail/forward.c
261
if (ferror(file->fp)) {
usr.bin/tail/forward.c
262
fclose(file->fp);
usr.bin/tail/forward.c
263
file->fp = NULL;
usr.bin/tail/forward.c
267
clearerr(file->fp);
usr.bin/tail/forward.c
285
if (file->fp == NULL)
usr.bin/tail/forward.c
288
if (fstatfs(fileno(file->fp), &sf) == 0 &&
usr.bin/tail/forward.c
294
if (Fflag && fileno(file->fp) != STDIN_FILENO) {
usr.bin/tail/forward.c
295
EV_SET(&ev[n], fileno(file->fp), EVFILT_VNODE,
usr.bin/tail/forward.c
300
EV_SET(&ev[n], fileno(file->fp), EVFILT_READ,
usr.bin/tail/forward.c
324
if (file->fp == NULL)
usr.bin/tail/forward.c
329
forward(file->fp, file->file_name, style, off, &file->st);
usr.bin/tail/forward.c
352
if (file->fp == NULL) {
usr.bin/tail/forward.c
353
file->fp = fopen(file->file_name, "r");
usr.bin/tail/forward.c
354
if (file->fp != NULL &&
usr.bin/tail/forward.c
355
fstat(fileno(file->fp), &file->st)
usr.bin/tail/forward.c
357
fclose(file->fp);
usr.bin/tail/forward.c
358
file->fp = NULL;
usr.bin/tail/forward.c
360
if (file->fp != NULL)
usr.bin/tail/forward.c
364
if (fileno(file->fp) == STDIN_FILENO)
usr.bin/tail/forward.c
372
if (file->fp != NULL) {
usr.bin/tail/forward.c
373
fclose(file->fp);
usr.bin/tail/forward.c
374
file->fp = NULL;
usr.bin/tail/forward.c
387
if (file->fp != NULL)
usr.bin/tail/forward.c
388
fclose(file->fp);
usr.bin/tail/forward.c
389
file->fp = ftmp;
usr.bin/tail/forward.c
400
if (file->fp != NULL && !show(file))
usr.bin/tail/forward.c
93
forward(FILE *fp, const char *fn, enum STYLE style, off_t off,
usr.bin/tail/read.c
129
display_lines(FILE *fp, const char *fn, off_t off)
usr.bin/tail/read.c
146
while ((ch = getc(fp)) != EOF) {
usr.bin/tail/read.c
172
if (ferror(fp)) {
usr.bin/tail/read.c
59
display_bytes(FILE *fp, const char *fn, off_t off)
usr.bin/tail/read.c
69
for (wrap = 0, ep = p + off; (ch = getc(fp)) != EOF;) {
usr.bin/tail/read.c
76
if (ferror(fp)) {
usr.bin/tail/reverse.c
101
r_reg(FILE *fp, const char *fn, enum STYLE style, off_t off, struct stat *sbp)
usr.bin/tail/reverse.c
112
map.fd = fileno(fp);
usr.bin/tail/reverse.c
183
r_buf(FILE *fp, const char *fn)
usr.bin/tail/reverse.c
193
while (!feof(fp)) {
usr.bin/tail/reverse.c
213
while ((!feof(fp)) && len < BSZ) {
usr.bin/tail/reverse.c
215
len += fread(p, 1, BSZ - len, fp);
usr.bin/tail/reverse.c
216
if (ferror(fp)) {
usr.bin/tail/reverse.c
72
reverse(FILE *fp, const char *fn, enum STYLE style, off_t off,
usr.bin/tail/reverse.c
79
r_reg(fp, fn, style, off, sbp);
usr.bin/tail/reverse.c
84
display_bytes(fp, fn, off);
usr.bin/tail/reverse.c
88
display_lines(fp, fn, off);
usr.bin/tail/reverse.c
91
r_buf(fp, fn);
usr.bin/tail/tail.c
162
filep->fp = fopen(filep->file_name, "r");
usr.bin/tail/tail.c
163
if (filep->fp == NULL ||
usr.bin/tail/tail.c
164
fstat(fileno(filep->fp), &filep->st) == -1) {
usr.bin/tail/tail.c
165
if (filep->fp != NULL) {
usr.bin/tail/tail.c
166
fclose(filep->fp);
usr.bin/tail/tail.c
167
filep->fp = NULL;
usr.bin/tail/tail.c
179
if ((fp = fopen(fn, "r")) == NULL ||
usr.bin/tail/tail.c
180
fstat(fileno(fp), &sb) == -1) {
usr.bin/tail/tail.c
181
if (fp != NULL)
usr.bin/tail/tail.c
182
fclose(fp);
usr.bin/tail/tail.c
192
reverse(fp, fn, style, off, &sb);
usr.bin/tail/tail.c
194
forward(fp, fn, style, off, &sb);
usr.bin/tail/tail.c
195
fclose(fp);
usr.bin/tail/tail.c
222
file.fp = stdin;
usr.bin/tail/tail.c
58
FILE *fp;
usr.bin/tsort/tsort.c
110
FILE *fp;
usr.bin/tsort/tsort.c
133
fp = stdin;
usr.bin/tsort/tsort.c
138
if ((fp = fopen(*argv, "r")) == NULL)
usr.bin/tsort/tsort.c
150
for (n = 0, c = getc(fp);;) {
usr.bin/tsort/tsort.c
152
c = getc(fp);
usr.bin/tsort/tsort.c
163
c = getc(fp);
usr.bin/tsort/tsort.c
172
fclose(fp);
usr.bin/undo/undo.c
418
FILE *fp;
usr.bin/undo/undo.c
464
fp = _fopen(path, "w");
usr.bin/undo/undo.c
467
fp = _fopen(OutFileName, "w");
usr.bin/undo/undo.c
476
fp = _fopen(path, "w");
usr.bin/undo/undo.c
494
fp = stdout;
usr.bin/undo/undo.c
504
fwrite(buf, 1, n, fp);
usr.bin/undo/undo.c
513
runcmd(fileno(fp), "/usr/bin/diff", "diff", "-N", "-r", "-u",
usr.bin/undo/undo.c
519
runcmd(fileno(fp), "/usr/bin/diff", "diff", "-N", "-r", "-u",
usr.bin/undo/undo.c
535
if (fp != stdout)
usr.bin/undo/undo.c
536
fclose(fp);
usr.bin/undo/undo.c
661
FILE *fp;
usr.bin/undo/undo.c
663
fp = fopen(filename, mode);
usr.bin/undo/undo.c
664
if (fp == NULL)
usr.bin/undo/undo.c
666
return(fp);
usr.bin/unifdef/unifdef.c
458
synopsis(FILE *fp)
usr.bin/unifdef/unifdef.c
460
fprintf(fp,
usr.bin/unifdef/unifdef.h
39
#define fbinmode(fp) (fp)
usr.bin/uniq/uniq.c
265
FILE *fp;
usr.bin/uniq/uniq.c
267
if ((fp = fopen(name, mode)) == NULL)
usr.bin/uniq/uniq.c
269
return(fp);
usr.bin/unvis/unvis.c
102
while ((c = getc(fp)) != EOF) {
usr.bin/unvis/unvis.c
45
FILE *fp;
usr.bin/unvis/unvis.c
84
if ((fp = fopen(*argv, "r")) != NULL)
usr.bin/unvis/unvis.c
85
process(fp, *argv, eflags);
usr.bin/unvis/unvis.c
96
process(FILE *fp, const char *filename, int eflags)
usr.bin/usbhidaction/usbhidaction.c
168
fp = open(pidfile, O_WRONLY|O_CREAT, S_IRUSR|S_IRGRP|S_IROTH);
usr.bin/usbhidaction/usbhidaction.c
169
if (fp >= 0) {
usr.bin/usbhidaction/usbhidaction.c
174
write(fp, buf, sz1);
usr.bin/usbhidaction/usbhidaction.c
175
close(fp);
usr.bin/usbhidaction/usbhidaction.c
88
int fd, fp, ch, n, val, i;
usr.bin/vis/vis.c
143
if ((fp = fopen(*argv, "r")) != NULL) {
usr.bin/vis/vis.c
144
process(fp);
usr.bin/vis/vis.c
145
fclose(fp);
usr.bin/vis/vis.c
158
process(FILE *fp)
usr.bin/vis/vis.c
181
c = getwc(fp);
usr.bin/vis/vis.c
184
c = (wint_t)getc(fp);
usr.bin/vis/vis.c
192
rachar = getwc(fp);
usr.bin/vis/vis.c
195
rachar = (wint_t)getc(fp);
usr.bin/vis/vis.c
57
FILE *fp;
usr.bin/wall/wall.c
172
FILE *fp;
usr.bin/wall/wall.c
180
if ((fd = mkstemp(tmpname)) == -1 || !(fp = fdopen(fd, "r+")))
usr.bin/wall/wall.c
202
(void)fprintf(fp, "\r%79s\r\n", " ");
usr.bin/wall/wall.c
206
(void)fprintf(fp, "%-79.79s\007\007\r\n", lbuf);
usr.bin/wall/wall.c
210
(void)fprintf(fp, "%-79.79s\r\n", lbuf);
usr.bin/wall/wall.c
212
(void)fprintf(fp, "%79s\r\n", " ");
usr.bin/wall/wall.c
227
putc(' ', fp);
usr.bin/wall/wall.c
228
putc('\r', fp);
usr.bin/wall/wall.c
229
putc('\n', fp);
usr.bin/wall/wall.c
238
putc('M', fp);
usr.bin/wall/wall.c
240
putc('\r', fp);
usr.bin/wall/wall.c
241
putc('\n', fp);
usr.bin/wall/wall.c
244
putc('-', fp);
usr.bin/wall/wall.c
246
putc('\r', fp);
usr.bin/wall/wall.c
247
putc('\n', fp);
usr.bin/wall/wall.c
253
putc('^', fp);
usr.bin/wall/wall.c
255
putc('\r', fp);
usr.bin/wall/wall.c
256
putc('\n', fp);
usr.bin/wall/wall.c
260
putc(ch, fp);
usr.bin/wall/wall.c
262
putc(ch, fp);
usr.bin/wall/wall.c
265
(void)fprintf(fp, "%79s\r\n", " ");
usr.bin/wall/wall.c
266
rewind(fp);
usr.bin/wall/wall.c
273
if ((int)fread(mbuf, sizeof(*mbuf), mbufsize, fp) != mbufsize)
usr.bin/window/wwterminfo.c
63
FILE *fp;
usr.bin/window/wwterminfo.c
76
if ((fp = fopen(buf, "w")) == NULL) {
usr.bin/window/wwterminfo.c
80
(void) fprintf(fp, "%sco#%d:li#%d:%s\n",
usr.bin/window/wwterminfo.c
82
(void) fclose(fp);
usr.sbin/arp/arp.c
224
FILE *fp;
usr.sbin/arp/arp.c
228
if ((fp = fopen(name, "r")) == NULL)
usr.sbin/arp/arp.c
236
while(fgets(line, 100, fp) != NULL) {
usr.sbin/arp/arp.c
252
fclose(fp);
usr.sbin/burncd/burncd.c
236
FILE *fp;
usr.sbin/burncd/burncd.c
238
if ((fp = fopen(argv[arg], "r")) == NULL)
usr.sbin/burncd/burncd.c
241
while (fgets(file_buf, sizeof(file_buf), fp) != NULL) {
usr.sbin/burncd/burncd.c
248
if (feof(fp))
usr.sbin/burncd/burncd.c
249
fclose(fp);
usr.sbin/ckdist/ckdist.c
185
FILE *fp;
usr.sbin/ckdist/ckdist.c
190
fp = stdin;
usr.sbin/ckdist/ckdist.c
191
} else if ((fp = fopen(path, "r")) == NULL)
usr.sbin/ckdist/ckdist.c
194
if (fp != stdin)
usr.sbin/ckdist/ckdist.c
197
if ((c = fgetc(fp)) != EOF) {
usr.sbin/ckdist/ckdist.c
199
ungetc(c, fp);
usr.sbin/ckdist/ckdist.c
204
rval = chkmd5(fp, path);
usr.sbin/ckdist/ckdist.c
207
rval = chkinf(fp, path);
usr.sbin/ckdist/ckdist.c
212
if (ferror(fp))
usr.sbin/ckdist/ckdist.c
214
if (fp != stdin && fclose(fp))
usr.sbin/ckdist/ckdist.c
271
chkmd5(FILE * fp, const char *path)
usr.sbin/ckdist/ckdist.c
282
while (fgets(buf, sizeof(buf), fp)) {
usr.sbin/ckdist/ckdist.c
286
&ch)) != 3 && (!feof(fp) || c != 2)) ||
usr.sbin/ckdist/ckdist.c
316
chkinf(FILE * fp, const char *path)
usr.sbin/ckdist/ckdist.c
330
for (cnt = -1; fgets(buf, sizeof(buf), fp); cnt++) {
usr.sbin/ckdist/ckdist.c
340
(!feof(fp) || c != 3)) || (c == 4 && ch != '\n') ||
usr.sbin/ckdist/ckdist.c
343
else if ((dname = distname(fp == stdin ? NULL : path, NULL,
usr.sbin/ckdist/ckdist.c
77
static int chkmd5(FILE * fp, const char *path);
usr.sbin/ckdist/ckdist.c
78
static int chkinf(FILE * fp, const char *path);
usr.sbin/config/main.c
272
get_word(FILE *fp)
usr.sbin/config/main.c
280
while ((ch = getc(fp)) != EOF)
usr.sbin/config/main.c
299
while ((ch = getc(fp)) != EOF) {
usr.sbin/config/main.c
307
ungetc(ch, fp);
usr.sbin/config/main.c
317
get_quoted_word(FILE *fp)
usr.sbin/config/main.c
325
while ((ch = getc(fp)) != EOF)
usr.sbin/config/main.c
346
while ((ch = getc(fp)) != EOF) {
usr.sbin/config/main.c
359
while ((ch = getc(fp)) != EOF) {
usr.sbin/config/main.c
365
ungetc(ch, fp);
usr.sbin/config/mkioconf.c
103
fprintf(fp, "\t{ \"maddr\",\tRES_INT,\t{ 0x%x }},\n", dp->d_maddr);
usr.sbin/config/mkioconf.c
107
fprintf(fp, "\t{ \"msize\",\tRES_INT,\t{ 0x%x }},\n", dp->d_msize);
usr.sbin/config/mkioconf.c
111
fprintf(fp, "\t{ \"drq\",\tRES_INT,\t{ %d }},\n", dp->d_drq);
usr.sbin/config/mkioconf.c
115
fprintf(fp, "\t{ \"irq\",\tRES_INT,\t{ %d }},\n", dp->d_irq);
usr.sbin/config/mkioconf.c
118
fprintf(fp, "};\n");
usr.sbin/config/mkioconf.c
119
fprintf(fp, "#define %s_count %d\n", devstr(dp), count);
usr.sbin/config/mkioconf.c
123
write_all_device_resources(FILE *fp)
usr.sbin/config/mkioconf.c
132
write_device_resources(fp, dp);
usr.sbin/config/mkioconf.c
137
write_devtab(FILE *fp)
usr.sbin/config/mkioconf.c
142
write_all_device_resources(fp);
usr.sbin/config/mkioconf.c
145
fprintf(fp, "struct config_device config_devtab[] = {\n");
usr.sbin/config/mkioconf.c
154
fprintf(fp, "\t{ \"%s\",\t%d,\t%s_count,\t%s_resources },\n",
usr.sbin/config/mkioconf.c
158
fprintf(fp, "};\n");
usr.sbin/config/mkioconf.c
159
fprintf(fp, "int devtab_count = %d;\n", count);
usr.sbin/config/mkioconf.c
165
FILE *fp;
usr.sbin/config/mkioconf.c
167
fp = fopen(path("ioconf.c.new"), "w");
usr.sbin/config/mkioconf.c
168
if (fp == NULL)
usr.sbin/config/mkioconf.c
170
fprintf(fp, "/*\n");
usr.sbin/config/mkioconf.c
171
fprintf(fp, " * I/O configuration.\n");
usr.sbin/config/mkioconf.c
172
fprintf(fp, " * DO NOT EDIT-- this file is automatically generated.\n");
usr.sbin/config/mkioconf.c
173
fprintf(fp, " */\n");
usr.sbin/config/mkioconf.c
174
fprintf(fp, "\n");
usr.sbin/config/mkioconf.c
175
fprintf(fp, "#include <sys/param.h>\n");
usr.sbin/config/mkioconf.c
176
fprintf(fp, "\n");
usr.sbin/config/mkioconf.c
177
fprintf(fp, "/*\n");
usr.sbin/config/mkioconf.c
178
fprintf(fp, " * New bus architecture devices.\n");
usr.sbin/config/mkioconf.c
179
fprintf(fp, " */\n");
usr.sbin/config/mkioconf.c
180
fprintf(fp, "\n");
usr.sbin/config/mkioconf.c
181
fprintf(fp, "#include <sys/queue.h>\n");
usr.sbin/config/mkioconf.c
182
fprintf(fp, "#include <sys/sysctl.h>\n");
usr.sbin/config/mkioconf.c
183
fprintf(fp, "#include <bus/isa/isareg.h>\n");
usr.sbin/config/mkioconf.c
184
fprintf(fp, "#include <sys/bus_private.h>\n");
usr.sbin/config/mkioconf.c
185
fprintf(fp, "\n");
usr.sbin/config/mkioconf.c
187
write_devtab(fp);
usr.sbin/config/mkioconf.c
189
fclose(fp);
usr.sbin/config/mkioconf.c
56
write_device_resources(FILE *fp, struct device *dp)
usr.sbin/config/mkioconf.c
61
fprintf(fp, "struct config_resource %s_resources[] = {\n", devstr(dp));
usr.sbin/config/mkioconf.c
67
fprintf(fp, "\t{ \"at\",\tRES_STRING,\t{ (long)\"%s\" }},\n", buf);
usr.sbin/config/mkioconf.c
71
fprintf(fp, "\t{ \"drive\",\tRES_INT,\t{ %d }},\n", dp->d_drive);
usr.sbin/config/mkioconf.c
75
fprintf(fp, "\t{ \"target\",\tRES_INT,\t{ %d }},\n", dp->d_target);
usr.sbin/config/mkioconf.c
79
fprintf(fp, "\t{ \"lun\",\tRES_INT,\t{ %d }},\n", dp->d_lun);
usr.sbin/config/mkioconf.c
83
fprintf(fp, "\t{ \"bus\",\tRES_INT,\t{ %d }},\n", dp->d_bus);
usr.sbin/config/mkioconf.c
87
fprintf(fp, "\t{ \"flags\",\tRES_INT,\t{ 0x%x }},\n", dp->d_flags);
usr.sbin/config/mkioconf.c
91
fprintf(fp, "\t{ \"disabled\",\tRES_INT,\t{ %d }},\n", dp->d_disabled);
usr.sbin/config/mkioconf.c
95
fprintf(fp, "\t{ \"port\",\tRES_INT,\t { %s }},\n", dp->d_port);
usr.sbin/config/mkioconf.c
99
fprintf(fp, "\t{ \"port\",\tRES_INT,\t{ 0x%x }},\n", dp->d_portn);
usr.sbin/config/mkmakefile.c
103
struct file_list *fp;
usr.sbin/config/mkmakefile.c
105
for (fp = ftab; fp != NULL; fp = fp->f_next) {
usr.sbin/config/mkmakefile.c
106
if (strcmp(tail(fp->f_fn), tail(file)) == 0)
usr.sbin/config/mkmakefile.c
107
return(fp);
usr.sbin/config/mkmakefile.c
118
struct file_list *fp;
usr.sbin/config/mkmakefile.c
120
fp = malloc(sizeof(*fp));
usr.sbin/config/mkmakefile.c
121
bzero(fp, sizeof(*fp));
usr.sbin/config/mkmakefile.c
123
fcur = ftab = fp;
usr.sbin/config/mkmakefile.c
125
fcur->f_next = fp;
usr.sbin/config/mkmakefile.c
126
fcur = fp;
usr.sbin/config/mkmakefile.c
127
return(fp);
usr.sbin/config/mkmakefile.c
225
FILE *fp;
usr.sbin/config/mkmakefile.c
244
fp = fopen(fname, "r");
usr.sbin/config/mkmakefile.c
245
if (fp == NULL)
usr.sbin/config/mkmakefile.c
255
wd = get_word(fp);
usr.sbin/config/mkmakefile.c
257
fclose(fp);
usr.sbin/config/mkmakefile.c
263
fp = fopen(fname, "r");
usr.sbin/config/mkmakefile.c
264
if (fp != NULL)
usr.sbin/config/mkmakefile.c
274
fp = fopen(fname, "r");
usr.sbin/config/mkmakefile.c
275
if (fp != NULL)
usr.sbin/config/mkmakefile.c
284
while (((wd = get_word(fp)) != (char *)EOF) && wd)
usr.sbin/config/mkmakefile.c
289
next_word(fp, wd);
usr.sbin/config/mkmakefile.c
343
next_word(fp, wd);
usr.sbin/config/mkmakefile.c
368
next_quoted_word(fp, wd);
usr.sbin/config/mkmakefile.c
378
next_quoted_word(fp, wd);
usr.sbin/config/mkmakefile.c
388
next_quoted_word(fp, wd);
usr.sbin/config/mkmakefile.c
402
next_quoted_word(fp, wd);
usr.sbin/config/mkmakefile.c
465
while ((wd = get_word(fp)) != NULL)
usr.sbin/config/mkmakefile.c
48
#define next_word(fp, wd) \
usr.sbin/config/mkmakefile.c
52
word = get_word(fp); \
usr.sbin/config/mkmakefile.c
534
do_before_depend(FILE *fp)
usr.sbin/config/mkmakefile.c
539
fputs("BEFORE_DEPEND=", fp);
usr.sbin/config/mkmakefile.c
546
fputs("\\\n\t", fp);
usr.sbin/config/mkmakefile.c
549
fprintf(fp, "%s ", tp->f_fn);
usr.sbin/config/mkmakefile.c
551
fprintf(fp, "$S/%s ", tp->f_fn);
usr.sbin/config/mkmakefile.c
555
putc('\n', fp);
usr.sbin/config/mkmakefile.c
559
do_objs(FILE *fp)
usr.sbin/config/mkmakefile.c
565
fprintf(fp, "OBJS=");
usr.sbin/config/mkmakefile.c
576
fprintf(fp, "\\\n\t");
usr.sbin/config/mkmakefile.c
578
fprintf(fp, "%s ", sp);
usr.sbin/config/mkmakefile.c
58
#define next_quoted_word(fp, wd) \
usr.sbin/config/mkmakefile.c
583
putc('\n', fp);
usr.sbin/config/mkmakefile.c
587
do_cfiles(FILE *fp)
usr.sbin/config/mkmakefile.c
592
fputs("CFILES=", fp);
usr.sbin/config/mkmakefile.c
601
fputs("\\\n\t", fp);
usr.sbin/config/mkmakefile.c
604
fprintf(fp, "$S/%s ", tp->f_fn);
usr.sbin/config/mkmakefile.c
606
fprintf(fp, "%s ", tp->f_fn);
usr.sbin/config/mkmakefile.c
611
putc('\n', fp);
usr.sbin/config/mkmakefile.c
615
do_mfiles(FILE *fp)
usr.sbin/config/mkmakefile.c
62
word = get_quoted_word(fp); \
usr.sbin/config/mkmakefile.c
620
fputs("MFILES=", fp);
usr.sbin/config/mkmakefile.c
629
fputs("\\\n\t", fp);
usr.sbin/config/mkmakefile.c
631
fprintf(fp, "$S/%s ", tp->f_fn);
usr.sbin/config/mkmakefile.c
635
putc('\n', fp);
usr.sbin/config/mkmakefile.c
639
do_sfiles(FILE *fp)
usr.sbin/config/mkmakefile.c
644
fputs("SFILES=", fp);
usr.sbin/config/mkmakefile.c
653
fputs("\\\n\t", fp);
usr.sbin/config/mkmakefile.c
655
fprintf(fp, "$S/%s ", tp->f_fn);
usr.sbin/config/mkmakefile.c
659
putc('\n', fp);
usr.sbin/config/mkmakefile.c
742
do_clean(FILE *fp)
usr.sbin/config/mkmakefile.c
747
fputs("CLEAN=", fp);
usr.sbin/config/mkmakefile.c
754
fputs("\\\n\t", fp);
usr.sbin/config/mkmakefile.c
756
fprintf(fp, "%s ", tp->f_clean);
usr.sbin/config/mkmakefile.c
760
putc('\n', fp);
usr.sbin/config/mkmakefile.c
88
struct file_list *fp;
usr.sbin/config/mkmakefile.c
90
for (fp = ftab; fp != NULL; fp = fp->f_next) {
usr.sbin/config/mkmakefile.c
91
if (strcmp(fp->f_fn, file) == 0)
usr.sbin/config/mkmakefile.c
92
return(fp);
usr.sbin/config/mkoptions.c
276
FILE *fp;
usr.sbin/config/mkoptions.c
290
fp = fopen(fname, "r");
usr.sbin/config/mkoptions.c
291
if (fp == NULL) {
usr.sbin/config/mkoptions.c
295
wd = get_word(fp);
usr.sbin/config/mkoptions.c
297
fclose(fp);
usr.sbin/config/mkoptions.c
303
fp = fopen(fname, "r");
usr.sbin/config/mkoptions.c
304
if (fp != NULL)
usr.sbin/config/mkoptions.c
313
fp = fopen(fname, "r");
usr.sbin/config/mkoptions.c
314
if (fp != NULL)
usr.sbin/config/mkoptions.c
323
while (((wd = get_word(fp)) != (char *)EOF) && wd != NULL)
usr.sbin/config/mkoptions.c
328
val = get_word(fp);
usr.sbin/cron/lib/misc.c
229
static FILE *fp = NULL;
usr.sbin/cron/lib/misc.c
231
if (closeflag && fp) {
usr.sbin/cron/lib/misc.c
232
fclose(fp);
usr.sbin/cron/lib/misc.c
233
fp = NULL;
usr.sbin/cron/lib/misc.c
237
if (!fp) {
usr.sbin/cron/lib/misc.c
244
|| (NULL == (fp = fdopen(fd, "r+")))
usr.sbin/cron/lib/misc.c
255
fscanf(fp, "%d", &otherpid);
usr.sbin/cron/lib/misc.c
265
rewind(fp);
usr.sbin/cron/lib/misc.c
266
fprintf(fp, "%d\n", getpid());
usr.sbin/cron/lib/misc.c
267
fflush(fp);
usr.sbin/cron/lib/misc.c
268
ftruncate(fileno(fp), ftell(fp));
usr.sbin/fstyp/apfs.c
84
fstyp_apfs(FILE *fp, char *label, size_t size, const char *devpath)
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, const char *devpath)
usr.sbin/fstyp/befs.c
52
volume = read_buf(fp, BEFS_BLOCK_OFFSET, sizeof(*volume));
usr.sbin/fstyp/cd9660.c
44
fstyp_cd9660(FILE *fp, char *label, size_t size, const char *devpath)
usr.sbin/fstyp/cd9660.c
48
sector = read_buf(fp, ISO9660_OFFSET, 512);
usr.sbin/fstyp/exfat.c
135
read_sectn(FILE *fp, off_t sect, unsigned count, unsigned bytespersec)
usr.sbin/fstyp/exfat.c
137
return (read_buf(fp, sect * bytespersec, bytespersec * count));
usr.sbin/fstyp/exfat.c
141
read_sect(FILE *fp, off_t sect, unsigned bytespersec)
usr.sbin/fstyp/exfat.c
143
return (read_sectn(fp, sect, 1, bytespersec));
usr.sbin/fstyp/exfat.c
153
exfat_compute_boot_chksum(FILE *fp, unsigned region, unsigned bytespersec,
usr.sbin/fstyp/exfat.c
162
sector = read_sect(fp, region + sect, bytespersec);
usr.sbin/fstyp/exfat.c
241
exfat_fat_next(FILE *fp, const struct exfat_vbr *ev, unsigned BPS,
usr.sbin/fstyp/exfat.c
252
fatsect = read_sect(fp, clsect, BPS);
usr.sbin/fstyp/exfat.c
260
exfat_find_label(FILE *fp, const struct exfat_vbr *ev, unsigned BPS,
usr.sbin/fstyp/exfat.c
279
rootdir_cluster = exfat_fat_next(fp, ev, BPS, rootdir_cluster)) {
usr.sbin/fstyp/exfat.c
288
declust = read_sectn(fp, rootdir_sect, sects_per_clust, BPS);
usr.sbin/fstyp/exfat.c
318
fstyp_exfat(FILE *fp, char *label, size_t size, const char *devpath)
usr.sbin/fstyp/exfat.c
328
ev = (struct exfat_vbr *)read_buf(fp, 0, 512);
usr.sbin/fstyp/exfat.c
339
error = exfat_compute_boot_chksum(fp, MAIN_BOOT_REGION_SECT,
usr.sbin/fstyp/exfat.c
344
cksect = read_sect(fp, MAIN_BOOT_REGION_SECT + SUBREGION_CHKSUM_SECT,
usr.sbin/fstyp/exfat.c
359
exfat_find_label(fp, ev, bytespersec, label, size);
usr.sbin/fstyp/ext2fs.c
53
fstyp_ext2fs(FILE *fp, char *label, size_t size, const char *devpath)
usr.sbin/fstyp/ext2fs.c
58
fs = (e2sb_t *)read_buf(fp, EXT2FS_SB_OFFSET, 512);
usr.sbin/fstyp/fstyp.c
109
nread = fread(buf, len, 1, fp);
usr.sbin/fstyp/fstyp.c
112
if (feof(fp) == 0)
usr.sbin/fstyp/fstyp.c
155
type_check(const char *path, FILE *fp)
usr.sbin/fstyp/fstyp.c
161
fd = fileno(fp);
usr.sbin/fstyp/fstyp.c
185
FILE *fp;
usr.sbin/fstyp/fstyp.c
224
fp = fopen(fdpath, "r");
usr.sbin/fstyp/fstyp.c
225
if (fp == NULL) {
usr.sbin/fstyp/fstyp.c
227
fp = fopen(path, "r");
usr.sbin/fstyp/fstyp.c
228
if (fp == NULL)
usr.sbin/fstyp/fstyp.c
235
type_check(fdpath, fp);
usr.sbin/fstyp/fstyp.c
246
error = fstyp_f(fp, label, sizeof(label), path);
usr.sbin/fstyp/fstyp.c
91
read_buf(FILE *fp, off_t off, size_t len)
usr.sbin/fstyp/fstyp.c
97
error = fseek(fp, off, SEEK_SET);
usr.sbin/fstyp/fstyp.h
51
void *read_buf(FILE *fp, off_t off, size_t len);
usr.sbin/fstyp/fstyp.h
55
int fstyp_apfs(FILE *fp, char *label, size_t size, const char *devpath);
usr.sbin/fstyp/fstyp.h
56
int fstyp_befs(FILE *fp, char *label, size_t size, const char *devpath);
usr.sbin/fstyp/fstyp.h
57
int fstyp_cd9660(FILE *fp, char *label, size_t size, const char *devpath);
usr.sbin/fstyp/fstyp.h
58
int fstyp_exfat(FILE *fp, char *label, size_t size, const char *devpath);
usr.sbin/fstyp/fstyp.h
59
int fstyp_ext2fs(FILE *fp, char *label, size_t size, const char *devpath);
usr.sbin/fstyp/fstyp.h
60
int fstyp_hfsp(FILE *fp, char *label, size_t size, const char *devpath);
usr.sbin/fstyp/fstyp.h
61
int fstyp_msdosfs(FILE *fp, char *label, size_t size, const char *devpath);
usr.sbin/fstyp/fstyp.h
62
int fstyp_ntfs(FILE *fp, char *label, size_t size, const char *devpath);
usr.sbin/fstyp/fstyp.h
63
int fstyp_ufs(FILE *fp, char *label, size_t size, const char *devpath);
usr.sbin/fstyp/fstyp.h
64
int fstyp_hammer(FILE *fp, char *label, size_t size, const char *devpath);
usr.sbin/fstyp/fstyp.h
65
int fstyp_hammer2(FILE *fp, char *label, size_t size, const char *devpath);
usr.sbin/fstyp/hammer.c
105
ondisk = read_ondisk(fp);
usr.sbin/fstyp/hammer.c
139
FILE *fp;
usr.sbin/fstyp/hammer.c
142
if ((fp = fopen(volpath, "r")) == NULL)
usr.sbin/fstyp/hammer.c
145
ondisk = read_ondisk(fp);
usr.sbin/fstyp/hammer.c
153
if (fp)
usr.sbin/fstyp/hammer.c
154
fclose(fp);
usr.sbin/fstyp/hammer.c
163
FILE *fp = NULL;
usr.sbin/fstyp/hammer.c
195
if ((fp = fopen(volpath, "r")) == NULL)
usr.sbin/fstyp/hammer.c
197
ondisk = read_ondisk(fp);
usr.sbin/fstyp/hammer.c
226
if (fp)
usr.sbin/fstyp/hammer.c
227
fclose(fp);
usr.sbin/fstyp/hammer.c
38
read_ondisk(FILE *fp)
usr.sbin/fstyp/hammer.c
40
return (read_buf(fp, 0, sizeof(struct hammer_volume_ondisk)));
usr.sbin/fstyp/hammer.c
98
fstyp_hammer(FILE *fp, char *label, size_t size, const char *devpath)
usr.sbin/fstyp/hammer2.c
126
read_media(FILE *fp, const hammer2_blockref_t *bref, size_t *media_bytes)
usr.sbin/fstyp/hammer2.c
159
fbytes = get_file_size(fp);
usr.sbin/fstyp/hammer2.c
169
if (fseek(fp, io_base, SEEK_SET) == -1) {
usr.sbin/fstyp/hammer2.c
173
media = read_buf(fp, io_base, io_bytes);
usr.sbin/fstyp/hammer2.c
185
find_pfs(FILE *fp, const hammer2_blockref_t *bref, const char *pfs, bool *res)
usr.sbin/fstyp/hammer2.c
193
media = read_media(fp, bref, &bytes);
usr.sbin/fstyp/hammer2.c
236
if (find_pfs(fp, &bscan[i], pfs, res) == -1) {
usr.sbin/fstyp/hammer2.c
278
read_label(FILE *fp, char *label, size_t size, const char *devpath)
usr.sbin/fstyp/hammer2.c
293
if (i * HAMMER2_ZONE_BYTES64 >= get_file_size(fp))
usr.sbin/fstyp/hammer2.c
298
vols[i] = (void*)read_voldata(fp, i);
usr.sbin/fstyp/hammer2.c
316
media = read_media(fp, bref, &bytes);
usr.sbin/fstyp/hammer2.c
354
if (find_pfs(fp, bref, pfs, &res) == 0 && res) {
usr.sbin/fstyp/hammer2.c
380
fstyp_hammer2(FILE *fp, char *label, size_t size, const char *devpath)
usr.sbin/fstyp/hammer2.c
382
hammer2_volume_data_t *voldata = read_voldata(fp, 0);
usr.sbin/fstyp/hammer2.c
389
if (test_voldata(fp))
usr.sbin/fstyp/hammer2.c
392
error = read_label(fp, label, size, devpath);
usr.sbin/fstyp/hammer2.c
40
get_file_size(FILE *fp)
usr.sbin/fstyp/hammer2.c
402
FILE *fp = NULL;
usr.sbin/fstyp/hammer2.c
425
if ((fp = fopen(volpath, "r")) == NULL) {
usr.sbin/fstyp/hammer2.c
429
if (test_voldata(fp))
usr.sbin/fstyp/hammer2.c
431
voldata = read_voldata(fp, 0);
usr.sbin/fstyp/hammer2.c
432
fclose(fp);
usr.sbin/fstyp/hammer2.c
44
if (fseek(fp, 0, SEEK_END) == -1) {
usr.sbin/fstyp/hammer2.c
452
if ((fp = fopen(volpath, "r")) == NULL) {
usr.sbin/fstyp/hammer2.c
456
voldata = read_voldata(fp, 0);
usr.sbin/fstyp/hammer2.c
486
error = read_label(fp, label, size, volpath);
usr.sbin/fstyp/hammer2.c
49
siz = ftell(fp);
usr.sbin/fstyp/hammer2.c
493
if (fp)
usr.sbin/fstyp/hammer2.c
494
fclose(fp);
usr.sbin/fstyp/hammer2.c
59
read_voldata(FILE *fp, int i)
usr.sbin/fstyp/hammer2.c
64
if (i * HAMMER2_ZONE_BYTES64 >= get_file_size(fp))
usr.sbin/fstyp/hammer2.c
67
return (read_buf(fp, i * HAMMER2_ZONE_BYTES64,
usr.sbin/fstyp/hammer2.c
72
test_voldata(FILE *fp)
usr.sbin/fstyp/hammer2.c
80
if (i * HAMMER2_ZONE_BYTES64 >= get_file_size(fp))
usr.sbin/fstyp/hammer2.c
82
voldata = read_voldata(fp, i);
usr.sbin/fstyp/hfsplus.c
102
fstyp_hfsp(FILE *fp, char *label, size_t size, const char *devpath)
usr.sbin/fstyp/hfsplus.c
108
hdr = read_buf(fp, VOL_HDR_OFF, sizeof(*hdr));
usr.sbin/fstyp/msdosfs.c
127
sector = (uint8_t *)read_buf(fp, offset, fat_BytesPerSector);
usr.sbin/fstyp/msdosfs.c
44
fstyp_msdosfs(FILE *fp, char *label, size_t size, const char *devpath)
usr.sbin/fstyp/msdosfs.c
56
sector0 = (uint8_t *)read_buf(fp, 0, 512);
usr.sbin/fstyp/ntfs.c
128
fstyp_ntfs(FILE *fp, char *label, size_t size, const char *devpath)
usr.sbin/fstyp/ntfs.c
140
bf = (struct ntfs_bootfile *)read_buf(fp, 0, 512);
usr.sbin/fstyp/ntfs.c
152
filerecp = read_buf(fp, voloff, recsize);
usr.sbin/fstyp/ufs.c
61
fstyp_ufs(FILE *fp, char *label, size_t labelsize, const char *devpath)
usr.sbin/fstyp/ufs.c
74
fs = (struct fs *)read_buf(fp, superblock, SBLOCKSIZE);
usr.sbin/inetd/inetd.c
437
FILE *fp;
usr.sbin/inetd/inetd.c
454
fp = fopen(pid_file, "w");
usr.sbin/inetd/inetd.c
455
if (fp) {
usr.sbin/inetd/inetd.c
456
fprintf(fp, "%ld\n", (long)pid);
usr.sbin/inetd/inetd.c
457
fclose(fp);
usr.sbin/installer/libaura/popen.c
151
close(fileno(p->fp));
usr.sbin/installer/libaura/popen.c
168
cur->fp = iop;
usr.sbin/installer/libaura/popen.c
191
if (cur->fp == iop)
usr.sbin/installer/libaura/popen.c
221
if (cur->fp == iop)
usr.sbin/installer/libaura/popen.c
64
FILE *fp;
usr.sbin/ip6addrctl/ip6addrctl.c
207
FILE *fp;
usr.sbin/ip6addrctl/ip6addrctl.c
212
if ((fp = fopen(conf, "r")) == NULL)
usr.sbin/ip6addrctl/ip6addrctl.c
215
while(fgets(line, sizeof(line), fp)) {
usr.sbin/ip6addrctl/ip6addrctl.c
249
fclose(fp);
usr.sbin/kbdcontrol/kbdcontrol.c
355
print_entry(FILE *fp, int value)
usr.sbin/kbdcontrol/kbdcontrol.c
361
fprintf(fp, " nop ");
usr.sbin/kbdcontrol/kbdcontrol.c
364
fprintf(fp, " lshift");
usr.sbin/kbdcontrol/kbdcontrol.c
367
fprintf(fp, " rshift");
usr.sbin/kbdcontrol/kbdcontrol.c
370
fprintf(fp, " clock ");
usr.sbin/kbdcontrol/kbdcontrol.c
373
fprintf(fp, " nlock ");
usr.sbin/kbdcontrol/kbdcontrol.c
376
fprintf(fp, " slock ");
usr.sbin/kbdcontrol/kbdcontrol.c
379
fprintf(fp, " btab ");
usr.sbin/kbdcontrol/kbdcontrol.c
382
fprintf(fp, " lalt ");
usr.sbin/kbdcontrol/kbdcontrol.c
385
fprintf(fp, " lctrl ");
usr.sbin/kbdcontrol/kbdcontrol.c
388
fprintf(fp, " nscr ");
usr.sbin/kbdcontrol/kbdcontrol.c
391
fprintf(fp, " pscr ");
usr.sbin/kbdcontrol/kbdcontrol.c
394
fprintf(fp, " rctrl ");
usr.sbin/kbdcontrol/kbdcontrol.c
397
fprintf(fp, " ralt ");
usr.sbin/kbdcontrol/kbdcontrol.c
400
fprintf(fp, " alock ");
usr.sbin/kbdcontrol/kbdcontrol.c
403
fprintf(fp, " ashift");
usr.sbin/kbdcontrol/kbdcontrol.c
406
fprintf(fp, " meta ");
usr.sbin/kbdcontrol/kbdcontrol.c
409
fprintf(fp, " boot ");
usr.sbin/kbdcontrol/kbdcontrol.c
412
fprintf(fp, " debug ");
usr.sbin/kbdcontrol/kbdcontrol.c
415
fprintf(fp, " susp ");
usr.sbin/kbdcontrol/kbdcontrol.c
418
fprintf(fp, " saver ");
usr.sbin/kbdcontrol/kbdcontrol.c
421
fprintf(fp, " panic ");
usr.sbin/kbdcontrol/kbdcontrol.c
424
fprintf(fp, " lshifta");
usr.sbin/kbdcontrol/kbdcontrol.c
427
fprintf(fp, " rshifta");
usr.sbin/kbdcontrol/kbdcontrol.c
430
fprintf(fp, " lctrla");
usr.sbin/kbdcontrol/kbdcontrol.c
433
fprintf(fp, " rctrla");
usr.sbin/kbdcontrol/kbdcontrol.c
436
fprintf(fp, " lalta ");
usr.sbin/kbdcontrol/kbdcontrol.c
439
fprintf(fp, " ralta ");
usr.sbin/kbdcontrol/kbdcontrol.c
442
fprintf(fp, " halt ");
usr.sbin/kbdcontrol/kbdcontrol.c
445
fprintf(fp, " pdwn ");
usr.sbin/kbdcontrol/kbdcontrol.c
450
fprintf(fp, " fkey%02d", val - F_FN + 1);
usr.sbin/kbdcontrol/kbdcontrol.c
452
fprintf(fp, " scr%02d ", val - F_SCR + 1);
usr.sbin/kbdcontrol/kbdcontrol.c
454
fprintf(fp, " %-6s", acc_names[val - F_ACC]);
usr.sbin/kbdcontrol/kbdcontrol.c
456
fprintf(fp, " 0x%02x ", val);
usr.sbin/kbdcontrol/kbdcontrol.c
458
fprintf(fp, " %3d ", val);
usr.sbin/kbdcontrol/kbdcontrol.c
462
fprintf(fp, " %s ", ctrl_names[val]);
usr.sbin/kbdcontrol/kbdcontrol.c
464
fprintf(fp, " del ");
usr.sbin/kbdcontrol/kbdcontrol.c
466
fprintf(fp, " '%c' ", val);
usr.sbin/kbdcontrol/kbdcontrol.c
468
fprintf(fp, " 0x%02x ", val);
usr.sbin/kbdcontrol/kbdcontrol.c
470
fprintf(fp, " %3d ", val);
usr.sbin/kbdcontrol/kbdcontrol.c
477
print_key_definition_line(FILE *fp, int scancode, struct keyent_t *key)
usr.sbin/kbdcontrol/kbdcontrol.c
483
fprintf(fp, " 0x%02x ", scancode);
usr.sbin/kbdcontrol/kbdcontrol.c
485
fprintf(fp, " %03d ", scancode);
usr.sbin/kbdcontrol/kbdcontrol.c
490
print_entry(fp, key->map[i] | 0x100);
usr.sbin/kbdcontrol/kbdcontrol.c
492
print_entry(fp, key->map[i]);
usr.sbin/kbdcontrol/kbdcontrol.c
498
fprintf(fp, " O\n");
usr.sbin/kbdcontrol/kbdcontrol.c
501
fprintf(fp, " C\n");
usr.sbin/kbdcontrol/kbdcontrol.c
504
fprintf(fp, " N\n");
usr.sbin/kbdcontrol/kbdcontrol.c
507
fprintf(fp, " B\n");
usr.sbin/kbdcontrol/kbdcontrol.c
513
print_accent_definition_line(FILE *fp, int accent, struct acc_t *key)
usr.sbin/kbdcontrol/kbdcontrol.c
522
fprintf(fp, " %-6s", acc_names[accent]);
usr.sbin/kbdcontrol/kbdcontrol.c
524
fprintf(fp, "'%c' ", key->accchar);
usr.sbin/kbdcontrol/kbdcontrol.c
526
fprintf(fp, "0x%02x ", key->accchar);
usr.sbin/kbdcontrol/kbdcontrol.c
528
fprintf(fp, "%03d ", key->accchar);
usr.sbin/kbdcontrol/kbdcontrol.c
535
fprintf(fp, "\n ");
usr.sbin/kbdcontrol/kbdcontrol.c
537
fprintf(fp, "( '%c' ", c);
usr.sbin/kbdcontrol/kbdcontrol.c
539
fprintf(fp, "(0x%02x ", c);
usr.sbin/kbdcontrol/kbdcontrol.c
541
fprintf(fp, "( %03d ", c);
usr.sbin/kbdcontrol/kbdcontrol.c
544
fprintf(fp, "'%c' ) ", c);
usr.sbin/kbdcontrol/kbdcontrol.c
546
fprintf(fp, "0x%02x) ", c);
usr.sbin/kbdcontrol/kbdcontrol.c
548
fprintf(fp, "%03d ) ", c);
usr.sbin/kbdcontrol/kbdcontrol.c
550
fprintf(fp, "\n");
usr.sbin/kbdmap/kbdmap.c
208
FILE *fp = fopen(sysconfig, "r");
usr.sbin/kbdmap/kbdmap.c
209
if (fp) {
usr.sbin/kbdmap/kbdmap.c
210
while (fgets(line, sizeof(line), fp)) {
usr.sbin/kbdmap/kbdmap.c
228
fclose(fp);
usr.sbin/kbdmap/kbdmap.c
326
FILE *fp;
usr.sbin/kbdmap/kbdmap.c
379
fp = fopen(tmp_name, "r");
usr.sbin/kbdmap/kbdmap.c
380
if (fp) {
usr.sbin/kbdmap/kbdmap.c
382
if (fgets(choice, sizeof(choice), fp) != NULL) {
usr.sbin/kbdmap/kbdmap.c
398
fclose(fp);
usr.sbin/kbdmap/kbdmap.c
562
FILE *fp;
usr.sbin/kbdmap/kbdmap.c
586
fp = fopen(filename, "r");
usr.sbin/kbdmap/kbdmap.c
587
if (fp) {
usr.sbin/kbdmap/kbdmap.c
589
while (fgets(buffer, sizeof(buffer), fp)) {
usr.sbin/kbdmap/kbdmap.c
667
fclose(fp);
usr.sbin/lpr/common_source/displayq.c
144
fp = fopen(pp->lock_file, "r");
usr.sbin/lpr/common_source/displayq.c
146
if (fp == NULL)
usr.sbin/lpr/common_source/displayq.c
152
while ((i = getc(fp)) != EOF && i != '\n') {
usr.sbin/lpr/common_source/displayq.c
171
while ((i = getc(fp)) != EOF && i != '\n') {
usr.sbin/lpr/common_source/displayq.c
192
fclose(fp);
usr.sbin/lpr/common_source/displayq.c
93
FILE *fp;
usr.sbin/lpr/common_source/rmjob.c
149
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
fclose(fp);
usr.sbin/lpr/common_source/rmjob.c
166
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
fclose(fp);
usr.sbin/lpr/lpc/cmds.c
1210
FILE *fp;
usr.sbin/lpr/lpc/cmds.c
1253
fp = fopen((*qq)->job_cfname, "r");
usr.sbin/lpr/lpc/cmds.c
1255
if (fp == NULL)
usr.sbin/lpr/lpc/cmds.c
1257
while (get_line(fp) > 0)
usr.sbin/lpr/lpc/cmds.c
1260
fclose(fp);
usr.sbin/lpr/lpc/cmds.c
268
FILE *fp;
usr.sbin/lpr/lpc/cmds.c
273
fp = fopen(lf, "r");
usr.sbin/lpr/lpc/cmds.c
277
if (fp == NULL) {
usr.sbin/lpr/lpc/cmds.c
289
if (get_line(fp) == 0)
usr.sbin/lpr/lpc/cmds.c
298
lockres = flock(fileno(fp), LOCK_SH|LOCK_NB);
usr.sbin/lpr/lpc/cmds.c
299
fclose(fp);
usr.sbin/lpr/lpd/printjob.c
1421
FILE *fp;
usr.sbin/lpr/lpd/printjob.c
1462
|| (fp = fopen(tempstderr, "r")) == NULL) {
usr.sbin/lpr/lpd/printjob.c
1467
while ((i = getc(fp)) != EOF)
usr.sbin/lpr/lpd/printjob.c
1469
fclose(fp);
usr.sbin/lpr/lpd/printjob.c
593
FILE *fp;
usr.sbin/lpr/lpd/printjob.c
832
if ((fp = fopen(tempstderr, "r"))) {
usr.sbin/lpr/lpd/printjob.c
833
while (fgets(buf, sizeof(buf), fp))
usr.sbin/lpr/lpd/printjob.c
835
fclose(fp);
usr.sbin/lpr/lpd/recvjob.c
331
FILE *fp;
usr.sbin/lpr/lpd/recvjob.c
333
if ((fp = fopen(fn, "r")) == NULL)
usr.sbin/lpr/lpd/recvjob.c
335
if (fgets(lin, 80, fp) == NULL) {
usr.sbin/lpr/lpd/recvjob.c
336
fclose(fp);
usr.sbin/lpr/lpd/recvjob.c
339
fclose(fp);
usr.sbin/makefs/hammer2/hammer2_ioctl.c
215
struct file *fp;
usr.sbin/makefs/hammer2/hammer2_ioctl.c
219
fp = holdfp(curthread, recl->fd, -1);
usr.sbin/makefs/hammer2/hammer2_ioctl.c
220
if (fp) {
usr.sbin/makefs/hammer2/hammer2_ioctl.c
231
fp);
usr.sbin/makefs/msdos/msdosfs_vfsops.c
264
struct fsinfo *fp;
usr.sbin/makefs/msdos/msdosfs_vfsops.c
274
fp = (struct fsinfo *)bp->b_data;
usr.sbin/makefs/msdos/msdosfs_vfsops.c
275
if (!memcmp(fp->fsisig1, "RRaA", 4)
usr.sbin/makefs/msdos/msdosfs_vfsops.c
276
&& !memcmp(fp->fsisig2, "rrAa", 4)
usr.sbin/makefs/msdos/msdosfs_vfsops.c
277
&& !memcmp(fp->fsisig3, "\0\0\125\252", 4))
usr.sbin/makefs/msdos/msdosfs_vfsops.c
278
pmp->pm_nxtfree = getulong(fp->fsinxtfree);
usr.sbin/makefs/msdos/msdosfs_vfsops.c
366
struct fsinfo *fp;
usr.sbin/makefs/msdos/msdosfs_vfsops.c
380
fp = (struct fsinfo *)bp->b_data;
usr.sbin/makefs/msdos/msdosfs_vfsops.c
381
putulong(fp->fsinfree, pmp->pm_freeclustercount);
usr.sbin/makefs/msdos/msdosfs_vfsops.c
382
putulong(fp->fsinxtfree, pmp->pm_nxtfree);
usr.sbin/makefs/mtree.c
100
fi->fp = fp;
usr.sbin/makefs/mtree.c
1005
error = read_mtree_spec1(fp, false, pathspec);
usr.sbin/makefs/mtree.c
1020
error = read_mtree_spec1(fp, true, pathspec);
usr.sbin/makefs/mtree.c
1023
skip_to(fp, "\n");
usr.sbin/makefs/mtree.c
1024
(void)getc(fp);
usr.sbin/makefs/mtree.c
1032
FILE *fp;
usr.sbin/makefs/mtree.c
1039
fp = stdin;
usr.sbin/makefs/mtree.c
1041
fp = fopen(fname, "r");
usr.sbin/makefs/mtree.c
1042
if (fp == NULL)
usr.sbin/makefs/mtree.c
1046
error = mtree_file_push(fname, fp);
usr.sbin/makefs/mtree.c
1069
error = skip_over(fp, " \t");
usr.sbin/makefs/mtree.c
1073
c = getc(fp);
usr.sbin/makefs/mtree.c
1075
error = ferror(fp) ? errno : -1;
usr.sbin/makefs/mtree.c
1084
error = skip_to(fp, "\n");
usr.sbin/makefs/mtree.c
1086
(void)getc(fp);
usr.sbin/makefs/mtree.c
1089
error = read_mtree_command(fp);
usr.sbin/makefs/mtree.c
1092
ungetc(c, fp);
usr.sbin/makefs/mtree.c
1093
error = read_mtree_spec(fp);
usr.sbin/makefs/mtree.c
1112
if (fp != stdin)
usr.sbin/makefs/mtree.c
1113
fclose(fp);
usr.sbin/makefs/mtree.c
302
skip_over(FILE *fp, const char *cs)
usr.sbin/makefs/mtree.c
306
c = getc(fp);
usr.sbin/makefs/mtree.c
308
c = getc(fp);
usr.sbin/makefs/mtree.c
310
ungetc(c, fp);
usr.sbin/makefs/mtree.c
313
return (ferror(fp) ? errno : -1);
usr.sbin/makefs/mtree.c
317
skip_to(FILE *fp, const char *cs)
usr.sbin/makefs/mtree.c
321
c = getc(fp);
usr.sbin/makefs/mtree.c
323
c = getc(fp);
usr.sbin/makefs/mtree.c
325
ungetc(c, fp);
usr.sbin/makefs/mtree.c
328
return (ferror(fp) ? errno : -1);
usr.sbin/makefs/mtree.c
332
read_word(FILE *fp, char *buf, size_t bufsz)
usr.sbin/makefs/mtree.c
347
c = getc(fp);
usr.sbin/makefs/mtree.c
351
error = ferror(fp) ? errno : -1;
usr.sbin/makefs/mtree.c
357
error = skip_to(fp, "\n");
usr.sbin/makefs/mtree.c
392
ungetc(c, fp);
usr.sbin/makefs/mtree.c
420
skip_to(fp, " \t\n");
usr.sbin/makefs/mtree.c
479
read_mtree_keywords(FILE *fp, fsnode *node)
usr.sbin/makefs/mtree.c
493
error = skip_over(fp, " \t");
usr.sbin/makefs/mtree.c
497
error = read_word(fp, keyword, sizeof(keyword));
usr.sbin/makefs/mtree.c
68
FILE *fp;
usr.sbin/makefs/mtree.c
803
read_mtree_command(FILE *fp)
usr.sbin/makefs/mtree.c
808
error = read_word(fp, cmd, sizeof(cmd));
usr.sbin/makefs/mtree.c
812
error = read_mtree_keywords(fp, &mtree_global);
usr.sbin/makefs/mtree.c
815
skip_to(fp, "\n");
usr.sbin/makefs/mtree.c
816
(void)getc(fp);
usr.sbin/makefs/mtree.c
821
read_mtree_spec1(FILE *fp, bool def, const char *name)
usr.sbin/makefs/mtree.c
86
mtree_file_push(const char *name, FILE *fp)
usr.sbin/makefs/mtree.c
877
error = read_mtree_spec1(fp, false, ".");
usr.sbin/makefs/mtree.c
934
error = read_mtree_keywords(fp, node);
usr.sbin/makefs/mtree.c
973
read_mtree_spec(FILE *fp)
usr.sbin/makefs/mtree.c
979
error = read_word(fp, pathtmp, sizeof(pathtmp));
usr.sbin/makefs/walk.c
312
FILE *fp;
usr.sbin/makefs/walk.c
322
if ((fp = fopen(specfile, "r")) == NULL)
usr.sbin/makefs/walk.c
325
root = spec(fp);
usr.sbin/makefs/walk.c
327
if (fclose(fp) == EOF)
usr.sbin/moused/moused.c
894
FILE *fp;
usr.sbin/moused/moused.c
909
fp = fopen(pidfile, "w");
usr.sbin/moused/moused.c
910
if (fp != NULL) {
usr.sbin/moused/moused.c
911
fprintf(fp, "%d\n", getpid());
usr.sbin/moused/moused.c
912
fclose(fp);
usr.sbin/mtree/create.c
107
fprintf(fp,
usr.sbin/mtree/create.c
128
fprintf(fp, "\n");
usr.sbin/mtree/create.c
130
fprintf(fp, "# %s\n", p->fts_path);
usr.sbin/mtree/create.c
131
statd(fp, t, p, &uid, &gid, &mode, &flags);
usr.sbin/mtree/create.c
132
statf(fp, indent, p);
usr.sbin/mtree/create.c
137
fprintf(fp, "%*s# %s\n", indent, "",
usr.sbin/mtree/create.c
140
fprintf(fp, "%*s..\n", indent, "");
usr.sbin/mtree/create.c
142
fprintf(fp, "\n");
usr.sbin/mtree/create.c
153
statf(fp, indent, p);
usr.sbin/mtree/create.c
164
dosum(FILE *fp, int indent, FTSENT *p, int *offset, int flag,
usr.sbin/mtree/create.c
179
output(fp, indent, offset, "%s=%s", key, digestbuf);
usr.sbin/mtree/create.c
217
statf(FILE *fp, int indent, FTSENT *p)
usr.sbin/mtree/create.c
222
offset = fprintf(fp, "%*s%s%s", indent, "",
usr.sbin/mtree/create.c
228
offset += fprintf(fp, "%*s",
usr.sbin/mtree/create.c
232
output(fp, indent, &offset, "type=%s",
usr.sbin/mtree/create.c
237
output(fp, indent, &offset, "uname=%s", name);
usr.sbin/mtree/create.c
239
output(fp, indent, &offset, "uid=%u",
usr.sbin/mtree/create.c
245
output(fp, indent, &offset, "gname=%s", name);
usr.sbin/mtree/create.c
247
output(fp, indent, &offset, "gid=%u",
usr.sbin/mtree/create.c
251
output(fp, indent, &offset, "mode=%#o",
usr.sbin/mtree/create.c
255
output(fp, indent, &offset, "device=%#jx",
usr.sbin/mtree/create.c
258
output(fp, indent, &offset, "nlink=%ju",
usr.sbin/mtree/create.c
262
output(fp, indent, &offset, "size=%ju",
usr.sbin/mtree/create.c
266
output(fp, indent, &offset, "time=%jd.%09ld",
usr.sbin/mtree/create.c
270
output(fp, indent, &offset, "time=%jd.%09ld",
usr.sbin/mtree/create.c
274
dosum(fp, indent, p, &offset, F_CKSUM, crcFile, "cksum");
usr.sbin/mtree/create.c
276
dosum(fp, indent, p, &offset, F_MD5, NULL, MD5KEY);
usr.sbin/mtree/create.c
279
dosum(fp, indent, p, &offset, F_RMD160, NULL, RMD160KEY);
usr.sbin/mtree/create.c
282
dosum(fp, indent, p, &offset, F_SHA1, NULL, SHA1KEY);
usr.sbin/mtree/create.c
283
dosum(fp, indent, p, &offset, F_SHA256, NULL, SHA256KEY);
usr.sbin/mtree/create.c
284
dosum(fp, indent, p, &offset, F_SHA384, NULL, SHA384KEY);
usr.sbin/mtree/create.c
285
dosum(fp, indent, p, &offset, F_SHA512, NULL, SHA512KEY);
usr.sbin/mtree/create.c
290
output(fp, indent, &offset, "link=%s",
usr.sbin/mtree/create.c
295
output(fp, indent, &offset, "flags=%s", str);
usr.sbin/mtree/create.c
319
statd(FILE *fp, FTS *t, FTSENT *parent, uid_t *puid, gid_t *pgid, mode_t *pmode,
usr.sbin/mtree/create.c
395
fprintf(fp, "/set type=dir");
usr.sbin/mtree/create.c
397
fprintf(fp, "/set type=file");
usr.sbin/mtree/create.c
401
fprintf(fp, " uname=%s", name);
usr.sbin/mtree/create.c
403
fprintf(fp, " uid=%lu", (u_long)saveuid);
usr.sbin/mtree/create.c
408
fprintf(fp, " gname=%s", name);
usr.sbin/mtree/create.c
410
fprintf(fp, " gid=%lu", (u_long)savegid);
usr.sbin/mtree/create.c
413
fprintf(fp, " mode=%#lo", (u_long)savemode);
usr.sbin/mtree/create.c
415
fprintf(fp, " nlink=1");
usr.sbin/mtree/create.c
418
fprintf(fp, " flags=%s", str);
usr.sbin/mtree/create.c
421
fprintf(fp, "\n");
usr.sbin/mtree/create.c
452
output(FILE *fp, int indent, int *offset, const char *fmt, ...)
usr.sbin/mtree/create.c
462
fprintf(fp, " \\\n%*s", INDENTNAMELEN + indent, "");
usr.sbin/mtree/create.c
465
*offset += fprintf(fp, " %s", buf) + 1;
usr.sbin/mtree/create.c
83
cwalk(FILE *fp)
usr.sbin/mtree/excludes.c
67
FILE *fp;
usr.sbin/mtree/excludes.c
71
fp = fopen(name, "r");
usr.sbin/mtree/excludes.c
72
if (fp == NULL)
usr.sbin/mtree/excludes.c
75
while ((line = fparseln(fp, NULL, NULL, NULL,
usr.sbin/mtree/excludes.c
91
fclose(fp);
usr.sbin/mtree/only.c
117
FILE *fp;
usr.sbin/mtree/only.c
121
if ((fp = fopen(fname, "r")) == NULL)
usr.sbin/mtree/only.c
124
while ((line = fparseln(fp, &len, &lineno, NULL, FPARSELN_UNESCALL))) {
usr.sbin/mtree/only.c
133
fclose(fp);
usr.sbin/mtree/spec.c
112
(buf = fparseln(fp, NULL, &mtree_lineno, NULL,
usr.sbin/mtree/spec.c
285
appendfield(FILE *fp, int pathlast, const char *fmt, ...)
usr.sbin/mtree/spec.c
292
fprintf(fp, " ");
usr.sbin/mtree/spec.c
295
fprintf(fp, " ");
usr.sbin/mtree/spec.c
307
dump_nodes(FILE *fp, const char *dir, NODE *root, int pathlast)
usr.sbin/mtree/spec.c
325
fprintf(fp, "%s", vispath(path));
usr.sbin/mtree/spec.c
329
appendfield(fp, pathlast, "type=%s",
usr.sbin/mtree/spec.c
334
appendfield(fp, pathlast, "uname=%s", name);
usr.sbin/mtree/spec.c
336
appendfield(fp, pathlast, "uid=%u",
usr.sbin/mtree/spec.c
342
appendfield(fp, pathlast, "gname=%s", name);
usr.sbin/mtree/spec.c
344
appendfield(fp, pathlast, "gid=%u",
usr.sbin/mtree/spec.c
348
appendfield(fp, pathlast, "mode=%#o", cur->st_mode);
usr.sbin/mtree/spec.c
351
appendfield(fp, pathlast, "device=%#jx",
usr.sbin/mtree/spec.c
354
appendfield(fp, pathlast, "nlink=%ju",
usr.sbin/mtree/spec.c
357
appendfield(fp, pathlast, "link=%s",
usr.sbin/mtree/spec.c
360
appendfield(fp, pathlast, "size=%ju",
usr.sbin/mtree/spec.c
363
appendfield(fp, pathlast, "time=%jd.%09ld",
usr.sbin/mtree/spec.c
367
appendfield(fp, pathlast, "cksum=%lu", cur->cksum);
usr.sbin/mtree/spec.c
369
appendfield(fp, pathlast, "%s=%s", MD5KEY,
usr.sbin/mtree/spec.c
372
appendfield(fp, pathlast, "%s=%s", RMD160KEY,
usr.sbin/mtree/spec.c
375
appendfield(fp, pathlast, "%s=%s", SHA1KEY,
usr.sbin/mtree/spec.c
378
appendfield(fp, pathlast, "%s=%s", SHA256KEY,
usr.sbin/mtree/spec.c
381
appendfield(fp, pathlast, "%s=%s", SHA384KEY,
usr.sbin/mtree/spec.c
384
appendfield(fp, pathlast, "%s=%s", SHA512KEY,
usr.sbin/mtree/spec.c
388
appendfield(fp, pathlast, "flags=%s", str);
usr.sbin/mtree/spec.c
392
appendfield(fp, pathlast, "ignore");
usr.sbin/mtree/spec.c
394
appendfield(fp, pathlast, "optional");
usr.sbin/mtree/spec.c
403
appendfield(fp, pathlast, "tags=%.*s", (int)(q - p), p);
usr.sbin/mtree/spec.c
408
dump_nodes(fp, path, cur->child, pathlast);
usr.sbin/mtree/spec.c
98
spec(FILE *fp)
usr.sbin/ndp/ndp.c
323
FILE *fp;
usr.sbin/ndp/ndp.c
327
if ((fp = fopen(name, "r")) == NULL) {
usr.sbin/ndp/ndp.c
337
while(fgets(line, 100, fp) != NULL) {
usr.sbin/ndp/ndp.c
348
fclose(fp);
usr.sbin/ngctl/main.c
115
FILE *fp = NULL;
usr.sbin/ngctl/main.c
129
fp = stdin;
usr.sbin/ngctl/main.c
130
else if ((fp = fopen(optarg, "r")) == NULL)
usr.sbin/ngctl/main.c
151
if (fp != NULL) {
usr.sbin/ngctl/main.c
152
rtn = ReadFile(fp);
usr.sbin/ngctl/main.c
181
ReadFile(FILE *fp)
usr.sbin/ngctl/main.c
186
for (num = 1; fgets(line, sizeof(line), fp) != NULL; num++) {
usr.sbin/ngctl/main.c
361
FILE *fp;
usr.sbin/ngctl/main.c
367
if ((fp = fopen(av[1], "r")) == NULL) {
usr.sbin/ngctl/main.c
377
rtn = ReadFile(fp);
usr.sbin/ngctl/main.c
378
fclose(fp);
usr.sbin/ngctl/main.c
49
static int ReadFile(FILE *fp);
usr.sbin/ngctl/write.c
58
FILE *fp;
usr.sbin/ngctl/write.c
72
if ((fp = fopen(av[3], "r")) == NULL) {
usr.sbin/ngctl/write.c
76
if ((len = fread(buf, 1, sizeof(buf), fp)) == 0) {
usr.sbin/ngctl/write.c
77
if (ferror(fp))
usr.sbin/ngctl/write.c
81
fclose(fp);
usr.sbin/ngctl/write.c
84
fclose(fp);
usr.sbin/pfctl/pfctl.c
1519
FILE *fp;
usr.sbin/pfctl/pfctl.c
1521
fp = fopen(name, mode);
usr.sbin/pfctl/pfctl.c
1522
if (fp == NULL)
usr.sbin/pfctl/pfctl.c
1524
if (fstat(fileno(fp), &st)) {
usr.sbin/pfctl/pfctl.c
1525
fclose(fp);
usr.sbin/pfctl/pfctl.c
1529
fclose(fp);
usr.sbin/pfctl/pfctl.c
1533
return (fp);
usr.sbin/pfctl/pfctl_osfp.c
100
struct pf_osfp_ioctl fp;
usr.sbin/pfctl/pfctl_osfp.c
1009
print_ioctl(struct pf_osfp_ioctl *fp)
usr.sbin/pfctl/pfctl_osfp.c
1016
if (fp->fp_flags & PF_OSFP_WSIZE_DC)
usr.sbin/pfctl/pfctl_osfp.c
1018
else if (fp->fp_flags & PF_OSFP_WSIZE_MSS)
usr.sbin/pfctl/pfctl_osfp.c
1020
else if (fp->fp_flags & PF_OSFP_WSIZE_MTU)
usr.sbin/pfctl/pfctl_osfp.c
1023
if (fp->fp_flags & PF_OSFP_WSIZE_MOD)
usr.sbin/pfctl/pfctl_osfp.c
1025
snprintf(tmp, sizeof(tmp), "%d", fp->fp_wsize);
usr.sbin/pfctl/pfctl_osfp.c
1030
snprintf(tmp, sizeof(tmp), "%d", fp->fp_ttl);
usr.sbin/pfctl/pfctl_osfp.c
1034
if (fp->fp_flags & PF_OSFP_DF)
usr.sbin/pfctl/pfctl_osfp.c
1040
if (fp->fp_flags & PF_OSFP_PSIZE_DC)
usr.sbin/pfctl/pfctl_osfp.c
1043
if (fp->fp_flags & PF_OSFP_PSIZE_MOD)
usr.sbin/pfctl/pfctl_osfp.c
1045
snprintf(tmp, sizeof(tmp), "%d", fp->fp_psize);
usr.sbin/pfctl/pfctl_osfp.c
1050
if (fp->fp_optcnt == 0)
usr.sbin/pfctl/pfctl_osfp.c
1052
for (i = fp->fp_optcnt - 1; i >= 0; i--) {
usr.sbin/pfctl/pfctl_osfp.c
1053
opt = fp->fp_tcpopts >> (i * PF_OSFP_TCPOPT_BITS);
usr.sbin/pfctl/pfctl_osfp.c
1064
if (fp->fp_flags & PF_OSFP_TS0)
usr.sbin/pfctl/pfctl_osfp.c
1069
if (fp->fp_flags & PF_OSFP_MSS_DC)
usr.sbin/pfctl/pfctl_osfp.c
1072
if (fp->fp_flags & PF_OSFP_MSS_MOD)
usr.sbin/pfctl/pfctl_osfp.c
1074
snprintf(tmp, sizeof(tmp), "%d", fp->fp_mss);
usr.sbin/pfctl/pfctl_osfp.c
1080
if (fp->fp_flags & PF_OSFP_WSCALE_DC)
usr.sbin/pfctl/pfctl_osfp.c
1083
if (fp->fp_flags & PF_OSFP_WSCALE_MOD)
usr.sbin/pfctl/pfctl_osfp.c
1085
snprintf(tmp, sizeof(tmp), "%d", fp->fp_wscale);
usr.sbin/pfctl/pfctl_osfp.c
1096
strlcat(buf, fp->fp_os.fp_class_nm, sizeof(buf));
usr.sbin/pfctl/pfctl_osfp.c
1098
strlcat(buf, fp->fp_os.fp_version_nm, sizeof(buf));
usr.sbin/pfctl/pfctl_osfp.c
1100
strlcat(buf, fp->fp_os.fp_subtype_nm, sizeof(buf));
usr.sbin/pfctl/pfctl_osfp.c
1103
snprintf(tmp, sizeof(tmp), "TcpOpts %d 0x%llx", fp->fp_optcnt,
usr.sbin/pfctl/pfctl_osfp.c
1104
(long long int)fp->fp_tcpopts);
usr.sbin/pfctl/pfctl_osfp.c
126
memset(&fp, 0, sizeof(fp));
usr.sbin/pfctl/pfctl_osfp.c
175
fp.fp_ttl = ttl;
usr.sbin/pfctl/pfctl_osfp.c
177
fp.fp_flags |= PF_OSFP_DF;
usr.sbin/pfctl/pfctl_osfp.c
182
fp.fp_flags |= PF_OSFP_WSIZE_DC;
usr.sbin/pfctl/pfctl_osfp.c
185
fp.fp_flags |= PF_OSFP_WSIZE_MSS;
usr.sbin/pfctl/pfctl_osfp.c
188
fp.fp_flags |= PF_OSFP_WSIZE_MTU;
usr.sbin/pfctl/pfctl_osfp.c
191
fp.fp_flags |= PF_OSFP_WSIZE_MOD;
usr.sbin/pfctl/pfctl_osfp.c
194
fp.fp_wsize = window;
usr.sbin/pfctl/pfctl_osfp.c
198
fp.fp_flags |= PF_OSFP_PSIZE_DC;
usr.sbin/pfctl/pfctl_osfp.c
201
fp.fp_flags |= PF_OSFP_PSIZE_MOD;
usr.sbin/pfctl/pfctl_osfp.c
203
fp.fp_psize = psize;
usr.sbin/pfctl/pfctl_osfp.c
208
fp.fp_flags |= PF_OSFP_WSCALE_DC;
usr.sbin/pfctl/pfctl_osfp.c
211
fp.fp_flags |= PF_OSFP_WSCALE_MOD;
usr.sbin/pfctl/pfctl_osfp.c
213
fp.fp_wscale = wscale;
usr.sbin/pfctl/pfctl_osfp.c
217
fp.fp_flags |= PF_OSFP_MSS_DC;
usr.sbin/pfctl/pfctl_osfp.c
220
fp.fp_flags |= PF_OSFP_MSS_MOD;
usr.sbin/pfctl/pfctl_osfp.c
223
fp.fp_mss = mss;
usr.sbin/pfctl/pfctl_osfp.c
225
fp.fp_tcpopts = packed_tcpopts;
usr.sbin/pfctl/pfctl_osfp.c
226
fp.fp_optcnt = optcnt;
usr.sbin/pfctl/pfctl_osfp.c
228
fp.fp_flags |= PF_OSFP_TS0;
usr.sbin/pfctl/pfctl_osfp.c
231
fp.fp_os.fp_enflags |= PF_OSFP_GENERIC;
usr.sbin/pfctl/pfctl_osfp.c
233
fp.fp_os.fp_enflags |= PF_OSFP_NODETAIL;
usr.sbin/pfctl/pfctl_osfp.c
236
strlcpy(fp.fp_os.fp_class_nm, class + 1,
usr.sbin/pfctl/pfctl_osfp.c
237
sizeof(fp.fp_os.fp_class_nm));
usr.sbin/pfctl/pfctl_osfp.c
239
strlcpy(fp.fp_os.fp_class_nm, class,
usr.sbin/pfctl/pfctl_osfp.c
240
sizeof(fp.fp_os.fp_class_nm));
usr.sbin/pfctl/pfctl_osfp.c
241
strlcpy(fp.fp_os.fp_version_nm, version,
usr.sbin/pfctl/pfctl_osfp.c
242
sizeof(fp.fp_os.fp_version_nm));
usr.sbin/pfctl/pfctl_osfp.c
243
strlcpy(fp.fp_os.fp_subtype_nm, subtype,
usr.sbin/pfctl/pfctl_osfp.c
244
sizeof(fp.fp_os.fp_subtype_nm));
usr.sbin/pfctl/pfctl_osfp.c
246
add_fingerprint(dev, opts, &fp);
usr.sbin/pfctl/pfctl_osfp.c
248
fp.fp_flags |= (PF_OSFP_DF | PF_OSFP_INET6);
usr.sbin/pfctl/pfctl_osfp.c
249
fp.fp_psize += sizeof(struct ip6_hdr) - sizeof(struct ip);
usr.sbin/pfctl/pfctl_osfp.c
250
add_fingerprint(dev, opts, &fp);
usr.sbin/pfctl/pfctl_osfp.c
457
pfctl_lookup_fingerprint(pf_osfp_t fp, char *buf, size_t len)
usr.sbin/pfctl/pfctl_osfp.c
466
if (fp == PF_OSFP_UNKNOWN) {
usr.sbin/pfctl/pfctl_osfp.c
470
if (fp == PF_OSFP_ANY) {
usr.sbin/pfctl/pfctl_osfp.c
475
PF_OSFP_UNPACK(fp, class, version, subtype);
usr.sbin/pfctl/pfctl_osfp.c
479
warnx("PF_OSFP_UNPACK(0x%x) failed!!", fp);
usr.sbin/pfctl/pfctl_osfp.c
49
# define DEBUG(fp, str, v...) \
usr.sbin/pfctl/pfctl_osfp.c
50
fprintf(stderr, "%s:%s:%s " str "\n", (fp)->fp_os.fp_class_nm, \
usr.sbin/pfctl/pfctl_osfp.c
51
(fp)->fp_os.fp_version_nm, (fp)->fp_os.fp_subtype_nm , ## v);
usr.sbin/pfctl/pfctl_osfp.c
53
# define DEBUG(fp, str, v...) ((void)0)
usr.sbin/pfctl/pfctl_osfp.c
548
add_fingerprint(int dev, int opts, struct pf_osfp_ioctl *fp)
usr.sbin/pfctl/pfctl_osfp.c
558
if (isdigit(fp->field[_i]) && fp->field[_i+1] == '.') { \
usr.sbin/pfctl/pfctl_osfp.c
559
_dot = fp->field[_i] - '0'; \
usr.sbin/pfctl/pfctl_osfp.c
562
if (isdigit(fp->field[_i])) \
usr.sbin/pfctl/pfctl_osfp.c
563
_start = fp->field[_i++] - '0'; \
usr.sbin/pfctl/pfctl_osfp.c
566
if (isdigit(fp->field[_i])) \
usr.sbin/pfctl/pfctl_osfp.c
567
_start = (_start * 10) + fp->field[_i++] - '0'; \
usr.sbin/pfctl/pfctl_osfp.c
568
if (fp->field[_i++] != '-') \
usr.sbin/pfctl/pfctl_osfp.c
570
if (isdigit(fp->field[_i]) && fp->field[_i+1] == '.' && \
usr.sbin/pfctl/pfctl_osfp.c
571
fp->field[_i] - '0' == _dot) \
usr.sbin/pfctl/pfctl_osfp.c
575
if (isdigit(fp->field[_i])) \
usr.sbin/pfctl/pfctl_osfp.c
576
_end = fp->field[_i++] - '0'; \
usr.sbin/pfctl/pfctl_osfp.c
579
if (isdigit(fp->field[_i])) \
usr.sbin/pfctl/pfctl_osfp.c
580
_end = (_end * 10) + fp->field[_i++] - '0'; \
usr.sbin/pfctl/pfctl_osfp.c
581
if (isdigit(fp->field[_i])) \
usr.sbin/pfctl/pfctl_osfp.c
582
_end = (_end * 10) + fp->field[_i++] - '0'; \
usr.sbin/pfctl/pfctl_osfp.c
583
if (fp->field[_i] != '\0') \
usr.sbin/pfctl/pfctl_osfp.c
585
memcpy(&fptmp, fp, sizeof(fptmp)); \
usr.sbin/pfctl/pfctl_osfp.c
603
if (strcasecmp(fp->fp_os.fp_class_nm, "nomatch") == 0)
usr.sbin/pfctl/pfctl_osfp.c
609
nm_class = fingerprint_name_entry(&classes, fp->fp_os.fp_class_nm);
usr.sbin/pfctl/pfctl_osfp.c
615
fp->fp_os.fp_version_nm);
usr.sbin/pfctl/pfctl_osfp.c
621
fp->fp_os.fp_subtype_nm);
usr.sbin/pfctl/pfctl_osfp.c
631
DEBUG(fp, "\tsignature %d:%d:%d %s", class, version, subtype,
usr.sbin/pfctl/pfctl_osfp.c
632
print_ioctl(fp));
usr.sbin/pfctl/pfctl_osfp.c
634
PF_OSFP_PACK(fp->fp_os.fp_os, class, version, subtype);
usr.sbin/pfctl/pfctl_osfp.c
639
if ((errno = pf_osfp_add(fp)))
usr.sbin/pfctl/pfctl_osfp.c
641
if ((opts & PF_OPT_NOACTION) == 0 && ioctl(dev, DIOCOSFPADD, fp))
usr.sbin/pfctl/pfctl_osfp.c
646
fp->fp_os.fp_class_nm,
usr.sbin/pfctl/pfctl_osfp.c
647
fp->fp_os.fp_version_nm,
usr.sbin/pfctl/pfctl_osfp.c
648
fp->fp_os.fp_subtype_nm);
usr.sbin/pfctl/pfctl_osfp.c
658
import_fingerprint(struct pf_osfp_ioctl *fp)
usr.sbin/pfctl/pfctl_osfp.c
663
PF_OSFP_UNPACK(fp->fp_os.fp_os, class, version, subtype);
usr.sbin/pfctl/pfctl_osfp.c
665
nm_class = fingerprint_name_entry(&classes, fp->fp_os.fp_class_nm);
usr.sbin/pfctl/pfctl_osfp.c
672
fp->fp_os.fp_version_nm);
usr.sbin/pfctl/pfctl_osfp.c
680
fp->fp_os.fp_subtype_nm);
usr.sbin/pfctl/pfctl_osfp.c
692
DEBUG(fp, "import signature %d:%d:%d", class, version, subtype);
usr.sbin/pfctl/pfctl_radix.c
512
FILE *fp;
usr.sbin/pfctl/pfctl_radix.c
519
fp = stdin;
usr.sbin/pfctl/pfctl_radix.c
521
fp = pfctl_fopen(file, "r");
usr.sbin/pfctl/pfctl_radix.c
522
if (fp == NULL)
usr.sbin/pfctl/pfctl_radix.c
525
while ((rv = pfr_next_token(buf, fp)) == 1)
usr.sbin/pfctl/pfctl_radix.c
530
if (fp != stdin)
usr.sbin/pfctl/pfctl_radix.c
531
fclose(fp);
usr.sbin/pfctl/pfctl_radix.c
536
pfr_next_token(char buf[BUF_SIZE], FILE *fp)
usr.sbin/pfctl/pfctl_radix.c
543
while (isspace(next_ch) && !feof(fp))
usr.sbin/pfctl/pfctl_radix.c
544
next_ch = fgetc(fp);
usr.sbin/pfctl/pfctl_radix.c
547
while (!feof(fp)) {
usr.sbin/pfctl/pfctl_radix.c
548
next_ch = fgetc(fp);
usr.sbin/pfctl/pfctl_radix.c
555
if (feof(fp)) {
usr.sbin/pfctl/pfctl_radix.c
562
next_ch = fgetc(fp);
usr.sbin/pfctl/pfctl_radix.c
563
} while (!feof(fp) && !isspace(next_ch));
usr.sbin/pflogd/pflogd.c
299
FILE *fp;
usr.sbin/pflogd/pflogd.c
318
fp = fdopen(fd, "a+");
usr.sbin/pflogd/pflogd.c
320
if (fp == NULL) {
usr.sbin/pflogd/pflogd.c
325
if (fstat(fileno(fp), &st) == -1) {
usr.sbin/pflogd/pflogd.c
327
fclose(fp);
usr.sbin/pflogd/pflogd.c
332
if (setvbuf(fp, NULL, _IONBF, 0)) {
usr.sbin/pflogd/pflogd.c
334
fclose(fp);
usr.sbin/pflogd/pflogd.c
356
if (fwrite((char *)&hdr, sizeof(hdr), 1, fp) != 1) {
usr.sbin/pflogd/pflogd.c
357
fclose(fp);
usr.sbin/pflogd/pflogd.c
360
} else if (scan_dump(fp, st.st_size)) {
usr.sbin/pflogd/pflogd.c
361
fclose(fp);
usr.sbin/pflogd/pflogd.c
370
dpcap = fp;
usr.sbin/pflogd/pflogd.c
373
flush_buffer(fp);
usr.sbin/pflogd/pflogd.c
379
scan_dump(FILE *fp, off_t size)
usr.sbin/pflogd/pflogd.c
393
fseek(fp, 0L, SEEK_SET);
usr.sbin/pflogd/pflogd.c
395
if (fread((char *)&hdr, sizeof(hdr), 1, fp) != 1) {
usr.sbin/pflogd/pflogd.c
410
while (!feof(fp)) {
usr.sbin/pflogd/pflogd.c
411
off_t len = fread((char *)&ph, 1, sizeof(ph), fp);
usr.sbin/pflogd/pflogd.c
422
fseek(fp, ph.caplen, SEEK_CUR);
usr.sbin/ppp/auth.c
125
FILE *fp;
usr.sbin/ppp/auth.c
130
fp = OpenSecret(SECRETFILE);
usr.sbin/ppp/auth.c
131
if (fp != NULL) {
usr.sbin/ppp/auth.c
134
while (fgets(buff, sizeof buff, fp)) {
usr.sbin/ppp/auth.c
145
CloseSecret(fp);
usr.sbin/ppp/auth.c
157
rewind(fp);
usr.sbin/ppp/auth.c
161
CloseSecret(fp);
usr.sbin/ppp/auth.c
170
FILE *fp;
usr.sbin/ppp/auth.c
191
fp = OpenSecret(SECRETFILE);
usr.sbin/ppp/auth.c
192
if (fp != NULL) {
usr.sbin/ppp/auth.c
195
while (fgets(buff, sizeof buff, fp)) {
usr.sbin/ppp/auth.c
206
CloseSecret(fp);
usr.sbin/ppp/auth.c
226
rewind(fp);
usr.sbin/ppp/auth.c
230
CloseSecret(fp);
usr.sbin/ppp/auth.c
253
FILE *fp;
usr.sbin/ppp/auth.c
258
fp = OpenSecret(SECRETFILE);
usr.sbin/ppp/auth.c
261
if (fp != NULL) {
usr.sbin/ppp/auth.c
262
while (fgets(buff, sizeof buff, fp)) {
usr.sbin/ppp/auth.c
273
CloseSecret(fp);
usr.sbin/ppp/auth.c
282
if (fp != NULL) {
usr.sbin/ppp/auth.c
283
rewind(fp);
usr.sbin/ppp/auth.c
288
if (fp != NULL)
usr.sbin/ppp/auth.c
289
CloseSecret(fp);
usr.sbin/ppp/auth.c
304
FILE *fp;
usr.sbin/ppp/auth.c
310
fp = OpenSecret(SECRETFILE);
usr.sbin/ppp/auth.c
311
if (fp == NULL)
usr.sbin/ppp/auth.c
316
while (fgets(buff, sizeof buff, fp)) {
usr.sbin/ppp/auth.c
329
CloseSecret(fp);
usr.sbin/ppp/auth.c
338
rewind(fp);
usr.sbin/ppp/auth.c
342
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
374
(*algorithm[f]->o.OptInit)(fp->bundle, &(*o)->val, &ccp->cfg);
usr.sbin/ppp/ccp.c
378
log_Printf(LogERROR, "%s: CCP REQ buffer overrun !\n", fp->link->name);
usr.sbin/ppp/ccp.c
391
fsm_Output(fp, CODE_CONFIGREQ, fp->reqid, buff, cp - buff, MB_CCPOUT);
usr.sbin/ppp/ccp.c
395
ccp_SendResetReq(struct fsm *fp)
usr.sbin/ppp/ccp.c
398
struct ccp *ccp = fsm2ccp(fp);
usr.sbin/ppp/ccp.c
400
ccp->reset_sent = fp->reqid;
usr.sbin/ppp/ccp.c
402
fsm_Output(fp, CODE_RESETREQ, fp->reqid, NULL, 0, MB_CCPOUT);
usr.sbin/ppp/ccp.c
406
CcpSentTerminateReq(struct fsm *fp __unused)
usr.sbin/ppp/ccp.c
412
CcpSendTerminateAck(struct fsm *fp, u_char id)
usr.sbin/ppp/ccp.c
415
fsm_Output(fp, CODE_TERMACK, id, NULL, 0, MB_CCPOUT);
usr.sbin/ppp/ccp.c
419
CcpRecvResetReq(struct fsm *fp)
usr.sbin/ppp/ccp.c
422
struct ccp *ccp = fsm2ccp(fp);
usr.sbin/ppp/ccp.c
429
CcpLayerStart(struct fsm *fp)
usr.sbin/ppp/ccp.c
432
struct ccp *ccp = fsm2ccp(fp);
usr.sbin/ppp/ccp.c
434
log_Printf(LogCCP, "%s: LayerStart.\n", fp->link->name);
usr.sbin/ppp/ccp.c
435
fp->more.reqs = fp->more.naks = fp->more.rejs = ccp->cfg.fsm.maxreq * 3;
usr.sbin/ppp/ccp.c
439
CcpLayerDown(struct fsm *fp)
usr.sbin/ppp/ccp.c
442
struct ccp *ccp = fsm2ccp(fp);
usr.sbin/ppp/ccp.c
445
log_Printf(LogCCP, "%s: LayerDown.\n", fp->link->name);
usr.sbin/ppp/ccp.c
467
CcpLayerFinish(struct fsm *fp)
usr.sbin/ppp/ccp.c
470
struct ccp *ccp = fsm2ccp(fp);
usr.sbin/ppp/ccp.c
473
log_Printf(LogCCP, "%s: LayerFinish.\n", fp->link->name);
usr.sbin/ppp/ccp.c
486
if (fp->link->lcp.fsm.state == ST_OPENED)
usr.sbin/ppp/ccp.c
487
log_Printf(LogLCP, "%s: Closing due to CCP completion\n", fp->link->name);
usr.sbin/ppp/ccp.c
488
fsm_Close(&fp->link->lcp.fsm);
usr.sbin/ppp/ccp.c
494
CcpLayerUp(struct fsm *fp)
usr.sbin/ppp/ccp.c
497
struct ccp *ccp = fsm2ccp(fp);
usr.sbin/ppp/ccp.c
507
fp->link->name, protoname(algorithm[f]->id));
usr.sbin/ppp/ccp.c
513
fsm_Close(fp);
usr.sbin/ppp/ccp.c
514
fsm_Close(&fp->link->lcp.fsm);
usr.sbin/ppp/ccp.c
518
log_Printf(LogCCP, "%s: LayerUp.\n", fp->link->name);
usr.sbin/ppp/ccp.c
523
(fp->bundle, &ccp->in.opt);
usr.sbin/ppp/ccp.c
526
fp->link->name, protoname(ccp->his_proto));
usr.sbin/ppp/ccp.c
528
fsm_Close(fp);
usr.sbin/ppp/ccp.c
542
(fp->bundle, &(*o)->val);
usr.sbin/ppp/ccp.c
545
fp->link->name, protoname(ccp->my_proto));
usr.sbin/ppp/ccp.c
547
fsm_Close(fp);
usr.sbin/ppp/ccp.c
552
fp->more.reqs = fp->more.naks = fp->more.rejs = ccp->cfg.fsm.maxreq * 3;
usr.sbin/ppp/ccp.c
555
fp->link->name, protoname(ccp->my_proto), ccp->my_proto,
usr.sbin/ppp/ccp.c
562
CcpDecodeConfig(struct fsm *fp, u_char *cp, u_char *end, int mode_type,
usr.sbin/ppp/ccp.c
566
struct ccp *ccp = fsm2ccp(fp);
usr.sbin/ppp/ccp.c
601
(*algorithm[f]->Usable)(fp) &&
usr.sbin/ppp/ccp.c
604
switch ((*algorithm[f]->i.Set)(fp->bundle, &ccp->in.opt, &ccp->cfg)) {
usr.sbin/ppp/ccp.c
627
" option\n", fp->link->name);
usr.sbin/ppp/ccp.c
630
if ((*algorithm[f]->o.Set)(fp->bundle, &o->val, &ccp->cfg) ==
usr.sbin/ppp/ccp.c
636
if (algorithm[f]->Required(fp)) {
usr.sbin/ppp/ccp.c
638
" %s negotiation\n", fp->link->name,
usr.sbin/ppp/ccp.c
640
fsm_Close(&fp->link->lcp.fsm);
usr.sbin/ppp/ccp.c
648
if (algorithm[f]->Required(fp)) {
usr.sbin/ppp/ccp.c
650
fp->link->name, protoname(algorithm[f]->id));
usr.sbin/ppp/ccp.c
651
fsm_Close(&fp->link->lcp.fsm);
usr.sbin/ppp/ccp.c
686
CcpRecvResetAck(struct fsm *fp, u_char id)
usr.sbin/ppp/ccp.c
689
struct ccp *ccp = fsm2ccp(fp);
usr.sbin/ppp/ccp.c
694
" ignored\n", fp->link->name, id, ccp->reset_sent);
usr.sbin/ppp/ccp.c
700
fp->link->name);
usr.sbin/ppp/ccp.c
703
fp->link->name, id);
usr.sbin/ppp/ccp.c
811
ccp_DefaultUsable(struct fsm *fp __unused)
usr.sbin/ppp/ccp.c
817
ccp_DefaultRequired(struct fsm *fp __unused)
usr.sbin/ppp/ccp.h
122
#define fsm2ccp(fp) (fp->proto == PROTO_CCP ? (struct ccp *)fp : NULL)
usr.sbin/ppp/command.c
1271
struct fsm *fp;
usr.sbin/ppp/command.c
1273
fp = &command_ChooseLink(arg)->ccp.fsm;
usr.sbin/ppp/command.c
1274
if (fp->link->lcp.fsm.state != ST_OPENED)
usr.sbin/ppp/command.c
1276
else if (fp->state == ST_OPENED)
usr.sbin/ppp/command.c
1277
fsm_Reopen(fp);
usr.sbin/ppp/command.c
1279
fp->open_mode = 0; /* Not passive any more */
usr.sbin/ppp/command.c
1280
if (fp->state == ST_STOPPED) {
usr.sbin/ppp/command.c
1281
fsm_Down(fp);
usr.sbin/ppp/command.c
1282
fsm_Up(fp);
usr.sbin/ppp/command.c
1284
fsm_Up(fp);
usr.sbin/ppp/command.c
1285
fsm_Open(fp);
usr.sbin/ppp/command.c
1313
struct fsm *fp;
usr.sbin/ppp/command.c
1315
fp = &command_ChooseLink(arg)->ccp.fsm;
usr.sbin/ppp/command.c
1316
if (fp->state == ST_OPENED) {
usr.sbin/ppp/command.c
1317
fsm_Close(fp);
usr.sbin/ppp/command.c
1319
fp->open_mode = 0; /* Stay ST_CLOSED */
usr.sbin/ppp/command.c
1321
fp->open_mode = OPEN_PASSIVE; /* Wait for the peer to start */
usr.sbin/ppp/command.c
1346
struct fsm *fp = arg->cx ? &arg->cx->physical->link.ccp.fsm :
usr.sbin/ppp/command.c
1348
fsm2initial(fp);
usr.sbin/ppp/datalink.c
559
datalink_LayerStart(void *v, struct fsm *fp)
usr.sbin/ppp/datalink.c
564
if (fp->proto == PROTO_LCP)
usr.sbin/ppp/datalink.c
565
(*dl->parent->LayerStart)(dl->parent->object, fp);
usr.sbin/ppp/datalink.c
569
datalink_LayerUp(void *v, struct fsm *fp)
usr.sbin/ppp/datalink.c
575
if (fp->proto == PROTO_LCP) {
usr.sbin/ppp/datalink.c
591
} else if (fp->proto == PROTO_CCP)
usr.sbin/ppp/datalink.c
748
datalink_LayerDown(void *v, struct fsm *fp)
usr.sbin/ppp/datalink.c
753
if (fp->proto == PROTO_LCP) {
usr.sbin/ppp/datalink.c
759
(*dl->parent->LayerDown)(dl->parent->object, fp);
usr.sbin/ppp/datalink.c
777
datalink_LayerFinish(void *v, struct fsm *fp)
usr.sbin/ppp/datalink.c
782
if (fp->proto == PROTO_LCP) {
usr.sbin/ppp/datalink.c
783
fsm2initial(fp);
usr.sbin/ppp/datalink.c
784
(*dl->parent->LayerFinish)(dl->parent->object, fp);
usr.sbin/ppp/datalink.c
786
} else if (fp->state == ST_CLOSED && fp->open_mode == OPEN_PASSIVE)
usr.sbin/ppp/datalink.c
787
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
1005
if (magic != fp->link->lcp.his_magic)
usr.sbin/ppp/fsm.c
1006
log_Printf(fp->LogLevel, "%s: RecvIdent: magic 0x%08lx is wrong,"
usr.sbin/ppp/fsm.c
1007
" expecting 0x%08lx\n", fp->link->name, (u_long)magic,
usr.sbin/ppp/fsm.c
1008
(u_long)fp->link->lcp.his_magic);
usr.sbin/ppp/fsm.c
1010
lcp_RecvIdentification(&fp->link->lcp, cp + 4);
usr.sbin/ppp/fsm.c
1016
FsmRecvTimeRemain(struct fsm *fp __unused, struct fsmheader *lhp __unused,
usr.sbin/ppp/fsm.c
1023
FsmRecvResetReq(struct fsm *fp, struct fsmheader *lhp, struct mbuf *bp)
usr.sbin/ppp/fsm.c
1025
if ((*fp->fn->RecvResetReq)(fp)) {
usr.sbin/ppp/fsm.c
1031
link_SequenceQueue(fp->link);
usr.sbin/ppp/fsm.c
1032
fsm_Output(fp, CODE_RESETACK, lhp->id, NULL, 0, MB_CCPOUT);
usr.sbin/ppp/fsm.c
1038
FsmRecvResetAck(struct fsm *fp, struct fsmheader *lhp, struct mbuf *bp)
usr.sbin/ppp/fsm.c
1040
(*fp->fn->RecvResetAck)(fp, lhp->id);
usr.sbin/ppp/fsm.c
1045
fsm_Input(struct fsm *fp, struct mbuf *bp)
usr.sbin/ppp/fsm.c
1060
"- dropped\n", fp->link->name, len, (int)ntohs(lh.length));
usr.sbin/ppp/fsm.c
1065
if (lh.code < fp->min_code || lh.code > fp->max_code ||
usr.sbin/ppp/fsm.c
1075
fsm_Output(fp, CODE_CODEREJ, id++, MBUF_CTOP(bp), bp->m_len, MB_UNKNOWN);
usr.sbin/ppp/fsm.c
1081
if (lh.id != fp->reqid && codep->check_reqid &&
usr.sbin/ppp/fsm.c
1082
Enabled(fp->bundle, OPT_IDCHECK)) {
usr.sbin/ppp/fsm.c
1083
log_Printf(fp->LogLevel, "%s: Recv%s(%d), dropped (expected %d)\n",
usr.sbin/ppp/fsm.c
1084
fp->link->name, codep->name, lh.id, fp->reqid);
usr.sbin/ppp/fsm.c
1088
log_Printf(fp->LogLevel, "%s: Recv%s(%d) state = %s\n",
usr.sbin/ppp/fsm.c
1089
fp->link->name, codep->name, lh.id, State2Nam(fp->state));
usr.sbin/ppp/fsm.c
1091
if (codep->inc_reqid && (lh.id == fp->reqid ||
usr.sbin/ppp/fsm.c
1092
(!Enabled(fp->bundle, OPT_IDCHECK) && codep->check_reqid)))
usr.sbin/ppp/fsm.c
1093
fp->reqid++; /* That's the end of that ``exchange''.... */
usr.sbin/ppp/fsm.c
1095
(*codep->recv)(fp, &lh, bp);
usr.sbin/ppp/fsm.c
1099
fsm_NullRecvResetReq(struct fsm *fp)
usr.sbin/ppp/fsm.c
1101
log_Printf(fp->LogLevel, "%s: Oops - received unexpected reset req\n",
usr.sbin/ppp/fsm.c
1102
fp->link->name);
usr.sbin/ppp/fsm.c
1107
fsm_NullRecvResetAck(struct fsm *fp, u_char id __unused)
usr.sbin/ppp/fsm.c
1109
log_Printf(fp->LogLevel, "%s: Oops - received unexpected reset ack\n",
usr.sbin/ppp/fsm.c
1110
fp->link->name);
usr.sbin/ppp/fsm.c
1114
fsm_Reopen(struct fsm *fp)
usr.sbin/ppp/fsm.c
1116
if (fp->state == ST_OPENED) {
usr.sbin/ppp/fsm.c
1117
(*fp->fn->LayerDown)(fp);
usr.sbin/ppp/fsm.c
1118
FsmInitRestartCounter(fp, FSM_REQ_TIMER);
usr.sbin/ppp/fsm.c
1119
FsmSendConfigReq(fp);
usr.sbin/ppp/fsm.c
1120
NewState(fp, ST_REQSENT);
usr.sbin/ppp/fsm.c
1121
(*fp->parent->LayerDown)(fp->parent->object, fp);
usr.sbin/ppp/fsm.c
1126
fsm2initial(struct fsm *fp)
usr.sbin/ppp/fsm.c
1128
timer_Stop(&fp->FsmTimer);
usr.sbin/ppp/fsm.c
1129
timer_Stop(&fp->OpenTimer);
usr.sbin/ppp/fsm.c
1130
timer_Stop(&fp->StoppedTimer);
usr.sbin/ppp/fsm.c
1131
if (fp->state == ST_STOPPED)
usr.sbin/ppp/fsm.c
1132
fsm_Close(fp);
usr.sbin/ppp/fsm.c
1133
if (fp->state > ST_INITIAL)
usr.sbin/ppp/fsm.c
1134
fsm_Down(fp);
usr.sbin/ppp/fsm.c
1135
if (fp->state > ST_INITIAL)
usr.sbin/ppp/fsm.c
1136
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
534
FsmInitRestartCounter(fp, FSM_REQ_TIMER);
usr.sbin/ppp/fsm.c
537
FsmSendConfigReq(fp);
usr.sbin/ppp/fsm.c
542
fsm_Output(fp, CODE_CONFIGREJ, lhp->id, dec.rej, dec.rejend - dec.rej,
usr.sbin/ppp/fsm.c
545
fsm_Output(fp, CODE_CONFIGNAK, lhp->id, dec.nak, dec.nakend - dec.nak,
usr.sbin/ppp/fsm.c
548
fsm_Output(fp, CODE_CONFIGACK, lhp->id, dec.ack, dec.ackend - dec.ack,
usr.sbin/ppp/fsm.c
551
switch (fp->state) {
usr.sbin/ppp/fsm.c
558
(*fp->fn->LayerStart)(fp);
usr.sbin/ppp/fsm.c
559
(*fp->parent->LayerStart)(fp->parent->object, fp);
usr.sbin/ppp/fsm.c
564
NewState(fp, ST_ACKSENT);
usr.sbin/ppp/fsm.c
566
NewState(fp, ST_REQSENT);
usr.sbin/ppp/fsm.c
567
(*fp->parent->LayerDown)(fp->parent->object, fp);
usr.sbin/ppp/fsm.c
571
NewState(fp, ST_ACKSENT);
usr.sbin/ppp/fsm.c
575
NewState(fp, ST_OPENED);
usr.sbin/ppp/fsm.c
576
if ((*fp->fn->LayerUp)(fp))
usr.sbin/ppp/fsm.c
577
(*fp->parent->LayerUp)(fp->parent->object, fp);
usr.sbin/ppp/fsm.c
579
(*fp->fn->LayerDown)(fp);
usr.sbin/ppp/fsm.c
580
FsmInitRestartCounter(fp, FSM_TRM_TIMER);
usr.sbin/ppp/fsm.c
581
FsmSendTerminateReq(fp);
usr.sbin/ppp/fsm.c
582
NewState(fp, ST_CLOSING);
usr.sbin/ppp/fsm.c
583
lcp_SendIdentification(&fp->link->lcp);
usr.sbin/ppp/fsm.c
589
NewState(fp, ST_REQSENT);
usr.sbin/ppp/fsm.c
594
if (dec.rejend != dec.rej && --fp->more.rejs <= 0) {
usr.sbin/ppp/fsm.c
596
fp->link->name, fp->name);
usr.sbin/ppp/fsm.c
597
lcp_SendIdentification(&fp->link->lcp);
usr.sbin/ppp/fsm.c
598
fsm_Close(fp);
usr.sbin/ppp/fsm.c
601
if (dec.nakend != dec.nak && --fp->more.naks <= 0) {
usr.sbin/ppp/fsm.c
603
fp->link->name, fp->name);
usr.sbin/ppp/fsm.c
604
lcp_SendIdentification(&fp->link->lcp);
usr.sbin/ppp/fsm.c
605
fsm_Close(fp);
usr.sbin/ppp/fsm.c
610
FsmRecvConfigAck(struct fsm *fp, struct fsmheader *lhp, struct mbuf *bp)
usr.sbin/ppp/fsm.c
629
(*fp->fn->DecodeConfig)(fp, cp, cp + flen, MODE_ACK, &dec);
usr.sbin/ppp/fsm.c
631
log_Printf(fp->LogLevel, " [EMPTY]\n");
usr.sbin/ppp/fsm.c
633
switch (fp->state) {
usr.sbin/ppp/fsm.c
636
(*fp->fn->SendTerminateAck)(fp, lhp->id);
usr.sbin/ppp/fsm.c
642
FsmInitRestartCounter(fp, FSM_REQ_TIMER);
usr.sbin/ppp/fsm.c
643
NewState(fp, ST_ACKRCVD);
usr.sbin/ppp/fsm.c
646
FsmSendConfigReq(fp);
usr.sbin/ppp/fsm.c
647
NewState(fp, ST_REQSENT);
usr.sbin/ppp/fsm.c
650
FsmInitRestartCounter(fp, FSM_REQ_TIMER);
usr.sbin/ppp/fsm.c
651
NewState(fp, ST_OPENED);
usr.sbin/ppp/fsm.c
652
if ((*fp->fn->LayerUp)(fp))
usr.sbin/ppp/fsm.c
653
(*fp->parent->LayerUp)(fp->parent->object, fp);
usr.sbin/ppp/fsm.c
655
(*fp->fn->LayerDown)(fp);
usr.sbin/ppp/fsm.c
656
FsmInitRestartCounter(fp, FSM_TRM_TIMER);
usr.sbin/ppp/fsm.c
657
FsmSendTerminateReq(fp);
usr.sbin/ppp/fsm.c
658
NewState(fp, ST_CLOSING);
usr.sbin/ppp/fsm.c
659
lcp_SendIdentification(&fp->link->lcp);
usr.sbin/ppp/fsm.c
663
(*fp->fn->LayerDown)(fp);
usr.sbin/ppp/fsm.c
664
FsmSendConfigReq(fp);
usr.sbin/ppp/fsm.c
665
NewState(fp, ST_REQSENT);
usr.sbin/ppp/fsm.c
666
(*fp->parent->LayerDown)(fp->parent->object, fp);
usr.sbin/ppp/fsm.c
673
FsmRecvConfigNak(struct fsm *fp, struct fsmheader *lhp, struct mbuf *bp)
usr.sbin/ppp/fsm.c
690
switch (fp->state) {
usr.sbin/ppp/fsm.c
693
log_Printf(fp->LogLevel, "%s: Oops, RCN in %s.\n",
usr.sbin/ppp/fsm.c
694
fp->link->name, State2Nam(fp->state));
usr.sbin/ppp/fsm.c
699
(*fp->fn->SendTerminateAck)(fp, lhp->id);
usr.sbin/ppp/fsm.c
713
(*fp->fn->DecodeConfig)(fp, cp, cp + flen, MODE_NAK, &dec);
usr.sbin/ppp/fsm.c
715
log_Printf(fp->LogLevel, " [EMPTY]\n");
usr.sbin/ppp/fsm.c
717
switch (fp->state) {
usr.sbin/ppp/fsm.c
720
FsmInitRestartCounter(fp, FSM_REQ_TIMER);
usr.sbin/ppp/fsm.c
721
FsmSendConfigReq(fp);
usr.sbin/ppp/fsm.c
724
(*fp->fn->LayerDown)(fp);
usr.sbin/ppp/fsm.c
725
FsmSendConfigReq(fp);
usr.sbin/ppp/fsm.c
726
NewState(fp, ST_REQSENT);
usr.sbin/ppp/fsm.c
727
(*fp->parent->LayerDown)(fp->parent->object, fp);
usr.sbin/ppp/fsm.c
730
FsmSendConfigReq(fp);
usr.sbin/ppp/fsm.c
731
NewState(fp, ST_REQSENT);
usr.sbin/ppp/fsm.c
739
FsmRecvTermReq(struct fsm *fp, struct fsmheader *lhp, struct mbuf *bp)
usr.sbin/ppp/fsm.c
742
switch (fp->state) {
usr.sbin/ppp/fsm.c
745
log_Printf(fp->LogLevel, "%s: Oops, RTR in %s\n",
usr.sbin/ppp/fsm.c
746
fp->link->name, State2Nam(fp->state));
usr.sbin/ppp/fsm.c
753
(*fp->fn->SendTerminateAck)(fp, lhp->id);
usr.sbin/ppp/fsm.c
757
(*fp->fn->SendTerminateAck)(fp, lhp->id);
usr.sbin/ppp/fsm.c
758
NewState(fp, ST_REQSENT);
usr.sbin/ppp/fsm.c
761
(*fp->fn->LayerDown)(fp);
usr.sbin/ppp/fsm.c
762
(*fp->fn->SendTerminateAck)(fp, lhp->id);
usr.sbin/ppp/fsm.c
763
FsmInitRestartCounter(fp, FSM_TRM_TIMER);
usr.sbin/ppp/fsm.c
764
timer_Start(&fp->FsmTimer); /* Start restart timer */
usr.sbin/ppp/fsm.c
765
fp->restart = 0;
usr.sbin/ppp/fsm.c
766
NewState(fp, ST_STOPPING);
usr.sbin/ppp/fsm.c
767
(*fp->parent->LayerDown)(fp->parent->object, fp);
usr.sbin/ppp/fsm.c
775
FsmRecvTermAck(struct fsm *fp, struct fsmheader *lhp __unused, struct mbuf *bp)
usr.sbin/ppp/fsm.c
778
switch (fp->state) {
usr.sbin/ppp/fsm.c
780
(*fp->fn->LayerFinish)(fp);
usr.sbin/ppp/fsm.c
781
NewState(fp, ST_CLOSED);
usr.sbin/ppp/fsm.c
782
(*fp->parent->LayerFinish)(fp->parent->object, fp);
usr.sbin/ppp/fsm.c
785
(*fp->fn->LayerFinish)(fp);
usr.sbin/ppp/fsm.c
786
NewState(fp, ST_STOPPED);
usr.sbin/ppp/fsm.c
787
(*fp->parent->LayerFinish)(fp->parent->object, fp);
usr.sbin/ppp/fsm.c
790
NewState(fp, ST_REQSENT);
usr.sbin/ppp/fsm.c
793
(*fp->fn->LayerDown)(fp);
usr.sbin/ppp/fsm.c
794
FsmSendConfigReq(fp);
usr.sbin/ppp/fsm.c
795
NewState(fp, ST_REQSENT);
usr.sbin/ppp/fsm.c
796
(*fp->parent->LayerDown)(fp->parent->object, fp);
usr.sbin/ppp/fsm.c
803
FsmRecvConfigRej(struct fsm *fp, struct fsmheader *lhp, struct mbuf *bp)
usr.sbin/ppp/fsm.c
818
lcp_SendIdentification(&fp->link->lcp);
usr.sbin/ppp/fsm.c
823
switch (fp->state) {
usr.sbin/ppp/fsm.c
826
log_Printf(fp->LogLevel, "%s: Oops, RCJ in %s.\n",
usr.sbin/ppp/fsm.c
827
fp->link->name, State2Nam(fp->state));
usr.sbin/ppp/fsm.c
832
(*fp->fn->SendTerminateAck)(fp, lhp->id);
usr.sbin/ppp/fsm.c
846
(*fp->fn->DecodeConfig)(fp, cp, cp + flen, MODE_REJ, &dec);
usr.sbin/ppp/fsm.c
848
log_Printf(fp->LogLevel, " [EMPTY]\n");
usr.sbin/ppp/fsm.c
850
switch (fp->state) {
usr.sbin/ppp/fsm.c
853
FsmInitRestartCounter(fp, FSM_REQ_TIMER);
usr.sbin/ppp/fsm.c
854
FsmSendConfigReq(fp);
usr.sbin/ppp/fsm.c
857
(*fp->fn->LayerDown)(fp);
usr.sbin/ppp/fsm.c
858
FsmSendConfigReq(fp);
usr.sbin/ppp/fsm.c
859
NewState(fp, ST_REQSENT);
usr.sbin/ppp/fsm.c
860
(*fp->parent->LayerDown)(fp->parent->object, fp);
usr.sbin/ppp/fsm.c
863
FsmSendConfigReq(fp);
usr.sbin/ppp/fsm.c
864
NewState(fp, ST_REQSENT);
usr.sbin/ppp/fsm.c
871
FsmRecvCodeRej(struct fsm *fp __unused, struct fsmheader *lhp __unused,
usr.sbin/ppp/fsm.c
878
FsmRecvProtoRej(struct fsm *fp, struct fsmheader *lhp __unused, struct mbuf *bp)
usr.sbin/ppp/fsm.c
880
struct physical *p = link2physical(fp->link);
usr.sbin/ppp/fsm.c
889
log_Printf(fp->LogLevel, "%s: -- Protocol 0x%04x (%s) was rejected!\n",
usr.sbin/ppp/fsm.c
890
fp->link->name, proto, hdlc_Protocol2Nam(proto));
usr.sbin/ppp/fsm.c
898
fp->link->name);
usr.sbin/ppp/fsm.c
901
if (fp->proto == PROTO_LCP) {
usr.sbin/ppp/fsm.c
902
fp = &fp->link->ccp.fsm;
usr.sbin/ppp/fsm.c
905
switch (fp->state) {
usr.sbin/ppp/fsm.c
908
NewState(fp, ST_CLOSED);
usr.sbin/ppp/fsm.c
911
NewState(fp, ST_STOPPED);
usr.sbin/ppp/fsm.c
919
if (fp->proto == PROTO_LCP) {
usr.sbin/ppp/fsm.c
921
fp->link->name);
usr.sbin/ppp/fsm.c
922
fsm_Close(&fp->bundle->ncp.ipcp.fsm);
usr.sbin/ppp/fsm.c
927
if (fp->proto == PROTO_LCP) {
usr.sbin/ppp/fsm.c
929
fp->link->name);
usr.sbin/ppp/fsm.c
930
fsm_Close(&fp->bundle->ncp.ipv6cp.fsm);
usr.sbin/ppp/fsm.c
935
if (fp->proto == PROTO_LCP) {
usr.sbin/ppp/fsm.c
936
struct lcp *lcp = fsm2lcp(fp);
usr.sbin/ppp/fsm.c
940
fp->link->name);
usr.sbin/ppp/fsm.c
941
fsm_Close(fp);
usr.sbin/ppp/fsm.c
950
FsmRecvEchoReq(struct fsm *fp, struct fsmheader *lhp, struct mbuf *bp)
usr.sbin/ppp/fsm.c
952
struct lcp *lcp = fsm2lcp(fp);
usr.sbin/ppp/fsm.c
963
log_Printf(fp->LogLevel, "%s: RecvEchoReq: magic 0x%08lx is wrong,"
usr.sbin/ppp/fsm.c
964
" expecting 0x%08lx\n", fp->link->name, (u_long)magic,
usr.sbin/ppp/fsm.c
968
if (fp->state == ST_OPENED) {
usr.sbin/ppp/fsm.c
970
fsm_Output(fp, CODE_ECHOREP, lhp->id, cp,
usr.sbin/ppp/fsm.c
978
FsmRecvEchoRep(struct fsm *fp, struct fsmheader *lhp __unused, struct mbuf *bp)
usr.sbin/ppp/fsm.c
980
if (fsm2lcp(fp))
usr.sbin/ppp/fsm.c
981
bp = lqr_RecvEcho(fp, bp);
usr.sbin/ppp/fsm.c
987
FsmRecvDiscReq(struct fsm *fp __unused, struct fsmheader *lhp __unused,
usr.sbin/ppp/fsm.c
994
FsmRecvIdent(struct fsm *fp, struct fsmheader *lhp, struct mbuf *bp)
usr.sbin/ppp/fsm.h
87
int (*RecvResetReq)(struct fsm *fp); /* Reset output */
usr.sbin/ppp/fsm.h
88
void (*RecvResetAck)(struct fsm *fp, u_char); /* Reset input */
usr.sbin/ppp/ip.c
202
const struct filterent *fp = filter->rule;
usr.sbin/ppp/ip.c
208
if (fp->f_action == A_NONE)
usr.sbin/ppp/ip.c
258
if (fp->f_action == A_NONE) {
usr.sbin/ppp/ip.c
260
fp++;
usr.sbin/ppp/ip.c
271
if ((ncprange_family(&fp->f_src) == AF_UNSPEC ||
usr.sbin/ppp/ip.c
272
ncprange_contains(&fp->f_src, &srcaddr)) &&
usr.sbin/ppp/ip.c
273
(ncprange_family(&fp->f_dst) == AF_UNSPEC ||
usr.sbin/ppp/ip.c
274
ncprange_contains(&fp->f_dst, &dstaddr))) {
usr.sbin/ppp/ip.c
275
if (fp->f_proto != 0) {
usr.sbin/ppp/ip.c
384
if (fp->f_srcop != OP_NONE) {
usr.sbin/ppp/ip.c
386
filter_Op2Nam(fp->f_srcop), fp->f_srcport);
usr.sbin/ppp/ip.c
390
if (fp->f_dstop != OP_NONE) {
usr.sbin/ppp/ip.c
392
", dst %s %d", filter_Op2Nam(fp->f_dstop),
usr.sbin/ppp/ip.c
393
fp->f_dstport);
usr.sbin/ppp/ip.c
399
n, fp->f_proto, dbuff, filter_Action2Nam(fp->f_action));
usr.sbin/ppp/ip.c
402
if (cproto == fp->f_proto) {
usr.sbin/ppp/ip.c
403
if ((fp->f_srcop == OP_NONE ||
usr.sbin/ppp/ip.c
404
PortMatch(fp->f_srcop, sport, fp->f_srcport)) &&
usr.sbin/ppp/ip.c
405
(fp->f_dstop == OP_NONE ||
usr.sbin/ppp/ip.c
406
PortMatch(fp->f_dstop, dport, fp->f_dstport)) &&
usr.sbin/ppp/ip.c
407
(fp->f_estab == 0 || estab) &&
usr.sbin/ppp/ip.c
408
(fp->f_syn == 0 || syn) &&
usr.sbin/ppp/ip.c
409
(fp->f_finrst == 0 || finrst)) {
usr.sbin/ppp/ip.c
416
filter_Action2Nam(fp->f_action));
usr.sbin/ppp/ip.c
422
if (match != fp->f_invert) {
usr.sbin/ppp/ip.c
424
if (fp->f_action < A_NONE)
usr.sbin/ppp/ip.c
425
fp = &filter->rule[n = fp->f_action];
usr.sbin/ppp/ip.c
427
if (fp->f_action == A_PERMIT) {
usr.sbin/ppp/ip.c
429
*psecs = fp->timeout;
usr.sbin/ppp/ip.c
454
fp++;
usr.sbin/ppp/ipcp.c
1040
IpcpDecodeConfig(struct fsm *fp, u_char *cp, u_char *end, int mode_type,
usr.sbin/ppp/ipcp.c
1045
struct ipcp *ipcp = fsm2ipcp(fp);
usr.sbin/ppp/ipcp.c
1081
bundle_AdjustFilters(fp->bundle, &ncpaddr, NULL);
usr.sbin/ppp/ipcp.c
1300
bundle_AdjustDNS(fp->bundle);
usr.sbin/ppp/ipcp.c
1303
bundle_AdjustDNS(fp->bundle);
usr.sbin/ppp/ipcp.c
278
FILE *fp;
usr.sbin/ppp/ipcp.c
293
if ((fp = ID0fopen(_PATH_RESCONF, "w")) != NULL) {
usr.sbin/ppp/ipcp.c
296
fputs(ipcp->ns.resolv_nons, fp);
usr.sbin/ppp/ipcp.c
299
fprintf(fp, "\nnameserver %s\n", paddr);
usr.sbin/ppp/ipcp.c
305
fprintf(fp, "nameserver %s\n", paddr);
usr.sbin/ppp/ipcp.c
307
if (fclose(fp) == EOF) {
usr.sbin/ppp/ipcp.c
726
IpcpInitRestartCounter(struct fsm *fp, int what)
usr.sbin/ppp/ipcp.c
729
struct ipcp *ipcp = fsm2ipcp(fp);
usr.sbin/ppp/ipcp.c
731
fp->FsmTimer.load = ipcp->cfg.fsm.timeout * SECTICKS;
usr.sbin/ppp/ipcp.c
734
fp->restart = ipcp->cfg.fsm.maxreq;
usr.sbin/ppp/ipcp.c
737
fp->restart = ipcp->cfg.fsm.maxtrm;
usr.sbin/ppp/ipcp.c
740
fp->restart = 1;
usr.sbin/ppp/ipcp.c
746
IpcpSendConfigReq(struct fsm *fp)
usr.sbin/ppp/ipcp.c
749
struct physical *p = link2physical(fp->link);
usr.sbin/ppp/ipcp.c
750
struct ipcp *ipcp = fsm2ipcp(fp);
usr.sbin/ppp/ipcp.c
790
fsm_Output(fp, CODE_CONFIGREQ, fp->reqid, buff, (u_char *)o - buff,
usr.sbin/ppp/ipcp.c
795
IpcpSentTerminateReq(struct fsm *fp __unused)
usr.sbin/ppp/ipcp.c
801
IpcpSendTerminateAck(struct fsm *fp, u_char id)
usr.sbin/ppp/ipcp.c
804
fsm_Output(fp, CODE_TERMACK, id, NULL, 0, MB_IPCPOUT);
usr.sbin/ppp/ipcp.c
808
IpcpLayerStart(struct fsm *fp)
usr.sbin/ppp/ipcp.c
811
struct ipcp *ipcp = fsm2ipcp(fp);
usr.sbin/ppp/ipcp.c
813
log_Printf(LogIPCP, "%s: LayerStart.\n", fp->link->name);
usr.sbin/ppp/ipcp.c
815
Enabled(fp->bundle, OPT_THROUGHPUT));
usr.sbin/ppp/ipcp.c
816
fp->more.reqs = fp->more.naks = fp->more.rejs = ipcp->cfg.fsm.maxreq * 3;
usr.sbin/ppp/ipcp.c
821
IpcpLayerFinish(struct fsm *fp)
usr.sbin/ppp/ipcp.c
824
struct ipcp *ipcp = fsm2ipcp(fp);
usr.sbin/ppp/ipcp.c
826
log_Printf(LogIPCP, "%s: LayerFinish.\n", fp->link->name);
usr.sbin/ppp/ipcp.c
856
IpcpLayerDown(struct fsm *fp)
usr.sbin/ppp/ipcp.c
859
struct ipcp *ipcp = fsm2ipcp(fp);
usr.sbin/ppp/ipcp.c
865
log_Printf(LogIPCP, "%s: LayerDown: %s\n", fp->link->name, addr);
usr.sbin/ppp/ipcp.c
868
radius_Account(&fp->bundle->radius, &fp->bundle->radacct,
usr.sbin/ppp/ipcp.c
869
fp->bundle->links, RAD_STOP, &ipcp->peer_ip, &ipcp->ifmask,
usr.sbin/ppp/ipcp.c
872
if (fp->bundle->radius.cfg.file[0] != '\0' && fp->bundle->radius.filterid)
usr.sbin/ppp/ipcp.c
873
system_Select(fp->bundle, fp->bundle->radius.filterid, LINKDOWNFILE,
usr.sbin/ppp/ipcp.c
881
if (system_Select(fp->bundle, addr, LINKDOWNFILE, NULL, NULL) < 0) {
usr.sbin/ppp/ipcp.c
882
if (bundle_GetLabel(fp->bundle)) {
usr.sbin/ppp/ipcp.c
883
if (system_Select(fp->bundle, bundle_GetLabel(fp->bundle),
usr.sbin/ppp/ipcp.c
885
system_Select(fp->bundle, "MYADDR", LINKDOWNFILE, NULL, NULL);
usr.sbin/ppp/ipcp.c
887
system_Select(fp->bundle, "MYADDR", LINKDOWNFILE, NULL, NULL);
usr.sbin/ppp/ipcp.c
918
IpcpLayerUp(struct fsm *fp)
usr.sbin/ppp/ipcp.c
921
struct ipcp *ipcp = fsm2ipcp(fp);
usr.sbin/ppp/ipcp.c
924
log_Printf(LogIPCP, "%s: LayerUp.\n", fp->link->name);
usr.sbin/ppp/ipcp.c
936
radius_Account(&fp->bundle->radius, &fp->bundle->radacct, fp->bundle->links,
usr.sbin/ppp/ipcp.c
939
if (fp->bundle->radius.cfg.file[0] != '\0' && fp->bundle->radius.filterid)
usr.sbin/ppp/ipcp.c
940
system_Select(fp->bundle, fp->bundle->radius.filterid, LINKUPFILE,
usr.sbin/ppp/ipcp.c
948
if (system_Select(fp->bundle, tbuff, LINKUPFILE, NULL, NULL) < 0) {
usr.sbin/ppp/ipcp.c
949
if (bundle_GetLabel(fp->bundle)) {
usr.sbin/ppp/ipcp.c
950
if (system_Select(fp->bundle, bundle_GetLabel(fp->bundle),
usr.sbin/ppp/ipcp.c
952
system_Select(fp->bundle, "MYADDR", LINKUPFILE, NULL, NULL);
usr.sbin/ppp/ipcp.c
954
system_Select(fp->bundle, "MYADDR", LINKUPFILE, NULL, NULL);
usr.sbin/ppp/ipcp.c
957
fp->more.reqs = fp->more.naks = fp->more.rejs = ipcp->cfg.fsm.maxreq * 3;
usr.sbin/ppp/ipcp.h
104
#define fsm2ipcp(fp) (fp->proto == PROTO_IPCP ? (struct ipcp *)fp : NULL)
usr.sbin/ppp/ipv6cp.c
463
ipv6cp_LayerUp(struct fsm *fp)
usr.sbin/ppp/ipv6cp.c
466
struct ipv6cp *ipv6cp = fsm2ipv6cp(fp);
usr.sbin/ppp/ipv6cp.c
469
log_Printf(LogIPV6CP, "%s: LayerUp.\n", fp->link->name);
usr.sbin/ppp/ipv6cp.c
479
if (!Enabled(fp->bundle, OPT_IPCP)) {
usr.sbin/ppp/ipv6cp.c
484
if (system_Select(fp->bundle, tbuff, LINKUPFILE, NULL, NULL) < 0) {
usr.sbin/ppp/ipv6cp.c
485
if (bundle_GetLabel(fp->bundle)) {
usr.sbin/ppp/ipv6cp.c
486
if (system_Select(fp->bundle, bundle_GetLabel(fp->bundle),
usr.sbin/ppp/ipv6cp.c
488
system_Select(fp->bundle, "MYADDR6", LINKUPFILE, NULL, NULL);
usr.sbin/ppp/ipv6cp.c
490
system_Select(fp->bundle, "MYADDR6", LINKUPFILE, NULL, NULL);
usr.sbin/ppp/ipv6cp.c
494
fp->more.reqs = fp->more.naks = fp->more.rejs = ipv6cp->cfg.fsm.maxreq * 3;
usr.sbin/ppp/ipv6cp.c
501
ipv6cp_LayerDown(struct fsm *fp)
usr.sbin/ppp/ipv6cp.c
504
struct ipv6cp *ipv6cp = fsm2ipv6cp(fp);
usr.sbin/ppp/ipv6cp.c
510
log_Printf(LogIPV6CP, "%s: LayerDown: %s\n", fp->link->name, addr);
usr.sbin/ppp/ipv6cp.c
514
if (!Enabled(fp->bundle, OPT_IPCP)) {
usr.sbin/ppp/ipv6cp.c
519
if (system_Select(fp->bundle, addr, LINKDOWNFILE, NULL, NULL) < 0) {
usr.sbin/ppp/ipv6cp.c
520
if (bundle_GetLabel(fp->bundle)) {
usr.sbin/ppp/ipv6cp.c
521
if (system_Select(fp->bundle, bundle_GetLabel(fp->bundle),
usr.sbin/ppp/ipv6cp.c
523
system_Select(fp->bundle, "MYADDR6", LINKDOWNFILE, NULL, NULL);
usr.sbin/ppp/ipv6cp.c
525
system_Select(fp->bundle, "MYADDR6", LINKDOWNFILE, NULL, NULL);
usr.sbin/ppp/ipv6cp.c
535
ipv6cp_LayerStart(struct fsm *fp)
usr.sbin/ppp/ipv6cp.c
538
struct ipv6cp *ipv6cp = fsm2ipv6cp(fp);
usr.sbin/ppp/ipv6cp.c
540
log_Printf(LogIPV6CP, "%s: LayerStart.\n", fp->link->name);
usr.sbin/ppp/ipv6cp.c
542
Enabled(fp->bundle, OPT_THROUGHPUT));
usr.sbin/ppp/ipv6cp.c
543
fp->more.reqs = fp->more.naks = fp->more.rejs = ipv6cp->cfg.fsm.maxreq * 3;
usr.sbin/ppp/ipv6cp.c
548
ipv6cp_LayerFinish(struct fsm *fp)
usr.sbin/ppp/ipv6cp.c
551
struct ipv6cp *ipv6cp = fsm2ipv6cp(fp);
usr.sbin/ppp/ipv6cp.c
553
log_Printf(LogIPV6CP, "%s: LayerFinish.\n", fp->link->name);
usr.sbin/ppp/ipv6cp.c
559
ipv6cp_InitRestartCounter(struct fsm *fp, int what)
usr.sbin/ppp/ipv6cp.c
562
struct ipv6cp *ipv6cp = fsm2ipv6cp(fp);
usr.sbin/ppp/ipv6cp.c
564
fp->FsmTimer.load = ipv6cp->cfg.fsm.timeout * SECTICKS;
usr.sbin/ppp/ipv6cp.c
567
fp->restart = ipv6cp->cfg.fsm.maxreq;
usr.sbin/ppp/ipv6cp.c
570
fp->restart = ipv6cp->cfg.fsm.maxtrm;
usr.sbin/ppp/ipv6cp.c
573
fp->restart = 1;
usr.sbin/ppp/ipv6cp.c
579
ipv6cp_SendConfigReq(struct fsm *fp)
usr.sbin/ppp/ipv6cp.c
582
struct physical *p = link2physical(fp->link);
usr.sbin/ppp/ipv6cp.c
583
struct ipv6cp *ipv6cp = fsm2ipv6cp(fp);
usr.sbin/ppp/ipv6cp.c
594
fsm_Output(fp, CODE_CONFIGREQ, fp->reqid, buff, (u_char *)o - buff,
usr.sbin/ppp/ipv6cp.c
599
ipv6cp_SentTerminateReq(struct fsm *fp __unused)
usr.sbin/ppp/ipv6cp.c
605
ipv6cp_SendTerminateAck(struct fsm *fp, u_char id)
usr.sbin/ppp/ipv6cp.c
608
fsm_Output(fp, CODE_TERMACK, id, NULL, 0, MB_IPV6CPOUT);
usr.sbin/ppp/ipv6cp.c
645
ipv6cp_DecodeConfig(struct fsm *fp, u_char *cp, u_char *end, int mode_type,
usr.sbin/ppp/ipv6cp.c
649
struct ipv6cp *ipv6cp = fsm2ipv6cp(fp);
usr.sbin/ppp/ipv6cp.c
711
bundle_AdjustFilters(fp->bundle, &ipv6cp->myaddr, NULL);
usr.sbin/ppp/ipv6cp.h
60
#define fsm2ipv6cp(fp) (fp->proto == PROTO_IPV6CP ? (struct ipv6cp *)fp : NULL)
usr.sbin/ppp/lcp.c
356
LcpInitRestartCounter(struct fsm *fp, int what)
usr.sbin/ppp/lcp.c
359
struct lcp *lcp = fsm2lcp(fp);
usr.sbin/ppp/lcp.c
361
fp->FsmTimer.load = lcp->cfg.fsm.timeout * SECTICKS;
usr.sbin/ppp/lcp.c
364
fp->restart = lcp->cfg.fsm.maxreq;
usr.sbin/ppp/lcp.c
367
fp->restart = lcp->cfg.fsm.maxtrm;
usr.sbin/ppp/lcp.c
370
fp->restart = 1;
usr.sbin/ppp/lcp.c
376
LcpSendConfigReq(struct fsm *fp)
usr.sbin/ppp/lcp.c
379
struct physical *p = link2physical(fp->link);
usr.sbin/ppp/lcp.c
380
struct lcp *lcp = fsm2lcp(fp);
usr.sbin/ppp/lcp.c
389
fp->link->name);
usr.sbin/ppp/lcp.c
412
fp->link->name, lcp->want_mru, maxmru);
usr.sbin/ppp/lcp.c
483
fsm_Output(fp, CODE_CONFIGREQ, fp->reqid, buff, (u_char *)o - buff,
usr.sbin/ppp/lcp.c
531
LcpSentTerminateReq(struct fsm *fp __unused)
usr.sbin/ppp/lcp.c
537
LcpSendTerminateAck(struct fsm *fp, u_char id)
usr.sbin/ppp/lcp.c
540
struct physical *p = link2physical(fp->link);
usr.sbin/ppp/lcp.c
545
fsm_Output(fp, CODE_TERMACK, id, NULL, 0, MB_LCPOUT);
usr.sbin/ppp/lcp.c
549
LcpLayerStart(struct fsm *fp)
usr.sbin/ppp/lcp.c
552
struct lcp *lcp = fsm2lcp(fp);
usr.sbin/ppp/lcp.c
554
log_Printf(LogLCP, "%s: LayerStart\n", fp->link->name);
usr.sbin/ppp/lcp.c
556
fp->more.reqs = fp->more.naks = fp->more.rejs = lcp->cfg.fsm.maxreq * 3;
usr.sbin/ppp/lcp.c
561
LcpLayerFinish(struct fsm *fp)
usr.sbin/ppp/lcp.c
564
log_Printf(LogLCP, "%s: LayerFinish\n", fp->link->name);
usr.sbin/ppp/lcp.c
568
LcpLayerUp(struct fsm *fp)
usr.sbin/ppp/lcp.c
571
struct physical *p = link2physical(fp->link);
usr.sbin/ppp/lcp.c
572
struct lcp *lcp = fsm2lcp(fp);
usr.sbin/ppp/lcp.c
574
log_Printf(LogLCP, "%s: LayerUp\n", fp->link->name);
usr.sbin/ppp/lcp.c
578
fp->more.reqs = fp->more.naks = fp->more.rejs = lcp->cfg.fsm.maxreq * 3;
usr.sbin/ppp/lcp.c
586
LcpLayerDown(struct fsm *fp)
usr.sbin/ppp/lcp.c
589
struct physical *p = link2physical(fp->link);
usr.sbin/ppp/lcp.c
591
log_Printf(LogLCP, "%s: LayerDown\n", fp->link->name);
usr.sbin/ppp/lcp.c
594
lcp_Setup(fsm2lcp(fp), 0);
usr.sbin/ppp/lcp.c
655
LcpDecodeConfig(struct fsm *fp, u_char *cp, u_char *end, int mode_type,
usr.sbin/ppp/lcp.c
659
struct lcp *lcp = fsm2lcp(fp);
usr.sbin/ppp/lcp.c
667
struct physical *p = link2physical(fp->link);
usr.sbin/ppp/lcp.c
752
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/libradius/radlib.c
480
FILE *fp;
usr.sbin/ppp/libradius/radlib.c
487
if ((fp = fopen(path, "r")) == NULL) {
usr.sbin/ppp/libradius/radlib.c
493
while (fgets(buf, sizeof buf, fp) != NULL) {
usr.sbin/ppp/libradius/radlib.c
657
fclose(fp);
usr.sbin/ppp/lqr.c
106
" got 0x%08x\n", fp->link->name, lcp->his_magic, lqr.magic);
usr.sbin/ppp/lqr.c
89
lqr_RecvEcho(struct fsm *fp, struct mbuf *bp)
usr.sbin/ppp/lqr.c
91
struct hdlc *hdlc = &link2physical(fp->link)->hdlc;
usr.sbin/ppp/lqr.c
92
struct lcp *lcp = fsm2lcp(fp);
usr.sbin/ppp/mp.c
165
mp_LayerStart(void *v __unused, struct fsm *fp __unused)
usr.sbin/ppp/mp.c
171
mp_LayerUp(void *v __unused, struct fsm *fp)
usr.sbin/ppp/mp.c
175
bundle_CalculateBandwidth(fp->bundle); /* Against ccp_MTUOverhead */
usr.sbin/ppp/mp.c
179
mp_LayerDown(void *v __unused, struct fsm *fp __unused)
usr.sbin/ppp/mp.c
185
mp_LayerFinish(void *v __unused, struct fsm *fp)
usr.sbin/ppp/mp.c
188
if (fp->state == ST_CLOSED && fp->open_mode == OPEN_PASSIVE)
usr.sbin/ppp/mp.c
189
fsm_Open(fp); /* CCP goes to ST_STOPPED */
usr.sbin/ppp/mppe.c
431
MPPEUsable(struct fsm *fp)
usr.sbin/ppp/mppe.c
435
struct radius *r = &fp->bundle->radius;
usr.sbin/ppp/mppe.c
448
struct lcp *lcp = &fp->link->lcp;
usr.sbin/ppp/mppe.c
459
MPPERequired(struct fsm *fp)
usr.sbin/ppp/mppe.c
466
if (*fp->bundle->radius.cfg.file && fp->bundle->radius.mppe.policy)
usr.sbin/ppp/mppe.c
467
return fp->bundle->radius.mppe.policy == MPPE_POLICY_REQUIRED ? 1 : 0;
usr.sbin/ppp/mppe.c
470
return fp->link->ccp.cfg.mppe.required;
usr.sbin/ppp/physical.h
115
#define field2phys(fp, name) \
usr.sbin/ppp/physical.h
116
((struct physical *)((char *)fp - (uintptr_t)(&((struct physical *)0)->name)))
usr.sbin/ppp/systems.c
287
xgets(char *buf, int buflen, FILE *fp)
usr.sbin/ppp/systems.c
292
while (fgets(buf, buflen-1, fp)) {
usr.sbin/ppp/systems.c
341
FILE *fp;
usr.sbin/ppp/systems.c
358
fp = ID0fopen(filename, "r");
usr.sbin/ppp/systems.c
359
if (fp == NULL) {
usr.sbin/ppp/systems.c
366
while ((n = xgets(line, sizeof line, fp))) {
usr.sbin/ppp/systems.c
384
fclose(fp);
usr.sbin/ppp/systems.c
401
fclose(fp);
usr.sbin/ppp/systems.c
404
while ((n = xgets(line, sizeof line, fp))) {
usr.sbin/ppp/systems.c
438
fclose(fp); /* everything read - get out */
usr.sbin/ppp/systems.c
444
fclose(fp);
usr.sbin/ppp/systems.c
52
FILE *fp;
usr.sbin/ppp/systems.c
56
fp = ID0fopen(line, "r");
usr.sbin/ppp/systems.c
57
if (fp == NULL)
usr.sbin/ppp/systems.c
59
return (fp);
usr.sbin/ppp/systems.c
63
CloseSecret(FILE *fp)
usr.sbin/ppp/systems.c
65
fclose(fp);
usr.sbin/pstat/pstat.c
389
char *fp = flags;
usr.sbin/pstat/pstat.c
423
*fp++ = 'R';
usr.sbin/pstat/pstat.c
425
*fp++ = 'T';
usr.sbin/pstat/pstat.c
427
*fp++ = 'S';
usr.sbin/pstat/pstat.c
429
*fp++ = 't';
usr.sbin/pstat/pstat.c
432
*fp++ = 'L';
usr.sbin/pstat/pstat.c
434
*fp++ = 'W';
usr.sbin/pstat/pstat.c
437
*fp++ = 'V';
usr.sbin/pstat/pstat.c
439
*fp++ = 'a';
usr.sbin/pstat/pstat.c
442
*fp++ = 'D';
usr.sbin/pstat/pstat.c
445
*fp++ = 'O';
usr.sbin/pstat/pstat.c
448
*fp++ = 'I';
usr.sbin/pstat/pstat.c
450
*fp++ = 'X';
usr.sbin/pstat/pstat.c
454
*fp++ = '-';
usr.sbin/pstat/pstat.c
455
*fp = '\0';
usr.sbin/pstat/pstat.c
863
struct kinfo_file *fp, *ofp;
usr.sbin/pstat/pstat.c
877
if (kinfo_get_files(&fp, &len))
usr.sbin/pstat/pstat.c
879
ofp = fp;
usr.sbin/pstat/pstat.c
883
for (; len-- > 0; fp++) {
usr.sbin/pstat/pstat.c
884
if ((unsigned)fp->f_type > DTYPE_SOCKET)
usr.sbin/pstat/pstat.c
886
printf("%p ", fp->f_file);
usr.sbin/pstat/pstat.c
887
printf("%-8.8s", dtypes[fp->f_type]);
usr.sbin/pstat/pstat.c
889
if (fp->f_flag & FREAD)
usr.sbin/pstat/pstat.c
891
if (fp->f_flag & FWRITE)
usr.sbin/pstat/pstat.c
893
if (fp->f_flag & FAPPEND)
usr.sbin/pstat/pstat.c
896
if (fp->f_flag & FSHLOCK)
usr.sbin/pstat/pstat.c
898
if (fp->f_flag & FEXLOCK)
usr.sbin/pstat/pstat.c
901
if (fp->f_flag & FASYNC)
usr.sbin/pstat/pstat.c
904
printf("%6s %3d", flagbuf, fp->f_count);
usr.sbin/pstat/pstat.c
905
printf(" %3d", fp->f_msgcount);
usr.sbin/pstat/pstat.c
906
printf(" %8lx", (u_long)(void *)fp->f_data);
usr.sbin/pstat/pstat.c
907
if (fp->f_offset < 0)
usr.sbin/pstat/pstat.c
908
printf(" %jx\n", (uintmax_t)fp->f_offset);
usr.sbin/pstat/pstat.c
910
printf(" %jd\n", (intmax_t)fp->f_offset);
usr.sbin/pw/pw_conf.c
226
FILE *fp;
usr.sbin/pw/pw_conf.c
232
if ((fp = fopen(file, "r")) != NULL) {
usr.sbin/pw/pw_conf.c
237
while (fgets(buf, buflen, fp) != NULL) {
usr.sbin/pw/pw_conf.c
244
while ((ch = fgetc(fp)) != '\n' && ch != EOF);
usr.sbin/pw/pw_conf.c
248
if (fgets(buf + l, buflen - l, fp) == NULL)
usr.sbin/pw/pw_conf.c
369
fclose(fp);
usr.sbin/pw/pw_conf.c
384
FILE *fp;
usr.sbin/pw/pw_conf.c
386
if ((fp = fdopen(fd, "w")) == NULL)
usr.sbin/pw/pw_conf.c
496
fputs(comments[i], fp);
usr.sbin/pw/pw_conf.c
500
fprintf(fp, "%s = \"%s\"\n", kwds[i], val);
usr.sbin/pw/pw_conf.c
502
fprintf(fp, "%s = %s\n", kwds[i], val);
usr.sbin/pw/pw_conf.c
509
return fclose(fp) != EOF;
usr.sbin/pw/pw_user.c
104
FILE *fp;
usr.sbin/pw/pw_user.c
767
if (mode == M_ADD && !PWALTDIR() && cnf->newmail && *cnf->newmail && (fp = fopen(cnf->newmail, "r")) != NULL) {
usr.sbin/pw/pw_user.c
774
while (fgets(line, sizeof(line), fp) != NULL) {
usr.sbin/pw/pw_user.c
782
fclose(fp);
usr.sbin/pwd_mkdb/pwd_mkdb.c
182
if (!(fp = fopen(pname, "r")))
usr.sbin/pwd_mkdb/pwd_mkdb.c
184
if (flock(fileno(fp), LOCK_EX|nblock) < 0 && !(dflag && iflag))
usr.sbin/pwd_mkdb/pwd_mkdb.c
186
if (fstat(fileno(fp), &st) < 0)
usr.sbin/pwd_mkdb/pwd_mkdb.c
190
fclose(fp);
usr.sbin/pwd_mkdb/pwd_mkdb.c
191
fp = NULL;
usr.sbin/pwd_mkdb/pwd_mkdb.c
196
for (cnt = 1; scan(fp, &pwd); ++cnt);
usr.sbin/pwd_mkdb/pwd_mkdb.c
343
for (cnt = 1; scan(fp, &pwd); ++cnt) {
usr.sbin/pwd_mkdb/pwd_mkdb.c
590
fchmod(fileno(fp), S_IRUSR|S_IWUSR);
usr.sbin/pwd_mkdb/pwd_mkdb.c
616
if (fclose(fp) == EOF)
usr.sbin/pwd_mkdb/pwd_mkdb.c
623
scan(FILE *fp, struct passwd *pw)
usr.sbin/pwd_mkdb/pwd_mkdb.c
629
p = fgetln(fp, &len);
usr.sbin/pwd_mkdb/pwd_mkdb.c
91
FILE *fp, *oldfp;
usr.sbin/quot/quot.c
320
struct fsizes *fp;
usr.sbin/quot/quot.c
323
for (fp = fsizes; fp; fp = fp->fsz_next) {
usr.sbin/quot/quot.c
325
fp->fsz_count[i] = 0;
usr.sbin/quot/quot.c
326
fp->fsz_sz[i] = 0;
usr.sbin/quot/quot.c
337
struct fsizes *fp, **fsp;
usr.sbin/quot/quot.c
367
for (fsp = &fsizes; (fp = *fsp); fsp = &fp->fsz_next) {
usr.sbin/quot/quot.c
368
if (ksz < fp->fsz_last)
usr.sbin/quot/quot.c
371
if (!fp || ksz < fp->fsz_first) {
usr.sbin/quot/quot.c
372
if (!(fp = (struct fsizes *)
usr.sbin/quot/quot.c
375
fp->fsz_next = *fsp;
usr.sbin/quot/quot.c
376
*fsp = fp;
usr.sbin/quot/quot.c
377
fp->fsz_first = rounddown(ksz, FSZCNT);
usr.sbin/quot/quot.c
378
fp->fsz_last = fp->fsz_first + FSZCNT;
usr.sbin/quot/quot.c
380
fp->fsz_count[i] = 0;
usr.sbin/quot/quot.c
381
fp->fsz_sz[i] = 0;
usr.sbin/quot/quot.c
384
fp->fsz_count[ksz % FSZCNT]++;
usr.sbin/quot/quot.c
385
fp->fsz_sz[ksz % FSZCNT] += sz;
usr.sbin/quot/quot.c
392
for (fp = fsizes; fp; fp = fp->fsz_next) {
usr.sbin/quot/quot.c
394
if (fp->fsz_count[i])
usr.sbin/quot/quot.c
395
printf("%d\t%ju\t%d\n",fp->fsz_first + i,
usr.sbin/quot/quot.c
396
(uintmax_t)fp->fsz_count[i],
usr.sbin/quot/quot.c
397
SIZE(sz += fp->fsz_sz[i]));
usr.sbin/rarpd/rarpd.c
892
FILE *fp;
usr.sbin/rarpd/rarpd.c
898
fp = stderr;
usr.sbin/rarpd/rarpd.c
900
fp = stdout;
usr.sbin/rarpd/rarpd.c
902
vfprintf(fp, fmt, v);
usr.sbin/rarpd/rarpd.c
904
vfprintf(fp, newfmt, v);
usr.sbin/rarpd/rarpd.c
907
fputs("\n", fp);
usr.sbin/rarpd/rarpd.c
908
fflush(fp);
usr.sbin/rpc.ypxfrd/ypxfrd_server.c
133
if ((fp = open((char *)&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
416
FILE *fp = stdin;
usr.sbin/rrenumd/rrenumd.c
430
if((fp = fopen(optarg, "r")) == NULL) {
usr.sbin/rrenumd/rrenumd.c
438
fp = stdin;
usr.sbin/rrenumd/rrenumd.c
462
config(&fp);
usr.sbin/rtadvd/dump.c
113
fprintf(fp, "%s:\n", rai->ifname);
usr.sbin/rtadvd/dump.c
115
fprintf(fp, " Status: %s\n",
usr.sbin/rtadvd/dump.c
122
fprintf(fp, " Last RA sent: %s",
usr.sbin/rtadvd/dump.c
126
fprintf(fp, " Next RA will be sent: %s",
usr.sbin/rtadvd/dump.c
130
fprintf(fp, " RA timer is stopped");
usr.sbin/rtadvd/dump.c
131
fprintf(fp, " waits: %d, initcount: %d\n",
usr.sbin/rtadvd/dump.c
135
fprintf(fp,
usr.sbin/rtadvd/dump.c
141
fprintf(fp, "RS(input): " LONGLONG "\n",
usr.sbin/rtadvd/dump.c
146
fprintf(fp, " Link-layer address: %s\n",
usr.sbin/rtadvd/dump.c
148
fprintf(fp, " MTU: %d\n", rai->phymtu);
usr.sbin/rtadvd/dump.c
151
fprintf(fp,
usr.sbin/rtadvd/dump.c
155
fprintf(fp, " Flags: %s%s%s, ",
usr.sbin/rtadvd/dump.c
161
fprintf(fp, "Preference: %s, ",
usr.sbin/rtadvd/dump.c
163
fprintf(fp, "MTU: %d\n", rai->linkmtu);
usr.sbin/rtadvd/dump.c
164
fprintf(fp, " ReachableTime: %d, RetransTimer: %d, "
usr.sbin/rtadvd/dump.c
168
fprintf(fp, " HAPreference: %d, HALifetime: %d\n",
usr.sbin/rtadvd/dump.c
173
fprintf(fp, " Clock skew: %ldsec\n",
usr.sbin/rtadvd/dump.c
178
fprintf(fp, " Prefixes:\n");
usr.sbin/rtadvd/dump.c
181
fprintf(fp, " %s/%d(",
usr.sbin/rtadvd/dump.c
187
fprintf(fp, "KERNEL, ");
usr.sbin/rtadvd/dump.c
190
fprintf(fp, "CONFIG, ");
usr.sbin/rtadvd/dump.c
193
fprintf(fp, "DYNAMIC, ");
usr.sbin/rtadvd/dump.c
197
fprintf(fp, "vltime: infinity");
usr.sbin/rtadvd/dump.c
199
fprintf(fp, "vltime: %ld",
usr.sbin/rtadvd/dump.c
202
fprintf(fp, "(decr,expire %ld), ", (long)
usr.sbin/rtadvd/dump.c
206
fprintf(fp, ", ");
usr.sbin/rtadvd/dump.c
208
fprintf(fp, "pltime: infinity");
usr.sbin/rtadvd/dump.c
210
fprintf(fp, "pltime: %ld",
usr.sbin/rtadvd/dump.c
213
fprintf(fp, "(decr,expire %ld), ", (long)
usr.sbin/rtadvd/dump.c
217
fprintf(fp, ", ");
usr.sbin/rtadvd/dump.c
218
fprintf(fp, "flags: %s%s%s",
usr.sbin/rtadvd/dump.c
230
fprintf(fp, ", expire in: %ld",
usr.sbin/rtadvd/dump.c
234
fprintf(fp, ")\n");
usr.sbin/rtadvd/dump.c
242
if ((fp = fopen(dumpfile, "w")) == NULL) {
usr.sbin/rtadvd/dump.c
250
fclose(fp);
usr.sbin/rtadvd/dump.c
64
static FILE *fp;
usr.sbin/rtsold/dump.c
102
if ((fp = fopen(dumpfile, "w")) == NULL) {
usr.sbin/rtsold/dump.c
110
fclose(fp);
usr.sbin/rtsold/dump.c
51
static FILE *fp;
usr.sbin/rtsold/dump.c
68
fprintf(fp, "Interface %s\n", ifinfo->ifname);
usr.sbin/rtsold/dump.c
69
fprintf(fp, " probe interval: ");
usr.sbin/rtsold/dump.c
71
fprintf(fp, "%d\n", ifinfo->probeinterval);
usr.sbin/rtsold/dump.c
72
fprintf(fp, " probe timer: %d\n", ifinfo->probetimer);
usr.sbin/rtsold/dump.c
75
fprintf(fp, "infinity\n");
usr.sbin/rtsold/dump.c
76
fprintf(fp, " no probe timer\n");
usr.sbin/rtsold/dump.c
78
fprintf(fp, " interface status: %s\n",
usr.sbin/rtsold/dump.c
80
fprintf(fp, " rtsold status: %s\n", ifstatstr[ifinfo->state]);
usr.sbin/rtsold/dump.c
81
fprintf(fp, " carrier detection: %s\n",
usr.sbin/rtsold/dump.c
83
fprintf(fp, " probes: %d, dadcount = %d\n",
usr.sbin/rtsold/dump.c
87
fprintf(fp, " no timer\n");
usr.sbin/rtsold/dump.c
89
fprintf(fp, " timer: interval=%d:%d, expire=%s\n",
usr.sbin/rtsold/dump.c
95
fprintf(fp, " number of valid RAs: %d\n", ifinfo->racnt);
usr.sbin/rtsold/rtsold.c
258
FILE *fp;
usr.sbin/rtsold/rtsold.c
260
if ((fp = fopen(pidfilename, "w")) == NULL)
usr.sbin/rtsold/rtsold.c
265
fprintf(fp, "%d\n", pid);
usr.sbin/rtsold/rtsold.c
266
fclose(fp);
usr.sbin/sliplogin/sliplogin.c
139
FILE *fp;
usr.sbin/sliplogin/sliplogin.c
153
if ((fp = fopen(_PATH_ACCESS, "r")) == NULL) {
usr.sbin/sliplogin/sliplogin.c
158
while (fgets(loginargs, sizeof(loginargs) - 1, fp)) {
usr.sbin/sliplogin/sliplogin.c
159
if (ferror(fp))
usr.sbin/sliplogin/sliplogin.c
173
fclose(fp);
usr.sbin/sliplogin/sliplogin.c
213
if ((fp = fopen(slparmsfile, "r")) == NULL) {
usr.sbin/sliplogin/sliplogin.c
219
while (fgets(buf, sizeof(buf) - 1, fp) != NULL) {
usr.sbin/sliplogin/sliplogin.c
220
if (ferror(fp))
usr.sbin/sliplogin/sliplogin.c
230
fclose(fp);
usr.sbin/tzsetup/tzsetup.c
343
FILE *fp;
usr.sbin/tzsetup/tzsetup.c
349
fp = fopen(path_iso3166, "r");
usr.sbin/tzsetup/tzsetup.c
350
if (!fp)
usr.sbin/tzsetup/tzsetup.c
354
while ((s = fgetln(fp, &len)) != NULL) {
usr.sbin/tzsetup/tzsetup.c
384
fclose(fp);
usr.sbin/tzsetup/tzsetup.c
474
FILE *fp;
usr.sbin/tzsetup/tzsetup.c
480
fp = fopen(path_zonetab, "r");
usr.sbin/tzsetup/tzsetup.c
481
if (!fp)
usr.sbin/tzsetup/tzsetup.c
485
while ((line = fgetln(fp, &len)) != NULL) {
usr.sbin/tzsetup/tzsetup.c
518
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
74
FILE *fp;
usr.sbin/uefisign/uefisign.c
78
fp = fopen(path, mode);
usr.sbin/uefisign/uefisign.c
79
if (fp == NULL)
usr.sbin/uefisign/uefisign.c
81
return (fp);
usr.sbin/ypserv/yp_access.c
104
FILE *fp;
usr.sbin/ypserv/yp_access.c
122
if ((fp = fopen(path, "r")) == NULL) {
usr.sbin/ypserv/yp_access.c
137
while (fgets(linebuf, LINEBUFSZ, fp)) {
usr.sbin/ypserv/yp_access.c
167
fclose(fp);
usr.sbin/zic/scheck.c
12
const char *fp;
usr.sbin/zic/scheck.c
24
fp = format;
usr.sbin/zic/scheck.c
34
while ((*tp++ = c = *fp++) != '\0') {
usr.sbin/zic/scheck.c
37
if (is_digit(*fp)) {
usr.sbin/zic/scheck.c
38
char const *f = fp;
usr.sbin/zic/scheck.c
44
fp = f;
usr.sbin/zic/scheck.c
49
if (*fp == '*')
usr.sbin/zic/scheck.c
50
++fp;
usr.sbin/zic/scheck.c
51
if ((*tp++ = *fp++) == '\0')
usr.sbin/zic/zic.c
1319
puttzcode(const int_fast32_t val, FILE *const fp)
usr.sbin/zic/zic.c
1324
fwrite(buf, sizeof buf, 1, fp);
usr.sbin/zic/zic.c
1328
puttzcode64(const zic_t val, FILE * const fp)
usr.sbin/zic/zic.c
1333
fwrite(buf, sizeof buf, 1, fp);
usr.sbin/zic/zic.c
1354
FILE * fp;
usr.sbin/zic/zic.c
1447
if ((fp = fopen(fullname, "wb")) == NULL) {
usr.sbin/zic/zic.c
1450
if ((fp = fopen(fullname, "wb")) == NULL)
usr.sbin/zic/zic.c
1590
#define DO(field) fwrite(tzh.field, sizeof tzh.field, 1, fp)
usr.sbin/zic/zic.c
1612
puttzcode(ats[i], fp);
usr.sbin/zic/zic.c
1613
else puttzcode64(ats[i], fp);
usr.sbin/zic/zic.c
1618
fwrite(&uc, sizeof uc, 1, fp);
usr.sbin/zic/zic.c
1622
puttzcode(gmtoffs[i], fp);
usr.sbin/zic/zic.c
1623
putc(isdsts[i], fp);
usr.sbin/zic/zic.c
1624
putc((unsigned char) indmap[abbrinds[i]], fp);
usr.sbin/zic/zic.c
1628
thischarcnt, fp);
usr.sbin/zic/zic.c
1650
puttzcode(todo, fp);
usr.sbin/zic/zic.c
1651
else puttzcode64(todo, fp);
usr.sbin/zic/zic.c
1652
puttzcode(corr[i], fp);
usr.sbin/zic/zic.c
1656
putc(ttisstds[i], fp);
usr.sbin/zic/zic.c
1659
putc(ttisgmts[i], fp);
usr.sbin/zic/zic.c
1661
fprintf(fp, "\n%s\n", string);
usr.sbin/zic/zic.c
1662
if (ferror(fp) || fclose(fp))
usr.sbin/zic/zic.c
615
FILE *fp, *tp;
usr.sbin/zic/zic.c
617
fp = fopen(fromname, "rb");
usr.sbin/zic/zic.c
618
if (!fp)
usr.sbin/zic/zic.c
623
while ((c = getc(fp)) != EOF)
usr.sbin/zic/zic.c
625
if (ferror(fp) || fclose(fp))
usr.sbin/zic/zic.c
749
FILE *fp;
usr.sbin/zic/zic.c
760
fp = stdin;
usr.sbin/zic/zic.c
761
} else if ((fp = fopen(name, "r")) == NULL)
usr.sbin/zic/zic.c
766
if (fgets(buf, sizeof buf, fp) != buf)
usr.sbin/zic/zic.c
817
if (ferror(fp))
usr.sbin/zic/zic.c
819
if (fp != stdin && fclose(fp))