Searched refs:sb (Results 1 - 25 of 40) sorted by relevance

12

/system/extras/ext4_utils/
H A Dext4_sb.c21 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 Dext4_utils.c141 void read_sb(int fd, struct ext4_super_block *sb) argument
149 ret = read(fd, sb, sizeof(*sb));
152 if (ret != sizeof(*sb))
157 void write_sb(int fd, unsigned long long offset, struct ext4_super_block *sb) argument
165 ret = write(fd, sb, sizeof(*sb));
168 if (ret != sizeof(*sb))
187 write_sb(fd, 1024, aux_info.sb);
245 aux_info.sb
278 struct ext4_super_block *sb = aux_info.sb; local
401 ext4_queue_sb(u64 start_block, struct ext4_super_block *sb) argument
406 ext4_parse_sb_info(struct ext4_super_block *sb) argument
598 struct ext4_super_block sb; local
[all...]
H A Dext4_sb.h49 int ext4_parse_sb(struct ext4_super_block *sb, struct fs_info *info);
H A Dext4.h362 #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 Dext4_utils.h101 struct ext4_super_block *sb; member in struct:fs_aux_info
139 void read_sb(int fd, struct ext4_super_block *sb);
140 void write_sb(int fd, unsigned long long offset, struct ext4_super_block *sb);
148 void ext4_queue_sb(u64 start_block, struct ext4_super_block *sb);
153 void ext4_parse_sb_info(struct ext4_super_block *sb);
H A Dext4fixup.c120 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...]
/system/core/libutils/
H A DSharedBuffer.cpp35 SharedBuffer* sb = static_cast<SharedBuffer *>(malloc(sizeof(SharedBuffer) + size)); local
36 if (sb) {
37 // Should be std::atomic_init(&sb->mRefs, 1);
40 sb->mRefs.store(1, std::memory_order_relaxed);
41 sb->mSize = size;
43 return sb;
57 SharedBuffer* sb = alloc(mSize); local
58 if (sb) {
59 memcpy(sb->data(), data(), size());
62 return sb;
81 SharedBuffer* sb = alloc(newSize); local
101 SharedBuffer* sb = alloc(new_size); local
[all...]
H A DVectorImpl.cpp90 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 Dsquashfs_utils.c43 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/extras/tests/fstest/
H A Drecovery_test.cpp80 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
320 struct ext4_super_block sb; local
[all...]
/system/extras/f2fs_utils/
H A Df2fs_sparseblock.c33 static void dbg_print_raw_sb_info(struct f2fs_super_block *sb) argument
40 D_DISP_u32(sb, magic);
41 D_DISP_u32(sb, major_ver);
42 D_DISP_u32(sb, minor_ver);
43 D_DISP_u32(sb, log_sectorsize);
44 D_DISP_u32(sb, log_sectors_per_block);
46 D_DISP_u32(sb, log_blocksize);
47 D_DISP_u32(sb, log_blocks_per_seg);
48 D_DISP_u32(sb, segs_per_sec);
49 D_DISP_u32(sb, secs_per_zon
186 read_f2fs_sb(int fd, struct f2fs_super_block *sb) argument
205 struct f2fs_super_block sb; local
259 get_valid_checkpoint_info(int fd, struct f2fs_super_block *sb, struct f2fs_checkpoint **cp, struct f2fs_info *info) argument
381 struct f2fs_super_block *sb = NULL; local
[all...]
/system/bt/embdrv/sbc/decoder/srce/
H A Dbitalloc.c138 OI_UINT sb; local
145 for (sb = 0; sb < nrof_subbands; sb++) {
146 OI_INT bits = scale_factor[sb];
150 if ((bitneeds[sb] = bits) > 1) {
162 for (sb = 0; sb < nrof_subbands; sb++) {
163 OI_INT bits = scale_factor[sb];
349 OI_UINT sb; local
[all...]
H A Dreadsamplesjoint.inc71 OI_UINT sb;
75 sb = NROF_SUBBANDS;
85 } while (--sb);
89 sb = NROF_SUBBANDS;
109 } while (--sb);
/system/sepolicy/tools/sepolicy-analyze/
H A Dutils.c28 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/core/libcutils/
H A Dfs.c43 struct stat sb; local
45 if (TEMP_FAILURE_RETRY(lstat(path, &sb)) == -1) {
55 int type_ok = prepare_as_dir ? S_ISDIR(sb.st_mode) : S_ISREG(sb.st_mode);
61 int owner_match = ((sb.st_uid == uid) && (sb.st_gid == gid));
62 int mode_match = ((sb.st_mode & ALL_PERMS) == mode);
70 path, uid, gid, sb.st_uid, sb.st_gid);
74 path, mode, (sb
192 struct stat sb; local
[all...]
/system/extras/pagecache/
H A Ddumpcache.c74 static int store_num_cached(const char* fpath, const struct stat *sb) { argument
83 void* mapped_addr = mmap(NULL, sb->st_size, PROT_NONE, MAP_SHARED, fd, 0);
87 size_t num_file_pages = (sb->st_size + g_page_size - 1) / g_page_size;
89 int ret = mincore(mapped_addr, sb->st_size, mincore_data);
96 struct file_info *info = get_file_info(fpath, sb->st_size);
100 munmap(mapped_addr, sb->st_size);
107 static int scan_entry(const char *fpath, const struct stat *sb, int typeflag, struct FTW *ftwbuf) { argument
109 store_num_cached(fpath, sb);
/system/core/adb/
H A Dadb_utils.cpp74 struct stat sb; local
75 return lstat(path.c_str(), &sb) != -1 && S_ISDIR(sb.st_mode);
165 struct stat sb; local
166 if (stat(path.c_str(), &sb) != -1 && S_ISDIR(sb.st_mode)) {
/system/vold/
H A DLoop.h30 static int lookupInfo(const char *loopDevice, struct asec_superblock *sb, unsigned long *nr_sec);
H A DVolumeManager.cpp98 static int writeSuperBlock(const char* name, struct asec_superblock *sb, unsigned int numImgSectors) { argument
111 if (write(sbfd, sb, sizeof(struct asec_superblock)) != sizeof(struct asec_superblock)) {
517 struct stat sb; local
541 if (fstat(pidFd, &sb) != 0) {
545 if (sb.st_uid != uid) {
766 struct asec_superblock sb; local
767 memset(&sb, 0, sizeof(sb));
780 sb.c_opts |= ASEC_SB_C_OPTS_EXT4;
788 sb
986 struct asec_superblock sb; local
1129 struct asec_superblock sb; local
1194 struct asec_superblock sb; local
1577 struct stat sb; local
1669 struct asec_superblock sb; local
[all...]
H A DUtils.cpp433 struct statvfs sb; local
434 if (statvfs(path.c_str(), &sb) == 0) {
435 return (uint64_t)sb.f_bfree * sb.f_bsize;
634 struct stat sb; local
635 if (stat(path.c_str(), &sb)) {
639 return sb.st_dev;
/system/core/base/
H A Dfile_test.cpp57 struct stat sb; local
58 ASSERT_EQ(0, stat(tf.path, &sb));
59 ASSERT_EQ(0660U, static_cast<unsigned int>(sb.st_mode & ~S_IFMT));
60 ASSERT_EQ(getuid(), sb.st_uid);
61 ASSERT_EQ(getgid(), sb.st_gid);
/system/sepolicy/tools/
H A Dsepolicy-check.c190 struct stat sb; local
199 if (fstat(fd, &sb) < 0) {
204 map = mmap(NULL, sb.st_size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
214 pf->len = sb.st_size;
218 munmap(map, sb.st_size);
225 munmap(map, sb.st_size);
H A Dcheckfc.c253 struct stat sb; local
254 if (stat(context_file, &sb) < 0) {
259 if (sb.st_size == 0) {
/system/core/init/
H A Dproperty_service.cpp427 struct stat sb; local
428 if (fstat(fd, &sb) == -1) {
436 if (((sb.st_mode & (S_IRWXG | S_IRWXO)) != 0) || (sb.st_uid != 0) || (sb.st_gid != 0) ||
437 (sb.st_nlink != 1)) {
439 entry->d_name, (unsigned int)sb.st_uid, (unsigned int)sb.st_gid,
440 (unsigned int)sb.st_nlink, sb
[all...]
/system/extras/libfec/
H A Dfec_open.cpp254 ext4_super_block sb;
256 if (fec_pread(f, &sb, sizeof(sb), 1024) != sizeof(sb)) {
264 if (ext4_parse_sb(&sb, &info) != 0) {

Completed in 454 milliseconds

12