Home
last modified time | relevance | path

Searched refs:st_size (Results 1 – 25 of 42) sorted by relevance

12

/tools/build/
Dfixdep.c138 if (st.st_size == 0) { in print_deps()
143 map = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0); in print_deps()
150 parse_dep_file(map, st.st_size); in print_deps()
152 munmap(map, st.st_size); in print_deps()
/tools/perf/util/
Dzlib.c39 ptr = mmap(NULL, stbuf.st_size, PROT_READ, MAP_PRIVATE, input_fd, 0); in gzip_decompress_to_file()
47 zs.avail_in = stbuf.st_size; in gzip_decompress_to_file()
76 munmap(ptr, stbuf.st_size); in gzip_decompress_to_file()
Ddata.c127 file->size = st.st_size; in perf_data__open_dir()
158 file->size = st.st_size; in perf_data__update_dir()
192 if (!stat(data->path, &st) && st.st_size) { in check_backup()
256 if (!st.st_size) { in open_file_read()
262 data->file.size = st.st_size; in open_file_read()
Dcopyfile.c104 if (st.st_size == 0) { /* /proc? do it slowly... */ in copyfile_mode_ns()
120 err = copyfile_offset(fromfd, 0, tofd, 0, st.st_size); in copyfile_mode_ns()
Dgenelf.c92 .st_size = 0,
99 .st_size = 0, /* for now */
384 symtab[1].st_size = csize; in jit_write_elf()
Dsrccode.c128 h->maplen = st.st_size; in find_srcfile()
/tools/testing/selftests/splice/
Dsplice_read.c39 if (statbuf.st_size > INT_MAX) { in main()
44 size = statbuf.st_size; in main()
/tools/bootconfig/
Dmain.c162 ret = load_xbc_fd(fd, buf, stat.st_size); in load_xbc_file()
187 if (stat.st_size < 8 + BOOTCONFIG_MAGIC_LEN) in load_xbc_from_initrd()
212 if (stat.st_size < size + 8 + BOOTCONFIG_MAGIC_LEN) { in load_xbc_from_initrd()
217 if (lseek(fd, stat.st_size - (size + 8 + BOOTCONFIG_MAGIC_LEN), in load_xbc_from_initrd()
307 if (ret == 0 && st.st_size <= XBC_DATA_MAX) { in show_xbc()
347 ret = ftruncate(fd, stat.st_size in delete_xbc()
426 total_size = stat.st_size + size + sizeof(u32) * 2 + BOOTCONFIG_MAGIC_LEN; in apply_xbc()
463 if (ftruncate(fd, stat.st_size) < 0) { in apply_xbc()
/tools/spi/
Dspidev_test.c347 tx = malloc(sb.st_size); in transfer_file()
351 rx = malloc(sb.st_size); in transfer_file()
355 bytes = read(tx_fd, tx, sb.st_size); in transfer_file()
356 if (bytes != sb.st_size) in transfer_file()
359 transfer(fd, tx, rx, sb.st_size); in transfer_file()
/tools/perf/pmu-events/
Djson.c62 *size = st.st_size; in mapfile()
64 (st.st_size + ps - 1) & ~(ps - 1), in mapfile()
/tools/testing/selftests/bpf/prog_tests/
Dksyms.c34 btf_size = st.st_size; in test_ksyms()
/tools/testing/selftests/memfd/
Dfuse_mnt.c37 st->st_size = strlen(memfd_content); in memfd_getattr()
Dmemfd_test.c151 } else if (st.st_size != size) { in mfd_assert_size()
153 (long long)st.st_size, (long long)size); in mfd_assert_size()
/tools/testing/selftests/powerpc/nx-gzip/
Dgzfht_test.c160 assert(NULL != (p = (char *) malloc(statbuf.st_size))); in read_alloc_input_file()
161 num_bytes = fread(p, 1, statbuf.st_size, fp); in read_alloc_input_file()
162 if (ferror(fp) || (num_bytes != statbuf.st_size)) { in read_alloc_input_file()
/tools/firmware/
Dihex2fw.c111 data = mmap(NULL, st.st_size, PROT_READ, MAP_SHARED, infd, 0); in main()
126 if (process_ihex(data, st.st_size)) in main()
/tools/include/nolibc/
Dnolibc.h263 off_t st_size; /* total size, in bytes */ member
471 long st_size; member
658 unsigned long st_size; member
852 unsigned long st_size; member
1039 long st_size; member
1245 long st_size; member
1437 long st_size; /* Size of file, in bytes. */ member
1716 buf->st_size = stat.st_size; in sys_stat()
/tools/vm/
Dpage_owner_sort.c111 max_size = st.st_size / 100; /* hack ... */ in main()
/tools/io_uring/
Dio_uring-cp.c54 *size = st.st_size; in get_file_size()
/tools/cgroup/
Diocost_coef_gen.py76 if os.path.isfile(path) and os.stat(path).st_size == size:
/tools/testing/selftests/net/
Dtls.c192 EXPECT_GE(sendfile(self->fd, filefd, 0, st.st_size), 0); in TEST_F()
206 buf = (char *)malloc(st.st_size); in TEST_F()
212 EXPECT_GE(sendfile(self->fd, filefd, 0, st.st_size), 0); in TEST_F()
213 EXPECT_EQ(recv(self->cfd, buf, st.st_size, MSG_WAITALL), st.st_size); in TEST_F()
/tools/bpf/
Dbpf_jit_disasm.c140 len = fi.st_size + 1; in get_flog_buff()
/tools/testing/selftests/filesystems/incfs/
Dutils.c220 return st.st_size; in get_file_size()
/tools/bpf/bpftool/
Dgen.c300 file_sz = st.st_size; in do_skeleton()
/tools/testing/selftests/powerpc/ptrace/
Dcore-pkey.c185 return buf.st_mtime >= info->core_time ? buf.st_size : TEST_FAIL; in try_core_file()
/tools/testing/selftests/exec/
Dexecveat.c147 sendfile(out_fd, in_fd, NULL, info.st_size); in exe_cp()

12