Lines Matching refs:fd
26 support_descriptor_supports_holes (int fd) in support_descriptor_supports_holes() argument
44 xfstat (fd, &st); in support_descriptor_supports_holes()
46 FAIL_EXIT1 ("descriptor %d does not refer to a regular file", fd); in support_descriptor_supports_holes()
48 FAIL_EXIT1 ("descriptor %d does not refer to an empty file", fd); in support_descriptor_supports_holes()
51 fd, (long long int) st.st_blocks); in support_descriptor_supports_holes()
55 xlseek (fd, 0, SEEK_SET); in support_descriptor_supports_holes()
57 xwrite (fd, &b, 1); in support_descriptor_supports_holes()
59 TEST_COMPARE (fsync (fd), 0); in support_descriptor_supports_holes()
60 xfstat (fd, &st); in support_descriptor_supports_holes()
70 xlseek (fd, write_offset, SEEK_SET); in support_descriptor_supports_holes()
71 xwrite (fd, &b, 1); in support_descriptor_supports_holes()
73 TEST_COMPARE (fsync (fd), 0); in support_descriptor_supports_holes()
74 xfstat (fd, &st); in support_descriptor_supports_holes()
78 xftruncate (fd, 2 * write_offset); in support_descriptor_supports_holes()
80 TEST_COMPARE (fsync (fd), 0); in support_descriptor_supports_holes()
81 xfstat (fd, &st); in support_descriptor_supports_holes()
85 xftruncate (fd, 0); in support_descriptor_supports_holes()
86 xlseek (fd, 0, SEEK_SET); in support_descriptor_supports_holes()