/external/honggfuzz/libhfuzz/ |
persistent.c | 95 int in_fd = STDIN_FILENO; local 99 if ((in_fd = open(argv[argc - 1], O_RDONLY)) == -1) { 101 in_fd = STDIN_FILENO; 111 ssize_t len = files_readFromFd(in_fd, buf, sizeof(buf));
|
/external/ltp/testcases/kernel/syscalls/sendfile/ |
sendfile07.c | 65 int in_fd, out_fd = 0, ignored_fd = 0; variable 89 TEST(sendfile(out_fd, in_fd, NULL, 1)); 128 if ((in_fd = creat(in_file, 00700)) < 0) { 133 if (write(in_fd, buf, strlen(buf)) < 0) { 136 close(in_fd); 137 if ((in_fd = open(in_file, O_RDONLY)) < 0) { 189 close(in_fd);
|
sendfile08.c | 46 static int in_fd; variable 65 TEST(sendfile(out_fd, in_fd, NULL, strlen(TEST_MSG_IN))); 102 in_fd = SAFE_CREAT(cleanup, in_file, 0700); 104 ret = write(in_fd, TEST_MSG_IN, strlen(TEST_MSG_IN)); 107 close(in_fd); 109 in_fd = SAFE_OPEN(cleanup, in_file, O_RDONLY); 120 close(in_fd);
|
sendfile03.c | 30 * 2. Call sendfile(2) with in_fd = -1, and expect EBADF to be returned. 31 * 3. Call sendfile(2) with in_fd = out_fd = -1, and expect EBADF. 64 int in_fd, out_fd; variable 75 int in_fd; member in struct:test_case_t 81 "Test for EBADF, in_fd = -1", NULL, 8, -1, NULL, 0, EBADF}, { 83 "Test for EBADF, in_fd = out_fd = -1", NULL, -1, -1, NULL, 107 TEST(sendfile(testcases[i].out_fd, testcases[i].in_fd, 145 if ((in_fd = creat(in_file, 00700)) < 0) { 150 if (write(in_fd, buf, strlen(buf)) < 0) { 153 close(in_fd); [all...] |
sendfile05.c | 84 int in_fd; local 89 if ((in_fd = open(in_file, O_RDONLY)) < 0) { 95 TEST(sendfile(out_fd, in_fd, &offset, sb.st_size)); 113 close(in_fd);
|
sendfile06.c | 23 * position of in_fd correctly when passing NULL as offset. 68 int in_fd, out_fd; local 74 in_fd = SAFE_OPEN(cleanup, IN_FILE, O_RDONLY); 76 TEST(sendfile(out_fd, in_fd, NULL, sb.st_size)); 77 if ((after_pos = lseek(in_fd, 0, SEEK_CUR)) < 0) { 92 " the file position of in_fd, " 103 SAFE_CLOSE(cleanup, in_fd);
|
sendfile09.c | 64 static int in_fd; variable 92 in_fd = SAFE_OPEN(cleanup, in_file, O_RDONLY); 93 before_pos = SAFE_LSEEK(cleanup, in_fd, 0, SEEK_CUR); 95 TEST(sendfile(out_fd, in_fd, &t->offset, t->count)); 99 after_pos = SAFE_LSEEK(cleanup, in_fd, 0, SEEK_CUR); 114 " of in_fd unexpectedly, expected file position: %" 121 close(in_fd); 159 if (in_fd > 0) 160 close(in_fd);
|
sendfile02.c | 100 int in_fd; local 108 if ((in_fd = open(in_file, O_RDONLY)) < 0) { 113 if ((before_pos = lseek(in_fd, 0, SEEK_CUR)) < 0) { 118 TEST(sendfile(out_fd, in_fd, &offset, sb.st_size - offset)); 120 if ((after_pos = lseek(in_fd, 0, SEEK_CUR)) < 0) { 142 " of in_fd unexpectedly, expected file position: %" 151 close(in_fd);
|
sendfile04.c | 103 int in_fd; local 115 if ((in_fd = open(in_file, O_RDONLY)) < 0) { 125 TEST(sendfile(out_fd, in_fd, protected_buffer, sb.st_size)); 143 close(in_fd);
|
/external/perfetto/src/perfetto_cmd/ |
rate_limiter.cc | 160 base::ScopedFile in_fd; local 161 in_fd.reset(open(GetStateFilePath().c_str(), O_RDONLY)); 163 if (!in_fd) 166 ssize_t bytes = PERFETTO_EINTR(read(in_fd.get(), &buf, sizeof(buf)));
|
/system/update_engine/payload_generator/ |
full_update_generator.cc | 148 int in_fd = open(new_part.path.c_str(), O_RDONLY, 0); local 149 TEST_AND_RETURN_FALSE(in_fd >= 0); 150 ScopedFdCloser in_fd_closer(&in_fd); 178 in_fd,
|
payload_file.cc | 283 int in_fd = open(data_blobs_path.c_str(), O_RDONLY, 0); local 284 TEST_AND_RETURN_FALSE_ERRNO(in_fd >= 0); 285 ScopedFdCloser in_fd_closer(&in_fd); 303 ssize_t rc = pread(in_fd, buf.data(), buf.size(), aop.op.data_offset());
|
/build/make/tools/makeparallel/ |
makeparallel.cpp | 103 int* in_fd, int* out_fd, bool* parallel, bool* keep_going) { 135 if (sscanf(optarg, "%d,%d", in_fd, out_fd) != 2) { 138 // TODO: propagate in_fd, out_fd 242 // Measure the size of the jobserver pool by reading from in_fd until it blocks 243 static int GetJobserverTokens(int in_fd) { 245 pollfd pollfds[] = {{in_fd, POLLIN, 0}}; 261 bool got_token = ReadByteTimeout(in_fd, 10); 289 int in_fd = -1; local 310 if (ParseMakeflags(makeflags, &in_fd, &out_fd, ¶llel, &keep_going)) { 311 if (in_fd >= 0 && out_fd >= 0) [all...] |
/external/linux-kselftest/tools/testing/selftests/exec/ |
execveat.c | 139 int in_fd = open_or_die(src, O_RDONLY); local 143 fstat(in_fd, &info); 144 sendfile(out_fd, in_fd, NULL, info.st_size); 145 close(in_fd);
|
/external/fio/oslib/ |
libmtd.c | 1288 int tmp, ret, in_fd, len, written = 0; local 1310 in_fd = open(img_name, O_RDONLY | O_CLOEXEC); 1311 if (in_fd == -1) 1314 if (fstat(in_fd, &st)) { 1351 ret = read(in_fd, buf, mtd->eb_size - offs - rd); 1372 close(in_fd); 1378 close(in_fd) [all...] |
/external/toybox/toys/other/ |
bzcat.c | 84 int in_fd, inbufCount, inbufPos; member in struct:bunzip_data 120 if (0 >= (bd->inbufCount = read(bd->in_fd, bd->inbuf, IOBUF_SIZE))) 619 bd->in_fd = -1; 622 bd->in_fd = src_fd;
|