Home
last modified time | relevance | path

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

12345678910>>...21

/external/ltp/testcases/kernel/syscalls/madvise/
Dmadvise02.c103 if (mlock(file1, st.st_size) < 0) in tcases_filter()
158 file1 = SAFE_MMAP(0, st.st_size, PROT_READ, MAP_SHARED, fd, 0); in setup()
159 file2 = SAFE_MMAP(0, st.st_size, PROT_READ, MAP_SHARED, fd, 0); in setup()
160 file3 = SAFE_MMAP(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0); in setup()
166 ptr_addr = SAFE_MALLOC(st.st_size); in setup()
170 SAFE_MUNMAP(file2 + st.st_size - pagesize, pagesize); in setup()
186 TEST(madvise(*(tc->addr), st.st_size, tc->advice)); in advice_test()
204 SAFE_MUNMAP(file1, st.st_size); in cleanup()
205 SAFE_MUNMAP(file2, st.st_size - pagesize); in cleanup()
206 SAFE_MUNMAP(file3, st.st_size); in cleanup()
Dmadvise01.c87 sfile = SAFE_MMAP(NULL, st.st_size, in setup()
92 amem = SAFE_MMAP(NULL, st.st_size, in setup()
100 SAFE_MUNMAP(sfile, st.st_size); in cleanup()
101 SAFE_MUNMAP(amem, st.st_size); in cleanup()
109 TEST(madvise(*(tc->addr), st.st_size, tc->advice)); in verify_madvise()
/external/u-boot/tools/gdb/
Dgdbsend.c85 if ((image = (char *)malloc(ist.st_size)) == NULL) in main()
86 Perror("can't allocate %ld bytes for image", ist.st_size); in main()
88 if ((c = read(ifd, image, ist.st_size)) < 0) in main()
89 Perror("read of %d bytes from '%s' failed", ist.st_size, ifn); in main()
91 if (c != ist.st_size) in main()
92 Error("read of %ld bytes from '%s' failed (%d)", ist.st_size, ifn, c); in main()
105 remote_write_bytes(addr, image, ist.st_size); in main()
/external/elfutils/libdwfl/
Ddwfl_module_addrsym.c139 if (value + sym->st_size > state->min_label) in try_sym_value()
140 state->min_label = value + sym->st_size; in try_sym_value()
142 if (sym->st_size == 0 || state->addr - value < sym->st_size) in try_sym_value()
150 if (sym->st_size != 0) in try_sym_value()
179 else if (sym->st_size != 0 in try_sym_value()
181 && ((state->closest_sym->st_size > sym->st_size in try_sym_value()
184 || (state->closest_sym->st_size >= sym->st_size in try_sym_value()
/external/kernel-headers/original/uapi/asm-x86/asm/
Dstat.h18 unsigned long st_size; member
57 long long st_size; member
93 __kernel_long_t st_size; member
126 unsigned long st_size; member
131 unsigned int st_size; member
/external/ltp/testcases/kernel/syscalls/sendfile/
Dsendfile06.c76 TEST(sendfile(out_fd, in_fd, NULL, sb.st_size)); in do_sendfile()
85 if (TEST_RETURN != sb.st_size) { in do_sendfile()
88 "got: %ld", (int64_t) sb.st_size, TEST_RETURN); in do_sendfile()
90 } else if (after_pos != sb.st_size) { in do_sendfile()
95 (int64_t) sb.st_size, (int64_t) after_pos); in do_sendfile()
114 while (bytes_total_received < sb.st_size) { in do_child()
/external/u-boot/scripts/basic/
Dfixdep.c311 if (st.st_size == 0) { in do_config_file()
315 map = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0); in do_config_file()
322 parse_config_file(map, st.st_size); in do_config_file()
324 munmap(map, st.st_size); in do_config_file()
431 if (st.st_size == 0) { in print_deps()
436 map = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0); in print_deps()
443 parse_dep_file(map, st.st_size); in print_deps()
445 munmap(map, st.st_size); in print_deps()
/external/elfutils/lib/
Dcrc32_file.c52 size_t mapsize = st.st_size; in crc32_file()
67 if (st.st_size <= (off_t) mapsize) in crc32_file()
69 *resp = crc32 (crc, mapped, st.st_size); in crc32_file()
75 st.st_size -= mapsize; in crc32_file()
/external/u-boot/tools/
Dfit_common.c62 sbuf->st_size += size_inc; in mmap_fdt()
63 if (ftruncate(fd, sbuf->st_size)) { in mmap_fdt()
71 ptr = mmap(0, sbuf->st_size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); in mmap_fdt()
88 ret = fdt_open_into(ptr, ptr, sbuf->st_size); in mmap_fdt()
Dmkimage.c390 if ((unsigned)sbuf.st_size < tparams->header_size) { in main()
397 ptr = mmap(0, sbuf.st_size, PROT_READ, MAP_SHARED, ifd, 0); in main()
414 (void) munmap((void *)ptr, sbuf.st_size); in main()
436 params.file_size = sbuf.st_size + tparams->header_size; in main()
477 size = cpu_to_uimage (sbuf.st_size); in main()
577 params.file_size = sbuf.st_size; in main()
579 ptr = mmap(0, sbuf.st_size, PROT_READ|PROT_WRITE, MAP_SHARED, ifd, 0); in main()
603 (void) munmap((void *)ptr, sbuf.st_size); in main()
656 ptr = mmap(0, sbuf.st_size, PROT_READ, MAP_SHARED, dfd, 0); in copy_file()
671 if ((unsigned)sbuf.st_size < tparams->header_size) { in copy_file()
[all …]
Daisimage.c205 ais_img_size = WORD_ALIGN(sbuf.st_size) + MAX_CMD_BUFFER; in ais_alloc_buffer()
206 ptr = (uint32_t *)malloc(WORD_ALIGN(sbuf.st_size) + MAX_CMD_BUFFER); in ais_alloc_buffer()
240 ptr = mmap(0, sbuf.st_size, PROT_READ, MAP_SHARED, dfd, 0); in ais_copy_image()
243 *aisptr++ = sbuf.st_size; in ais_copy_image()
244 memcpy((void *)aisptr, ptr, sbuf.st_size); in ais_copy_image()
245 aisptr += WORD_ALIGN(sbuf.st_size) / sizeof(uint32_t); in ais_copy_image()
247 (void) munmap((void *)ptr, sbuf.st_size); in ais_copy_image()
Ddumpimage.c37 sbuf->st_size, &params); in dumpimage_extract_subimage()
147 if ((uint32_t)sbuf.st_size < tparams->header_size) { in main()
154 ptr = mmap(0, sbuf.st_size, PROT_READ, MAP_SHARED, ifd, 0); in main()
183 (void)munmap((void *)ptr, sbuf.st_size); in main()
/external/cn-cbor/test/
Dtest.c29 unsigned char* text=malloc(st.st_size+1); // this is not going to be freed in load_file()
30 if (st.st_size!=read(fd, text, st.st_size)) { in load_file()
36 text[st.st_size]='\0'; in load_file()
37 *end = text + st.st_size; in load_file()
/external/libjpeg-turbo/md5/
Dmd5hl.c101 if (ofs > stbuf.st_size) in MD5FileChunk()
102 ofs = stbuf.st_size; in MD5FileChunk()
103 if ((len == 0) || (len > stbuf.st_size - ofs)) in MD5FileChunk()
104 len = stbuf.st_size - ofs; in MD5FileChunk()
/external/vixl/examples/aarch32/
Ddisasm-a32.cc158 Symbol(symname, sym.st_value, 0, sym.st_size, sym.st_shndx)); in visit()
179 sym.st_size, in visit()
186 sym.st_size, in visit()
237 mmap(0, sb.st_size, PROT_READ, MAP_PRIVATE, elf_in, 0))) != in main()
245 munmap(base_addr, sb.st_size); in main()
251 munmap(base_addr, sb.st_size); in main()
310 munmap(base_addr, sb.st_size); in main()
/external/u-boot/include/linux/
Dstat.h55 off_t st_size; /* file size in # of bytes */ member
83 unsigned long st_size; member
110 off_t st_size; member
139 unsigned long st_size; member
/external/kernel-headers/original/uapi/asm-arm/asm/
Dstat.h13 unsigned long st_size; member
39 unsigned long st_size; member
72 long long st_size; member
/external/puffin/scripts/
Dmeasure_patch_size.py98 os.stat(src).st_size, os.stat(tgt).st_size,
99 os.stat(bsdiff_patch.name).st_size,
100 os.stat(puffdiff_patch.name).st_size)
/external/vboot_reference/futility/
Dmisc.c248 ioctl(fd, BLKGETSIZE64, &sb.st_size); in futil_map_file()
252 if (sb.st_size < 0 || sb.st_size > UINT32_MAX) { in futil_map_file()
256 reasonable_len = (uint32_t)sb.st_size; in futil_map_file()
259 mmap_ptr = mmap(0, sb.st_size, in futil_map_file()
262 mmap_ptr = mmap(0, sb.st_size, in futil_map_file()
/external/toybox/toys/posix/
Dcpio.c234 && st.st_size && (fd = open(name, O_RDONLY))<0)) in cpio_main()
240 if (!S_ISREG(st.st_mode) && !S_ISLNK(st.st_mode)) st.st_size = 0; in cpio_main()
241 if (st.st_size >> 32) perror_msg("skipping >2G file '%s'", name); in cpio_main()
246 (int)st.st_mtime, (int)st.st_size, dev_major(st.st_dev), in cpio_main()
257 llen = st.st_size; in cpio_main()
270 llen = st.st_size & 3; in cpio_main()
/external/kernel-headers/original/uapi/asm-mips/asm/
Dstat.h29 off_t st_size; member
67 long long st_size; member
108 off_t st_size; member
/external/toybox/toys/pending/
Dmore.c105 st.st_size = show_prompt = col = row = 0; in more_main()
117 if (st.st_size) in more_main()
119 (int) (100 * ( (double) ftell(fp) / (double) st.st_size)), in more_main()
120 (long long)st.st_size); in more_main()
/external/libpcap/testprogs/
Dfiltertest.c102 cp = malloc((u_int)buf.st_size + 1); in read_infile()
104 error("malloc(%d) for %s: %s", (u_int)buf.st_size + 1, in read_infile()
106 cc = read(fd, cp, (u_int)buf.st_size); in read_infile()
109 if (cc != buf.st_size) in read_infile()
110 error("short read %s (%d != %d)", fname, cc, (int)buf.st_size); in read_infile()
/external/google-breakpad/src/common/linux/
Dmemory_mapped_file.cc71 if (sys_fstat(fd, &st) == -1 || st.st_size < 0) { in Map()
74 if (sys_fstat64(fd, &st) == -1 || st.st_size < 0) { in Map()
81 size_t file_len = static_cast<size_t>(st.st_size); in Map()
/external/ltp/testcases/kernel/syscalls/pwrite/
Dpwrite04.c173 if (statbuf.st_size != K4) { in main()
175 statbuf.st_size); in main()
198 if (statbuf.st_size != K5) { in main()
200 statbuf.st_size); in main()

12345678910>>...21