Home
last modified time | relevance | path

Searched refs:fd (Results 1 – 25 of 42) sorted by relevance

12

/libio/
A Dtst-atime.c20 int fd; in do_test() local
34 fd = mkstemp (buf); in do_test()
35 if (fd == -1) in do_test()
45 int e = fstatvfs (fd, &sv); in do_test()
65 if (write (fd, "some string\n", 12) != 12) in do_test()
71 if (lseek (fd, 0, SEEK_SET) == (off_t) -1) in do_test()
77 fp = fdopen (fd, "r"); in do_test()
84 if (fstat (fd, &st1) == -1) in do_test()
99 if (fstat (fd, &st2) == -1) in do_test()
A Dtst-eof.c14 int fd; variable
20 fd = create_temp_file ("tst-eof.", NULL); in do_prepare()
21 if (fd == -1) in do_prepare()
35 if (write (fd, "some string\n", 12) != 12) in do_test()
41 if (lseek (fd, 0, SEEK_SET) == (off_t) -1) in do_test()
47 fp = fdopen (fd, "r"); in do_test()
A Doldtmpfile.c35 int fd; in __old_tmpfile() local
40 fd = __gen_tempname (buf, 0, 0, __GT_FILE); in __old_tmpfile()
41 if (fd < 0) in __old_tmpfile()
48 if ((f = _IO_old_fdopen (fd, "w+b")) == NULL) in __old_tmpfile()
49 __close (fd); in __old_tmpfile()
A Dfreopen64.c50 int fd = _IO_fileno (fp); in freopen64() local
52 = filename != NULL ? filename : __fd_to_filename (fd, &fdfilename); in freopen64()
68 if (fd != -1 && _IO_fileno (result) != fd) in freopen64()
77 if (__dup3 (_IO_fileno (result), fd, in freopen64()
86 _IO_fileno (result) = fd; in freopen64()
89 else if (fd != -1) in freopen64()
90 __close (fd); in freopen64()
A Dbug-fopena+.c6 static int fd; variable
22 fd = create_temp_file ("wrewind.", &fname); in prepare()
23 if (fd == -1) in prepare()
35 fp = fdopen (fd, "w"); in do_test()
71 fd = open (fname, O_RDWR); in do_test()
72 if (fd == -1) in do_test()
78 fp = fdopen (fd, "a+"); in do_test()
A Dfreopen.c51 int fd = _IO_fileno (fp); in freopen() local
53 = filename != NULL ? filename : __fd_to_filename (fd, &fdfilename); in freopen()
85 if (fd != -1 && _IO_fileno (result) != fd) in freopen()
94 if (__dup3 (_IO_fileno (result), fd, in freopen()
103 _IO_fileno (result) = fd; in freopen()
106 else if (fd != -1) in freopen()
107 __close (fd); in freopen()
A Dtst-ftell-active-handler.c49 close (fd); \
101 int fd; in do_ftruncate_test() local
219 int fd; in do_rewind_test() local
317 int fd; in do_ftell_test() local
407 int fd; in do_write_test() local
484 int fd; in do_append_test() local
545 if (fd == -1) in do_append_test()
558 fp = fdopen (fd, "a"); in do_append_test()
562 close (fd); in do_append_test()
624 if (fd == -1) in do_test()
[all …]
A Dtst-popen1.c17 int fd = fileno (fp); in do_test() local
18 if (fcntl (fd, F_GETFD) == FD_CLOEXEC) in do_test()
35 int fd = fileno (fp); in do_test() local
36 if (fcntl (fd, F_GETFD) != FD_CLOEXEC) in do_test()
A Dtst-fwrite-error.c28 int fd = mkstemp (tmpl); in do_test() local
29 if (fd == -1) in do_test()
34 FILE *fp = fdopen (fd, "w"); in do_test()
43 close (fd); in do_test()
A Dtst-fopenloc2.c32 static int fd; variable
39 fd = create_temp_file ("tst-fopenloc2", &tmpname); in prepare()
40 if (fd == -1) in prepare()
53 if (ftruncate (fd, 0) != 0) in do_test()
59 if (TEMP_FAILURE_RETRY (write (fd, tests[i].data, tests[i].datalen)) in do_test()
66 if (lseek (fd, 0, SEEK_SET) != 0) in do_test()
113 close (fd); in do_test()
A Dbug-wfflush.c17 int fd = create_temp_file ("bug-ungetc.", &temp_file); in do_prepare() local
18 if (fd == -1) in do_prepare()
23 write (fd, "1!", 2); in do_prepare()
24 close (fd); in do_prepare()
A Dbug-rewind2.c5 static int fd; variable
19 fd = create_temp_file ("wrewind2.", NULL); in prepare()
20 if (fd == -1) in prepare()
33 fp = fdopen (fd, "w+"); in do_test()
A Dtst-widetext.c43 int fd; in do_test() local
120 fd = mkstemp (name); in do_test()
121 if (fd == -1) in do_test()
129 fp = fdopen (dup (fd), "w"); in do_test()
153 lseek (fd, SEEK_SET, 0); in do_test()
195 lseek (fd, SEEK_SET, 0); in do_test()
196 fp = fdopen (fd, "r"); in do_test()
235 if (fd == -1) in do_test()
281 lseek (fd, SEEK_SET, 0); in do_test()
330 lseek (fd, SEEK_SET, 0); in do_test()
[all …]
A Dtst_wprintf2.c15 int fd; in main() local
22 fd = mkstemp (name); in main()
23 if (fd == -1) in main()
30 fp = fdopen (dup (fd), "w"); in main()
42 fp = fdopen (dup (fd), "a"); in main()
55 lseek (fd, SEEK_SET, 0); in main()
56 fp = fdopen (fd, "r"); in main()
A Dtst-bz24051.c40 int fd = create_temp_file ("tst-bz24051", NULL); in do_test_narrow() local
41 stdout = fdopen (fd, "w+"); in do_test_narrow()
60 int fd = create_temp_file ("tst-bz24051w", NULL); in do_test_wide() local
61 stdout = fdopen (fd, "w+"); in do_test_wide()
A Dbug-ungetc3.c17 int fd = create_temp_file ("bug-ungetc.", &temp_file); in do_prepare() local
18 if (fd == -1) in do_prepare()
23 write (fd, pattern, sizeof (pattern)); in do_prepare()
24 close (fd); in do_prepare()
A Dbug-wsetpos.c19 int fd = create_temp_file ("bug-wsetpos.", &temp_file); in do_prepare() local
20 if (fd == -1) in do_prepare()
25 write (fd, pattern, sizeof (pattern)); in do_prepare()
26 close (fd); in do_prepare()
A Dbug-rewind.c8 static int fd; variable
22 fd = create_temp_file ("wrewind.", NULL); in prepare()
23 if (fd == -1) in prepare()
39 fptr = fdopen (fd, "w+"); in do_test()
A Dbug-ungetc.c17 int fd = create_temp_file ("bug-ungetc.", &temp_file); in do_prepare() local
18 if (fd == -1) in do_prepare()
23 write (fd, pattern, sizeof (pattern)); in do_prepare()
24 close (fd); in do_prepare()
A Dtst-ungetwc1.c17 int fd; in do_test() local
27 fd = mkstemp (fname); in do_test()
28 if (fd == -1) in do_test()
35 if ((fp = fdopen (fd, "w")) == NULL) in do_test()
A Dbug-ungetwc1.c24 int fd; in do_test() local
33 fd = mkstemp (fname); in do_test()
34 if (fd == -1) in do_test()
44 if ((fp = fdopen (fd, "w")) == NULL) in do_test()
A Dtst-ungetwc2.c17 int fd; in do_test() local
29 fd = mkstemp (fname); in do_test()
30 if (fd == -1) in do_test()
35 if ((fp = fdopen (fd, "w")) == NULL) in do_test()
A Dtst-ftell-partial-wide.c73 int fd = create_temp_file ("tst-fseek-wide-partial.out", &filename); in do_test() local
75 if (fd == -1) in do_test()
81 fp = fdopen (fd, "w+"); in do_test()
85 close (fd); in do_test()
A Dtst-fgetws.c24 int fd; in main() local
34 fd = mkstemp (name1); in main()
35 if (fd == -1) in main()
40 if ((fp = fdopen (fd, "w")) == NULL) in main()
49 fd = mkstemp (name2); in main()
50 if (fd == -1) in main()
55 if ((fp = fdopen (fd, "w")) == NULL) in main()
A Dbug-ungetc4.c33 int fd = create_temp_file ("bug-ungetc.", &temp_file); in do_prepare() local
34 if (fd == -1) in do_prepare()
39 write (fd, pattern, sizeof (pattern) - 1); in do_prepare()
40 close (fd); in do_prepare()

Completed in 72 milliseconds

12