Lines Matching refs:fd
80 const int fd = open(name, O_RDONLY);
81 ATF_REQUIRE_MSG(fd != -1, "Cannot open %s", name);
86 while ((count = read(fd, buffer, sizeof(buffer) - 1)) > 0) {
121 const int fd = open(name, O_RDONLY);
122 ATF_REQUIRE_MSG(fd != -1, "Cannot open %s", name);
129 while ((count = read(fd, buffer, sizeof(buffer))) > 0 &&
132 close(fd);
138 close(fd);
192 const int fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0644);
193 ATF_REQUIRE_MSG(fd != -1, "Cannot create file %s", name);
194 ATF_REQUIRE(write(fd, atf_dynstr_cstring(&formatted),
196 close(fd);
266 int fd;
276 ATF_REQUIRE((fd = open(file, O_RDONLY)) != -1);
279 while (!found && (line = atf_utils_readline(fd)) != NULL) {
283 close(fd);
319 * \param fd The descriptor from which to read the line.
324 atf_utils_readline(const int fd)
334 while ((cnt = read(fd, &ch, sizeof(ch))) == sizeof(ch) &&
369 err(EXIT_FAILURE, "Cannot redirect to fd %d", target_fd);