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

/system/core/toolbox/
H A Dload_policy.c14 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 Dinsmod.c16 struct stat sb; local
26 if (fstat(fd, &sb) < 0)
28 size = sb.st_size;
H A Drestorecon.c23 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 Ddynarray.c91 const char *sb = *(const char **)b; local
92 return strcmp(sa, sb);
H A Ddd.c251 struct stat sb; local
253 if (fstat(io->fd, &sb)) {
259 if (S_ISCHR(sb.st_mode))
H A Dnewfs_msdos.c258 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 Dset_ext4_err_bit.c16 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 Dcorrupt_gdt_free_blocks.c19 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/core/libpixelflinger/tinyutils/
H A DSharedBuffer.cpp22 SharedBuffer* sb = static_cast<SharedBuffer *>(malloc(sizeof(SharedBuffer) + size)); local
23 if (sb) {
24 sb->mRefs = 1;
25 sb->mSize = size;
27 return sb;
43 SharedBuffer* sb = alloc(mSize); local
44 if (sb) {
45 memcpy(sb->data(), data(), size());
48 return sb;
62 SharedBuffer* sb local
82 SharedBuffer* sb = alloc(new_size); local
[all...]
H A DVectorImpl.cpp89 SharedBuffer* sb = SharedBuffer::sharedBuffer(mStorage)->attemptEdit(); local
90 if (sb == 0) {
91 sb = SharedBuffer::alloc(capacity() * mItemSize);
92 if (sb) {
93 _do_copy(sb->data(), mStorage, mCount);
95 mStorage = sb->data();
250 SharedBuffer* sb = SharedBuffer::alloc(new_capacity * mItemSize);
251 if (sb) {
252 void* array = sb->data();
265 const SharedBuffer* sb
294 SharedBuffer* sb = SharedBuffer::alloc(new_capacity * mItemSize); variable
[all...]
/system/core/libcutils/
H A Dfs.c35 struct stat sb; local
36 if (TEMP_FAILURE_RETRY(lstat(path, &sb)) == -1) {
46 if (!S_ISDIR(sb.st_mode)) {
50 if (((sb.st_mode & ALL_PERMS) == mode) && (sb.st_uid == uid) && (sb.st_gid == gid)) {
H A Ddir_hash.c42 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/libcorkscrew/
H A Dsymbol_table.c65 struct stat sb; local
66 if (fstat(fd, &sb)) {
70 size_t length = sb.st_size;
/system/extras/ext4_utils/
H A Dext2simg.c59 struct ext4_super_block sb; local
66 ret = read(fd, &sb, sizeof(sb));
69 if (ret != sizeof(sb))
72 ext4_parse_sb(&sb);
100 aux_info.sb->s_inodes_count - aux_info.sb->s_free_inodes_count,
101 aux_info.sb->s_inodes_count,
102 aux_info.sb->s_blocks_count_lo - aux_info.sb
[all...]
H A Dext4_utils.c118 aux_info.sb = calloc(info.block_size, 1);
122 if (!aux_info.sb)
138 free(aux_info.sb);
146 struct ext4_super_block *sb = aux_info.sb; local
148 sb->s_inodes_count = info.inodes_per_group * aux_info.groups;
149 sb->s_blocks_count_lo = aux_info.len_blocks;
150 sb->s_r_blocks_count_lo = 0;
151 sb->s_free_blocks_count_lo = 0;
152 sb
264 ext4_parse_sb(struct ext4_super_block *sb) argument
[all...]
H A Dext4_utils.h127 struct ext4_super_block *sb; member in struct:fs_aux_info
168 void ext4_parse_sb(struct ext4_super_block *sb);
H A Dext4fixup.c87 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
374 struct ext4_super_block sb; local
429 write_sb(fd, (unsigned long long)i * info.blocks_per_group * info.block_size + sb_offset, &sb); local
[all...]
/system/vold/
H A DLoop.cpp252 int Loop::lookupInfo(const char *loopDevice, struct asec_superblock *sb, unsigned int *nr_sec) { argument
290 memcpy(sb, &buffer, sizeof(struct asec_superblock));
H A DVolumeManager.cpp242 struct asec_superblock sb; local
243 memset(&sb, 0, sizeof(sb));
250 sb.c_opts |= ASEC_SB_C_OPTS_EXT4;
258 sb.magic = ASEC_SB_MAGIC;
259 sb.ver = ASEC_SB_VER;
328 sb.c_cipher = ASEC_SB_C_CIPHER_TWOFISH;
338 sb.c_cipher = ASEC_SB_C_CIPHER_NONE;
368 if (write(sbfd, &sb, sizeof(sb)) !
471 struct asec_superblock sb; local
524 struct asec_superblock sb; local
903 struct asec_superblock sb; local
[all...]
H A Dcryptfs.c90 struct ext4_super_block sb; local
103 if (read(fd, &sb, sizeof(sb)) != sizeof(sb)) {
110 block_size = 1024 << sb.s_log_block_size;
112 len = ( ((off64_t)sb.s_blocks_count_hi << 32) + sb.s_blocks_count_lo) * block_size;
/system/core/toolbox/cp/
H A Dutils.c138 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 Dutil.c190 struct stat sb; local
202 if (!stat(fn, &sb)) {
204 s = sb.st_mode & S_IFMT;
/system/extras/tests/bionic/libc/common/
H A Dbench_pthread.c84 uint64_t sb = *(const uint64_t*)b; local
85 if (sa < sb)
87 if (sa > sb)
/system/core/init/
H A Dutil.c154 struct stat sb; local
162 if (fstat(fd, &sb) < 0) {
166 if ((sb.st_mode & (S_IWGRP | S_IWOTH)) != 0) {
497 struct stat sb; local
503 if (lstat(pathname, &sb) < 0)
505 if (selabel_lookup(sehandle, &secontext, pathname, sb.st_mode) < 0)
/system/core/debuggerd/
H A Dtombstone.c647 struct stat sb; local
653 typecheck(mtime, sb.st_mtime);
664 if (!stat(path, &sb)) {
665 if (sb.st_mtime < mtime) {
667 mtime = sb.st_mtime;

Completed in 493 milliseconds