/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 if ((sb->s_state & EXT4_VALID_FS) != EXT4_VALID_FS) 31 info->block_size = 1024 << sb->s_log_block_size; 32 info->blocks_per_group = sb->s_blocks_per_group; 33 info->inodes_per_group = sb->s_inodes_per_group; 34 info->inode_size = sb->s_inode_size; 35 info->inodes = sb->s_inodes_count; 36 info->feat_ro_compat = sb->s_feature_ro_compat; 37 info->feat_compat = sb [all...] |
H A D | ext4_utils.c | 99 void read_sb(int fd, struct ext4_super_block *sb) argument 107 ret = read(fd, sb, sizeof(*sb)); 110 if (ret != sizeof(*sb)) 115 void write_sb(int fd, unsigned long long offset, struct ext4_super_block *sb) argument 123 ret = write(fd, sb, sizeof(*sb)); 126 if (ret != sizeof(*sb)) 165 aux_info.sb = calloc(info.block_size, 1); 169 if (!aux_info.sb) 194 struct ext4_super_block *sb = aux_info.sb; local 312 ext4_parse_sb_info(struct ext4_super_block *sb) argument 504 struct ext4_super_block sb; local [all...] |
H A D | ext4_sb.h | 46 int ext4_parse_sb(struct ext4_super_block *sb, struct fs_info *info);
|
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...] |
H A D | ext4fixup.c | 120 struct ext4_super_block sb; local 150 read_sb(fd, &sb); 153 sb.s_desc_size |= 1; 156 sb.s_desc_size &= ~1; 160 write_sb(fd, 1024, &sb); 267 struct ext4_super_block sb; local 272 read_sb(fd, &sb); 276 total_new_inodes = num_block_groups * (new_inodes_per_group - sb.s_inodes_per_group); 285 aux_info.bg_desc[i].bg_free_inodes_count += (new_inodes_per_group - sb.s_inodes_per_group); 291 if ((sb 327 &sb); local [all...] |
H A D | ext4_utils.h | 101 struct ext4_super_block *sb; member in struct:fs_aux_info 136 void read_sb(int fd, struct ext4_super_block *sb); 137 void write_sb(int fd, unsigned long long offset, struct ext4_super_block *sb); 150 void ext4_parse_sb_info(struct ext4_super_block *sb);
|
/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/core/toolbox/upstream-netbsd/bin/ln/ |
H A D | ln.c | 73 struct stat sb; local 131 if (hflag && lstat(sourcedir, &sb) == 0 && S_ISLNK(sb.st_mode)) { 138 if (stat(sourcedir, &sb)) { 142 if (!S_ISDIR(sb.st_mode)) { 155 struct stat sb; local 162 if (stat(target, &sb)) { 171 (!lstat(source, &sb) && S_ISDIR(sb.st_mode)) || 172 (!hflag && !stat(source, &sb) [all...] |
/system/extras/tests/fstest/ |
H A D | recovery_test.cpp | 80 bool getSuperBlock(const int blk_fd, struct ext4_super_block* sb) { argument 86 if (read(blk_fd, sb, sizeof(*sb)) != sizeof(*sb)) { 91 if (sb->s_magic != 0xEF53) { 101 struct ext4_super_block sb; local 102 if (!getSuperBlock(blk_fd, &sb)) { 107 if (sb.s_state & 0x2) { 113 sb.s_state |= 0x2; 121 if (write(blk_fd, &sb, sizeo 131 struct ext4_super_block sb; local 315 struct ext4_super_block sb; local [all...] |
/system/extras/f2fs_utils/ |
H A D | f2fs_sparseblock.c | 30 static void dbg_print_raw_sb_info(struct f2fs_super_block *sb) argument 37 D_DISP_u32(sb, magic); 38 D_DISP_u32(sb, major_ver); 39 D_DISP_u32(sb, minor_ver); 40 D_DISP_u32(sb, log_sectorsize); 41 D_DISP_u32(sb, log_sectors_per_block); 43 D_DISP_u32(sb, log_blocksize); 44 D_DISP_u32(sb, log_blocks_per_seg); 45 D_DISP_u32(sb, segs_per_sec); 46 D_DISP_u32(sb, secs_per_zon 183 read_f2fs_sb(int fd, struct f2fs_super_block *sb) argument 202 struct f2fs_super_block sb; local 256 get_valid_checkpoint_info(int fd, struct f2fs_super_block *sb, struct f2fs_checkpoint **cp, struct f2fs_info *info) argument 378 struct f2fs_super_block *sb = NULL; local [all...] |
/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 | insmod.c | 17 struct stat sb; local 27 if (fstat(fd, &sb) < 0) 29 size = sb.st_size;
|
H A D | dynarray.c | 91 const char *sb = *(const char **)b; local 92 return strcmp(sa, sb);
|
/system/core/toolbox/upstream-netbsd/bin/mv/ |
H A D | mv.c | 81 struct stat sb; local 116 if (stat(argv[argc - 1], &sb) || !S_ISDIR(sb.st_mode)) { 156 struct stat sb; local 182 } else if (stdin_ok && access(to, W_OK) && !stat(to, &sb)) { 187 strmode(sb.st_mode, modep); 190 user_from_uid(sb.st_uid, 0), 191 group_from_gid(sb.st_gid, 0), to); 235 if (!lstat(to, &sb)) { 236 if ((S_ISDIR(sb [all...] |
/system/core/libcutils/ |
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 176 struct stat sb; local [all...] |
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...] |
/system/core/toolbox/upstream-netbsd/bin/rm/ |
H A D | rm.c | 285 struct stat sb; local 295 if (lstat(f, &sb)) { 298 sb.st_mode = S_IFWHT|S_IWUSR|S_IRUSR; 315 if (S_ISDIR(sb.st_mode) && !dflag) { 320 if (!fflag && !S_ISWHT(sb.st_mode) && !check(f, f, &sb)) 323 if (S_ISWHT(sb.st_mode)) 325 else if (S_ISDIR(sb.st_mode)) 327 if (S_ISDIR(sb.st_mode)) 332 if (rm_overwrite(f, &sb)) 403 struct stat sb, sb2; 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 | 64 struct stat sb; local 87 if (stat(fstab->recs[i].mount_point, &sb) == -1) { 92 if (!S_ISDIR(sb.st_mode)) {
|
H A D | VolumeManager.cpp | 62 static int writeSuperBlock(const char* name, struct asec_superblock *sb, unsigned int numImgSectors) { argument 75 if (write(sbfd, sb, sizeof(struct asec_superblock)) != sizeof(struct asec_superblock)) { 392 struct asec_superblock sb; local 393 memset(&sb, 0, sizeof(sb)); 406 sb.c_opts |= ASEC_SB_C_OPTS_EXT4; 414 sb.magic = ASEC_SB_MAGIC; 415 sb.ver = ASEC_SB_VER; 484 sb.c_cipher = ASEC_SB_C_CIPHER_TWOFISH; 494 sb 617 struct asec_superblock sb; local 760 struct asec_superblock sb; local 823 struct asec_superblock sb; local 1302 struct asec_superblock sb; local [all...] |
/system/core/init/ |
H A D | property_service.c | 444 struct stat sb; local 462 if (fstat(fd, &sb) < 0) { 470 if (((sb.st_mode & (S_IRWXG | S_IRWXO)) != 0) 471 || (sb.st_uid != 0) 472 || (sb.st_gid != 0) 473 || (sb.st_nlink != 1)) { 475 entry->d_name, (unsigned int)sb.st_uid, (unsigned int)sb.st_gid, 476 sb.st_nlink, sb [all...] |