/system/extras/ext4_utils/ |
D | ext4_sb.cpp | 21 int ext4_parse_sb(struct ext4_super_block* sb, struct fs_info* info) { in ext4_parse_sb() argument 24 if (sb->s_magic != EXT4_SUPER_MAGIC) return -EINVAL; in ext4_parse_sb() 26 info->block_size = 1024 << sb->s_log_block_size; in ext4_parse_sb() 27 info->blocks_per_group = sb->s_blocks_per_group; in ext4_parse_sb() 28 info->inodes_per_group = sb->s_inodes_per_group; in ext4_parse_sb() 29 info->inode_size = sb->s_inode_size; in ext4_parse_sb() 30 info->inodes = sb->s_inodes_count; in ext4_parse_sb() 31 info->feat_ro_compat = sb->s_feature_ro_compat; in ext4_parse_sb() 32 info->feat_compat = sb->s_feature_compat; in ext4_parse_sb() 33 info->feat_incompat = sb->s_feature_incompat; in ext4_parse_sb() [all …]
|
D | ext4_utils.cpp | 85 void read_sb(int fd, struct ext4_super_block* sb) { in read_sb() argument 91 ret = read(fd, sb, sizeof(*sb)); in read_sb() 93 if (ret != sizeof(*sb)) critical_error("failed to read all of superblock"); in read_sb() 142 aux_info.sb = (struct ext4_super_block*)((char*)aux_info.sb_block + 1024); in ext4_create_fs_aux_info() 144 aux_info.sb = aux_info.sb_block; in ext4_create_fs_aux_info() 149 if (!aux_info.sb) critical_error_errno("calloc"); in ext4_create_fs_aux_info() 168 void ext4_parse_sb_info(struct ext4_super_block* sb) { in ext4_parse_sb_info() argument 169 if (sb->s_magic != EXT4_SUPER_MAGIC) error("superblock magic incorrect"); in ext4_parse_sb_info() 171 if ((sb->s_state & EXT4_VALID_FS) != EXT4_VALID_FS) error("filesystem state not valid"); in ext4_parse_sb_info() 173 ext4_parse_sb(sb, &info); in ext4_parse_sb_info() [all …]
|
/system/core/libutils/ |
D | SharedBuffer.cpp | 37 SharedBuffer* sb = static_cast<SharedBuffer *>(malloc(sizeof(SharedBuffer) + size)); in alloc() local 38 if (sb) { in alloc() 42 sb->mRefs.store(1, std::memory_order_relaxed); in alloc() 43 sb->mSize = size; in alloc() 44 sb->mClientMetadata = 0; in alloc() 46 return sb; in alloc() 60 SharedBuffer* sb = alloc(mSize); in edit() local 61 if (sb) { in edit() 62 memcpy(sb->data(), data(), size()); in edit() 65 return sb; in edit() [all …]
|
D | VectorImpl.cpp | 88 const SharedBuffer* sb = SharedBuffer::bufferFromData(mStorage); in editArrayImpl() local 89 SharedBuffer* editable = sb->attemptEdit(); in editArrayImpl() 93 editable = SharedBuffer::alloc(sb->size()); in editArrayImpl() 344 SharedBuffer* sb = SharedBuffer::alloc(new_allocation_size); in setCapacity() local 345 if (sb) { in setCapacity() 346 void* array = sb->data(); in setCapacity() 369 const SharedBuffer* sb = SharedBuffer::bufferFromData(mStorage); in release_storage() local 370 if (sb->release(SharedBuffer::eKeepStorage) == 1) { in release_storage() 372 SharedBuffer::dealloc(sb); in release_storage() 416 SharedBuffer* sb = cur_sb->editResize(new_alloc_size); in _grow() local [all …]
|
/system/extras/squashfs_utils/ |
D | squashfs_utils.c | 43 const struct squashfs_super_block *sb = in squashfs_parse_sb_buffer() local 46 if (sb->s_magic != SQUASHFS_MAGIC) { in squashfs_parse_sb_buffer() 50 info->block_size = sb->block_size; in squashfs_parse_sb_buffer() 51 info->inodes = sb->inodes; in squashfs_parse_sb_buffer() 52 info->bytes_used = sb->bytes_used; in squashfs_parse_sb_buffer() 55 sb->bytes_used + (4096 - (sb->bytes_used & (4096 - 1))); in squashfs_parse_sb_buffer() 63 struct squashfs_super_block sb; in squashfs_parse_sb() local 72 if (TEMP_FAILURE_RETRY(read(data_device, &sb, sizeof(sb))) in squashfs_parse_sb() 73 != sizeof(sb)) { in squashfs_parse_sb() 79 if (squashfs_parse_sb_buffer(&sb, info) == -1) { in squashfs_parse_sb()
|
/system/extras/tests/fstest/ |
D | recovery_test.cpp | 81 bool getSuperBlock(const int blk_fd, struct ext4_super_block* sb) { in getSuperBlock() argument 87 if (read(blk_fd, sb, sizeof(*sb)) != sizeof(*sb)) { in getSuperBlock() 92 if (sb->s_magic != 0xEF53) { in getSuperBlock() 102 struct ext4_super_block sb; in setSbErrorBit() local 103 if (!getSuperBlock(blk_fd, &sb)) { in setSbErrorBit() 108 if (sb.s_state & 0x2) { in setSbErrorBit() 114 sb.s_state |= 0x2; in setSbErrorBit() 122 if (write(blk_fd, &sb, sizeof(sb)) != sizeof(sb)) { in setSbErrorBit() 132 struct ext4_super_block sb; in corruptGdtFreeBlock() local 133 if (!getSuperBlock(blk_fd, &sb)) { in corruptGdtFreeBlock() [all …]
|
/system/extras/f2fs_utils/ |
D | f2fs_sparseblock.c | 37 static void dbg_print_raw_sb_info(struct f2fs_super_block* sb) { in dbg_print_raw_sb_info() argument 43 D_DISP_u32(sb, magic); in dbg_print_raw_sb_info() 44 D_DISP_u32(sb, major_ver); in dbg_print_raw_sb_info() 45 D_DISP_u32(sb, minor_ver); in dbg_print_raw_sb_info() 46 D_DISP_u32(sb, log_sectorsize); in dbg_print_raw_sb_info() 47 D_DISP_u32(sb, log_sectors_per_block); in dbg_print_raw_sb_info() 49 D_DISP_u32(sb, log_blocksize); in dbg_print_raw_sb_info() 50 D_DISP_u32(sb, log_blocks_per_seg); in dbg_print_raw_sb_info() 51 D_DISP_u32(sb, segs_per_sec); in dbg_print_raw_sb_info() 52 D_DISP_u32(sb, secs_per_zone); in dbg_print_raw_sb_info() [all …]
|
/system/bt/embdrv/sbc/decoder/srce/ |
D | bitalloc.c | 135 OI_UINT sb; in computeBitneed() local 142 for (sb = 0; sb < nrof_subbands; sb++) { in computeBitneed() 143 OI_INT bits = scale_factor[sb]; in computeBitneed() 147 bitneeds[sb] = bits; in computeBitneed() 148 if (bitneeds[sb] > 1) { in computeBitneed() 160 for (sb = 0; sb < nrof_subbands; sb++) { in computeBitneed() 161 OI_INT bits = scale_factor[sb]; in computeBitneed() 167 bits -= offset[sb]; in computeBitneed() 173 bitneeds[sb] = bits; in computeBitneed() 174 if (bitneeds[sb] > 1) { in computeBitneed() [all …]
|
D | readsamplesjoint.inc | 72 OI_UINT sb; 76 sb = NROF_SUBBANDS; 86 } while (--sb); 90 sb = NROF_SUBBANDS; 110 } while (--sb);
|
/system/libufdt/utils/src/ |
D | mkdtboimg.py | 116 sb = [] 117 sb.append('{key:>20} = {value:d}'.format(key='dt_size', 119 sb.append('{key:>20} = {value:d}'.format(key='dt_offset', 121 sb.append('{key:>20} = {value:08x}'.format(key='id', 123 sb.append('{key:>20} = {value:08x}'.format(key='rev', 126 sb.append('{key:>20} = {value:08x}'.format(key='flags', 128 sb.append('{key:>20} = {value:08x}'.format(key='custom[0]', 130 sb.append('{key:>20} = {value:08x}'.format(key='custom[1]', 132 sb.append('{key:>20} = {value:08x}'.format(key='custom[2]', 135 sb.append('{key:>20} = {value:08x}'.format(key='custom[3]', [all …]
|
/system/core/libcutils/ |
D | fs.cpp | 50 struct stat sb; in fs_prepare_path_impl() local 52 if (TEMP_FAILURE_RETRY(lstat(path, &sb)) == -1) { in fs_prepare_path_impl() 62 type_ok = prepare_as_dir ? S_ISDIR(sb.st_mode) : S_ISREG(sb.st_mode); in fs_prepare_path_impl() 68 owner_match = ((sb.st_uid == uid) && (sb.st_gid == gid)); in fs_prepare_path_impl() 69 mode_match = ((sb.st_mode & ALL_PERMS) == mode); in fs_prepare_path_impl() 77 path, uid, gid, sb.st_uid, sb.st_gid); in fs_prepare_path_impl() 81 path, mode, (sb.st_mode & ALL_PERMS)); in fs_prepare_path_impl() 208 struct stat sb; in fs_mkdirs() local 223 if (fstatat(fd, segment, &sb, AT_SYMLINK_NOFOLLOW) != 0) { in fs_mkdirs() 241 if (S_ISLNK(sb.st_mode)) { in fs_mkdirs() [all …]
|
D | ashmem-dev.cpp | 461 struct stat sb; in ashmem_get_size_region() local 463 if (fstat(fd, &sb) == -1) { in ashmem_get_size_region() 469 ALOGD("ashmem_get_size_region(%d): %d\n", fd, static_cast<int>(sb.st_size)); in ashmem_get_size_region() 472 return sb.st_size; in ashmem_get_size_region()
|
/system/extras/pagecache/ |
D | dumpcache.c | 75 static int store_num_cached(const char* fpath, const struct stat *sb) { in store_num_cached() argument 84 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() 110 static int scan_entry(const char *fpath, const struct stat *sb, int typeflag, in scan_entry() argument 113 store_num_cached(fpath, sb); in scan_entry()
|
/system/sepolicy/tools/sepolicy-analyze/ |
D | utils.c | 28 struct stat sb; in load_policy() local 37 if (fstat(fd, &sb) < 0) { in load_policy() 41 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/fs_mgr/libvbmeta/ |
D | utility.cpp | 33 struct stat sb; in GetFileSize() local 34 if (fstat(fd, &sb) == -1) { in GetFileSize() 37 return sb.st_size; in GetFileSize()
|
/system/core/init/ |
D | persistent_properties.cpp | 79 struct stat sb; in LoadLegacyPersistentProperties() local 80 if (fstat(fd, &sb) == -1) { in LoadLegacyPersistentProperties() 87 if (((sb.st_mode & (S_IRWXG | S_IRWXO)) != 0) || sb.st_uid != 0 || sb.st_gid != 0 || in LoadLegacyPersistentProperties() 88 sb.st_nlink != 1) { in LoadLegacyPersistentProperties() 90 << " (uid=" << sb.st_uid << " gid=" << sb.st_gid << " nlink=" << sb.st_nlink in LoadLegacyPersistentProperties() 91 << " mode=" << std::oct << sb.st_mode << ")"; in LoadLegacyPersistentProperties()
|
D | mount_handler.cpp | 83 struct stat sb; in SetMountProperty() local 84 if (stat(queue.c_str(), &sb) || !S_ISDIR(sb.st_mode)) value = ""; in SetMountProperty() 85 if (stat(entry.mount_point.c_str(), &sb) || !S_ISDIR(sb.st_mode)) value = ""; in SetMountProperty()
|
/system/extras/ext4_utils/include/ext4_utils/ |
D | ext4.h | 396 #define test_opt(sb, opt) (EXT4_SB(sb)->s_mount_opt & EXT4_MOUNT_##opt) argument 487 #define EXT4_SB(sb) (sb) argument 505 #define EXT4_HAS_COMPAT_FEATURE(sb, mask) \ argument 506 ((EXT4_SB(sb)->s_es->s_feature_compat & cpu_to_le32(mask)) != 0) 507 #define EXT4_HAS_RO_COMPAT_FEATURE(sb, mask) \ argument 508 ((EXT4_SB(sb)->s_es->s_feature_ro_compat & cpu_to_le32(mask)) != 0) 509 #define EXT4_HAS_INCOMPAT_FEATURE(sb, mask) \ argument 510 ((EXT4_SB(sb)->s_es->s_feature_incompat & cpu_to_le32(mask)) != 0) 511 #define EXT4_SET_COMPAT_FEATURE(sb, mask) EXT4_SB(sb)->s_es->s_feature_compat |= cpu_to_le32(mask) argument 512 #define EXT4_SET_RO_COMPAT_FEATURE(sb, mask) \ argument [all …]
|
/system/core/fs_mgr/ |
D | fs_mgr.cpp | 306 static bool read_ext4_superblock(const std::string& blk_device, struct ext4_super_block* sb, in read_ext4_superblock() argument 315 if (TEMP_FAILURE_RETRY(pread(fd, sb, sizeof(*sb), 1024)) != sizeof(*sb)) { in read_ext4_superblock() 320 if (!is_ext4_superblock_valid(sb)) { in read_ext4_superblock() 327 LINFO << "superblock s_max_mnt_count:" << sb->s_max_mnt_count << "," << blk_device; in read_ext4_superblock() 328 if (sb->s_max_mnt_count == 0xffff) { // -1 (int16) in ext2, but uint16 in ext4 in read_ext4_superblock() 339 ext4_super_block sb; in fs_mgr_is_ext4() local 340 if (TEMP_FAILURE_RETRY(pread(fd, &sb, sizeof(sb), 1024)) != sizeof(sb)) return false; in fs_mgr_is_ext4() 341 if (!is_ext4_superblock_valid(&sb)) return false; in fs_mgr_is_ext4() 360 const struct ext4_super_block* sb, int* fs_stat) { in tune_quota() argument 361 bool has_quota = (sb->s_feature_ro_compat & cpu_to_le32(EXT4_FEATURE_RO_COMPAT_QUOTA)) != 0; in tune_quota() [all …]
|
/system/timezone/input_tools/android/common/src/main/java/com/android/libcore/timezone/util/ |
D | Errors.java | 79 StringBuilder sb = new StringBuilder(); in asString() local 81 sb.append(message); in asString() 82 sb.append("\n"); in asString() 84 return sb.toString(); in asString()
|
/system/core/libprocessgroup/cgrouprc/ |
D | cgroup_file.cpp | 37 struct stat sb; in LoadRcFile() local 45 if (fstat(fd, &sb) < 0) { in LoadRcFile() 50 size_t file_size = sb.st_size; in LoadRcFile()
|
/system/sepolicy/tools/ |
D | sepolicy-check.c | 190 struct stat sb; in load_policy() local 199 if (fstat(fd, &sb) < 0) { in load_policy() 204 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/gsid/ |
D | partition_installer.cpp | 121 struct statvfs sb; in PerformSanityChecks() local 122 if (statvfs(install_dir_.c_str(), &sb)) { in PerformSanityChecks() 129 uint64_t free_space = static_cast<uint64_t>(sb.f_bavail) * sb.f_frsize; in PerformSanityChecks() 130 uint64_t fs_size = static_cast<uint64_t>(sb.f_blocks) * sb.f_frsize; in PerformSanityChecks()
|
/system/core/fs_mgr/libfiemap/ |
D | fiemap_writer.cpp | 172 struct stat sb; in GetBlockDeviceForFile() local 173 if (stat(file_path.c_str(), &sb)) { in GetBlockDeviceForFile() 179 if (!BlockDeviceToName(major(sb.st_dev), minor(sb.st_dev), &bdev)) { in GetBlockDeviceForFile() 180 LOG(ERROR) << "Failed to get block device name for " << major(sb.st_dev) << ":" in GetBlockDeviceForFile() 181 << minor(sb.st_dev); in GetBlockDeviceForFile() 201 if (stat(bdev_path->c_str(), &sb)) { in GetBlockDeviceForFile() 206 if ((sb.st_mode & S_IFMT) != S_IFBLK) { in GetBlockDeviceForFile() 227 struct stat sb; in GetFileSize() local 228 if (stat(file_path.c_str(), &sb)) { in GetFileSize() 233 return sb.st_size; in GetFileSize()
|
/system/chre/build/sys_support/qcom/ |
D | uimage.lcs.toolv80 | 61 *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*) 145 *(.sbss.1 .sbss.1.* .gnu.linkonce.sb.1.*) 148 *(.sbss.2 .sbss.2.* .gnu.linkonce.sb.2.*) 151 *(.sbss.4 .sbss.4.* .gnu.linkonce.sb.4.*) 155 *(.sbss.8 .sbss.8.* .gnu.linkonce.sb.8.*) 166 *(.sbss.hot .sbss.hot.* .gnu.linkonce.sb.hot.*) 167 *(.sbss .sbss.* .gnu.linkonce.sb.*)
|