/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_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/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/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 | 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);
|
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...] |
/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...] |
/system/vold/ |
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 | Loop.cpp | 280 int Loop::lookupInfo(const char *loopDevice, struct asec_superblock *sb, unsigned int *nr_sec) { argument 318 memcpy(sb, &buffer, sizeof(struct asec_superblock));
|
/system/core/adb/ |
H A D | disable_verity_service.c | 51 struct ext4_super_block sb; local 68 if (adb_read(data_device, &sb, sizeof(sb)) != sizeof(sb)) { 74 ext4_parse_sb(&sb, &info);
|
/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 176 struct stat sb; local [all...] |
/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/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/fs_mgr/ |
H A D | fs_mgr_verity.c | 122 struct ext4_super_block sb; local 137 if (TEMP_FAILURE_RETRY(read(data_device, &sb, sizeof(sb))) != sizeof(sb)) { 143 ext4_parse_sb(&sb, &info);
|
/system/core/toolbox/upstream-netbsd/bin/cp/ |
H A D | utils.c | 132 struct stat sb; local 147 lstat(to.p_path, &sb) : stat(to.p_path, &sb); 154 if (!(tolnk && S_ISLNK(sb.st_mode)))
|
/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/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/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 315 struct ext4_super_block 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...] |
H A D | util.c | 155 struct stat sb; local 163 if (fstat(fd, &sb) < 0) { 167 if ((sb.st_mode & (S_IWGRP | S_IWOTH)) != 0) {
|