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

12

/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/vold/
H A Dfstrim.c59 struct stat sb; local
81 if (stat(fstab->recs[i].mount_point, &sb) == -1) {
86 if (!S_ISDIR(sb.st_mode)) {
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));
/system/core/libcutils/
H A Dfs.c36 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 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/libpixelflinger/codeflinger/tinyutils/
H A DSharedBuffer.cpp31 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 DVectorImpl.cpp91 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 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
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 Dext4_utils.c119 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 Dext4_utils.h137 struct ext4_super_block *sb; member in struct:fs_aux_info
179 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
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 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 Dproperty_service.c525 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 Dutil.c146 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 Dtombstone.c735 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;

Completed in 3984 milliseconds

12