Home
last modified time | relevance | path

Searched refs:sb (Results 1 – 25 of 69) sorted by relevance

123

/system/tools/hidl/docs/src/writer/elements/
DMethodElement.kt34 val sb = StringBuilder() in <lambda>() constant
35 declarationParser.prefix?.let { sb.append("${it} ") } in <lambda>()
36 sb.append("${declarationParser.name} (") in <lambda>()
38 sb.append(htmlEscape("${arg.type} ${arg.name}")) in <lambda>()
39 if (i < declarationParser.params.size-1) sb.append(", ") in <lambda>()
41 sb.append(")") in <lambda>()
43 sb.append("\ngenerates (") in <lambda>()
45 sb.append(htmlEscape("${arg.type} ${arg.name}")) in <lambda>()
46 if (i < declarationParser.returns.size-1) sb.append(", ") in <lambda>()
48 sb.append(")") in <lambda>()
[all …]
DCompoundElement.kt30 val sb = StringBuilder() in <lambda>() constant
31 sb.append("${declarationParser.type.value} ${declarationParser.name} {") in <lambda>()
34 sb.append("${typedef}${arg.type} ${arg.name}") in <lambda>()
35 if (i < declarationParser.members.size-1) sb.append("; ") in <lambda>()
37 sb.append("}") in <lambda>()
38 return sb.toString() in <lambda>()
43 val sb = StringBuilder() in <lambda>() constant
45 sb.append(""" in <lambda>()
54 sb.append(""" in <lambda>()
64 sb.append(""" in <lambda>()
[all …]
DAbstractElement.kt54 val sb = StringBuilder() in <lambda>() constant
56 sb.append(""" in <lambda>()
64 sb.append(""" in <lambda>()
74 sb.append(""" in <lambda>()
80 return sb.toString().trim() in <lambda>()
DEnumElement.kt34 val sb = StringBuilder() in <lambda>() constant
36 sb.append(""" in <lambda>()
46 sb.append(""" in <lambda>()
56 sb.append(""" in <lambda>()
62 return sb.toString().trim() in <lambda>()
/system/extras/ext4_utils/
Dext4_sb.cpp21 int ext4_parse_sb(struct ext4_super_block *sb, struct fs_info *info) in ext4_parse_sb() argument
25 if (sb->s_magic != EXT4_SUPER_MAGIC) in ext4_parse_sb()
28 info->block_size = 1024 << sb->s_log_block_size; in ext4_parse_sb()
29 info->blocks_per_group = sb->s_blocks_per_group; in ext4_parse_sb()
30 info->inodes_per_group = sb->s_inodes_per_group; in ext4_parse_sb()
31 info->inode_size = sb->s_inode_size; in ext4_parse_sb()
32 info->inodes = sb->s_inodes_count; in ext4_parse_sb()
33 info->feat_ro_compat = sb->s_feature_ro_compat; in ext4_parse_sb()
34 info->feat_compat = sb->s_feature_compat; in ext4_parse_sb()
35 info->feat_incompat = sb->s_feature_incompat; in ext4_parse_sb()
[all …]
Dext4_utils.cpp92 void read_sb(int fd, struct ext4_super_block *sb) in read_sb() argument
100 ret = read(fd, sb, sizeof(*sb)); in read_sb()
103 if (ret != sizeof(*sb)) in read_sb()
157 aux_info.sb = (struct ext4_super_block *)((char *)aux_info.sb_block + 1024); in ext4_create_fs_aux_info()
159 aux_info.sb = aux_info.sb_block; in ext4_create_fs_aux_info()
164 if (!aux_info.sb) in ext4_create_fs_aux_info()
186 void ext4_parse_sb_info(struct ext4_super_block *sb) in ext4_parse_sb_info() argument
188 if (sb->s_magic != EXT4_SUPER_MAGIC) in ext4_parse_sb_info()
191 if ((sb->s_state & EXT4_VALID_FS) != EXT4_VALID_FS) in ext4_parse_sb_info()
194 ext4_parse_sb(sb, &info); in ext4_parse_sb_info()
[all …]
/system/tools/hidl/docs/src/writer/files/
DInterfaceFileWriter.kt32 val sb = StringBuilder() in replaceVars() constant
34 sb.append("<section>\n") in replaceVars()
35 sb.append("<h2>Methods</h2>\n") in replaceVars()
36 sb.append(parser.methods.map { MethodElement(it).toHTML() }.joinToString("\n")) in replaceVars()
37 sb.append("\n</section>\n") in replaceVars()
39 sb.toString() in replaceVars()
57 val sb = StringBuilder() in buildDeclaration() constant
58 sb.append("interface ${parser.name}") in buildDeclaration()
60 sb.append(" extends ") in buildDeclaration()
61 if (parser.extendsVersion != null) sb.append("@${parser.extendsVersion}::") in buildDeclaration()
[all …]
DAbstractParserFileWriter.kt37 val sb = StringBuilder() in replaceVars() constant
43 sb.append("<section>\n") in replaceVars()
44 sb.append("<h2>Properties</h2>\n") in replaceVars()
46 sb.append(parser.typedefs.map { TypedefElement(it).toHTML() }.joinToString("\n")) in replaceVars()
48 sb.append(parser.enums.map { EnumElement(it).toHTML() }.joinToString("\n")) in replaceVars()
50 sb.append(parser.structs.map { CompoundElement(it).toHTML() }.joinToString("\n")) in replaceVars()
52 sb.append(parser.unions.map { CompoundElement(it).toHTML() }.joinToString("\n")) in replaceVars()
53 sb.append("\n</section>\n") in replaceVars()
55 sb.toString() in replaceVars()
DIndexFileWriter.kt73 val sb = StringBuilder() in <lambda>() constant
76 sb.append(buildEntryTable()) in <lambda>()
78 sb.toString() in <lambda>()
163 val sb = StringBuilder() in <lambda>() constant
166 sb.append("- title: $pkgName\n section:\n") in <lambda>()
169 sb.append(" - title: ${entry.baseName} @${entry.packageVersion}\n") in <lambda>()
170 sb.append(" path: ${tocFileRelPath}/${entry.relPath}\n") in <lambda>()
173 return sb.toString() in <lambda>()
/system/extras/squashfs_utils/
Dsquashfs_utils.c43 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/core/libutils/
DSharedBuffer.cpp37 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()
45 return sb; in alloc()
59 SharedBuffer* sb = alloc(mSize); in edit() local
60 if (sb) { in edit()
61 memcpy(sb->data(), data(), size()); in edit()
64 return sb; in edit()
83 SharedBuffer* sb = alloc(newSize); in editResize() local
[all …]
DVectorImpl.cpp88 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/tests/fstest/
Drecovery_test.cpp81 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/
Df2fs_sparseblock.c35 static void dbg_print_raw_sb_info(struct f2fs_super_block *sb) in dbg_print_raw_sb_info() argument
42 D_DISP_u32(sb, magic); in dbg_print_raw_sb_info()
43 D_DISP_u32(sb, major_ver); in dbg_print_raw_sb_info()
44 D_DISP_u32(sb, minor_ver); in dbg_print_raw_sb_info()
45 D_DISP_u32(sb, log_sectorsize); in dbg_print_raw_sb_info()
46 D_DISP_u32(sb, log_sectors_per_block); in dbg_print_raw_sb_info()
48 D_DISP_u32(sb, log_blocksize); in dbg_print_raw_sb_info()
49 D_DISP_u32(sb, log_blocks_per_seg); in dbg_print_raw_sb_info()
50 D_DISP_u32(sb, segs_per_sec); in dbg_print_raw_sb_info()
51 D_DISP_u32(sb, secs_per_zone); in dbg_print_raw_sb_info()
[all …]
/system/bt/embdrv/sbc/decoder/srce/
Dbitalloc.c135 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 …]
/system/tools/hidl/docs/src/writer/
Dformatutils.kt59 val sb = StringBuilder() in formatTextasHTML() constant
60 if (useParagraphs) sb.append("<p>") in formatTextasHTML()
63 sb.append(htmlEscape(string.trim()).replace(Regex("\\s*\n\n\\s*"), replaceText)) in formatTextasHTML()
64 if (useParagraphs) sb.append("</p>") in formatTextasHTML()
65 return sb.toString() in formatTextasHTML()
78 val sb = StringBuilder(summaryRegex.split(s)[0]) in getDescSummaryText() constant
79 if (sb[sb.length - 1] != '.') sb.append(".") // add period, if needed in getDescSummaryText()
80 formatTextasHTML(sb.toString()) in getDescSummaryText()
/system/libufdt/utils/src/
Dmkdtboimg.py101 sb = []
102 sb.append('{key:>20} = {value:d}'.format(key='dt_size',
104 sb.append('{key:>20} = {value:d}'.format(key='dt_offset',
106 sb.append('{key:>20} = {value:08x}'.format(key='id',
108 sb.append('{key:>20} = {value:08x}'.format(key='rev',
110 sb.append('{key:>20} = {value:08x}'.format(key='custom[0]',
112 sb.append('{key:>20} = {value:08x}'.format(key='custom[1]',
114 sb.append('{key:>20} = {value:08x}'.format(key='custom[2]',
116 sb.append('{key:>20} = {value:08x}'.format(key='custom[3]',
118 return '\n'.join(sb)
[all …]
/system/core/libcutils/
Dfs.cpp50 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 …]
/system/sepolicy/tools/sepolicy-analyze/
Dutils.c28 struct stat sb; in load_policy() local
37 if (fstat(fd, &sb) < 0) { in load_policy()
42 map = mmap(NULL, sb.st_size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); in load_policy()
52 pf->len = sb.st_size; in load_policy()
56 munmap(map, sb.st_size); in load_policy()
63 munmap(map, sb.st_size); in load_policy()
/system/extras/pagecache/
Ddumpcache.c75 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/core/init/
Dpersistent_properties.cpp78 struct stat sb; in LoadLegacyPersistentProperties() local
79 if (fstat(fd, &sb) == -1) { in LoadLegacyPersistentProperties()
86 if (((sb.st_mode & (S_IRWXG | S_IRWXO)) != 0) || sb.st_uid != 0 || sb.st_gid != 0 || in LoadLegacyPersistentProperties()
87 sb.st_nlink != 1) { in LoadLegacyPersistentProperties()
89 << " (uid=" << sb.st_uid << " gid=" << sb.st_gid << " nlink=" << sb.st_nlink in LoadLegacyPersistentProperties()
90 << " mode=" << std::oct << sb.st_mode << ")"; in LoadLegacyPersistentProperties()
/system/extras/ext4_utils/include/ext4_utils/
Dext4.h363 #define test_opt(sb, opt) (EXT4_SB(sb)->s_mount_opt & EXT4_MOUNT_##opt) argument
454 #define EXT4_SB(sb) (sb) argument
472 #define EXT4_HAS_COMPAT_FEATURE(sb,mask) ((EXT4_SB(sb)->s_es->s_feature_compat & cpu_to_le32(mask… argument
473 #define EXT4_HAS_RO_COMPAT_FEATURE(sb,mask) ((EXT4_SB(sb)->s_es->s_feature_ro_compat & cpu_to_le3… argument
474 #define EXT4_HAS_INCOMPAT_FEATURE(sb,mask) ((EXT4_SB(sb)->s_es->s_feature_incompat & cpu_to_le32(… argument
475 #define EXT4_SET_COMPAT_FEATURE(sb,mask) EXT4_SB(sb)->s_es->s_feature_compat |= cpu_to_le32(mask) argument
476 #define EXT4_SET_RO_COMPAT_FEATURE(sb,mask) EXT4_SB(sb)->s_es->s_feature_ro_compat |= cpu_to_le32… argument
477 #define EXT4_SET_INCOMPAT_FEATURE(sb,mask) EXT4_SB(sb)->s_es->s_feature_incompat |= cpu_to_le32(m… argument
478 #define EXT4_CLEAR_COMPAT_FEATURE(sb,mask) EXT4_SB(sb)->s_es->s_feature_compat &= ~cpu_to_le32(ma… argument
479 #define EXT4_CLEAR_RO_COMPAT_FEATURE(sb,mask) EXT4_SB(sb)->s_es->s_feature_ro_compat &= ~cpu_to_l… argument
[all …]
/system/timezone/tzlookup_generator/src/main/java/com/android/libcore/timezone/tzlookup/
DErrors.java64 StringBuilder sb = new StringBuilder(); in asString() local
66 sb.append(message); in asString()
67 sb.append("\n"); in asString()
69 return sb.toString(); in asString()
/system/core/adb/fastdeploy/deploypatchgenerator/src/com/android/fastdeploy/
DDeployPatchGenerator.java58 StringBuilder sb = null; in main() local
66 sb = new StringBuilder(); in main()
68 APKEntryToString(entry, sb); in main()
70 System.err.println(sb.toString()); in main()
76 sb = new StringBuilder(); in main()
78 APKEntryToString(entry, sb); in main()
80 System.err.println(sb.toString()); in main()
88 sb = new StringBuilder(); in main()
91 APKEntryToString(entry, sb); in main()
94 System.err.println(sb.toString()); in main()
/system/core/fs_mgr/
Dfs_mgr.cpp301 static bool read_ext4_superblock(const std::string& blk_device, struct ext4_super_block* sb, in read_ext4_superblock() argument
310 if (TEMP_FAILURE_RETRY(pread(fd, sb, sizeof(*sb), 1024)) != sizeof(*sb)) { in read_ext4_superblock()
315 if (!is_ext4_superblock_valid(sb)) { in read_ext4_superblock()
322 LINFO << "superblock s_max_mnt_count:" << sb->s_max_mnt_count << "," << blk_device; in read_ext4_superblock()
323 if (sb->s_max_mnt_count == 0xffff) { // -1 (int16) in ext2, but uint16 in ext4 in read_ext4_superblock()
334 ext4_super_block sb; in fs_mgr_is_ext4() local
335 if (TEMP_FAILURE_RETRY(pread(fd, &sb, sizeof(sb), 1024)) != sizeof(sb)) return false; in fs_mgr_is_ext4()
336 if (!is_ext4_superblock_valid(&sb)) return false; in fs_mgr_is_ext4()
356 const struct ext4_super_block* sb, int* fs_stat) { in tune_quota() argument
357 bool has_quota = (sb->s_feature_ro_compat & cpu_to_le32(EXT4_FEATURE_RO_COMPAT_QUOTA)) != 0; in tune_quota()
[all …]

123