/system/extras/ext4_utils/ |
H A D | ext4_sb.c | 21 int ext4_parse_sb(struct ext4_super_block *sb, struct fs_info *info) argument 25 if (sb->s_magic != EXT4_SUPER_MAGIC) 28 info->block_size = 1024 << sb->s_log_block_size; 29 info->blocks_per_group = sb->s_blocks_per_group; 30 info->inodes_per_group = sb->s_inodes_per_group; 31 info->inode_size = sb->s_inode_size; 32 info->inodes = sb->s_inodes_count; 33 info->feat_ro_compat = sb->s_feature_ro_compat; 34 info->feat_compat = sb->s_feature_compat; 35 info->feat_incompat = sb [all...] |
H A D | ext4_utils.c | 92 void read_sb(int fd, struct ext4_super_block *sb) argument 100 ret = read(fd, sb, sizeof(*sb)); 103 if (ret != sizeof(*sb)) 156 aux_info.sb = (struct ext4_super_block *)((char *)aux_info.sb_block + 1024); 158 aux_info.sb = aux_info.sb_block; 163 if (!aux_info.sb) 185 void ext4_parse_sb_info(struct ext4_super_block *sb) argument 187 if (sb->s_magic != EXT4_SUPER_MAGIC) 190 if ((sb 269 struct ext4_super_block sb; local [all...] |
/system/tools/hidl/docs/src/writer/files/ |
H A D | InterfaceFileWriter.kt | 32 val sb = StringBuilder() 34 sb.append("<section>\n") 35 sb.append("<h2>Methods</h2>\n") 36 sb.append(parser.methods.map { MethodElement(it).toHTML() }.joinToString("\n")) 37 sb.append("\n</section>\n") 39 sb.toString() 57 val sb = StringBuilder() 58 sb.append("interface ${parser.name}") 60 sb.append(" extends ") 61 if (parser.extendsVersion != null) sb [all...] |
H A D | AbstractParserFileWriter.kt | 37 val sb = StringBuilder() 43 sb.append("<section>\n") 44 sb.append("<h2>Properties</h2>\n") 46 sb.append(parser.typedefs.map { TypedefElement(it).toHTML() }.joinToString("\n")) 48 sb.append(parser.enums.map { EnumElement(it).toHTML() }.joinToString("\n")) 50 sb.append(parser.structs.map { CompoundElement(it).toHTML() }.joinToString("\n")) 52 sb.append(parser.unions.map { CompoundElement(it).toHTML() }.joinToString("\n")) 53 sb.append("\n</section>\n") 55 sb.toString()
|
H A D | IndexFileWriter.kt | 73 val sb = StringBuilder() 76 sb.append(buildEntryTable()) 78 sb.toString() 163 val sb = StringBuilder() 166 sb.append("- title: $pkgName\n section:\n") 169 sb.append(" - title: ${entry.baseName} @${entry.packageVersion}\n") 170 sb.append(" path: ${tocFileRelPath}/${entry.relPath}\n") 173 return sb.toString()
|
/system/tools/hidl/docs/src/writer/elements/ |
H A D | CompoundElement.kt | 30 val sb = StringBuilder() 31 sb.append("${declarationParser.type.value} ${declarationParser.name} {") 34 sb.append("${typedef}${arg.type} ${arg.name}") 35 if (i < declarationParser.members.size-1) sb.append("; ") 37 sb.append("}") 38 return sb.toString() 43 val sb = StringBuilder() 45 sb.append(""" 54 sb.append(""" 64 sb [all...] |
H A D | MethodElement.kt | 34 val sb = StringBuilder() 35 declarationParser.prefix?.let { sb.append("${it} ") } 36 sb.append("${declarationParser.name} (") 38 sb.append(htmlEscape("${arg.type} ${arg.name}")) 39 if (i < declarationParser.params.size-1) sb.append(", ") 41 sb.append(")") 43 sb.append("\ngenerates (") 45 sb.append(htmlEscape("${arg.type} ${arg.name}")) 46 if (i < declarationParser.returns.size-1) sb.append(", ") 48 sb [all...] |
H A D | AbstractElement.kt | 54 val sb = StringBuilder() 56 sb.append(""" 64 sb.append(""" 74 sb.append(""" 80 return sb.toString().trim()
|
H A D | EnumElement.kt | 34 val sb = StringBuilder() 36 sb.append(""" 46 sb.append(""" 56 sb.append(""" 62 return sb.toString().trim()
|
/system/core/libutils/ |
H A D | SharedBuffer.cpp | 37 SharedBuffer* sb = static_cast<SharedBuffer *>(malloc(sizeof(SharedBuffer) + size)); local 38 if (sb) { 39 // Should be std::atomic_init(&sb->mRefs, 1); 42 sb->mRefs.store(1, std::memory_order_relaxed); 43 sb->mSize = size; 45 return sb; 59 SharedBuffer* sb = alloc(mSize); local 60 if (sb) { 61 memcpy(sb->data(), data(), size()); 64 return sb; 83 SharedBuffer* sb = alloc(newSize); local 103 SharedBuffer* sb = alloc(new_size); local [all...] |
H A D | VectorImpl.cpp | 90 const SharedBuffer* sb = SharedBuffer::bufferFromData(mStorage); local 91 SharedBuffer* editable = sb->attemptEdit(); 95 editable = SharedBuffer::alloc(sb->size()); 346 SharedBuffer* sb = SharedBuffer::alloc(new_allocation_size); 347 if (sb) { 348 void* array = sb->data(); 371 const SharedBuffer* sb = SharedBuffer::bufferFromData(mStorage); 372 if (sb->release(SharedBuffer::eKeepStorage) == 1) { 374 SharedBuffer::dealloc(sb); 417 SharedBuffer* sb [all...] |
/system/extras/squashfs_utils/ |
H A D | squashfs_utils.c | 43 const struct squashfs_super_block *sb = local 46 if (sb->s_magic != SQUASHFS_MAGIC) { 50 info->block_size = sb->block_size; 51 info->inodes = sb->inodes; 52 info->bytes_used = sb->bytes_used; 55 sb->bytes_used + (4096 - (sb->bytes_used & (4096 - 1))); 63 struct squashfs_super_block sb; local 72 if (TEMP_FAILURE_RETRY(read(data_device, &sb, sizeof(sb))) [all...] |
/system/tools/hidl/docs/src/writer/ |
H A D | formatutils.kt | 59 val sb = StringBuilder() 60 if (useParagraphs) sb.append("<p>") 63 sb.append(htmlEscape(string.trim()).replace(Regex("\\s*\n\n\\s*"), replaceText)) 64 if (useParagraphs) sb.append("</p>") 65 return sb.toString() 78 val sb = StringBuilder(summaryRegex.split(s)[0]) 79 if (sb[sb.length - 1] != '.') sb.append(".") // add period, if needed 80 formatTextasHTML(sb [all...] |
/system/extras/tests/fstest/ |
H A D | recovery_test.cpp | 79 bool getSuperBlock(const int blk_fd, struct ext4_super_block* sb) { argument 85 if (read(blk_fd, sb, sizeof(*sb)) != sizeof(*sb)) { 90 if (sb->s_magic != 0xEF53) { 100 struct ext4_super_block sb; local 101 if (!getSuperBlock(blk_fd, &sb)) { 106 if (sb.s_state & 0x2) { 112 sb.s_state |= 0x2; 120 if (write(blk_fd, &sb, sizeo 130 struct ext4_super_block sb; local 313 struct ext4_super_block sb; local [all...] |
/system/extras/f2fs_utils/ |
H A D | f2fs_sparseblock.c | 35 static void dbg_print_raw_sb_info(struct f2fs_super_block *sb) argument 42 D_DISP_u32(sb, magic); 43 D_DISP_u32(sb, major_ver); 44 D_DISP_u32(sb, minor_ver); 45 D_DISP_u32(sb, log_sectorsize); 46 D_DISP_u32(sb, log_sectors_per_block); 48 D_DISP_u32(sb, log_blocksize); 49 D_DISP_u32(sb, log_blocks_per_seg); 50 D_DISP_u32(sb, segs_per_sec); 51 D_DISP_u32(sb, secs_per_zon 189 read_f2fs_sb(int fd, struct f2fs_super_block *sb) argument 208 struct f2fs_super_block sb; local 262 get_valid_checkpoint_info(int fd, struct f2fs_super_block *sb, struct f2fs_checkpoint **cp, struct f2fs_info *info) argument 384 struct f2fs_super_block *sb = NULL; local [all...] |
/system/bt/embdrv/sbc/decoder/srce/ |
H A D | bitalloc.c | 135 OI_UINT sb; local 142 for (sb = 0; sb < nrof_subbands; sb++) { 143 OI_INT bits = scale_factor[sb]; 147 bitneeds[sb] = bits; 148 if (bitneeds[sb] > 1) { 160 for (sb = 0; sb < nrof_subbands; sb 337 OI_UINT sb; local [all...] |
/system/sepolicy/tools/sepolicy-analyze/ |
H A D | utils.c | 28 struct stat sb; local 37 if (fstat(fd, &sb) < 0) { 42 map = mmap(NULL, sb.st_size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); 52 pf->len = sb.st_size; 56 munmap(map, sb.st_size); 63 munmap(map, sb.st_size);
|
/system/timezone/tzlookup_generator/src/main/java/com/android/libcore/timezone/tzlookup/ |
H A D | Errors.java | 64 StringBuilder sb = new StringBuilder(); 66 sb.append(message); 67 sb.append("\n"); 69 return sb.toString();
|
/system/core/libcutils/ |
H A D | fs.cpp | 50 struct stat sb; local 52 if (TEMP_FAILURE_RETRY(lstat(path, &sb)) == -1) { 62 type_ok = prepare_as_dir ? S_ISDIR(sb.st_mode) : S_ISREG(sb.st_mode); 68 owner_match = ((sb.st_uid == uid) && (sb.st_gid == gid)); 69 mode_match = ((sb.st_mode & ALL_PERMS) == mode); 77 path, uid, gid, sb.st_uid, sb.st_gid); 81 path, mode, (sb 208 struct stat sb; local [all...] |
/system/libufdt/utils/src/ |
H A D | mkdtboimg.py | 91 sb = [] 92 sb.append('{key:>20} = {value:d}'.format(key='dt_size', 94 sb.append('{key:>20} = {value:d}'.format(key='dt_offset', 96 sb.append('{key:>20} = {value:08x}'.format(key='id', 98 sb.append('{key:>20} = {value:08x}'.format(key='rev', 100 sb.append('{key:>20} = {value:08x}'.format(key='custom[0]', 102 sb.append('{key:>20} = {value:08x}'.format(key='custom[1]', 104 sb.append('{key:>20} = {value:08x}'.format(key='custom[2]', 106 sb.append('{key:>20} = {value:08x}'.format(key='custom[3]', 108 return '\n'.join(sb) [all...] |
/system/extras/pagecache/ |
H A D | dumpcache.c | 75 static int store_num_cached(const char* fpath, const struct stat *sb) { argument 84 void* mapped_addr = mmap(NULL, sb->st_size, PROT_NONE, MAP_SHARED, fd, 0); 88 size_t num_file_pages = (sb->st_size + g_page_size - 1) / g_page_size; 90 ret = mincore(mapped_addr, sb->st_size, mincore_data); 98 struct file_info *info = get_file_info(fpath, sb->st_size); 103 munmap(mapped_addr, sb->st_size); 110 static int scan_entry(const char *fpath, const struct stat *sb, int typeflag, argument 113 store_num_cached(fpath, sb);
|
/system/core/init/ |
H A D | persistent_properties.cpp | 78 struct stat sb; local 79 if (fstat(fd, &sb) == -1) { 86 if (((sb.st_mode & (S_IRWXG | S_IRWXO)) != 0) || sb.st_uid != 0 || sb.st_gid != 0 || 87 sb.st_nlink != 1) { 89 << " (uid=" << sb.st_uid << " gid=" << sb.st_gid << " nlink=" << sb.st_nlink 90 << " mode=" << std::oct << sb [all...] |
/system/extras/ext4_utils/include/ext4_utils/ |
H A D | ext4_sb.h | 51 int ext4_parse_sb(struct ext4_super_block *sb, struct fs_info *info);
|
H A D | ext4.h | 363 #define test_opt(sb, opt) (EXT4_SB(sb)->s_mount_opt & EXT4_MOUNT_##opt) 454 #define EXT4_SB(sb) (sb) 472 #define EXT4_HAS_COMPAT_FEATURE(sb,mask) ((EXT4_SB(sb)->s_es->s_feature_compat & cpu_to_le32(mask)) != 0) 473 #define EXT4_HAS_RO_COMPAT_FEATURE(sb,mask) ((EXT4_SB(sb)->s_es->s_feature_ro_compat & cpu_to_le32(mask)) != 0) 474 #define EXT4_HAS_INCOMPAT_FEATURE(sb,mask) ((EXT4_SB(sb) [all...] |
/system/tools/hidl/docs/src/lexer/ |
H A D | HidlLexer.kt | 57 val sb = StringBuilder() 67 sb.append(matches[1]!!.value) 70 sb.appendln(line) 74 tokens += DocLexer.tokenize(sb.toString())
|