/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 | 16 struct stat sb; local 26 if (fstat(fd, &sb) < 0) 28 size = sb.st_size;
|
H A D | restorecon.c | 23 static int restore(const char *pathname, const struct stat *sb) argument 32 if (selabel_lookup(sehandle, &newcontext, pathname, sb->st_mode) < 0) { 122 struct stat sb; local 125 rc = lstat(argv[i], &sb); 131 restore(argv[i], &sb);
|
H A D | dynarray.c | 91 const char *sb = *(const char **)b; local 92 return strcmp(sa, sb);
|
H A D | dd.c | 251 struct stat sb; local 253 if (fstat(io->fd, &sb)) { 259 if (S_ISCHR(sb.st_mode))
|
H A D | newfs_msdos.c | 258 struct stat sb; local 383 if (fstat(fd, &sb)) 386 if (!S_ISREG(sb.st_mode)) 389 if (!S_ISCHR(sb.st_mode)) 393 check_mounted(fname, sb.st_mode); 505 if ((fd1 = open(bname, O_RDONLY)) == -1 || fstat(fd1, &sb)) 507 if (!S_ISREG(sb.st_mode) || sb.st_size % bpb.bps || 508 sb.st_size < bpb.bps || sb [all...] |
/system/extras/tests/ext4/ |
H A D | set_ext4_err_bit.c | 16 unsigned char sb[1024]; local 35 if (read(fd, sb, SB_SIZE) != SB_SIZE) { 40 if ((sb[EXT4_MAGIC_OFFSET] != 0x53) || (sb[EXT4_MAGIC_OFFSET+1] != 0xEF)) { 46 sb[EXT4_STATE_OFFSET] |= 0x2; 53 if (write(fd, sb, SB_SIZE) != SB_SIZE) {
|
H A D | corrupt_gdt_free_blocks.c | 19 struct ext4_super_block sb; local 39 if (read(fd, &sb, sizeof(sb)) != sizeof(sb)) { 44 if (sb.s_magic != 0xEF53) { 50 if ((sb.s_log_block_size != 1) && (sb.s_log_block_size != 2)) { 55 block_size = 1 << (10 + sb.s_log_block_size); 56 num_bgs = DIV_ROUND_UP(sb.s_blocks_count_lo, sb [all...] |
/system/vold/ |
H A D | fstrim.c | 59 struct stat sb; local 81 if (stat(fstab->recs[i].mount_point, &sb) == -1) { 86 if (!S_ISDIR(sb.st_mode)) {
|
H A D | Loop.cpp | 252 int Loop::lookupInfo(const char *loopDevice, struct asec_superblock *sb, unsigned int *nr_sec) { argument 290 memcpy(sb, &buffer, sizeof(struct asec_superblock));
|
/system/core/libcutils/ |
H A D | fs.c | 36 struct stat sb; local 37 if (TEMP_FAILURE_RETRY(lstat(path, &sb)) == -1) { 47 if (!S_ISDIR(sb.st_mode)) { 51 if (((sb.st_mode & ALL_PERMS) == mode) && (sb.st_uid == uid) && (sb.st_gid == gid)) {
|
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 175 struct stat sb; local [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...] |
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/libcorkscrew/ |
H A D | symbol_table.c | 65 struct stat sb; local 66 if (fstat(fd, &sb)) { 70 size_t length = sb.st_size;
|
/system/extras/ext4_utils/ |
H A D | ext2simg.c | 59 struct ext4_super_block sb; local 65 ret = read(fd, &sb, sizeof(sb)); 68 if (ret != sizeof(sb)) 71 ext4_parse_sb(&sb); 99 aux_info.sb->s_inodes_count - aux_info.sb->s_free_inodes_count, 100 aux_info.sb->s_inodes_count, 101 aux_info.sb->s_blocks_count_lo - aux_info.sb [all...] |
H A D | ext4_utils.c | 119 aux_info.sb = calloc(info.block_size, 1); 123 if (!aux_info.sb) 140 free(aux_info.sb); 148 struct ext4_super_block *sb = aux_info.sb; local 150 sb->s_inodes_count = info.inodes_per_group * aux_info.groups; 151 sb->s_blocks_count_lo = aux_info.len_blocks; 152 sb->s_r_blocks_count_lo = 0; 153 sb->s_free_blocks_count_lo = 0; 154 sb 266 ext4_parse_sb(struct ext4_super_block *sb) argument [all...] |
H A D | ext4_utils.h | 137 struct ext4_super_block *sb; member in struct:fs_aux_info 179 void ext4_parse_sb(struct ext4_super_block *sb);
|
H A D | ext4fixup.c | 87 static void read_sb(int fd, struct ext4_super_block *sb) argument 95 ret = read(fd, sb, sizeof(*sb)); 98 if (ret != sizeof(*sb)) 103 static void write_sb(int fd, unsigned long long offset, struct ext4_super_block *sb) argument 115 ret = write(fd, sb, sizeof(*sb)); 118 if (ret != sizeof(*sb)) 156 struct ext4_super_block sb; local 186 read_sb(fd, &sb); 202 struct ext4_super_block sb; local 373 struct ext4_super_block sb; local 428 write_sb(fd, (unsigned long long)i * info.blocks_per_group * info.block_size + sb_offset, &sb); local [all...] |
/system/core/toolbox/cp/ |
H A D | utils.c | 138 struct stat sb; local 153 lstat(to.p_path, &sb) : stat(to.p_path, &sb); 160 if (!(tolnk && S_ISLNK(sb.st_mode)))
|
/system/core/toolbox/grep/ |
H A D | util.c | 190 struct stat sb; local 202 if (!stat(fn, &sb)) { 204 s = sb.st_mode & S_IFMT;
|
/system/extras/tests/bionic/libc/common/ |
H A D | bench_pthread.c | 84 uint64_t sb = *(const uint64_t*)b; local 85 if (sa < sb) 87 if (sa > sb)
|
/system/core/init/ |
H A D | property_service.c | 525 struct stat sb; local 543 if (fstat(fd, &sb) < 0) { 551 if (((sb.st_mode & (S_IRWXG | S_IRWXO)) != 0) 552 || (sb.st_uid != 0) 553 || (sb.st_gid != 0) 554 || (sb.st_nlink != 1)) { 556 entry->d_name, sb.st_uid, sb.st_gid, sb.st_nlink, sb [all...] |
H A D | util.c | 146 struct stat sb; local 154 if (fstat(fd, &sb) < 0) { 158 if ((sb.st_mode & (S_IWGRP | S_IWOTH)) != 0) { 485 struct stat sb; local 491 if (lstat(pathname, &sb) < 0) 493 if (selabel_lookup(sehandle, &secontext, pathname, sb.st_mode) < 0)
|
/system/core/debuggerd/ |
H A D | tombstone.c | 735 struct stat sb; local 741 typecheck(mtime, sb.st_mtime); 752 if (!stat(path, &sb)) { 753 if (sb.st_mtime < mtime) { 755 mtime = sb.st_mtime;
|