Lines Matching refs:fd

384 write_all(int fd, const void *buf, size_t nbytes)  in write_all()  argument
389 r = write(fd, buf, nbytes); in write_all()
406 int fd; variable
418 fd = open("abspath.txt", O_CREAT | O_RDONLY, 0644);
419 ATF_REQUIRE(fd >= 0);
420 close(fd);
449 int fd; variable
452 fd = open("small.txt", O_RDWR | O_CREAT, 0644);
453 ATF_REQUIRE(fd >= 0);
454 write_all(fd, contents, strlen(contents) + 1);
455 close(fd);
467 int fd; variable
470 fd = open("small.txt", O_RDWR | O_CREAT, 0644);
471 ATF_REQUIRE(fd >= 0);
472 write_all(fd, contents, strlen(contents) + 1);
473 close(fd);
490 int fd; variable
498 fd = open("medium.txt", O_RDWR | O_CREAT, 0644);
499 ATF_REQUIRE(fd >= 0);
500 write_all(fd, contents, sizeof(contents));
501 close(fd);
521 int fd; variable
528 fd = open("medium.txt", O_RDWR | O_CREAT, 0644);
529 ATF_REQUIRE(fd >= 0);
530 write_all(fd, contents, sizeof(contents));
531 close(fd);
548 int fd; variable
550 fd = open("empty.txt", O_CREAT | O_RDONLY, 0000);
551 ATF_REQUIRE(fd >= 0);
552 close(fd);
563 int fd; variable
565 fd = open("empty.txt", O_CREAT | O_RDONLY, 0644);
566 ATF_REQUIRE(fd >= 0);
567 close(fd);
579 int fd; variable
586 fd = open("medium.txt", O_RDWR | O_CREAT, 0644);
587 ATF_REQUIRE(fd >= 0);
588 write_all(fd, contents, sizeof(contents));
589 close(fd);
603 int fd; variable
611 fd = open("medium.txt", O_RDWR | O_CREAT, 0644);
612 ATF_REQUIRE(fd >= 0);
613 write_all(fd, contents, sizeof(contents));
614 close(fd);
629 int fd; variable
637 fd = open("unix.txt", O_RDWR | O_CREAT, 0644);
638 ATF_REQUIRE(fd >= 0);
639 write_all(fd, contents, strlen(contents) + 1);
640 close(fd);
690 int fd; variable
693 fd = open("small.txt", O_RDWR | O_CREAT, 0644);
694 ATF_REQUIRE(fd >= 0);
695 write_all(fd, contents, strlen(contents) + 1);
696 close(fd);
708 int fd; variable
718 fd = open("rfc7440.txt", O_RDWR | O_CREAT, 0644);
719 ATF_REQUIRE(fd >= 0);
720 write_all(fd, contents, sizeof(contents));
721 close(fd);
789 int fd; variable
801 fd = open("small.txt", O_RDONLY);
802 ATF_REQUIRE(fd >= 0);
803 r = read(fd, buffer, sizeof(buffer));
804 close(fd);
813 int fd; variable
822 fd = open("medium.txt", O_RDWR | O_CREAT, 0666);
823 ATF_REQUIRE(fd >= 0);
824 close(fd);
838 fd = open("medium.txt", O_RDONLY);
839 ATF_REQUIRE(fd >= 0);
840 r = read(fd, buffer, sizeof(buffer));
841 close(fd);
850 int fd; variable
856 fd = open("small.txt", O_RDWR | O_CREAT, 0666);
857 ATF_REQUIRE(fd >= 0);
858 close(fd);
871 fd = open("small.txt", O_RDONLY);
872 ATF_REQUIRE(fd >= 0);
873 r = read(fd, buffer, sizeof(buffer));
874 close(fd);
883 int fd; variable
892 fd = open("medium.txt", O_RDWR | O_CREAT, 0666);
893 ATF_REQUIRE(fd >= 0);
894 close(fd);
905 fd = open("medium.txt", O_RDONLY);
906 ATF_REQUIRE(fd >= 0);
907 r = read(fd, buffer, sizeof(buffer));
908 close(fd);
917 int fd; variable
919 fd = open("empty.txt", O_CREAT | O_RDONLY, 0440);
920 ATF_REQUIRE(fd >= 0);
921 close(fd);
933 int fd; variable
935 fd = open("empty.txt", O_CREAT | O_RDONLY, 0444);
936 ATF_REQUIRE(fd >= 0);
937 close(fd);
949 int fd; variable
958 fd = open("medium.txt", O_RDWR | O_CREAT, 0666);
959 ATF_REQUIRE(fd >= 0);
960 close(fd);
969 fd = open("medium.txt", O_RDONLY);
970 ATF_REQUIRE(fd >= 0);
971 r = read(fd, buffer, sizeof(buffer));
972 close(fd);
981 int fd; variable
991 fd = open("medium.txt", O_RDWR | O_CREAT, 0666);
992 ATF_REQUIRE(fd >= 0);
993 close(fd);
1001 fd = open("medium.txt", O_RDONLY);
1002 ATF_REQUIRE(fd >= 0);
1003 r = read(fd, buffer, sizeof(buffer));
1004 close(fd);
1013 int fd; variable
1024 fd = open("unix.txt", O_RDWR | O_CREAT, 0666);
1025 ATF_REQUIRE(fd >= 0);
1026 close(fd);
1034 fd = open("unix.txt", O_RDONLY);
1035 ATF_REQUIRE(fd >= 0);
1036 r = read(fd, buffer, sizeof(buffer));
1037 close(fd);
1056 int fd; variable
1062 fd = open("small.txt", O_RDWR | O_CREAT, 0666);
1063 ATF_REQUIRE(fd >= 0);
1064 close(fd);
1072 fd = open("small.txt", O_RDONLY);
1073 ATF_REQUIRE(fd >= 0);
1074 r = read(fd, buffer, sizeof(buffer));
1075 close(fd);
1084 int fd; variable
1088 fd = open("small.txt", O_RDWR | O_CREAT, 0666);
1089 ATF_REQUIRE(fd >= 0);
1090 write_all(fd, contents, strlen(contents) + 1);
1091 close(fd);
1107 int fd; variable
1119 fd = open("rfc7440.txt", O_RDWR | O_CREAT, 0666);
1120 ATF_REQUIRE(fd >= 0);
1121 close(fd);
1159 fd = open("rfc7440.txt", O_RDONLY);
1160 ATF_REQUIRE(fd >= 0);
1161 r = read(fd, buffer, sizeof(buffer));
1162 close(fd);