/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 | 143 void read_sb(int fd, struct ext4_super_block *sb) argument 151 ret = read(fd, sb, sizeof(*sb)); 154 if (ret != sizeof(*sb)) 159 void write_sb(int fd, unsigned long long offset, struct ext4_super_block *sb) argument 167 ret = write(fd, sb, sizeof(*sb)); 170 if (ret != sizeof(*sb)) 189 write_sb(fd, 1024, aux_info.sb); 250 aux_info.sb 283 struct ext4_super_block *sb = aux_info.sb; local 410 ext4_queue_sb(u64 start_block, struct ext4_super_block *sb) argument 415 ext4_parse_sb_info(struct ext4_super_block *sb) argument 607 struct ext4_super_block sb; local [all...] |
/system/core/init/ |
H A D | util_test.cpp | 98 struct stat sb; local 101 EXPECT_EQ(0, fstat(fd, &sb)); 102 EXPECT_EQ((const unsigned int)(S_IRUSR | S_IWUSR), sb.st_mode & 0777);
|
H A D | util.cpp | 175 struct stat sb; local 176 if (fstat(fd, &sb) == -1) { 180 if ((sb.st_mode & (S_IWGRP | S_IWOTH)) != 0) { 267 struct stat sb; local 268 if (stat(filename, &sb) != -1) return 0;
|
/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/base/ |
H A D | file_test.cpp | 75 struct stat sb; local 76 ASSERT_EQ(0, stat(tf.path, &sb)); 77 ASSERT_EQ(0660U, static_cast<unsigned int>(sb.st_mode & ~S_IFMT)); 78 ASSERT_EQ(getuid(), sb.st_uid); 79 ASSERT_EQ(getgid(), sb.st_gid);
|
H A D | file.cpp | 55 struct stat sb; local 56 if (fstat(fd, &sb) != -1 && sb.st_size > 0) { 57 content->reserve(sb.st_size);
|
/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 | 439 struct stat sb; local 447 if (fstat(fd, &sb) < 0) { 452 text = mmap(NULL, sb.st_size, PROT_READ, MAP_PRIVATE, fd, 0); 453 end = text + sb.st_size;
|
/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/core/libcutils/ |
H A D | fs.c | 44 struct stat sb; local 46 if (TEMP_FAILURE_RETRY(lstat(path, &sb)) == -1) { 56 int type_ok = prepare_as_dir ? S_ISDIR(sb.st_mode) : S_ISREG(sb.st_mode); 62 int owner_match = ((sb.st_uid == uid) && (sb.st_gid == gid)); 63 int mode_match = ((sb.st_mode & ALL_PERMS) == mode); 71 path, uid, gid, sb.st_uid, sb.st_gid); 75 path, mode, (sb 193 struct stat sb; local [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/sepolicy/tests/ |
H A D | sepol_wrap.cpp | 118 struct stat sb; local 119 if (fstat(fileno(fp), &sb)) { 126 auto unmap = [=](void *ptr) { munmap(ptr, sb.st_size); }; 128 mmap(NULL, sb.st_size, PROT_READ, MAP_PRIVATE, fileno(fp), 0), unmap); 140 pf.len = sb.st_size;
|
/system/vold/ |
H A D | Loop.cpp | 341 int Loop::lookupInfo(const char *loopDevice, struct asec_superblock *sb, unsigned long *nr_sec) { argument 380 memcpy(sb, &buffer, sizeof(struct asec_superblock));
|
H A D | CommandListener.cpp | 703 struct stat sb; local 704 const int result = fstat(pid_fd.get(), &sb); 709 if (sb.st_uid != AID_SYSTEM) { 711 << ", actual=" << sb.st_uid;
|
/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/core/adb/ |
H A D | adb_utils.cpp | 77 struct stat sb; local 78 return stat(path.c_str(), &sb) != -1 && S_ISDIR(sb.st_mode); 122 struct stat sb; local 123 if (stat(path.c_str(), &sb) != -1 && S_ISDIR(sb.st_mode)) {
|
/system/core/libziparchive/ |
H A D | zip_archive_test.cc | 515 struct stat sb; local 516 ASSERT_EQ(0, fstat(fd, &sb)); 520 file_map.create(zip_path.c_str(), fd, 0/*offset*/, sb.st_size, true);
|
/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/ext4_utils/include/ext4_utils/ |
H A D | ext4_utils.h | 103 struct ext4_super_block *sb; member in struct:fs_aux_info 141 void read_sb(int fd, struct ext4_super_block *sb); 142 void write_sb(int fd, unsigned long long offset, struct ext4_super_block *sb); 150 void ext4_queue_sb(u64 start_block, struct ext4_super_block *sb); 155 void ext4_parse_sb_info(struct ext4_super_block *sb);
|
/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 315 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 | 264 struct stat sb; local 265 if (stat(context_file, &sb) < 0) { 270 if (sb.st_size == 0) {
|