Home
last modified time | relevance | path

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

123

/system/bt/osi/test/
Dwakelock_test.cc101 CHECK(lock_stat.st_size >= unlock_stat.st_size); in IsFileWakeLockAcquired()
104 mmap(nullptr, lock_stat.st_size, PROT_READ, MAP_PRIVATE, lock_fd, 0); in IsFileWakeLockAcquired()
106 void* unlock_file = mmap(nullptr, unlock_stat.st_size, PROT_READ, in IsFileWakeLockAcquired()
109 if (memcmp(lock_file, unlock_file, unlock_stat.st_size) == 0) { in IsFileWakeLockAcquired()
110 acquired = lock_stat.st_size > unlock_stat.st_size; in IsFileWakeLockAcquired()
117 munmap(lock_file, lock_stat.st_size); in IsFileWakeLockAcquired()
118 munmap(unlock_file, unlock_stat.st_size); in IsFileWakeLockAcquired()
/system/extras/pagecache/
Ddumpcache.c84 void* mapped_addr = mmap(NULL, sb->st_size, PROT_NONE, MAP_SHARED, fd, 0); in store_num_cached()
88 size_t num_file_pages = (sb->st_size + g_page_size - 1) / g_page_size; in store_num_cached()
90 ret = mincore(mapped_addr, sb->st_size, mincore_data); in store_num_cached()
98 struct file_info *info = get_file_info(fpath, sb->st_size); in store_num_cached()
103 munmap(mapped_addr, sb->st_size); in store_num_cached()
/system/sepolicy/tools/sepolicy-analyze/
Dutils.c41 map = mmap(NULL, sb.st_size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); in load_policy()
50 pf->len = sb.st_size; in load_policy()
64 munmap(map, sb.st_size); in load_policy()
/system/core/cpio/
Dmkbootfs.c251 tmp = (char*) malloc(s.st_size); in _archive()
252 if(tmp == 0) die("cannot allocate %d bytes", s.st_size); in _archive()
254 if(read(fd, tmp, s.st_size) != s.st_size) { in _archive()
255 die("cannot read %d bytes", s.st_size); in _archive()
258 _eject(&s, out, olen, tmp, s.st_size); in _archive()
/system/nvram/hal/
Dfake_nvram_storage.cpp95 if (data_file_stat.st_size > kMaxFileSize) { in LoadFile()
96 LOG(ERROR) << "Bad size for " << name << ":" << data_file_stat.st_size; in LoadFile()
100 if (!blob->Resize(data_file_stat.st_size)) { in LoadFile()
/system/sepolicy/tools/
Dsepolicy-check.c204 map = mmap(NULL, sb.st_size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); in load_policy()
214 pf->len = sb.st_size; in load_policy()
218 munmap(map, sb.st_size); in load_policy()
225 munmap(map, sb.st_size); in load_policy()
/system/core/fs_mgr/libsnapshot/
Dpower_test.cpp191 while (written < s.st_size) { in Create()
192 uint64_t remaining = s.st_size - written; in Create()
268 uint64_t s1_size = (s1.st_size + 4095) & ~uint64_t(4095); in SetupImages()
269 uint64_t s2_size = (s2.st_size + 4095) & ~uint64_t(4095); in SetupImages()
292 while (written < s1.st_size) { in SetupImages()
293 uint64_t remaining = s1.st_size - written; in SetupImages()
496 uint64_t canonical_size = s.st_size; in Check()
/system/core/fs_mgr/libvbmeta/
Dutility.cpp37 return sb.st_size; in GetFileSize()
/system/incremental_delivery/incfs/
Dpath.cpp128 if (::lstat(fdNameBuffer, &st) || st.st_size == 0) { in fromFd()
129 st.st_size = PATH_MAX; in fromFd()
131 auto bufSize = st.st_size; in fromFd()
/system/core/libcutils/
Dashmem-host.cpp95 return buf.st_size; in ashmem_get_size_region()
Dashmem-dev.cpp462 ALOGD("ashmem_get_size_region(%d): %d\n", fd, static_cast<int>(sb.st_size)); in ashmem_get_size_region()
465 return sb.st_size; in ashmem_get_size_region()
/system/core/libunwindstack/tests/
DSymbolsTest.cpp47 void InitSym(TypeParam* sym, uint32_t st_value, uint32_t st_size, uint32_t st_name) { in InitSym() argument
51 sym->st_size = st_size; in InitSym()
329 sym.st_size = 0x100; in TYPED_TEST_P()
347 sym.st_size = 0x100; in TYPED_TEST_P()
/system/core/adb/client/
Dincremental.cpp124 auto [signature_fd, signature] = read_and_encode_signature(st.st_size, file, silent); in start_install()
130 (long long)st.st_size, i, signature.c_str()); in start_install()
156 auto [fd, _] = read_signature(st.st_size, file, /*silent=*/true); in can_install()
Dcommandline.cpp896 static_cast<int64_t>(sb.st_size), SIDELOAD_HOST_BLOCK_SIZE); in adb_sideload_install()
908 if (sb.st_size > INT_MAX) { in adb_sideload_install()
912 return adb_sideload_legacy(filename, package_fd.get(), static_cast<int>(sb.st_size)); in adb_sideload_install()
932 static_cast<double>(xfer) / (sb.st_size ? sb.st_size : 1), in adb_sideload_install()
942 if (offset >= static_cast<int64_t>(sb.st_size)) { in adb_sideload_install()
946 block, offset, static_cast<int64_t>(sb.st_size)); in adb_sideload_install()
951 if ((offset + SIDELOAD_HOST_BLOCK_SIZE) > static_cast<int64_t>(sb.st_size)) { in adb_sideload_install()
952 to_write = sb.st_size - offset; in adb_sideload_install()
977 int percent = static_cast<int>(xfer * 47LL / (sb.st_size ? sb.st_size : 1)); in adb_sideload_install()
Dfile_sync_client.cpp492 st->st_size = msg.stat_v2.size; in FinishStat()
514 st->st_size = msg.stat_v1.size; in FinishStat()
634 uint64_t total_size = st.st_size; in SendLargeFile()
736 uint64_t total_size = st.st_size; in SendLargeFileLegacy()
1015 st->st_size = 0; in sync_stat_fallback()
1065 if (st.st_size < SYNC_DATA_MAX) { in sync_send()
1305 ci.size = st.st_size; in local_build_list()
1401 if (st.st_size == static_cast<off_t>(ci.size) && st.st_mtime == ci.time) { in copy_local_dir_remote()
1518 sc.SetExpectedTotalBytes(st.st_size); in do_sync_push()
1746 sc.SetExpectedTotalBytes(src_st.st_size); in do_sync_pull()
[all …]
/system/extras/ioshark/
Ddump_ioshark_filenames.c50 filename_cache_num_entries = st.st_size / in main()
/system/core/property_service/libpropertyinfoparser/
Dproperty_info_parser.cpp210 (fd_stat.st_size < static_cast<off_t>(sizeof(PropertyInfoArea)))) { in LoadPath()
215 auto mmap_size = fd_stat.st_size; in LoadPath()
/system/core/libprocessgroup/cgrouprc/
Dcgroup_file.cpp50 size_t file_size = sb.st_size; in LoadRcFile()
/system/core/libunwindstack/
DMemory.cpp261 if (offset >= static_cast<uint64_t>(buf.st_size)) { in Init()
267 if (aligned_offset > static_cast<uint64_t>(buf.st_size) || in Init()
268 offset > static_cast<uint64_t>(buf.st_size)) { in Init()
272 size_ = buf.st_size - aligned_offset; in Init()
DSymbols.cpp58 sym.st_size = 0; in ReadFuncInfo()
60 Info info{.addr = sym.st_value, .size = static_cast<uint32_t>(sym.st_size), .name = sym.st_name}; in ReadFuncInfo()
/system/sepolicy/tests/
Dsepol_wrap.cpp221 auto unmap = [=](void *ptr) { munmap(ptr, sb.st_size); }; in load_policy()
223 mmap(nullptr, sb.st_size, PROT_READ, MAP_PRIVATE, fileno(fp), 0), unmap); in load_policy()
235 pf.len = sb.st_size; in load_policy()
/system/extras/verity/fec/tests/
Dfec.py34 size = os.stat(image).st_size
/system/extras/kexec_tools/
Dkexecload.c33 return st.st_size; in get_file_size()
/system/security/identity/
DUtil.cpp64 data.resize(statbuf.st_size); in fileGetContents()
/system/core/libutils/
DTokenizer.cpp62 size_t length = size_t(stat.st_size); in open()

123