Lines Matching refs:fd
233 unique_fd fd( in PrepareFile() local
235 ASSERT_NE(fd.get(), -1); in PrepareFile()
239 write(fd.get(), buffer, sizeof(buffer)); in PrepareFile()
276 unique_fd fd; in FindChanged() local
278 fd = unique_fd(open(loop_device_.c_str(), O_RDONLY)); in FindChanged()
280 fd = unique_fd(open(bow_device_.c_str(), O_RDONLY)); in FindChanged()
281 EXPECT_NE(fd.get(), -1); in FindChanged()
282 if (fd.get() == -1) return; in FindChanged()
297 EXPECT_NE(lseek(fd.get(), i * sector_size_, SEEK_SET), -1); in FindChanged()
298 EXPECT_EQ(read(fd.get(), buffer, sizeof(buffer)), sizeof(buffer)); in FindChanged()
452 unique_fd fd(open(MOUNT_POINT, O_RDONLY)); in Trim() local
453 EXPECT_NE(fd.get(), -1); in Trim()
456 EXPECT_EQ(ioctl(fd, FITRIM, &range), 0); in Trim()