/third_party/alsa-utils/alsamixer/ |
D | utils.c | 119 char *read_file(const char *file_name, unsigned int *file_size) in read_file() argument 133 *file_size = 0; in read_file() 138 bytes_read = fread(buf + *file_size, 1, allocated - *file_size, f); in read_file() 139 *file_size += bytes_read; in read_file() 140 } while (*file_size == allocated && allocated < MAX_FILE_SIZE); in read_file() 142 if (*file_size > 0 && buf[*file_size - 1] != '\n' && *file_size < allocated) { in read_file() 143 buf[*file_size] = '\n'; in read_file() 144 ++*file_size; in read_file()
|
/third_party/ltp/testcases/kernel/mce-test/tsrc/ |
D | thugetlb.c | 45 int file_size; /* Memory allocation size (hugepage unit) */ variable 135 file_size = 1; in main() 147 file_size = strtol(optarg, NULL, 10); in main() 192 if (inject && corrupt_page * PS > file_size * HPAGE_SIZE) in main() 208 addr = alloc_shm_hugepage(&shmkey, file_size * HPAGE_SIZE); in main() 212 addr = alloc_anonymous_hugepage(file_size * HPAGE_SIZE, in main() 218 file_size * HPAGE_SIZE, in main() 244 write_hugepage(addr, file_size, 0); in main() 245 read_hugepage(addr, file_size, 0); in main() 262 write_hugepage(addr, file_size, 0); in main() [all …]
|
/third_party/fsverity-utils/programs/ |
D | test_compute_digest.c | 52 u64 file_size; member 57 .file_size = 1000000, 65 .file_size = 100000, 73 .file_size = 4096, 81 .file_size = 1, 89 .file_size = 0, 97 .file_size = 1000000, 106 .file_size = 1000000, 115 .file_size = 1000000, 123 .file_size = 1000000, [all …]
|
D | cmd_enable.c | 22 u64 file_size; in read_signature() local 28 if (!get_file_size(&file, &file_size)) in read_signature() 30 if (file_size <= 0) { in read_signature() 34 if (file_size > 1000000) { in read_signature() 38 sig = xmalloc(file_size); in read_signature() 39 if (!full_read(&file, sig, file_size)) in read_signature() 42 *sig_size_ret = file_size; in read_signature()
|
/third_party/ffmpeg/libavformat/ |
D | rsoenc.c | 70 int64_t file_size; in rso_write_trailer() local 73 file_size = avio_tell(pb); in rso_write_trailer() 75 if (file_size < 0) in rso_write_trailer() 76 return file_size; in rso_write_trailer() 78 if (file_size > 0xffff + RSO_HEADER_SIZE) { in rso_write_trailer() 80 "Output file is too big (%"PRId64" bytes >= 64kB)\n", file_size); in rso_write_trailer() 83 coded_file_size = file_size - RSO_HEADER_SIZE; in rso_write_trailer() 89 avio_seek(pb, file_size, SEEK_SET); in rso_write_trailer()
|
D | mca.c | 48 int64_t file_size = avio_size(s->pb); in read_header() local 106 if (file_size < 0) { in read_header() 109 if (file_size - data_size > UINT32_MAX) in read_header() 111 m->data_start = file_size - data_size; in read_header() 126 if (file_size > 0 && (int64_t)m->data_start + data_size > file_size) { in read_header() 128 if ((int64_t)header_size + data_size > file_size) { in read_header() 137 if (file_size - data_offset > UINT32_MAX) in read_header() 139 m->data_start = file_size - data_size; in read_header()
|
D | wavenc.c | 412 int64_t file_size, data_size; in wav_write_trailer() local 427 file_size = avio_tell(pb); in wav_write_trailer() 428 data_size = file_size - wav->data; in wav_write_trailer() 429 if (wav->rf64 == RF64_ALWAYS || (wav->rf64 == RF64_AUTO && file_size - 8 > UINT32_MAX)) { in wav_write_trailer() 431 } else if (file_size - 8 <= UINT32_MAX) { in wav_write_trailer() 433 avio_wl32(pb, (uint32_t)(file_size - 8)); in wav_write_trailer() 434 avio_seek(pb, file_size, SEEK_SET); in wav_write_trailer() 438 file_size); in wav_write_trailer() 452 avio_seek(pb, file_size, SEEK_SET); in wav_write_trailer() 466 avio_wl64(pb, file_size - 8); /* RF64 chunk size */ in wav_write_trailer() [all …]
|
D | apm.c | 51 uint32_t file_size; member 64 ext->file_size = AV_RL32(buf + 4); in apm_parse_extradata() 287 int64_t file_size, data_size; in apm_write_trailer() local 289 file_size = avio_tell(s->pb); in apm_write_trailer() 290 data_size = file_size - (APM_FILE_HEADER_SIZE + APM_FILE_EXTRADATA_SIZE); in apm_write_trailer() 292 if (file_size >= UINT32_MAX) { in apm_write_trailer() 295 file_size); in apm_write_trailer() 300 avio_wl32(s->pb, (uint32_t)file_size); in apm_write_trailer()
|
D | apetag.c | 121 int64_t file_size = avio_size(pb); in ff_ape_parse_tag() local 127 if (file_size < APE_TAG_FOOTER_BYTES) in ff_ape_parse_tag() 130 avio_seek(pb, file_size - APE_TAG_FOOTER_BYTES, SEEK_SET); in ff_ape_parse_tag() 149 if (tag_bytes > file_size - APE_TAG_FOOTER_BYTES) { in ff_ape_parse_tag() 166 avio_seek(pb, file_size - tag_bytes, SEEK_SET); in ff_ape_parse_tag() 171 tag_start = file_size - tag_bytes; in ff_ape_parse_tag()
|
D | kvag.c | 179 int64_t file_size, data_size; in kvag_write_trailer() local 181 file_size = avio_tell(s->pb); in kvag_write_trailer() 182 data_size = file_size - KVAG_HEADER_SIZE; in kvag_write_trailer() 186 avio_seek(s->pb, file_size, SEEK_SET); in kvag_write_trailer() 190 file_size); in kvag_write_trailer()
|
D | aiffenc.c | 239 int64_t file_size, end_size; in aiff_write_trailer() local 240 end_size = file_size = avio_tell(pb); in aiff_write_trailer() 241 if (file_size & 1) { in aiff_write_trailer() 249 avio_wb32(pb, (file_size - aiff->ssnd - 12) / par->block_align); in aiff_write_trailer() 253 avio_wb32(pb, file_size - aiff->ssnd - 4); in aiff_write_trailer() 264 file_size = avio_tell(pb); in aiff_write_trailer() 266 avio_wb32(pb, file_size - aiff->form - 4); in aiff_write_trailer()
|
/third_party/ltp/testcases/kernel/syscalls/splice/ |
D | splice02.c | 41 static int file_size; variable 46 if (tst_parse_int(sarg, &file_size, 1, INT_MAX)) in setup() 76 if (st.st_size != file_size) { in do_child() 78 st.st_size, file_size); in do_child() 125 if (!file_size) { in run() 127 file_size = max_pipe_size << 4; in run() 130 to_write = file_size; in run() 135 tst_res(TINFO, "writting %d bytes", file_size); in run() 141 buf[i] = get_letter(file_size - to_write + i); in run()
|
/third_party/ltp/testcases/kernel/fs/fsx-linux/ |
D | fsx-linux.c | 101 off_t file_size = 0; variable 316 save_buffer(good_buf, file_size, fsxgoodfd); in report_failure() 483 if (file_size != statbuf.st_size || file_size != size_by_seek) { in check_size() 485 (unsigned long long)file_size, in check_size() 600 if (size + offset > file_size) { in doread() 655 if (size + offset > file_size) { in domapread() 734 log4(OP_WRITE, offset, size, file_size, &t); in dowrite() 737 if (file_size < offset + size) { in dowrite() 738 if (file_size < offset) in dowrite() 739 memset(good_buf + file_size, '\0', offset - file_size); in dowrite() [all …]
|
/third_party/node/deps/v8/tools/ |
D | shell-utils.h | 49 int file_size = static_cast<int>(ftell(file)); in ReadFileAndRepeat() local 52 *size = file_size * repeat; in ReadFileAndRepeat() 55 for (int i = 0; i < file_size;) { in ReadFileAndRepeat() 56 int read = static_cast<int>(fread(&chars[i], 1, file_size - i, file)); in ReadFileAndRepeat() 61 for (int i = file_size; i < *size; i++) { in ReadFileAndRepeat() 62 chars[i] = chars[i - file_size]; in ReadFileAndRepeat()
|
/third_party/skia/third_party/externals/libwebp/imageio/ |
D | imageio_util.c | 75 size_t file_size; in ImgIoUtilReadFile() local 91 file_size = ftell(in); in ImgIoUtilReadFile() 94 file_data = (uint8_t*)WebPMalloc(file_size + 1); in ImgIoUtilReadFile() 101 ok = (fread(file_data, file_size, 1, in) == 1); in ImgIoUtilReadFile() 106 (int)file_size, (const W_CHAR*)file_name); in ImgIoUtilReadFile() 110 file_data[file_size] = '\0'; // convenient 0-terminator in ImgIoUtilReadFile() 112 *data_size = file_size; in ImgIoUtilReadFile()
|
/third_party/skia/third_party/externals/tint/fuzzers/ |
D | tint_black_box_fuzz_target.cc | 65 const auto file_size = static_cast<size_t>(tell_file_size); in ReadFile() local 66 if (0 != (file_size % sizeof(T))) { in ReadFile() 69 << file_size << " bytes in the file, require " << sizeof(T) in ReadFile() 77 buffer->resize(file_size / sizeof(T)); in ReadFile() 79 size_t bytes_read = fread(buffer->data(), 1, file_size, file); in ReadFile() 81 if (bytes_read != file_size) { in ReadFile()
|
/third_party/mesa3d/src/microsoft/spirv_to_dxil/ |
D | spirv2dxil.c | 121 size_t file_size; in main() local 122 char *file_contents = os_read_file(filename, &file_size); in main() 128 if (file_size % WORD_SIZE != 0) { in main() 130 file_size, WORD_SIZE); in main() 134 size_t word_count = file_size / WORD_SIZE; in main()
|
/third_party/ltp/testcases/kernel/mem/mtest06/ |
D | mmap1.c | 43 static int file_size = 1024; variable 103 (size_t) file_size, PROT_WRITE | PROT_READ, in map_write_unmap() 107 for (j = 0; j < file_size; j++) in map_write_unmap() 112 SAFE_MUNMAP(tmp, file_size); in map_write_unmap() 130 for (j = 0; j < file_size; j++) { in read_mem() 229 int fd = mkfile(file_size); in run()
|
/third_party/selinux/secilc/ |
D | secil2conf.c | 69 uint32_t file_size; in main() local 152 file_size = filedata.st_size; in main() 154 buffer = malloc(file_size); in main() 155 rc = fread(buffer, file_size, 1, file); in main() 163 rc = cil_add_file(db, argv[i], buffer, file_size); in main()
|
D | secil2tree.c | 73 uint32_t file_size; in main() local 158 file_size = filedata.st_size; in main() 160 buffer = malloc(file_size); in main() 161 rc = fread(buffer, file_size, 1, file); in main() 169 rc = cil_add_file(db, argv[i], buffer, file_size); in main()
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_suspend/ |
D | 9-1.c | 77 int file_size = num_aiocbs * buf_size; in do_test() local 79 bufs = malloc(file_size); in do_test() 86 ret = write(fd, bufs, file_size); in do_test() 87 if (ret != file_size) { in do_test() 93 ret, file_size); in do_test()
|
/third_party/skia/third_party/externals/sfntly/cpp/src/sample/chromium/ |
D | chrome_subsetter.cc | 54 size_t file_size = ftell(input_file); in LoadFile() local 56 input_buffer->resize(file_size); in LoadFile() 57 size_t bytes_read = fread(&((*input_buffer)[0]), 1, file_size, input_file); in LoadFile() 59 return bytes_read == file_size; in LoadFile()
|
/third_party/fsverity-utils/lib/ |
D | compute_digest.c | 104 u64 file_size, struct hash_ctx *hash, in compute_root_hash() argument 122 if (file_size == 0) { in compute_root_hash() 135 blocks = DIV_ROUND_UP(file_size, block_size); in compute_root_hash() 183 for (offset = 0; offset < file_size; offset += block_size) { in compute_root_hash() 184 buffers[-1].filled = min(block_size, file_size - offset); in compute_root_hash() 302 desc.data_size = cpu_to_le64(params->file_size); in libfsverity_compute_digest() 308 err = compute_root_hash(fd, read_fn, params->file_size, hash, in libfsverity_compute_digest()
|
/third_party/skia/third_party/externals/sfntly/cpp/src/test/ |
D | test_font_utils.cc | 75 size_t file_size = ftell(input_file); in LoadFile() local 77 input_buffer->resize(file_size); in LoadFile() 78 size_t bytes_read = fread(&((*input_buffer)[0]), 1, file_size, input_file); in LoadFile() 79 EXPECT_EQ(bytes_read, file_size); in LoadFile()
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/munmap/ |
D | 9-1.c | 33 long file_size; in main() local 46 file_size = 2 * page_size; in main() 61 if (ftruncate(fd, file_size) == -1) { in main()
|