/system/extras/ext4_utils/ |
H A D | ext4_jbd2.h | 19 #define EXT4_SINGLEDATA_TRANS_BLOCKS(sb) (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS) ? 27U : 8U) 23 #define EXT4_DATA_TRANS_BLOCKS(sb) (EXT4_SINGLEDATA_TRANS_BLOCKS(sb) + EXT4_XATTR_TRANS_BLOCKS - 2 + EXT4_MAXQUOTAS_TRANS_BLOCKS(sb)) 25 #define EXT4_META_TRANS_BLOCKS(sb) (EXT4_XATTR_TRANS_BLOCKS + EXT4_MAXQUOTAS_TRANS_BLOCKS(sb)) 27 #define EXT4_DELETE_TRANS_BLOCKS(sb) (2 * EXT4_DATA_TRANS_BLOCKS(sb) + 64) 35 #define EXT4_QUOTA_TRANS_BLOCKS(sb) [all...] |
H A D | ext4_utils.c | 119 aux_info.sb = calloc(info.block_size, 1); 123 if (!aux_info.sb) 140 free(aux_info.sb); 148 struct ext4_super_block *sb = aux_info.sb; local 150 sb->s_inodes_count = info.inodes_per_group * aux_info.groups; 151 sb->s_blocks_count_lo = aux_info.len_blocks; 152 sb->s_r_blocks_count_lo = 0; 153 sb->s_free_blocks_count_lo = 0; 154 sb 266 ext4_parse_sb(struct ext4_super_block *sb) argument [all...] |
H A D | ext4fixup.c | 87 static void read_sb(int fd, struct ext4_super_block *sb) argument 95 ret = read(fd, sb, sizeof(*sb)); 98 if (ret != sizeof(*sb)) 103 static void write_sb(int fd, unsigned long long offset, struct ext4_super_block *sb) argument 115 ret = write(fd, sb, sizeof(*sb)); 118 if (ret != sizeof(*sb)) 156 struct ext4_super_block sb; local 186 read_sb(fd, &sb); 202 struct ext4_super_block sb; local 373 struct ext4_super_block sb; local 428 write_sb(fd, (unsigned long long)i * info.blocks_per_group * info.block_size + sb_offset, &sb); local [all...] |
H A D | ext2simg.c | 59 struct ext4_super_block sb; local 65 ret = read(fd, &sb, sizeof(sb)); 68 if (ret != sizeof(sb)) 71 ext4_parse_sb(&sb); 99 aux_info.sb->s_inodes_count - aux_info.sb->s_free_inodes_count, 100 aux_info.sb->s_inodes_count, 101 aux_info.sb->s_blocks_count_lo - aux_info.sb [all...] |
H A D | ext4.h | 362 #define test_opt(sb, opt) (EXT4_SB(sb)->s_mount_opt & EXT4_MOUNT_##opt) 453 #define EXT4_SB(sb) (sb) 471 #define EXT4_HAS_COMPAT_FEATURE(sb,mask) ((EXT4_SB(sb)->s_es->s_feature_compat & cpu_to_le32(mask)) != 0) 472 #define EXT4_HAS_RO_COMPAT_FEATURE(sb,mask) ((EXT4_SB(sb)->s_es->s_feature_ro_compat & cpu_to_le32(mask)) != 0) 473 #define EXT4_HAS_INCOMPAT_FEATURE(sb,mask) ((EXT4_SB(sb) [all...] |
/system/core/libpixelflinger/codeflinger/tinyutils/ |
H A D | SharedBuffer.cpp | 31 SharedBuffer* sb = static_cast<SharedBuffer *>(malloc(sizeof(SharedBuffer) + size)); local 32 if (sb) { 33 sb->mRefs = 1; 34 sb->mSize = size; 36 return sb; 52 SharedBuffer* sb = alloc(mSize); local 53 if (sb) { 54 memcpy(sb->data(), data(), size()); 57 return sb; 71 SharedBuffer* sb local 91 SharedBuffer* sb = alloc(new_size); local [all...] |
H A D | VectorImpl.cpp | 91 SharedBuffer* sb = SharedBuffer::sharedBuffer(mStorage)->attemptEdit(); local 92 if (sb == 0) { 93 sb = SharedBuffer::alloc(capacity() * mItemSize); 94 if (sb) { 95 _do_copy(sb->data(), mStorage, mCount); 97 mStorage = sb->data(); 252 SharedBuffer* sb = SharedBuffer::alloc(new_capacity * mItemSize); 253 if (sb) { 254 void* array = sb->data(); 267 const SharedBuffer* sb 296 SharedBuffer* sb = SharedBuffer::alloc(new_capacity * mItemSize); variable 345 SharedBuffer* sb = cur_sb->editResize(new_capacity * mItemSize); local 348 SharedBuffer* sb = SharedBuffer::alloc(new_capacity * mItemSize); local [all...] |
/system/core/libutils/ |
H A D | SharedBuffer.cpp | 29 SharedBuffer* sb = static_cast<SharedBuffer *>(malloc(sizeof(SharedBuffer) + size)); local 30 if (sb) { 31 sb->mRefs = 1; 32 sb->mSize = size; 34 return sb; 50 SharedBuffer* sb = alloc(mSize); local 51 if (sb) { 52 memcpy(sb->data(), data(), size()); 55 return sb; 69 SharedBuffer* sb local 89 SharedBuffer* sb = alloc(new_size); local [all...] |
H A D | VectorImpl.cpp | 88 SharedBuffer* sb = SharedBuffer::bufferFromData(mStorage)->attemptEdit(); local 89 if (sb == 0) { 90 sb = SharedBuffer::alloc(capacity() * mItemSize); 91 if (sb) { 92 _do_copy(sb->data(), mStorage, mCount); 94 mStorage = sb->data(); 334 SharedBuffer* sb = SharedBuffer::alloc(new_capacity * mItemSize); 335 if (sb) { 336 void* array = sb->data(); 359 const SharedBuffer* sb [all...] |
H A D | BasicHashtable.cpp | 84 SharedBuffer* sb = SharedBuffer::bufferFromData(mBuckets); local 85 if (sb->onlyOwner()) { 247 SharedBuffer* sb = SharedBuffer::alloc(bytes); local 248 LOG_ALWAYS_FATAL_IF(!sb, "Could not allocate %u bytes for hashtable with %u buckets.", 250 void* buckets = sb->data(); 259 SharedBuffer* sb = SharedBuffer::bufferFromData(buckets); local 260 if (sb->release(SharedBuffer::eKeepStorage) == 1) { 262 SharedBuffer::dealloc(sb);
|
/system/extras/tests/ext4/ |
H A D | corrupt_gdt_free_blocks.c | 19 struct ext4_super_block sb; local 39 if (read(fd, &sb, sizeof(sb)) != sizeof(sb)) { 44 if (sb.s_magic != 0xEF53) { 50 if ((sb.s_log_block_size != 1) && (sb.s_log_block_size != 2)) { 55 block_size = 1 << (10 + sb.s_log_block_size); 56 num_bgs = DIV_ROUND_UP(sb.s_blocks_count_lo, sb [all...] |
H A D | set_ext4_err_bit.c | 16 unsigned char sb[1024]; local 35 if (read(fd, sb, SB_SIZE) != SB_SIZE) { 40 if ((sb[EXT4_MAGIC_OFFSET] != 0x53) || (sb[EXT4_MAGIC_OFFSET+1] != 0xEF)) { 46 sb[EXT4_STATE_OFFSET] |= 0x2; 53 if (write(fd, sb, SB_SIZE) != SB_SIZE) {
|
/system/core/toolbox/ |
H A D | load_policy.c | 14 struct stat sb; local 30 if (fstat(fd, &sb) < 0) { 35 map = mmap(NULL, sb.st_size, PROT_READ, MAP_PRIVATE, fd, 0); 41 rc = security_load_policy(map, sb.st_size); 46 munmap(map, sb.st_size);
|
H A D | restorecon.c | 23 static int restore(const char *pathname, const struct stat *sb) argument 32 if (selabel_lookup(sehandle, &newcontext, pathname, sb->st_mode) < 0) { 122 struct stat sb; local 125 rc = lstat(argv[i], &sb); 131 restore(argv[i], &sb);
|
H A D | insmod.c | 16 struct stat sb; local 26 if (fstat(fd, &sb) < 0) 28 size = sb.st_size;
|
H A D | dynarray.c | 91 const char *sb = *(const char **)b; local 92 return strcmp(sa, sb);
|
/system/core/libcutils/ |
H A D | fs.c | 42 struct stat sb; local 43 if (TEMP_FAILURE_RETRY(lstat(path, &sb)) == -1) { 53 if (!S_ISDIR(sb.st_mode)) { 57 if (((sb.st_mode & ALL_PERMS) == mode) && (sb.st_uid == uid) && (sb.st_gid == gid)) { 156 struct stat sb; local 183 if (fstatat(fd, segment, &sb, AT_SYMLINK_NOFOLLOW) != 0) { 201 if (S_ISLNK(sb.st_mode)) { 206 if (!S_ISDIR(sb [all...] |
H A D | dir_hash.c | 42 struct stat sb; local 52 if (stat(path, &sb) != 0) { 56 if (S_ISLNK(sb.st_mode)) { 68 } else if (S_ISREG(sb.st_mode)) { 92 if (S_ISLNK(sb.st_mode) || S_ISREG(sb.st_mode)) { 101 " %d 0%o %d %d", (int) sb.st_size, sb.st_mode, 102 (int) sb.st_uid, (int) sb 175 struct stat sb; local [all...] |
/system/vold/ |
H A D | Loop.h | 30 static int lookupInfo(const char *loopDevice, struct asec_superblock *sb, unsigned int *nr_sec);
|
H A D | fstrim.c | 59 struct stat sb; local 81 if (stat(fstab->recs[i].mount_point, &sb) == -1) { 86 if (!S_ISDIR(sb.st_mode)) {
|
H A D | VolumeManager.cpp | 270 struct asec_superblock sb; local 271 memset(&sb, 0, sizeof(sb)); 284 sb.c_opts |= ASEC_SB_C_OPTS_EXT4; 292 sb.magic = ASEC_SB_MAGIC; 293 sb.ver = ASEC_SB_VER; 366 sb.c_cipher = ASEC_SB_C_CIPHER_TWOFISH; 376 sb.c_cipher = ASEC_SB_C_CIPHER_NONE; 406 if (write(sbfd, &sb, sizeof(sb)) ! 525 struct asec_superblock sb; local 588 struct asec_superblock sb; local 1066 struct asec_superblock sb; local [all...] |
/system/core/init/ |
H A D | property_service.c | 487 struct stat sb; local 505 if (fstat(fd, &sb) < 0) { 513 if (((sb.st_mode & (S_IRWXG | S_IRWXO)) != 0) 514 || (sb.st_uid != 0) 515 || (sb.st_gid != 0) 516 || (sb.st_nlink != 1)) { 518 entry->d_name, sb.st_uid, sb.st_gid, sb.st_nlink, sb [all...] |
H A D | util.c | 147 struct stat sb; local 155 if (fstat(fd, &sb) < 0) { 159 if ((sb.st_mode & (S_IWGRP | S_IWOTH)) != 0) { 499 struct stat sb; local 505 if (lstat(pathname, &sb) < 0) 507 if (selabel_lookup(sehandle, &secontext, pathname, sb.st_mode) < 0)
|
/system/core/fs_mgr/ |
H A D | fs_mgr_verity.c | 123 struct ext4_super_block sb; local 137 if (read(data_device, &sb, sizeof(sb)) != sizeof(sb)) { 143 ext4_parse_sb(&sb);
|
/system/extras/tests/bionic/libc/common/ |
H A D | bench_pthread.c | 84 uint64_t sb = *(const uint64_t*)b; local 85 if (sa < sb) 87 if (sa > sb)
|