fp 153 bsp/hal/x86/arch/trap.c uint32_t ss, esp, *fp; fp 182 bsp/hal/x86/arch/trap.c fp = (uint32_t *)r->ebp; fp 184 bsp/hal/x86/arch/trap.c if (user_area(fp)) fp 186 bsp/hal/x86/arch/trap.c fp = (uint32_t *)(*fp); /* XXX: may cause fault */ fp 187 bsp/hal/x86/arch/trap.c if (!(*(fp + 1) && *fp)) fp 189 bsp/hal/x86/arch/trap.c printf(" %08x\n", *(fp + 1)); fp 59 usr/bin/head/head.c FILE *fp; fp 80 usr/bin/head/head.c if ((fp = fopen(*argv, "r")) == NULL) { fp 89 usr/bin/head/head.c head(fp, linecnt); fp 90 usr/bin/head/head.c (void)fclose(fp); fp 98 usr/bin/head/head.c head(FILE *fp, int cnt) fp 103 usr/bin/head/head.c while ((ch = getc(fp)) != EOF) { fp 153 usr/bin/kill/kill.c printsignals(fp) fp 154 usr/bin/kill/kill.c FILE *fp; fp 162 usr/bin/kill/kill.c (void)fprintf(fp, "%s\n", name); fp 164 usr/bin/kill/kill.c (void)fprintf(fp, "%s ", name); fp 49 usr/bin/more/more.c FILE *fp = NULL; fp 69 usr/bin/more/more.c if ((fp = fopen(*argv, "r")) == NULL) { fp 75 usr/bin/more/more.c do_more(fp, height); fp 76 usr/bin/more/more.c (void)fclose(fp); fp 85 usr/bin/more/more.c do_more(FILE *fp, int maxlines) fp 89 usr/bin/more/more.c while ((c = getc(fp)) != EOF) { fp 44 usr/lib/libc/gen/getpass.c FILE *fp, *outfp; fp 53 usr/lib/libc/gen/getpass.c if ((outfp = fp = fopen(_PATH_TTY, "w+")) == NULL) { fp 55 usr/lib/libc/gen/getpass.c fp = stdin; fp 62 usr/lib/libc/gen/getpass.c (void)tcgetattr(fileno(fp), &term); fp 65 usr/lib/libc/gen/getpass.c (void)tcsetattr(fileno(fp), TCSAFLUSH|TCSASOFT, &term); fp 69 usr/lib/libc/gen/getpass.c for (p = buf; (ch = getc(fp)) != EOF && ch != '\n';) { fp 77 usr/lib/libc/gen/getpass.c (void)tcsetattr(fileno(fp), TCSAFLUSH|TCSASOFT, &term); fp 80 usr/lib/libc/gen/getpass.c if (fp != stdin) fp 81 usr/lib/libc/gen/getpass.c (void)fclose(fp); fp 37 usr/lib/libc/stdio/clrerr.c clearerr(fp) fp 38 usr/lib/libc/stdio/clrerr.c FILE *fp; fp 40 usr/lib/libc/stdio/clrerr.c __sclearerr(fp); fp 39 usr/lib/libc/stdio/fclose.c fclose(fp) fp 40 usr/lib/libc/stdio/fclose.c FILE *fp; fp 44 usr/lib/libc/stdio/fclose.c if (fp->_flags == 0) { /* not open! */ fp 48 usr/lib/libc/stdio/fclose.c r = fp->_flags & __SWR ? __sflush(fp) : 0; fp 49 usr/lib/libc/stdio/fclose.c if (__sclose(fp) < 0) fp 51 usr/lib/libc/stdio/fclose.c if (fp->_flags & __SMBF) fp 52 usr/lib/libc/stdio/fclose.c free((char *)fp->_bf._base); fp 53 usr/lib/libc/stdio/fclose.c if (HASUB(fp)) fp 54 usr/lib/libc/stdio/fclose.c FREEUB(fp); fp 55 usr/lib/libc/stdio/fclose.c fp->_flags = 0; /* Release this FILE for reuse. */ fp 56 usr/lib/libc/stdio/fclose.c fp->_r = fp->_w = 0; /* Mess up if reaccessed. */ fp 45 usr/lib/libc/stdio/fdopen.c FILE *fp; fp 60 usr/lib/libc/stdio/fdopen.c if ((fp = __sfp()) == NULL) fp 62 usr/lib/libc/stdio/fdopen.c fp->_flags = flags; fp 69 usr/lib/libc/stdio/fdopen.c fp->_flags |= __SAPP; fp 70 usr/lib/libc/stdio/fdopen.c fp->_file = fd; fp 71 usr/lib/libc/stdio/fdopen.c return (fp); fp 42 usr/lib/libc/stdio/feof.c feof(fp) fp 43 usr/lib/libc/stdio/feof.c FILE *fp; fp 45 usr/lib/libc/stdio/feof.c return (__sfeof(fp)); fp 41 usr/lib/libc/stdio/ferror.c ferror(fp) fp 42 usr/lib/libc/stdio/ferror.c FILE *fp; fp 44 usr/lib/libc/stdio/ferror.c return (__sferror(fp)); fp 39 usr/lib/libc/stdio/fflush.c fflush(fp) fp 40 usr/lib/libc/stdio/fflush.c FILE *fp; fp 43 usr/lib/libc/stdio/fflush.c if (fp == NULL) fp 45 usr/lib/libc/stdio/fflush.c if ((fp->_flags & (__SWR | __SRW)) == 0) { fp 49 usr/lib/libc/stdio/fflush.c return (__sflush(fp)); fp 53 usr/lib/libc/stdio/fflush.c __sflush(fp) fp 54 usr/lib/libc/stdio/fflush.c FILE *fp; fp 59 usr/lib/libc/stdio/fflush.c t = fp->_flags; fp 63 usr/lib/libc/stdio/fflush.c if ((p = fp->_bf._base) == NULL) fp 66 usr/lib/libc/stdio/fflush.c n = fp->_p - p; /* write this much */ fp 72 usr/lib/libc/stdio/fflush.c fp->_p = p; fp 73 usr/lib/libc/stdio/fflush.c fp->_w = t & (__SLBF|__SNBF) ? 0 : fp->_bf._size; fp 76 usr/lib/libc/stdio/fflush.c t = __swrite(fp, (char *)p, n); fp 78 usr/lib/libc/stdio/fflush.c fp->_flags |= __SERR; fp 36 usr/lib/libc/stdio/fgetc.c fgetc(fp) fp 37 usr/lib/libc/stdio/fgetc.c FILE *fp; fp 39 usr/lib/libc/stdio/fgetc.c return (getc(fp)); fp 36 usr/lib/libc/stdio/fgetpos.c fgetpos(fp, pos) fp 37 usr/lib/libc/stdio/fgetpos.c FILE *fp; fp 40 usr/lib/libc/stdio/fgetpos.c return((*pos = (fpos_t)ftell(fp)) == (fpos_t)-1); fp 43 usr/lib/libc/stdio/fgets.c fgets(buf, n, fp) fp 46 usr/lib/libc/stdio/fgets.c FILE *fp; fp 52 usr/lib/libc/stdio/fgets.c while (--n > 0 && (c = getc(fp)) >= 0) { fp 41 usr/lib/libc/stdio/fileno.c fileno(fp) fp 42 usr/lib/libc/stdio/fileno.c FILE *fp; fp 44 usr/lib/libc/stdio/fileno.c return (__sfileno(fp)); fp 45 usr/lib/libc/stdio/findfp.c std(FILE *fp, FILE *next, short flags, short fileno) fp 48 usr/lib/libc/stdio/findfp.c memset(fp, 0, sizeof(FILE)); fp 49 usr/lib/libc/stdio/findfp.c fp->next = next; fp 50 usr/lib/libc/stdio/findfp.c fp->_flags = flags; fp 51 usr/lib/libc/stdio/findfp.c fp->_file = fileno; fp 60 usr/lib/libc/stdio/findfp.c FILE *fp, *tmp; fp 64 usr/lib/libc/stdio/findfp.c for (fp = &__sF[0];; fp = fp->next) { fp 65 usr/lib/libc/stdio/findfp.c if (fp->_flags == 0) fp 67 usr/lib/libc/stdio/findfp.c if (fp->next == NULL) { fp 70 usr/lib/libc/stdio/findfp.c fp->next = tmp; fp 71 usr/lib/libc/stdio/findfp.c fp = tmp; fp 77 usr/lib/libc/stdio/findfp.c std(fp, NULL, 1, -1); fp 78 usr/lib/libc/stdio/findfp.c return (fp); fp 45 usr/lib/libc/stdio/fopen.c FILE *fp; fp 51 usr/lib/libc/stdio/fopen.c if ((fp = __sfp()) == NULL) fp 54 usr/lib/libc/stdio/fopen.c fp->_flags = 0; /* release */ fp 57 usr/lib/libc/stdio/fopen.c fp->_file = f; fp 58 usr/lib/libc/stdio/fopen.c fp->_flags = flags; fp 69 usr/lib/libc/stdio/fopen.c (void) __sseek((void *)fp, (fpos_t)0, SEEK_END); fp 70 usr/lib/libc/stdio/fopen.c return (fp); fp 37 usr/lib/libc/stdio/fprintf.c fprintf(FILE *fp, const char *fmt, ...) fp 43 usr/lib/libc/stdio/fprintf.c ret = vfprintf(fp, fmt, ap); fp 43 usr/lib/libc/stdio/fpurge.c fpurge(fp) fp 44 usr/lib/libc/stdio/fpurge.c FILE *fp; fp 46 usr/lib/libc/stdio/fpurge.c if (!fp->_flags) { fp 51 usr/lib/libc/stdio/fpurge.c if (HASUB(fp)) fp 52 usr/lib/libc/stdio/fpurge.c FREEUB(fp); fp 53 usr/lib/libc/stdio/fpurge.c fp->_p = fp->_bf._base; fp 54 usr/lib/libc/stdio/fpurge.c fp->_r = 0; fp 55 usr/lib/libc/stdio/fpurge.c fp->_w = fp->_flags & (__SLBF|__SNBF) ? 0 : fp->_bf._size; fp 36 usr/lib/libc/stdio/fputc.c fputc(c, fp) fp 38 usr/lib/libc/stdio/fputc.c FILE *fp; fp 40 usr/lib/libc/stdio/fputc.c return (putc(c, fp)); fp 40 usr/lib/libc/stdio/fputs.c fputs(s, fp) fp 42 usr/lib/libc/stdio/fputs.c FILE *fp; fp 47 usr/lib/libc/stdio/fputs.c r = putc(c, fp); fp 38 usr/lib/libc/stdio/fread.c fread(buf, size, count, fp) fp 41 usr/lib/libc/stdio/fread.c FILE *fp; fp 55 usr/lib/libc/stdio/fread.c if (fp->_r < 0) fp 56 usr/lib/libc/stdio/fread.c fp->_r = 0; fp 59 usr/lib/libc/stdio/fread.c while (resid > (size_t)(r = fp->_r)) { fp 60 usr/lib/libc/stdio/fread.c (void)memcpy((void *)p, (void *)fp->_p, (size_t)r); fp 61 usr/lib/libc/stdio/fread.c fp->_p += r; fp 65 usr/lib/libc/stdio/fread.c if (__srefill(fp)) { fp 70 usr/lib/libc/stdio/fread.c (void)memcpy((void *)p, (void *)fp->_p, resid); fp 71 usr/lib/libc/stdio/fread.c fp->_r -= resid; fp 72 usr/lib/libc/stdio/fread.c fp->_p += resid; fp 48 usr/lib/libc/stdio/freopen.c freopen(file, mode, fp) fp 50 usr/lib/libc/stdio/freopen.c FILE *fp; fp 56 usr/lib/libc/stdio/freopen.c (void) fclose(fp); fp 71 usr/lib/libc/stdio/freopen.c if (fp->_flags == 0) { fp 72 usr/lib/libc/stdio/freopen.c fp->_flags = __SEOF; /* hold on to it */ fp 77 usr/lib/libc/stdio/freopen.c if (fp->_flags & __SWR) fp 78 usr/lib/libc/stdio/freopen.c (void) __sflush(fp); fp 81 usr/lib/libc/stdio/freopen.c if ((wantfd = fp->_file) < 0 && isopen) { fp 82 usr/lib/libc/stdio/freopen.c (void) __sclose(fp); fp 92 usr/lib/libc/stdio/freopen.c (void) __sclose(fp); fp 105 usr/lib/libc/stdio/freopen.c (void) __sclose(fp); fp 106 usr/lib/libc/stdio/freopen.c if (fp->_flags & __SMBF) fp 107 usr/lib/libc/stdio/freopen.c free((char *)fp->_bf._base); fp 108 usr/lib/libc/stdio/freopen.c fp->_w = 0; fp 109 usr/lib/libc/stdio/freopen.c fp->_r = 0; fp 110 usr/lib/libc/stdio/freopen.c fp->_p = NULL; fp 111 usr/lib/libc/stdio/freopen.c fp->_bf._base = NULL; fp 112 usr/lib/libc/stdio/freopen.c fp->_bf._size = 0; fp 113 usr/lib/libc/stdio/freopen.c if (HASUB(fp)) fp 114 usr/lib/libc/stdio/freopen.c FREEUB(fp); fp 115 usr/lib/libc/stdio/freopen.c fp->_ub._size = 0; fp 118 usr/lib/libc/stdio/freopen.c fp->_flags = 0; /* set it free */ fp 135 usr/lib/libc/stdio/freopen.c fp->_flags = flags; fp 136 usr/lib/libc/stdio/freopen.c fp->_file = f; fp 137 usr/lib/libc/stdio/freopen.c return (fp); fp 37 usr/lib/libc/stdio/fscanf.c fscanf(FILE *fp, char const *fmt, ...) { fp 42 usr/lib/libc/stdio/fscanf.c ret = __svfscanf(fp, fmt, ap); fp 48 usr/lib/libc/stdio/fseek.c fseek(fp, offset, whence) fp 49 usr/lib/libc/stdio/fseek.c FILE *fp; fp 72 usr/lib/libc/stdio/fseek.c curoff = __sseek(fp, (fpos_t)0, SEEK_CUR); fp 75 usr/lib/libc/stdio/fseek.c if (fp->_flags & __SRD) { fp 76 usr/lib/libc/stdio/fseek.c curoff -= fp->_r; fp 77 usr/lib/libc/stdio/fseek.c if (HASUB(fp)) fp 78 usr/lib/libc/stdio/fseek.c curoff -= fp->_ur; fp 79 usr/lib/libc/stdio/fseek.c } else if (fp->_flags & __SWR && fp->_p != NULL) fp 80 usr/lib/libc/stdio/fseek.c curoff += fp->_p - fp->_bf._base; fp 98 usr/lib/libc/stdio/fseek.c if (fp->_bf._base == NULL) fp 99 usr/lib/libc/stdio/fseek.c __smakebuf(fp); fp 101 usr/lib/libc/stdio/fseek.c if (__sflush(fp) || fp 102 usr/lib/libc/stdio/fseek.c __sseek(fp, (fpos_t)offset, whence) == POS_ERR) { fp 106 usr/lib/libc/stdio/fseek.c if (HASUB(fp)) fp 107 usr/lib/libc/stdio/fseek.c FREEUB(fp); fp 108 usr/lib/libc/stdio/fseek.c fp->_p = fp->_bf._base; fp 109 usr/lib/libc/stdio/fseek.c fp->_r = 0; fp 111 usr/lib/libc/stdio/fseek.c fp->_flags &= ~__SEOF; fp 41 usr/lib/libc/stdio/ftell.c ftell(fp) fp 42 usr/lib/libc/stdio/ftell.c FILE *fp; fp 50 usr/lib/libc/stdio/ftell.c pos = __sseek(fp, (fpos_t)0, SEEK_CUR); fp 54 usr/lib/libc/stdio/ftell.c if (fp->_flags & __SRD) { fp 60 usr/lib/libc/stdio/ftell.c pos -= fp->_r; fp 61 usr/lib/libc/stdio/ftell.c if (HASUB(fp)) fp 62 usr/lib/libc/stdio/ftell.c pos -= fp->_ur; fp 63 usr/lib/libc/stdio/ftell.c } else if (fp->_flags & __SWR && fp->_p != NULL) { fp 69 usr/lib/libc/stdio/ftell.c pos += fp->_p - fp->_bf._base; fp 45 usr/lib/libc/stdio/fvwrite.c __sfvwrite(fp, uio) fp 46 usr/lib/libc/stdio/fvwrite.c FILE *fp; fp 59 usr/lib/libc/stdio/fvwrite.c if (cantwrite(fp)) fp 63 usr/lib/libc/stdio/fvwrite.c #define COPY(n) (void)memcpy((void *)fp->_p, (void *)p, (size_t)(n)) fp 76 usr/lib/libc/stdio/fvwrite.c if (fp->_flags & __SNBF) { fp 82 usr/lib/libc/stdio/fvwrite.c w = __swrite(fp, p, MIN(len, BUFSIZ)); fp 88 usr/lib/libc/stdio/fvwrite.c } else if ((fp->_flags & __SLBF) == 0) { fp 102 usr/lib/libc/stdio/fvwrite.c w = fp->_w; fp 103 usr/lib/libc/stdio/fvwrite.c if (fp->_flags & __SSTR) { fp 107 usr/lib/libc/stdio/fvwrite.c fp->_w -= w; fp 108 usr/lib/libc/stdio/fvwrite.c fp->_p += w; fp 110 usr/lib/libc/stdio/fvwrite.c } else if (fp->_p > fp->_bf._base && len > w) { fp 114 usr/lib/libc/stdio/fvwrite.c fp->_p += w; fp 115 usr/lib/libc/stdio/fvwrite.c if (fflush(fp)) fp 117 usr/lib/libc/stdio/fvwrite.c } else if (len >= (w = fp->_bf._size)) { fp 119 usr/lib/libc/stdio/fvwrite.c w = __swrite(fp, p, w); fp 126 usr/lib/libc/stdio/fvwrite.c fp->_w -= w; fp 127 usr/lib/libc/stdio/fvwrite.c fp->_p += w; fp 150 usr/lib/libc/stdio/fvwrite.c w = fp->_w + fp->_bf._size; fp 151 usr/lib/libc/stdio/fvwrite.c if (fp->_p > fp->_bf._base && s > w) { fp 154 usr/lib/libc/stdio/fvwrite.c fp->_p += w; fp 155 usr/lib/libc/stdio/fvwrite.c if (fflush(fp)) fp 157 usr/lib/libc/stdio/fvwrite.c } else if (s >= (w = fp->_bf._size)) { fp 158 usr/lib/libc/stdio/fvwrite.c w = __swrite(fp, p, w); fp 164 usr/lib/libc/stdio/fvwrite.c fp->_w -= w; fp 165 usr/lib/libc/stdio/fvwrite.c fp->_p += w; fp 169 usr/lib/libc/stdio/fvwrite.c if (fflush(fp)) fp 180 usr/lib/libc/stdio/fvwrite.c fp->_flags |= __SERR; fp 41 usr/lib/libc/stdio/fwalk.c FILE *fp; fp 45 usr/lib/libc/stdio/fwalk.c for (fp = &__sF[0]; fp != NULL; fp = fp->next) { fp 46 usr/lib/libc/stdio/fwalk.c if (fp->_flags != 0) fp 47 usr/lib/libc/stdio/fwalk.c ret |= (*function)(fp); fp 41 usr/lib/libc/stdio/fwrite.c fwrite(buf, size, count, fp) fp 44 usr/lib/libc/stdio/fwrite.c FILE *fp; fp 51 usr/lib/libc/stdio/fwrite.c if (putc((int)*p, fp) == EOF) fp 37 usr/lib/libc/stdio/getc.c getc(fp) fp 38 usr/lib/libc/stdio/getc.c FILE *fp; fp 40 usr/lib/libc/stdio/getc.c if (--(fp->_r) < 0) { fp 41 usr/lib/libc/stdio/getc.c if (__srefill(fp) == 0) { fp 42 usr/lib/libc/stdio/getc.c fp->_r--; fp 43 usr/lib/libc/stdio/getc.c return (*fp->_p++); fp 47 usr/lib/libc/stdio/getc.c return (int)(*fp->_p++); fp 36 usr/lib/libc/stdio/getw.c getw(fp) fp 37 usr/lib/libc/stdio/getw.c FILE *fp; fp 44 usr/lib/libc/stdio/getw.c *p++ = getc(fp); fp 45 usr/lib/libc/stdio/getw.c if (fp->_flags & (__SERR|__SEOF)) fp 63 usr/lib/libc/stdio/local.h #define cantwrite(fp) \ fp 64 usr/lib/libc/stdio/local.h ((((fp)->_flags & __SWR) == 0 || (fp)->_bf._base == NULL) && \ fp 65 usr/lib/libc/stdio/local.h __swsetup(fp)) fp 71 usr/lib/libc/stdio/local.h #define HASUB(fp) ((fp)->_ub._base != NULL) fp 72 usr/lib/libc/stdio/local.h #define FREEUB(fp) { \ fp 73 usr/lib/libc/stdio/local.h (fp)->_ub._base = NULL; \ fp 44 usr/lib/libc/stdio/makebuf.c __swhatbuf(FILE *fp, size_t *bufsize, int *couldbetty) fp 50 usr/lib/libc/stdio/makebuf.c if (fp->_file < 0 || fstat(fp->_file, &st) < 0) fp 66 usr/lib/libc/stdio/makebuf.c __smakebuf(fp) fp 67 usr/lib/libc/stdio/makebuf.c FILE *fp; fp 74 usr/lib/libc/stdio/makebuf.c if (fp->_flags & __SNBF) { fp 75 usr/lib/libc/stdio/makebuf.c fp->_bf._base = fp->_p = fp->_nbuf; fp 76 usr/lib/libc/stdio/makebuf.c fp->_bf._size = 1; fp 79 usr/lib/libc/stdio/makebuf.c flags = __swhatbuf(fp, &size, &couldbetty); fp 81 usr/lib/libc/stdio/makebuf.c fp->_flags |= __SNBF; fp 82 usr/lib/libc/stdio/makebuf.c fp->_bf._base = fp->_p = fp->_nbuf; fp 83 usr/lib/libc/stdio/makebuf.c fp->_bf._size = 1; fp 88 usr/lib/libc/stdio/makebuf.c fp->_bf._base = fp->_p = p; fp 89 usr/lib/libc/stdio/makebuf.c fp->_bf._size = size; fp 90 usr/lib/libc/stdio/makebuf.c if (couldbetty && isatty(fp->_file)) fp 93 usr/lib/libc/stdio/makebuf.c fp->_flags |= flags; fp 42 usr/lib/libc/stdio/putc.c __swbuf(c, fp) fp 44 usr/lib/libc/stdio/putc.c FILE *fp; fp 48 usr/lib/libc/stdio/putc.c if (cantwrite(fp)) fp 61 usr/lib/libc/stdio/putc.c n = fp->_p - fp->_bf._base; fp 62 usr/lib/libc/stdio/putc.c if (n >= fp->_bf._size) { fp 63 usr/lib/libc/stdio/putc.c if (fflush(fp)) fp 67 usr/lib/libc/stdio/putc.c fp->_w--; fp 68 usr/lib/libc/stdio/putc.c *fp->_p++ = c; fp 69 usr/lib/libc/stdio/putc.c if (++n == fp->_bf._size || (fp->_flags & __SLBF && c == '\n')) fp 70 usr/lib/libc/stdio/putc.c if (fflush(fp)) fp 76 usr/lib/libc/stdio/putc.c putc(c, fp) fp 78 usr/lib/libc/stdio/putc.c FILE *fp; fp 80 usr/lib/libc/stdio/putc.c if (--fp->_w >= 0) fp 81 usr/lib/libc/stdio/putc.c return (*fp->_p++ = c); fp 83 usr/lib/libc/stdio/putc.c return (__swbuf(c, fp)); fp 36 usr/lib/libc/stdio/putw.c putw(w, fp) fp 38 usr/lib/libc/stdio/putw.c FILE *fp; fp 44 usr/lib/libc/stdio/putw.c putc(*p++, fp); fp 45 usr/lib/libc/stdio/putw.c if (fp->_flags & __SERR) fp 39 usr/lib/libc/stdio/refill.c lflush(FILE *fp) fp 42 usr/lib/libc/stdio/refill.c if ((fp->_flags & (__SLBF|__SWR)) == (__SLBF|__SWR)) fp 43 usr/lib/libc/stdio/refill.c return (__sflush(fp)); fp 52 usr/lib/libc/stdio/refill.c __srefill(fp) fp 53 usr/lib/libc/stdio/refill.c FILE *fp; fp 60 usr/lib/libc/stdio/refill.c fp->_r = 0; /* largely a convenience for callers */ fp 63 usr/lib/libc/stdio/refill.c if (fp->_flags & __SEOF) fp 67 usr/lib/libc/stdio/refill.c if ((fp->_flags & __SRD) == 0) { fp 68 usr/lib/libc/stdio/refill.c if ((fp->_flags & __SRW) == 0) { fp 73 usr/lib/libc/stdio/refill.c if (fp->_flags & __SWR) { fp 74 usr/lib/libc/stdio/refill.c if (__sflush(fp)) fp 76 usr/lib/libc/stdio/refill.c fp->_flags &= ~__SWR; fp 77 usr/lib/libc/stdio/refill.c fp->_w = 0; fp 79 usr/lib/libc/stdio/refill.c fp->_flags |= __SRD; fp 87 usr/lib/libc/stdio/refill.c if (HASUB(fp)) { fp 88 usr/lib/libc/stdio/refill.c FREEUB(fp); fp 89 usr/lib/libc/stdio/refill.c if ((fp->_r = fp->_ur) != 0) { fp 90 usr/lib/libc/stdio/refill.c fp->_p = fp->_up; fp 96 usr/lib/libc/stdio/refill.c if (fp->_bf._base == NULL) fp 97 usr/lib/libc/stdio/refill.c __smakebuf(fp); fp 104 usr/lib/libc/stdio/refill.c if (fp->_flags & (__SLBF|__SNBF)) fp 106 usr/lib/libc/stdio/refill.c fp->_p = fp->_bf._base; fp 107 usr/lib/libc/stdio/refill.c fp->_r = __sread(fp, (char *)fp->_p, fp->_bf._size); fp 108 usr/lib/libc/stdio/refill.c if (fp->_r <= 0) { fp 109 usr/lib/libc/stdio/refill.c if (fp->_r == 0) fp 110 usr/lib/libc/stdio/refill.c fp->_flags |= __SEOF; fp 112 usr/lib/libc/stdio/refill.c fp->_r = 0; fp 113 usr/lib/libc/stdio/refill.c fp->_flags |= __SERR; fp 37 usr/lib/libc/stdio/rewind.c rewind(fp) fp 38 usr/lib/libc/stdio/rewind.c FILE *fp; fp 40 usr/lib/libc/stdio/rewind.c (void) fseek(fp, 0L, SEEK_SET); fp 41 usr/lib/libc/stdio/rewind.c clearerr(fp); fp 37 usr/lib/libc/stdio/setbuf.c setbuf(fp, buf) fp 38 usr/lib/libc/stdio/setbuf.c FILE *fp; fp 41 usr/lib/libc/stdio/setbuf.c (void) setvbuf(fp, buf, buf ? _IOFBF : _IONBF, BUFSIZ); fp 36 usr/lib/libc/stdio/setbuffer.c setbuffer(fp, buf, size) fp 37 usr/lib/libc/stdio/setbuffer.c FILE *fp; fp 42 usr/lib/libc/stdio/setbuffer.c (void)setvbuf(fp, buf, buf ? _IOFBF : _IONBF, size); fp 49 usr/lib/libc/stdio/setbuffer.c setlinebuf(fp) fp 50 usr/lib/libc/stdio/setbuffer.c FILE *fp; fp 53 usr/lib/libc/stdio/setbuffer.c return (setvbuf(fp, (char *)NULL, _IOLBF, (size_t)0)); fp 42 usr/lib/libc/stdio/setvbuf.c setvbuf(fp, buf, mode, size) fp 43 usr/lib/libc/stdio/setvbuf.c FILE *fp; fp 67 usr/lib/libc/stdio/setvbuf.c (void)__sflush(fp); fp 68 usr/lib/libc/stdio/setvbuf.c if (HASUB(fp)) fp 69 usr/lib/libc/stdio/setvbuf.c FREEUB(fp); fp 70 usr/lib/libc/stdio/setvbuf.c fp->_r = 0; fp 71 usr/lib/libc/stdio/setvbuf.c flags = fp->_flags; fp 73 usr/lib/libc/stdio/setvbuf.c free((void *)fp->_bf._base); fp 82 usr/lib/libc/stdio/setvbuf.c fp->_flags = flags; fp 90 usr/lib/libc/stdio/setvbuf.c fp->_bf._base = fp->_p = (unsigned char *)buf; fp 91 usr/lib/libc/stdio/setvbuf.c fp->_bf._size = size; fp 92 usr/lib/libc/stdio/setvbuf.c fp->_w = 0; fp 43 usr/lib/libc/stdio/stdio.c __sread(fp, buf, n) fp 44 usr/lib/libc/stdio/stdio.c FILE *fp; fp 48 usr/lib/libc/stdio/stdio.c return (read(fp->_file, buf, n)); fp 52 usr/lib/libc/stdio/stdio.c __swrite(fp, buf, n) fp 53 usr/lib/libc/stdio/stdio.c FILE *fp; fp 57 usr/lib/libc/stdio/stdio.c if (fp->_flags & __SAPP) fp 58 usr/lib/libc/stdio/stdio.c (void) lseek(fp->_file, (off_t)0, SEEK_END); fp 59 usr/lib/libc/stdio/stdio.c return (write(fp->_file, buf, n)); fp 63 usr/lib/libc/stdio/stdio.c __sseek(fp, offset, whence) fp 64 usr/lib/libc/stdio/stdio.c FILE *fp; fp 68 usr/lib/libc/stdio/stdio.c return (lseek(fp->_file, (off_t)offset, whence)); fp 72 usr/lib/libc/stdio/stdio.c __sclose(fp) fp 73 usr/lib/libc/stdio/stdio.c FILE *fp; fp 75 usr/lib/libc/stdio/stdio.c return (close(fp->_file)); fp 45 usr/lib/libc/stdio/tmpfile.c FILE *fp; fp 65 usr/lib/libc/stdio/tmpfile.c if ((fp = fdopen(fd, "w+")) == NULL) { fp 71 usr/lib/libc/stdio/tmpfile.c return (fp); fp 39 usr/lib/libc/stdio/ungetc.c ungetc(c, fp) fp 41 usr/lib/libc/stdio/ungetc.c FILE *fp; fp 47 usr/lib/libc/stdio/ungetc.c if ((fp->_flags & __SRD) == 0) { fp 52 usr/lib/libc/stdio/ungetc.c if ((fp->_flags & __SRW) == 0) fp 54 usr/lib/libc/stdio/ungetc.c if (fp->_flags & __SWR) { fp 55 usr/lib/libc/stdio/ungetc.c if (__sflush(fp)) fp 57 usr/lib/libc/stdio/ungetc.c fp->_flags &= ~__SWR; fp 58 usr/lib/libc/stdio/ungetc.c fp->_w = 0; fp 60 usr/lib/libc/stdio/ungetc.c fp->_flags |= __SRD; fp 67 usr/lib/libc/stdio/ungetc.c if (HASUB(fp)) { fp 68 usr/lib/libc/stdio/ungetc.c if (fp->_r >= fp->_ub._size) fp 70 usr/lib/libc/stdio/ungetc.c *--fp->_p = c; fp 71 usr/lib/libc/stdio/ungetc.c fp->_r++; fp 74 usr/lib/libc/stdio/ungetc.c fp->_flags &= ~__SEOF; fp 81 usr/lib/libc/stdio/ungetc.c if (fp->_bf._base != NULL && fp->_p > fp->_bf._base && fp 82 usr/lib/libc/stdio/ungetc.c fp->_p[-1] == c) { fp 83 usr/lib/libc/stdio/ungetc.c fp->_p--; fp 84 usr/lib/libc/stdio/ungetc.c fp->_r++; fp 92 usr/lib/libc/stdio/ungetc.c fp->_ur = fp->_r; fp 93 usr/lib/libc/stdio/ungetc.c fp->_up = fp->_p; fp 94 usr/lib/libc/stdio/ungetc.c fp->_ub._base = fp->_ubuf; fp 95 usr/lib/libc/stdio/ungetc.c fp->_ub._size = sizeof(fp->_ubuf); fp 96 usr/lib/libc/stdio/ungetc.c fp->_ubuf[sizeof(fp->_ubuf) - 1] = c; fp 97 usr/lib/libc/stdio/ungetc.c fp->_p = &fp->_ubuf[sizeof(fp->_ubuf) - 1]; fp 98 usr/lib/libc/stdio/ungetc.c fp->_r = 1; fp 55 usr/lib/libc/stdio/vfprintf.c __sprint(FILE *fp, struct __suio *uio) fp 63 usr/lib/libc/stdio/vfprintf.c error = __sfvwrite(fp, uio); fp 75 usr/lib/libc/stdio/vfprintf.c __sbprintf(FILE *fp, const char *fmt, va_list ap) fp 82 usr/lib/libc/stdio/vfprintf.c fake._flags = fp->_flags & ~__SNBF; fp 83 usr/lib/libc/stdio/vfprintf.c fake._file = fp->_file; fp 94 usr/lib/libc/stdio/vfprintf.c fp->_flags |= __SERR; fp 181 usr/lib/libc/stdio/vfprintf.c vfprintf(fp, fmt0, ap) fp 182 usr/lib/libc/stdio/vfprintf.c FILE *fp; fp 229 usr/lib/libc/stdio/vfprintf.c if (__sprint(fp, &uio)) \ fp 244 usr/lib/libc/stdio/vfprintf.c if (uio.uio_resid && __sprint(fp, &uio)) \ fp 264 usr/lib/libc/stdio/vfprintf.c if (cantwrite(fp)) fp 268 usr/lib/libc/stdio/vfprintf.c if ((fp->_flags & (__SNBF|__SWR|__SRW)) == (__SNBF|__SWR) && fp 269 usr/lib/libc/stdio/vfprintf.c fp->_file >= 0) fp 270 usr/lib/libc/stdio/vfprintf.c return (__sbprintf(fp, fmt0, ap)); fp 539 usr/lib/libc/stdio/vfprintf.c return (__sferror(fp) ? EOF : ret); fp 83 usr/lib/libc/stdio/vfscanf.c __svfscanf(fp, fmt0, ap) fp 84 usr/lib/libc/stdio/vfscanf.c FILE *fp; fp 117 usr/lib/libc/stdio/vfscanf.c if (fp->_r <= 0 && __srefill(fp)) fp 119 usr/lib/libc/stdio/vfscanf.c if (!isspace(*fp->_p)) fp 121 usr/lib/libc/stdio/vfscanf.c nread++, fp->_r--, fp->_p++; fp 137 usr/lib/libc/stdio/vfscanf.c if (fp->_r <= 0 && __srefill(fp)) fp 139 usr/lib/libc/stdio/vfscanf.c if (*fp->_p != c) fp 141 usr/lib/libc/stdio/vfscanf.c fp->_r--, fp->_p++; fp 261 usr/lib/libc/stdio/vfscanf.c if (fp->_r <= 0 && __srefill(fp)) fp 269 usr/lib/libc/stdio/vfscanf.c while (isspace(*fp->_p)) { fp 271 usr/lib/libc/stdio/vfscanf.c if (--fp->_r > 0) fp 272 usr/lib/libc/stdio/vfscanf.c fp->_p++; fp 273 usr/lib/libc/stdio/vfscanf.c else if (__srefill(fp)) fp 295 usr/lib/libc/stdio/vfscanf.c if ((size_t)(n = fp->_r) < width) { fp 298 usr/lib/libc/stdio/vfscanf.c fp->_p += n; fp 299 usr/lib/libc/stdio/vfscanf.c if (__srefill(fp)) { fp 306 usr/lib/libc/stdio/vfscanf.c fp->_r -= width; fp 307 usr/lib/libc/stdio/vfscanf.c fp->_p += width; fp 314 usr/lib/libc/stdio/vfscanf.c width, fp); fp 330 usr/lib/libc/stdio/vfscanf.c while (ccltab[*fp->_p]) { fp 331 usr/lib/libc/stdio/vfscanf.c n++, fp->_r--, fp->_p++; fp 334 usr/lib/libc/stdio/vfscanf.c if (fp->_r <= 0 && __srefill(fp)) { fp 344 usr/lib/libc/stdio/vfscanf.c while (ccltab[*fp->_p]) { fp 345 usr/lib/libc/stdio/vfscanf.c fp->_r--; fp 346 usr/lib/libc/stdio/vfscanf.c *p++ = *fp->_p++; fp 349 usr/lib/libc/stdio/vfscanf.c if (fp->_r <= 0 && __srefill(fp)) { fp 370 usr/lib/libc/stdio/vfscanf.c while (!isspace(*fp->_p)) { fp 371 usr/lib/libc/stdio/vfscanf.c n++, fp->_r--, fp->_p++; fp 374 usr/lib/libc/stdio/vfscanf.c if (fp->_r <= 0 && __srefill(fp)) fp 380 usr/lib/libc/stdio/vfscanf.c while (!isspace(*fp->_p)) { fp 381 usr/lib/libc/stdio/vfscanf.c fp->_r--; fp 382 usr/lib/libc/stdio/vfscanf.c *p++ = *fp->_p++; fp 385 usr/lib/libc/stdio/vfscanf.c if (fp->_r <= 0 && __srefill(fp)) fp 407 usr/lib/libc/stdio/vfscanf.c c = *fp->_p; fp 491 usr/lib/libc/stdio/vfscanf.c if (--fp->_r > 0) fp 492 usr/lib/libc/stdio/vfscanf.c fp->_p++; fp 493 usr/lib/libc/stdio/vfscanf.c else if (__srefill(fp)) fp 504 usr/lib/libc/stdio/vfscanf.c (void) ungetc(*(u_char *)--p, fp); fp 510 usr/lib/libc/stdio/vfscanf.c (void) ungetc(c, fp); fp 44 usr/lib/libc/stdio/wsetup.c __swsetup(fp) fp 45 usr/lib/libc/stdio/wsetup.c FILE *fp; fp 54 usr/lib/libc/stdio/wsetup.c if ((fp->_flags & __SWR) == 0) { fp 55 usr/lib/libc/stdio/wsetup.c if ((fp->_flags & __SRW) == 0) fp 57 usr/lib/libc/stdio/wsetup.c if (fp->_flags & __SRD) { fp 59 usr/lib/libc/stdio/wsetup.c if (HASUB(fp)) fp 60 usr/lib/libc/stdio/wsetup.c FREEUB(fp); fp 61 usr/lib/libc/stdio/wsetup.c fp->_flags &= ~(__SRD|__SEOF); fp 62 usr/lib/libc/stdio/wsetup.c fp->_r = 0; fp 63 usr/lib/libc/stdio/wsetup.c fp->_p = fp->_bf._base; fp 65 usr/lib/libc/stdio/wsetup.c fp->_flags |= __SWR; fp 71 usr/lib/libc/stdio/wsetup.c if (fp->_bf._base == NULL) fp 72 usr/lib/libc/stdio/wsetup.c __smakebuf(fp); fp 74 usr/lib/libc/stdio/wsetup.c fp->_w = fp->_flags & (__SNBF|__SLBF) ? 0 : fp->_bf._size; fp 43 usr/lib/libc/string/memccpy.c const unsigned char *fp = f; fp 45 usr/lib/libc/string/memccpy.c if ((*tp++ = *fp++) == c) fp 39 usr/lib/libc/string/swab.c const char *fp; fp 43 usr/lib/libc/string/swab.c fp = (const char *)from; fp 45 usr/lib/libc/string/swab.c #define STEP temp = *fp++,*tp++ = *fp++,*tp++ = temp fp 56 usr/sbin/lock/lock.c FILE *fp; fp 70 usr/sbin/lock/lock.c if ((fp = fopen(_PATH_PASSWD, "r")) == NULL) { fp 74 usr/sbin/lock/lock.c if (((p = fgets(passcode, sizeof(passcode), fp)) == NULL) || fp 77 usr/sbin/lock/lock.c fclose(fp); fp 80 usr/sbin/lock/lock.c fclose(fp); fp 124 usr/sbin/lock/lock.c FILE *fp; fp 144 usr/sbin/lock/lock.c if ((fp = fopen(_PATH_PASSWD, "w+")) == NULL) { fp 148 usr/sbin/lock/lock.c fputs(buf, fp); fp 149 usr/sbin/lock/lock.c fclose(fp); fp 125 usr/server/boot/boot.c FILE *fp; fp 157 usr/server/boot/boot.c if ((fp = fopen("/boot/fstab", "r")) == NULL) fp 161 usr/server/boot/boot.c if ((p = fgets(line, sizeof(line), fp)) == NULL) fp 177 usr/server/boot/boot.c fclose(fp); fp 206 usr/server/fs/arfs/arfs_vnops.c arfs_read(vnode_t vp, file_t fp, void *buf, size_t size, size_t *result) fp 221 usr/server/fs/arfs/arfs_vnops.c file_pos = fp->f_offset; fp 261 usr/server/fs/arfs/arfs_vnops.c fp->f_offset = file_pos; fp 274 usr/server/fs/arfs/arfs_vnops.c arfs_seek(vnode_t vp, file_t fp, off_t oldoff, off_t newoff) fp 284 usr/server/fs/arfs/arfs_vnops.c arfs_readdir(vnode_t vp, file_t fp, struct dirent *dir) fp 313 usr/server/fs/arfs/arfs_vnops.c if (i == fp->f_offset) fp 331 usr/server/fs/arfs/arfs_vnops.c dir->d_fileno = (uint32_t)fp->f_offset; fp 334 usr/server/fs/arfs/arfs_vnops.c fp->f_offset++; fp 144 usr/server/fs/devfs/devfs_vnops.c devfs_close(vnode_t vp, file_t fp) fp 147 usr/server/fs/devfs/devfs_vnops.c DPRINTF(("devfs_close: fp=%x\n", fp)); fp 156 usr/server/fs/devfs/devfs_vnops.c devfs_read(vnode_t vp, file_t fp, void *buf, size_t size, size_t *result) fp 162 usr/server/fs/devfs/devfs_vnops.c error = device_read((device_t)vp->v_data, buf, &len, fp->f_offset); fp 169 usr/server/fs/devfs/devfs_vnops.c devfs_write(vnode_t vp, file_t fp, void *buf, size_t size, size_t *result) fp 175 usr/server/fs/devfs/devfs_vnops.c error = device_write((device_t)vp->v_data, buf, &len, fp->f_offset); fp 183 usr/server/fs/devfs/devfs_vnops.c devfs_ioctl(vnode_t vp, file_t fp, u_long cmd, void *arg) fp 229 usr/server/fs/devfs/devfs_vnops.c devfs_readdir(vnode_t vp, file_t fp, struct dirent *dir) fp 234 usr/server/fs/devfs/devfs_vnops.c DPRINTF(("devfs_readdir offset=%d\n", fp->f_offset)); fp 243 usr/server/fs/devfs/devfs_vnops.c } while (i++ != fp->f_offset); fp 251 usr/server/fs/devfs/devfs_vnops.c dir->d_fileno = (uint32_t)fp->f_offset; fp 255 usr/server/fs/devfs/devfs_vnops.c fp->f_offset++; fp 165 usr/server/fs/fatfs/fatfs_vnops.c fatfs_read(vnode_t vp, file_t fp, void *buf, size_t size, size_t *result) fp 182 usr/server/fs/fatfs/fatfs_vnops.c file_pos = fp->f_offset; fp 227 usr/server/fs/fatfs/fatfs_vnops.c fp->f_offset = file_pos; fp 236 usr/server/fs/fatfs/fatfs_vnops.c fatfs_write(vnode_t vp, file_t fp, void *buf, size_t size, size_t *result) fp 259 usr/server/fs/fatfs/fatfs_vnops.c file_pos = (fp->f_flags & O_APPEND) ? end_pos : fp->f_offset; fp 322 usr/server/fs/fatfs/fatfs_vnops.c fp->f_offset = file_pos; fp 339 usr/server/fs/fatfs/fatfs_vnops.c fatfs_readdir(vnode_t vp, file_t fp, struct dirent *dir) fp 349 usr/server/fs/fatfs/fatfs_vnops.c error = fatfs_get_node(vp, fp->f_offset, &np); fp 362 usr/server/fs/fatfs/fatfs_vnops.c dir->d_fileno = fp->f_offset; fp 365 usr/server/fs/fatfs/fatfs_vnops.c fp->f_offset++; fp 188 usr/server/fs/fifofs/fifo_vnops.c fifo_close(vnode_t vp, file_t fp) fp 192 usr/server/fs/fifofs/fifo_vnops.c DPRINTF(("fifo_close: fp=%x\n", fp)); fp 197 usr/server/fs/fifofs/fifo_vnops.c if (fp->f_flags & FREAD) { fp 202 usr/server/fs/fifofs/fifo_vnops.c if (fp->f_flags & FWRITE) { fp 219 usr/server/fs/fifofs/fifo_vnops.c fifo_read(vnode_t vp, file_t fp, void *buf, size_t size, size_t *result) fp 264 usr/server/fs/fifofs/fifo_vnops.c fifo_write(vnode_t vp, file_t fp, void *buf, size_t size, size_t *result) fp 310 usr/server/fs/fifofs/fifo_vnops.c fifo_ioctl(vnode_t vp, file_t fp, u_long cmd, void *arg) fp 424 usr/server/fs/fifofs/fifo_vnops.c fifo_readdir(vnode_t vp, file_t fp, struct dirent *dir) fp 432 usr/server/fs/fifofs/fifo_vnops.c if (fp->f_offset == 0) { fp 435 usr/server/fs/fifofs/fifo_vnops.c } else if (fp->f_offset == 1) { fp 443 usr/server/fs/fifofs/fifo_vnops.c if (i == (fp->f_offset - 2)) { fp 456 usr/server/fs/fifofs/fifo_vnops.c dir->d_fileno = fp->f_offset; fp 459 usr/server/fs/fifofs/fifo_vnops.c fp->f_offset++; fp 334 usr/server/fs/ramfs/ramfs_vnops.c ramfs_read(vnode_t vp, file_t fp, void *buf, size_t size, size_t *result) fp 345 usr/server/fs/ramfs/ramfs_vnops.c off = fp->f_offset; fp 355 usr/server/fs/ramfs/ramfs_vnops.c fp->f_offset += size; fp 361 usr/server/fs/ramfs/ramfs_vnops.c ramfs_write(vnode_t vp, file_t fp, void *buf, size_t size, size_t *result) fp 378 usr/server/fs/ramfs/ramfs_vnops.c file_pos = (fp->f_flags & O_APPEND) ? end_pos : fp->f_offset; fp 405 usr/server/fs/ramfs/ramfs_vnops.c fp->f_offset += size; fp 452 usr/server/fs/ramfs/ramfs_vnops.c ramfs_readdir(vnode_t vp, file_t fp, struct dirent *dir) fp 459 usr/server/fs/ramfs/ramfs_vnops.c if (fp->f_offset == 0) { fp 462 usr/server/fs/ramfs/ramfs_vnops.c } else if (fp->f_offset == 1) { fp 473 usr/server/fs/ramfs/ramfs_vnops.c for (i = 0; i != (fp->f_offset - 2); i++) { fp 487 usr/server/fs/ramfs/ramfs_vnops.c dir->d_fileno = (uint32_t)fp->f_offset; fp 490 usr/server/fs/ramfs/ramfs_vnops.c fp->f_offset++; fp 130 usr/server/fs/vfs/main.c file_t fp; fp 153 usr/server/fs/vfs/main.c if ((error = sys_open(path, msg->flags, msg->mode, &fp)) != 0) fp 156 usr/server/fs/vfs/main.c t->t_ofile[fd] = fp; fp 165 usr/server/fs/vfs/main.c file_t fp; fp 172 usr/server/fs/vfs/main.c fp = t->t_ofile[fd]; fp 173 usr/server/fs/vfs/main.c if (fp == NULL) fp 176 usr/server/fs/vfs/main.c if ((error = sys_close(fp)) != 0) fp 199 usr/server/fs/vfs/main.c file_t fp; fp 203 usr/server/fs/vfs/main.c if ((fp = task_getfp(t, msg->data[0])) == NULL) fp 208 usr/server/fs/vfs/main.c error = sys_lseek(fp, offset, type, &org); fp 216 usr/server/fs/vfs/main.c file_t fp; fp 221 usr/server/fs/vfs/main.c if ((fp = task_getfp(t, msg->fd)) == NULL) fp 227 usr/server/fs/vfs/main.c error = sys_read(fp, buf, size, &bytes); fp 236 usr/server/fs/vfs/main.c file_t fp; fp 241 usr/server/fs/vfs/main.c if ((fp = task_getfp(t, msg->fd)) == NULL) fp 247 usr/server/fs/vfs/main.c error = sys_write(fp, buf, size, &bytes); fp 256 usr/server/fs/vfs/main.c file_t fp; fp 258 usr/server/fs/vfs/main.c if ((fp = task_getfp(t, msg->fd)) == NULL) fp 261 usr/server/fs/vfs/main.c return sys_ioctl(fp, msg->request, msg->buf); fp 267 usr/server/fs/vfs/main.c file_t fp; fp 269 usr/server/fs/vfs/main.c if ((fp = task_getfp(t, msg->data[0])) == NULL) fp 272 usr/server/fs/vfs/main.c return sys_fsync(fp); fp 278 usr/server/fs/vfs/main.c file_t fp; fp 282 usr/server/fs/vfs/main.c if ((fp = task_getfp(t, msg->fd)) == NULL) fp 286 usr/server/fs/vfs/main.c error = sys_fstat(fp, st); fp 294 usr/server/fs/vfs/main.c file_t fp; fp 305 usr/server/fs/vfs/main.c if ((error = sys_opendir(path, &fp)) != 0) fp 307 usr/server/fs/vfs/main.c t->t_ofile[fd] = fp; fp 315 usr/server/fs/vfs/main.c file_t fp; fp 321 usr/server/fs/vfs/main.c fp = t->t_ofile[fd]; fp 322 usr/server/fs/vfs/main.c if (fp == NULL) fp 325 usr/server/fs/vfs/main.c if ((error = sys_closedir(fp)) != 0) fp 334 usr/server/fs/vfs/main.c file_t fp; fp 336 usr/server/fs/vfs/main.c if ((fp = task_getfp(t, msg->fd)) == NULL) fp 339 usr/server/fs/vfs/main.c return sys_readdir(fp, &msg->dirent); fp 345 usr/server/fs/vfs/main.c file_t fp; fp 347 usr/server/fs/vfs/main.c if ((fp = task_getfp(t, msg->data[0])) == NULL) fp 350 usr/server/fs/vfs/main.c return sys_rewinddir(fp); fp 356 usr/server/fs/vfs/main.c file_t fp; fp 359 usr/server/fs/vfs/main.c if ((fp = task_getfp(t, msg->data[0])) == NULL) fp 363 usr/server/fs/vfs/main.c return sys_seekdir(fp, loc); fp 369 usr/server/fs/vfs/main.c file_t fp; fp 373 usr/server/fs/vfs/main.c if ((fp = task_getfp(t, msg->data[0])) == NULL) fp 377 usr/server/fs/vfs/main.c if ((error = sys_telldir(fp, &loc)) != 0) fp 432 usr/server/fs/vfs/main.c file_t fp; fp 441 usr/server/fs/vfs/main.c if ((error = sys_opendir(path, &fp)) != 0) fp 445 usr/server/fs/vfs/main.c t->t_cwdfp = fp; fp 453 usr/server/fs/vfs/main.c file_t fp; fp 457 usr/server/fs/vfs/main.c if ((fp = task_getfp(t, fd)) == NULL) fp 462 usr/server/fs/vfs/main.c t->t_cwdfp = fp; fp 463 usr/server/fs/vfs/main.c return sys_fchdir(fp, t->t_cwd); fp 516 usr/server/fs/vfs/main.c file_t fp; fp 520 usr/server/fs/vfs/main.c if ((fp = task_getfp(t, old_fd)) == NULL) fp 527 usr/server/fs/vfs/main.c t->t_ofile[new_fd] = fp; fp 530 usr/server/fs/vfs/main.c vref(fp->f_vnode); fp 531 usr/server/fs/vfs/main.c fp->f_count++; fp 543 usr/server/fs/vfs/main.c file_t fp, org; fp 551 usr/server/fs/vfs/main.c fp = t->t_ofile[old_fd]; fp 552 usr/server/fs/vfs/main.c if (fp == NULL) fp 559 usr/server/fs/vfs/main.c t->t_ofile[new_fd] = fp; fp 562 usr/server/fs/vfs/main.c vref(fp->f_vnode); fp 563 usr/server/fs/vfs/main.c fp->f_count++; fp 575 usr/server/fs/vfs/main.c file_t fp; fp 578 usr/server/fs/vfs/main.c if ((fp = task_getfp(t, msg->fd)) == NULL) fp 589 usr/server/fs/vfs/main.c t->t_ofile[new_fd] = fp; fp 592 usr/server/fs/vfs/main.c vref(fp->f_vnode); fp 593 usr/server/fs/vfs/main.c fp->f_count++; fp 597 usr/server/fs/vfs/main.c msg->arg = fp->f_flags & FD_CLOEXEC; fp 600 usr/server/fs/vfs/main.c fp->f_flags = (fp->f_flags & ~FD_CLOEXEC) | fp 644 usr/server/fs/vfs/main.c file_t fp; fp 658 usr/server/fs/vfs/main.c fp = t->t_ofile[i]; fp 659 usr/server/fs/vfs/main.c newtask->t_ofile[i] = fp; fp 664 usr/server/fs/vfs/main.c if (fp != NULL) { fp 665 usr/server/fs/vfs/main.c vref(fp->f_vnode); fp 666 usr/server/fs/vfs/main.c fp->f_count++; fp 689 usr/server/fs/vfs/main.c file_t fp; fp 703 usr/server/fs/vfs/main.c fp = target->t_ofile[fd]; fp 704 usr/server/fs/vfs/main.c if (fp) { fp 705 usr/server/fs/vfs/main.c if (fp->f_vnode->v_type == VDIR) { fp 706 usr/server/fs/vfs/main.c sys_close(fp); fp 723 usr/server/fs/vfs/main.c file_t fp; fp 732 usr/server/fs/vfs/main.c fp = t->t_ofile[fd]; fp 733 usr/server/fs/vfs/main.c if (fp != NULL) fp 734 usr/server/fs/vfs/main.c sys_close(fp); fp 807 usr/server/fs/vfs/main.c file_t fp; fp 810 usr/server/fs/vfs/main.c if ((fp = task_getfp(t, msg->data[0])) == NULL) fp 813 usr/server/fs/vfs/main.c if (fp->f_vnode->v_flags & VISTTY) fp 836 usr/server/fs/vfs/main.c file_t fp; fp 838 usr/server/fs/vfs/main.c if ((fp = task_getfp(t, msg->data[0])) == NULL) fp 841 usr/server/fs/vfs/main.c return sys_ftruncate(fp, msg->data[1]); fp 95 usr/server/fs/vfs/vfs.h int sys_close(file_t fp); fp 96 usr/server/fs/vfs/vfs.h int sys_read(file_t fp, void *buf, size_t size, size_t *result); fp 97 usr/server/fs/vfs/vfs.h int sys_write(file_t fp, void *buf, size_t size, size_t *result); fp 98 usr/server/fs/vfs/vfs.h int sys_lseek(file_t fp, off_t off, int type, off_t * cur_off); fp 99 usr/server/fs/vfs/vfs.h int sys_ioctl(file_t fp, u_long request, void *buf); fp 100 usr/server/fs/vfs/vfs.h int sys_fstat(file_t fp, struct stat *st); fp 101 usr/server/fs/vfs/vfs.h int sys_fsync(file_t fp); fp 102 usr/server/fs/vfs/vfs.h int sys_ftruncate(file_t fp, off_t length); fp 105 usr/server/fs/vfs/vfs.h int sys_closedir(file_t fp); fp 106 usr/server/fs/vfs/vfs.h int sys_readdir(file_t fp, struct dirent *dirent); fp 107 usr/server/fs/vfs/vfs.h int sys_rewinddir(file_t fp); fp 108 usr/server/fs/vfs/vfs.h int sys_seekdir(file_t fp, long loc); fp 109 usr/server/fs/vfs/vfs.h int sys_telldir(file_t fp, long *loc); fp 110 usr/server/fs/vfs/vfs.h int sys_fchdir(file_t fp, char *path); fp 133 usr/server/fs/vfs/vfs.h void task_setfp(struct task *t, int fd, file_t fp); fp 58 usr/server/fs/vfs/vfs_syscalls.c file_t fp; fp 127 usr/server/fs/vfs/vfs_syscalls.c if (!(fp = malloc(sizeof(struct file)))) { fp 133 usr/server/fs/vfs/vfs_syscalls.c free(fp); fp 137 usr/server/fs/vfs/vfs_syscalls.c memset(fp, 0, sizeof(struct file)); fp 138 usr/server/fs/vfs/vfs_syscalls.c fp->f_vnode = vp; fp 139 usr/server/fs/vfs/vfs_syscalls.c fp->f_flags = flags; fp 140 usr/server/fs/vfs/vfs_syscalls.c fp->f_offset = 0; fp 141 usr/server/fs/vfs/vfs_syscalls.c fp->f_count = 1; fp 142 usr/server/fs/vfs/vfs_syscalls.c *pfp = fp; fp 148 usr/server/fs/vfs/vfs_syscalls.c sys_close(file_t fp) fp 154 usr/server/fs/vfs/vfs_syscalls.c (u_int)fp, fp->f_count)); fp 156 usr/server/fs/vfs/vfs_syscalls.c if (fp->f_count <= 0) fp 159 usr/server/fs/vfs/vfs_syscalls.c vp = fp->f_vnode; fp 160 usr/server/fs/vfs/vfs_syscalls.c if (--fp->f_count > 0) { fp 165 usr/server/fs/vfs/vfs_syscalls.c if ((error = VOP_CLOSE(vp, fp)) != 0) { fp 170 usr/server/fs/vfs/vfs_syscalls.c free(fp); fp 175 usr/server/fs/vfs/vfs_syscalls.c sys_read(file_t fp, void *buf, size_t size, size_t *count) fp 181 usr/server/fs/vfs/vfs_syscalls.c (u_int)fp, (u_int)buf, size)); fp 183 usr/server/fs/vfs/vfs_syscalls.c if ((fp->f_flags & FREAD) == 0) fp 189 usr/server/fs/vfs/vfs_syscalls.c vp = fp->f_vnode; fp 191 usr/server/fs/vfs/vfs_syscalls.c error = VOP_READ(vp, fp, buf, size, count); fp 197 usr/server/fs/vfs/vfs_syscalls.c sys_write(file_t fp, void *buf, size_t size, size_t *count) fp 203 usr/server/fs/vfs/vfs_syscalls.c (u_int)fp, (u_int)buf, size)); fp 205 usr/server/fs/vfs/vfs_syscalls.c if ((fp->f_flags & FWRITE) == 0) fp 211 usr/server/fs/vfs/vfs_syscalls.c vp = fp->f_vnode; fp 213 usr/server/fs/vfs/vfs_syscalls.c error = VOP_WRITE(vp, fp, buf, size, count); fp 219 usr/server/fs/vfs/vfs_syscalls.c sys_lseek(file_t fp, off_t off, int type, off_t *origin) fp 224 usr/server/fs/vfs/vfs_syscalls.c (u_int)fp, (u_int)off, type)); fp 226 usr/server/fs/vfs/vfs_syscalls.c vp = fp->f_vnode; fp 236 usr/server/fs/vfs/vfs_syscalls.c if (fp->f_offset + off > (off_t)vp->v_size) fp 238 usr/server/fs/vfs/vfs_syscalls.c else if (fp->f_offset + off < 0) fp 241 usr/server/fs/vfs/vfs_syscalls.c off = fp->f_offset + off; fp 256 usr/server/fs/vfs/vfs_syscalls.c if (VOP_SEEK(vp, fp, fp->f_offset, off) != 0) { fp 261 usr/server/fs/vfs/vfs_syscalls.c fp->f_offset = off; fp 267 usr/server/fs/vfs/vfs_syscalls.c sys_ioctl(file_t fp, u_long request, void *buf) fp 272 usr/server/fs/vfs/vfs_syscalls.c DPRINTF(VFSDB_SYSCALL, ("sys_ioctl: fp=%x request=%x\n", fp, request)); fp 274 usr/server/fs/vfs/vfs_syscalls.c if ((fp->f_flags & (FREAD | FWRITE)) == 0) fp 277 usr/server/fs/vfs/vfs_syscalls.c vp = fp->f_vnode; fp 279 usr/server/fs/vfs/vfs_syscalls.c error = VOP_IOCTL(vp, fp, request, buf); fp 286 usr/server/fs/vfs/vfs_syscalls.c sys_fsync(file_t fp) fp 291 usr/server/fs/vfs/vfs_syscalls.c DPRINTF(VFSDB_SYSCALL, ("sys_fsync: fp=%x\n", fp)); fp 293 usr/server/fs/vfs/vfs_syscalls.c if ((fp->f_flags & FWRITE) == 0) fp 296 usr/server/fs/vfs/vfs_syscalls.c vp = fp->f_vnode; fp 298 usr/server/fs/vfs/vfs_syscalls.c error = VOP_FSYNC(vp, fp); fp 304 usr/server/fs/vfs/vfs_syscalls.c sys_fstat(file_t fp, struct stat *st) fp 309 usr/server/fs/vfs/vfs_syscalls.c DPRINTF(VFSDB_SYSCALL, ("sys_fstat: fp=%x\n", fp)); fp 311 usr/server/fs/vfs/vfs_syscalls.c vp = fp->f_vnode; fp 325 usr/server/fs/vfs/vfs_syscalls.c file_t fp; fp 330 usr/server/fs/vfs/vfs_syscalls.c if ((error = sys_opendir(path, &fp)) != 0) fp 333 usr/server/fs/vfs/vfs_syscalls.c error = sys_readdir(fp, &dir); fp 338 usr/server/fs/vfs/vfs_syscalls.c sys_closedir(fp); fp 351 usr/server/fs/vfs/vfs_syscalls.c file_t fp; fp 356 usr/server/fs/vfs/vfs_syscalls.c if ((error = sys_open(path, O_RDONLY, 0, &fp)) != 0) fp 359 usr/server/fs/vfs/vfs_syscalls.c dvp = fp->f_vnode; fp 363 usr/server/fs/vfs/vfs_syscalls.c sys_close(fp); fp 368 usr/server/fs/vfs/vfs_syscalls.c *file = fp; fp 373 usr/server/fs/vfs/vfs_syscalls.c sys_closedir(file_t fp) fp 378 usr/server/fs/vfs/vfs_syscalls.c DPRINTF(VFSDB_SYSCALL, ("sys_closedir: fp=%x\n", fp)); fp 380 usr/server/fs/vfs/vfs_syscalls.c dvp = fp->f_vnode; fp 387 usr/server/fs/vfs/vfs_syscalls.c error = sys_close(fp); fp 392 usr/server/fs/vfs/vfs_syscalls.c sys_readdir(file_t fp, struct dirent *dir) fp 397 usr/server/fs/vfs/vfs_syscalls.c DPRINTF(VFSDB_SYSCALL, ("sys_readdir: fp=%x\n", fp)); fp 399 usr/server/fs/vfs/vfs_syscalls.c dvp = fp->f_vnode; fp 405 usr/server/fs/vfs/vfs_syscalls.c error = VOP_READDIR(dvp, fp, dir); fp 413 usr/server/fs/vfs/vfs_syscalls.c sys_rewinddir(file_t fp) fp 417 usr/server/fs/vfs/vfs_syscalls.c dvp = fp->f_vnode; fp 423 usr/server/fs/vfs/vfs_syscalls.c fp->f_offset = 0; fp 429 usr/server/fs/vfs/vfs_syscalls.c sys_seekdir(file_t fp, long loc) fp 433 usr/server/fs/vfs/vfs_syscalls.c dvp = fp->f_vnode; fp 439 usr/server/fs/vfs/vfs_syscalls.c fp->f_offset = (off_t)loc; fp 445 usr/server/fs/vfs/vfs_syscalls.c sys_telldir(file_t fp, long *loc) fp 449 usr/server/fs/vfs/vfs_syscalls.c dvp = fp->f_vnode; fp 455 usr/server/fs/vfs/vfs_syscalls.c *loc = (long)fp->f_offset; fp 738 usr/server/fs/vfs/vfs_syscalls.c sys_ftruncate(file_t fp, off_t length) fp 744 usr/server/fs/vfs/vfs_syscalls.c sys_fchdir(file_t fp, char *cwd) fp 748 usr/server/fs/vfs/vfs_syscalls.c dvp = fp->f_vnode; fp 178 usr/server/fs/vfs/vfs_task.c task_setfp(struct task *t, int fd, file_t fp) fp 181 usr/server/fs/vfs/vfs_task.c t->t_ofile[fd] = fp;