/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.h | 101 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 D | ext4_utils.c | 141 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...] |
/system/core/base/ |
H A D | file_test.cpp | 57 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/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/core/libutils/ |
H A D | SharedBuffer.cpp | 35 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 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/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);
|
H A D | neverallow.c | 442 struct stat sb; local 450 if (fstat(fd, &sb) < 0) { 455 text = mmap(NULL, sb.st_size, PROT_READ, MAP_PRIVATE, fd, 0); 456 end = text + sb.st_size;
|
/system/core/adb/ |
H A D | adb_utils.cpp | 74 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/core/libcutils/ |
H A D | fs.c | 43 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 D | dumpcache.c | 74 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/vold/ |
H A D | Loop.cpp | 301 int Loop::lookupInfo(const char *loopDevice, struct asec_superblock *sb, unsigned long *nr_sec) { argument 340 memcpy(sb, &buffer, sizeof(struct asec_superblock));
|
H A D | CommandListener.cpp | 700 struct stat sb; local 701 const int result = fstat(pid_fd.get(), &sb); 706 if (sb.st_uid != uid) { 707 LOG(ERROR) << "Mismatch UID expected=" << uid << ", actual=" << sb.st_uid;
|
/system/bt/embdrv/sbc/decoder/srce/ |
H A D | bitalloc.c | 138 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...] |
/system/core/toolbox/upstream-netbsd/bin/dd/ |
H A D | dd.c | 287 struct stat sb; local 289 if (io->ops->op_fstat(io->fd, &sb)) { 293 if (S_ISCHR(sb.st_mode))
|
/system/core/toolbox/upstream-netbsd/usr.bin/grep/ |
H A D | util.c | 191 struct stat sb; local 203 if (!stat(fn, &sb)) { 205 s = sb.st_mode & S_IFMT;
|
/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 320 struct ext4_super_block sb; local [all...] |
/system/sepolicy/tools/ |
H A D | sepolicy-check.c | 190 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 D | checkfc.c | 253 struct stat sb; local 254 if (stat(context_file, &sb) < 0) { 259 if (sb.st_size == 0) {
|
/system/core/init/ |
H A D | property_service.cpp | 427 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...] |
H A D | service.cpp | 338 struct stat sb; local 339 if (stat(args_[0].c_str(), &sb) == -1) {
|
H A D | util.cpp | 186 struct stat sb; local 187 if (fstat(fd, &sb) == -1) { 191 if ((sb.st_mode & (S_IWGRP | S_IWOTH)) != 0) {
|
/system/core/debuggerd/ |
H A D | tombstone.cpp | 648 struct stat sb; local 649 if (stat(path, &sb) == 0) { 650 if (oldest < 0 || sb.st_mtime < oldest_sb.st_mtime) { 652 oldest_sb.st_mtime = sb.st_mtime;
|
/system/core/fs_mgr/ |
H A D | fs_mgr.c | 395 struct ext4_super_block *sb; local 415 sb = (struct ext4_super_block *)super_buf; 416 if (sb->s_magic != EXT4_SUPER_MAGIC) { 421 if (!strncmp(label, sb->s_volume_name, label_len)) {
|