Lines Matching refs:fd
21 int fd; in libc_fstat() local
24 fd = open("/tmp/tt.txt", O_WRONLY | O_CREAT, 0); in libc_fstat()
25 if (fd < 0) in libc_fstat()
31 write(fd, text, strlen(text) + 1); in libc_fstat()
32 printf("begin: %d\n", lseek(fd, 0, SEEK_SET)); in libc_fstat()
33 printf("end: %d\n", lseek(fd, 0, SEEK_END)); in libc_fstat()
35 printf("fstat result: %d\n", fstat(fd, &s)); in libc_fstat()
36 close(fd); in libc_fstat()
42 int fd; in libc_lseek() local
44 fd = open("/tmp/tt.txt", O_WRONLY | O_CREAT, 0); in libc_lseek()
45 if (fd < 0) in libc_lseek()
51 write(fd, text, strlen(text) + 1); in libc_lseek()
52 printf("begin: %d\n", lseek(fd, 0, SEEK_SET)); in libc_lseek()
53 printf("end: %d\n", lseek(fd, 0, SEEK_END)); in libc_lseek()
54 close(fd); in libc_lseek()
67 int fd; in libc_fseek() local
89 fd = mkstemp(fname); in libc_fseek()
90 if (fd == -1) in libc_fseek()
96 fp = fdopen(fd, "w+"); in libc_fseek()
167 else if (lseek(fd, 0, SEEK_CUR) != 0) in libc_fseek()
169 int pos = lseek(fd, 0, SEEK_CUR); in libc_fseek()
196 else if (lseek(fd, 0, SEEK_CUR) != 0) in libc_fseek()
223 else if (lseek(fd, 0, SEEK_CUR) != 0) in libc_fseek()
250 else if (lseek(fd, 0, SEEK_CUR) != 0) in libc_fseek()
277 else if (lseek(fd, 0, SEEK_CUR) != 0) in libc_fseek()
304 else if (lseek(fd, 0, SEEK_CUR) != 0) in libc_fseek()
356 if (fstat(fd, &st1) < 0) in libc_fseek()
379 if (fstat(fd, &st2) < 0) in libc_fseek()