Searched defs:len (Results 76 - 100 of 158) sorted by relevance

1234567

/system/core/libcutils/
H A Dstr_parms.c242 int len)
248 return strlcpy(val, value, len);
241 str_parms_get_str(struct str_parms *str_parms, const char *key, char *val, int len) argument
H A Dtzstrftime.c424 int len; local
428 len = isleap_sum(year, base) ?
442 (len % DAYSPERWEEK);
445 top += len;
/system/core/liblinenoise/
H A Dlinenoise.c187 static void refreshLine(int fd, const char *prompt, char *buf, size_t len, size_t pos, size_t cols) { argument
193 len--;
196 while (plen+len > cols) {
197 len--;
205 if (write(fd,buf,len) == -1) return;
217 size_t len = 0; local
235 if (nread <= 0) return len;
240 return len;
243 return (len == 0) ? -1 : (int)len;
392 size_t len; local
431 linenoiseHistorySetMaxLen(int len) argument
[all...]
/system/core/libnl_2/
H A Dattr.c123 int len, struct nla_policy *policy)
131 nla_for_each_attr(pos, head, len, rem) {
122 nla_parse(struct nlattr *tb[], int maxtype, struct nlattr *head, int len, struct nla_policy *policy) argument
/system/core/libsparse/
H A Dbacked_block.c28 unsigned int len; member in struct:backed_block
67 return bb->len;
209 block_len = a->len / bbl->block_size; /* rounds down */
225 a->file.offset + a->len != b->file.offset) {
231 a->fd.offset + a->len != b->fd.offset) {
239 a->len += b->len;
289 unsigned int len, unsigned int block)
297 bb->len = len;
288 backed_block_add_fill(struct backed_block_list *bbl, unsigned int fill_val, unsigned int len, unsigned int block) argument
306 backed_block_add_data(struct backed_block_list *bbl, void *data, unsigned int len, unsigned int block) argument
324 backed_block_add_file(struct backed_block_list *bbl, const char *filename, int64_t offset, unsigned int len, unsigned int block) argument
343 backed_block_add_fd(struct backed_block_list *bbl, int fd, int64_t offset, unsigned int len, unsigned int block) argument
[all...]
H A Dsparse.c29 struct sparse_file *sparse_file_new(unsigned int block_size, int64_t len) argument
43 s->len = len;
55 void *data, unsigned int len, unsigned int block)
57 return backed_block_add_data(s->backed_block_list, data, len, block);
61 uint32_t fill_val, unsigned int len, unsigned int block)
63 return backed_block_add_fill(s->backed_block_list, fill_val, len, block);
67 const char *filename, int64_t file_offset, unsigned int len,
71 len, block);
75 int fd, int64_t file_offset, unsigned int len, unsigne
54 sparse_file_add_data(struct sparse_file *s, void *data, unsigned int len, unsigned int block) argument
60 sparse_file_add_fill(struct sparse_file *s, uint32_t fill_val, unsigned int len, unsigned int block) argument
66 sparse_file_add_file(struct sparse_file *s, const char *filename, int64_t file_offset, unsigned int len, unsigned int block) argument
74 sparse_file_add_fd(struct sparse_file *s, int fd, int64_t file_offset, unsigned int len, unsigned int block) argument
171 sparse_file_callback(struct sparse_file *s, bool sparse, bool crc, int (*write)(void *priv, const void *data, int len), void *priv) argument
192 out_counter_write(void *priv, const void *data, int len) argument
223 move_chunks_up_to_len(struct sparse_file *from, struct sparse_file *to, unsigned int len) argument
[all...]
H A Dsparse_read.c104 unsigned int len = blocks * s->block_size; local
114 ret = sparse_file_add_fd(s, fd, offset, len, block);
120 while (len) {
121 chunk = min(len, COPY_BUF_SIZE);
127 len -= chunk;
130 lseek64(fd, len, SEEK_CUR);
141 int64_t len = (int64_t)blocks * s->block_size; local
155 ret = sparse_file_add_fill(s, fill_val, len, block);
167 while (len) {
168 chunk = min(len, COPY_BUF_SIZ
182 int64_t len = (int64_t)blocks * s->block_size; local
427 int64_t len; local
482 int64_t len; local
[all...]
/system/core/libsysutils/src/
H A DNetlinkEvent.cpp82 int len = nh->nlmsg_len - sizeof(*nh); local
85 if (sizeof(*ifi) > (size_t) len) {
97 len = NLMSG_PAYLOAD(nh, sizeof(*ifi));
99 while(RTA_OK(rta, len)) {
112 rta = RTA_NEXT(rta, len);
118 size_t len = nh->nlmsg_len - sizeof(*nh); local
119 if (sizeof(*pm) > len) {
219 size_t len = strlen(paramName); local
221 const char *ptr = mParams[i] + len;
222 if (!strncmp(mParams[i], paramName, len)
[all...]
/system/core/sh/
H A Dinput.c144 pfgets(char *line, int len) argument
147 int nleft = len;
386 pushstring(char *s, int len, void *ap) argument
391 /*dprintf("*** calling pushstring: %s, %d\n", s, len);*/
405 parsenleft = len;
/system/core/toolbox/cp/
H A Dcp.c298 size_t len = strlen(*src); local
299 while (len-- > 1 && (*src)[len] == '/')
300 (*src)[len] = '\0';
H A Dutils.c323 int len; local
326 if ((len = readlink(p->fts_path, target, sizeof(target)-1)) == -1) {
330 target[len] = '\0';
/system/core/toolbox/grep/
H A Dgrep.h95 size_t len; member in struct:str
107 size_t len; member in struct:__anon481
161 char *grep_fgetln(struct file *f, size_t *len);
/system/core/toolbox/
H A Dls.c216 int len; local
218 len = readlink(path, linkto, 256);
219 if(len < 0) return -1;
221 if(len > 255) {
227 linkto[len] = 0;
279 int len; local
281 len = readlink(path, linkto, sizeof(linkto));
282 if(len < 0) return -1;
284 if(len > sizeof(linkto)-1) {
290 linkto[len]
[all...]
H A Dmount.c67 int len = strlen(s); local
68 int newlen = extra->used_size + len;
71 len++; /* +1 for ',' */
90 extra->used_size += len;
H A Dschedtop.c82 int len; local
86 len = read(fd, line, line_size - 1);
88 if (len <= 0)
90 line[len] = '\0';
/system/extras/ext4_utils/
H A Dcontents.c36 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 Dindirect.c44 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...]
/system/extras/fatblock/
H A Dfs.c29 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...]
/system/extras/libpagemap/
H A Dpm_process.c96 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 Dlibrank.c49 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 Dprocrank.c34 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 Dshowmap.c31 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;
/system/extras/tests/directiotest/
H A Ddirectiotest.c122 static void init_test_buf(void *buf, uint64_t start_blk, size_t len) argument
127 len /= sizeof(uint32_t);
128 for (i = 0; i < len; i++)
132 static void dump_hex(const void *buf, int len) argument
140 for (i = 0; i < len; i++) {
/system/extras/tests/framebuffer/
H A Dmdp_test.c31 static int open_file(char *name, int *fd, int *len, int *fmt) argument
62 *len = stat.st_size;
64 printf("Successfully opened file %s (fmt=%d len=%d fd=%d)\n", fn, *fmt,
65 *len, *fd);
/system/netd/
H A DDnsProxyListener.cpp66 static bool sendLenAndData(SocketClient *c, const int len, const void* data) { argument
67 uint32_t len_be = htonl(len);
69 (len == 0 || c->sendData(data, len) == 0);

Completed in 126 milliseconds

1234567