/system/core/toolbox/ |
H A D | mount.c | 67 int len = strlen(s); local 68 int newlen = extra->used_size + len; 71 len++; /* +1 for ',' */ 90 extra->used_size += len;
|
H A D | nandread.c | 34 loff_t start = 0, len = 0; local 67 len = strtoll(optarg, NULL, 0); 82 " -L <len> Length (default 0)\n" 188 end = len ? (start + len) : mtdinfo.size; 231 int len = ecclayout.oobfree[i].length; local 232 if (oob_fixed + len > oobbuf.ptr) 233 len = oobbuf.ptr - oob_fixed; 234 if (len) { 235 memcpy(oob_fixed, oobbuf.ptr + ecclayout.oobfree[i].offset, len); [all...] |
H A D | netstat.c | 83 size_t len = strlen(buf); local 85 snprintf(buf+len, ADDR_LEN-len, ":%d", port); 87 strncat(buf+len, ":*", ADDR_LEN-len-1);
|
H A D | newfs_msdos.c | 740 size_t len; local 748 len = strlen(_PATH_DEV); 750 if (!strncmp(s1, _PATH_DEV, len)) 751 s1 += len; 755 if (!strncmp(s2, _PATH_DEV, len)) 756 s2 += len; 1047 setstr(u_int8_t *dest, const char *src, size_t len) argument 1049 while (len--)
|
H A D | schedtop.c | 82 int len; local 86 len = read(fd, line, line_size - 1); 88 if (len <= 0) 90 line[len] = '\0';
|
H A D | smd.c | 9 int fd, len, r, port = 0; local 28 len = strlen(argv[0]); 29 r = write(fd, argv[0], len); 30 if(r != len) {
|
/system/extras/atrace/ |
H A D | atrace.c | 118 ssize_t len = strlen(str); local 119 if (write(fd, str, len) != len) { 250 int len; local
|
/system/extras/ext4_utils/ |
H A D | allocate.c | 40 u32 len; member in struct:region 116 reg->bg * info.blocks_per_group + reg->block + reg->len - 1, 117 reg->len); 132 u32 block, u32 len, int bg_num) 137 reg->len = len; 244 /* Reduces an existing allocation by len blocks by return the last blocks 247 void reduce_allocation(struct block_allocation *alloc, u32 len) argument 249 while (len) { 252 if (last_reg->len > le 131 append_region(struct block_allocation *alloc, u32 block, u32 len, int bg_num) argument 332 ext4_allocate_blocks_from_block_group(u32 len, int bg_num) argument 349 ext4_allocate_contiguous_blocks(u32 len) argument 385 ext4_allocate_partial(u32 len) argument 423 ext4_allocate_multiple_contiguous_blocks(u32 len) argument 449 do_allocate(u32 len) argument 467 allocate_blocks(u32 len) argument 534 get_region(struct block_allocation *alloc, u32 *block, u32 *len) argument 564 do_split_allocation(struct block_allocation *alloc, u32 len) argument 601 split_allocation(struct block_allocation *alloc, u32 len) argument 663 append_oob_allocation(struct block_allocation *alloc, u32 len) argument [all...] |
H A D | contents.c | 36 u32 len = 24; local 42 if (len % info.block_size + dentry_len > info.block_size) 43 len += info.block_size - (len % info.block_size); 44 len += dentry_len; 48 if (len % info.block_size + 8 > info.block_size) 49 len += info.block_size - (len % info.block_size); 50 len += 8; 52 return len; 96 u32 len; local 173 make_file(const char *filename, u64 len) argument 205 u32 len = strlen(link); local [all...] |
H A D | ext4.h | 65 unsigned int len; member in struct:ext4_allocation_request 297 __u64 len; member in struct:move_extent
|
H A D | ext4_utils.h | 107 s64 len; /* If set to 0, ask the block device for the size, member in struct:fs_info
|
H A D | ext4fixup.c | 125 int ret, len; local 132 len = read(fd, &magic, sizeof(magic)); 133 if (len != sizeof(magic)) { 157 int len; local 181 len = write(fd, &magic, sizeof(magic)); 182 if (len != sizeof(magic)) { 223 ret = lseek64(fd, info.len, SEEK_SET); 239 printf(" Size: %llu\n", info.len); 262 int len; local 274 len 285 unsigned int len; local 304 unsigned int len; local [all...] |
H A D | extent.c | 41 u32 len; local 44 len = min(region_len * info.block_size, backing_len); 46 sparse_file_add_data(info.sparse_file, ptr, len, region_block); 47 ptr += len; 48 backing_len -= len; 63 u32 len; local 66 len = min(region_len * info.block_size, backing_len); 68 sparse_file_add_file(info.sparse_file, filename, offset, len, 70 offset += len; 71 backing_len -= len; 75 do_inode_allocate_extents( struct ext4_inode *inode, u64 len) argument 181 inode_allocate_data_extents(struct ext4_inode *inode, u64 len, u64 backing_len) argument 206 inode_allocate_file_extents(struct ext4_inode *inode, u64 len, const char *filename) argument 223 inode_allocate_extents(struct ext4_inode *inode, u64 len) argument [all...] |
H A D | indirect.c | 44 u32 len; local 47 len = min(region_len * info.block_size, backing_len); 49 sparse_file_add_data(info.sparse_file, ptr, len, region_block); 50 ptr += len; 51 backing_len -= len; 57 static void reserve_indirect_block(struct block_allocation *alloc, int len) argument 64 if (advance_blocks(alloc, len)) { 65 error("failed to advance %d blocks", len); 70 static void reserve_dindirect_block(struct block_allocation *alloc, int len) argument 77 while (len > 87 reserve_tindirect_block(struct block_allocation *alloc, int len) argument 103 fill_indirect_block(u32 *ind_block, int len, struct block_allocation *alloc) argument 111 fill_dindirect_block(u32 *dind_block, int len, struct block_allocation *alloc) argument 141 fill_tindirect_block(u32 *tind_block, int len, struct block_allocation *alloc) argument 171 int len = min(*block_len, EXT4_NDIR_BLOCKS); local 194 int len = min(*block_len, aux_info.blocks_per_ind); local 226 int len = min(*block_len, aux_info.blocks_per_dind); local 258 int len = min(*block_len, aux_info.blocks_per_tind); local 283 reserve_all_indirect_blocks(struct block_allocation *alloc, u32 len) argument 315 indirect_blocks_needed(u32 len) argument 405 inode_allocate_indirect(struct ext4_inode *inode, unsigned long len) argument 490 inode_allocate_data_indirect(struct ext4_inode *inode, unsigned long len, unsigned long backing_len) argument [all...] |
H A D | make_ext4fs.c | 242 u32 journal_blocks = DIV_ROUND_UP(info.len, info.block_size) / 64; 257 return DIV_ROUND_UP(info.len, info.block_size) / 4; 262 u32 blocks = DIV_ROUND_UP(info.len, info.block_size); 277 u32 blocks = DIV_ROUND_UP(info.len, info.block_size); 304 int make_ext4fs(const char *filename, s64 len, argument 311 info.len = len; 335 if (info.len <= 0) 336 info.len = get_file_size(fd); 338 if (info.len < [all...] |
H A D | wipe.c | 33 int wipe_block_device(int fd, s64 len) argument 39 range[1] = len; 43 range[1] = len; 57 int wipe_block_device(int fd, s64 len) argument
|
/system/extras/fatblock/ |
H A D | fatblock.h | 37 offset_t len; member in struct:extent 68 int fs_read(struct fs *fs, char *buf, offset_t start, offset_t len);
|
H A D | fs.c | 29 offset_t start, offset_t len, int type) 35 extent->len = len; 42 struct extent *fs_find_extent(struct fs *fs, offset_t start, offset_t len, argument 54 end = start + len; 59 e_len = e->len; 72 rel_len = len; 86 assert(r_rel_start < len); 87 assert(r_rel_start + rel_len <= len); 110 offset_t len, in 28 fs_add_extent(struct fs *fs, struct extent *extent, offset_t start, offset_t len, int type) argument 109 fs_alloc_extent(struct fs *fs, struct extent *extent, offset_t len, int type, cluster_t *first_cluster_out) argument [all...] |
H A D | read.c | 29 offset_t off, offset_t len) 35 memset(out, 0, len); 39 if (off + len > buf_len) { 40 memset(out + (buf_len - off), 0, len - (buf_len - off)); 41 len = buf_len - off; 45 assert(off + len <= buf_len); 47 memcpy(out, buf + off, len); 72 static int file_read(struct file *f, char *buf, offset_t off, offset_t len) argument 84 f->path, off, len); 88 if (off + len > UINT32_MA 28 buffer_read(char *buf, offset_t buf_len, char *out, offset_t off, offset_t len) argument 126 dir_read(struct dir *d, char *buf, offset_t off, offset_t len) argument 134 extent_read(struct fs *fs, struct extent *e, char *buf, offset_t off, offset_t len) argument 161 fs_read(struct fs *fs, char *buf, offset_t start, offset_t len) argument [all...] |
/system/extras/libpagemap/ |
H A D | pm_kernel.c | 62 int pm_kernel_pids(pm_kernel_t *ker, pid_t **pids_out, size_t *len) { argument 111 *len = pids_count;
|
H A D | pm_map.c | 22 int pm_map_pagemap(pm_map_t *map, uint64_t **pagemap_out, size_t *len) { argument 27 pagemap_out, len); 32 size_t len, i; local 40 error = pm_map_pagemap(map, &pagemap, &len); 45 for (i = 0; i < len; i++) { 72 size_t len, i; local 80 error = pm_map_pagemap(map, &pagemap, &len); 85 for (i = 0; i < len; i++) {
|
H A D | pm_process.c | 96 uint64_t **range_out, size_t *len) { 102 if (!proc || (low >= high) || !range_out || !len) 121 *len = 0; 132 *len = numpages; 137 int pm_process_maps(pm_process_t *proc, pm_map_t ***maps_out, size_t *len) { argument 140 if (!proc || !maps_out || !len) 154 *len = proc->num_maps; 94 pm_process_pagemap_range(pm_process_t *proc, unsigned long low, unsigned long high, uint64_t **range_out, size_t *len) argument
|
/system/extras/librank/ |
H A D | librank.c | 49 static int getprocname(pid_t pid, char *buf, size_t len); 314 static int getprocname(pid_t pid, char *buf, size_t len) { argument 321 if (!fgets(buf, len, f)) { *buf = '\0'; return 2; }
|
/system/extras/procrank/ |
H A D | procrank.c | 34 static int getprocname(pid_t pid, char *buf, int len); 59 const int len = read(fd, buffer, sizeof(buffer)-1); local 62 if (len < 0) { 66 buffer[len] = 0; 301 * buf of length len. The size of the buffer must be greater than zero to get 313 static int getprocname(pid_t pid, char *buf, int len) { argument 319 if (len <= 0) { 334 if (fgets(buf, len, f) == NULL) { 350 if (strlcpy(buf, unknown_cmdline, (size_t)len) >= (size_t)len) { [all...] |
/system/extras/showmap/ |
H A D | showmap.c | 31 int len = strlen(name); local 32 return len >= 4 && name[0] == '/' 33 && name[len - 3] == '.' && name[len - 2] == 's' && name[len - 1] == 'o'; 168 int len; local 178 len = strlen(line); 179 if (line[len - 1] == '\n') { 180 line[--len] = 0;
|