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

12

/system/extras/ext4_utils/
H A Dext4_jbd2.h19 #define EXT4_SINGLEDATA_TRANS_BLOCKS(sb) (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS) ? 27U : 8U)
23 #define EXT4_DATA_TRANS_BLOCKS(sb) (EXT4_SINGLEDATA_TRANS_BLOCKS(sb) + EXT4_XATTR_TRANS_BLOCKS - 2 + EXT4_MAXQUOTAS_TRANS_BLOCKS(sb))
25 #define EXT4_META_TRANS_BLOCKS(sb) (EXT4_XATTR_TRANS_BLOCKS + EXT4_MAXQUOTAS_TRANS_BLOCKS(sb))
27 #define EXT4_DELETE_TRANS_BLOCKS(sb) (2 * EXT4_DATA_TRANS_BLOCKS(sb) + 64)
35 #define EXT4_QUOTA_TRANS_BLOCKS(sb)
[all...]
H A Dext4_utils.c191 aux_info.sb = calloc(info.block_size, 1);
195 if (!aux_info.sb)
211 free(aux_info.sb);
219 struct ext4_super_block *sb = aux_info.sb; local
221 sb->s_inodes_count = info.inodes_per_group * aux_info.groups;
222 sb->s_blocks_count_lo = aux_info.len_blocks;
223 sb->s_r_blocks_count_lo = 0;
224 sb->s_free_blocks_count_lo = 0;
225 sb
337 ext4_parse_sb(struct ext4_super_block *sb) argument
[all...]
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...]
H A Dext2simg.c52 struct ext4_super_block sb; local
59 ret = read(fd, &sb, sizeof(sb));
62 if (ret != sizeof(sb))
65 ext4_parse_sb(&sb);
93 aux_info.sb->s_inodes_count - aux_info.sb->s_free_inodes_count,
94 aux_info.sb->s_inodes_count,
95 aux_info.sb->s_blocks_count_lo - aux_info.sb
[all...]
H A Dext4.h362 #define test_opt(sb, opt) (EXT4_SB(sb)->s_mount_opt & EXT4_MOUNT_##opt)
453 #define EXT4_SB(sb) (sb)
471 #define EXT4_HAS_COMPAT_FEATURE(sb,mask) ((EXT4_SB(sb)->s_es->s_feature_compat & cpu_to_le32(mask)) != 0)
472 #define EXT4_HAS_RO_COMPAT_FEATURE(sb,mask) ((EXT4_SB(sb)->s_es->s_feature_ro_compat & cpu_to_le32(mask)) != 0)
473 #define EXT4_HAS_INCOMPAT_FEATURE(sb,mask) ((EXT4_SB(sb)
[all...]
H A Dmake_ext4fs.c454 aux_info.sb->s_inodes_count - aux_info.sb->s_free_inodes_count,
455 aux_info.sb->s_inodes_count,
456 aux_info.sb->s_blocks_count_lo - aux_info.sb->s_free_blocks_count_lo,
457 aux_info.sb->s_blocks_count_lo);
H A Dext4_utils.h125 struct ext4_super_block *sb; member in struct:fs_aux_info
167 void ext4_parse_sb(struct ext4_super_block *sb);
/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/extras/tests/ext4/
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...]
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) {
/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 Drestorecon.c24 static int restore(const char *pathname, const struct stat *sb) argument
33 if (selabel_lookup(sehandle, &newcontext, pathname, sb->st_mode) < 0) {
127 struct stat sb; local
130 rc = lstat(argv[i], &sb);
136 restore(argv[i], &sb);
H A Dinsmod.c16 struct stat sb; local
26 if (fstat(fd, &sb) < 0)
28 size = sb.st_size;
H A Ddynarray.c91 const char *sb = *(const char **)b; local
92 return strcmp(sa, sb);
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/core/libcutils/
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/vold/
H A DLoop.h30 static int lookupInfo(const char *loopDevice, struct asec_superblock *sb, unsigned int *nr_sec);
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 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/extras/bugmailer/src/com/android/commands/sendbug/
H A DSendBug.java113 final StringBuilder sb = new StringBuilder();
114 sb.append(SystemProperties.get("ro.build.description"));
115 sb.append("\n(Sent from BugMailer)");
116 intent.putExtra("body", sb.toString());
/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/libcorkscrew/
H A Dsymbol_table.c57 struct stat sb; local
58 if (fstat(fd, &sb)) {
62 size_t length = sb.st_size;
/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) {
/system/core/debuggerd/
H A Dtombstone.c633 struct stat sb; local
639 typecheck(mtime, sb.st_mtime);
650 if (!stat(path, &sb)) {
651 if (sb.st_mtime < mtime) {
653 mtime = sb.st_mtime;

Completed in 240 milliseconds

12