Searched defs:len (Results 51 - 75 of 158) sorted by path

1234567

/system/core/init/
H A Dinit_parser.c173 static int push_chars(char **dst, int *len, const char *chars, int cnt) argument
175 if (cnt > *len)
180 *len -= cnt;
H A Dproperty_service.c194 static void update_prop_info(prop_info *pi, const char *value, unsigned len) argument
197 memcpy(pi->value, value, len + 1);
198 pi->serial = (len << 24) | ((pi->serial + 1) & 0xffffff);
H A Dueventd.c150 int len = strlen(name); local
151 if (name[len - 1] == '*') {
153 name[len - 1] = '\0';
/system/core/libcutils/
H A Dashmem-dev.c75 int ashmem_pin_region(int fd, size_t offset, size_t len) argument
77 struct ashmem_pin pin = { offset, len };
81 int ashmem_unpin_region(int fd, size_t offset, size_t len) argument
83 struct ashmem_pin pin = { offset, len };
H A Dashmem-host.c68 /* truncate the file to `len' bytes */
86 int ashmem_pin_region(int fd, size_t offset, size_t len) argument
91 int ashmem_unpin_region(int fd, size_t offset, size_t len) argument
H A Dconfig_utils.c118 int len; member in struct:__anon390
H A Ddir_hash.c58 int len; local
60 len = readlink(path, buf, sizeof(buf));
61 if (len < 0) {
66 SHA1Update(&context, (unsigned char *) buf, len);
71 int len; local
79 while ((len = fread(buf, 1, sizeof(buf), f)) > 0) {
80 SHA1Update(&context, (unsigned char *) buf, len);
200 int len = get_file_hash(algorithm, name, local
202 if (len < 0) {
207 keep = malloc(len
271 int len = 0; local
[all...]
H A Dfs.c116 int len = snprintf(buf, BUF_SIZE, "%d", value) + 1; local
117 if (len > BUF_SIZE) {
121 if (TEMP_FAILURE_RETRY(write(fd, buf, len)) < len) {
H A Dpartition_utils.c25 static int only_one_char(char *buf, int len, char c) argument
30 for (i=0; i<len; i++) {
H A Dprocess_name.c43 int len = strlen(new_name); local
44 char* copy = (char*) malloc(len + 1);
49 if (len < 16) {
52 prctl(PR_SET_NAME, (unsigned long) new_name + len - 15, 0, 0, 0);
H A Dproperties.c41 int len; local
43 len = __system_property_get(key, value);
44 if(len > 0) {
45 return len;
49 len = strlen(default_value);
50 memcpy(value, default_value, len + 1);
52 return len;
141 int len = -1; local
150 len = strlen(value);
152 return len;
264 int len; local
298 int len; local
[all...]
H A Drecord_stream.c76 size_t len; local
84 len = ntohl(*((uint32_t *)p_begin));
86 p_ret = p_begin + HEADER_SIZE + len;
H A Dsched_policy.c177 size_t len; local
197 len = strlen(grp);
198 grp[len-1] = '\0'; /* Drop the trailing '\n' */
200 if (bufLen <= len) {
201 len = bufLen - 1;
203 strncpy(buf, grp, len);
204 buf[len] = '\0';
H A Dsockets.c29 socklen_t len = sizeof(cr); local
30 int n = getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &cr, &len);
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 Dstrdup16to8.c29 extern size_t strnlen16to8(const char16_t* utf16Str, size_t len) argument
34 * potentially be as big as 3*len, which will overflow
35 * for len > SIZE_MAX/3.
43 * dst = malloc(strnlen16to8(utf16,len)+1)
55 /* Fast path for the usual case where 3*len is < SIZE_MAX-1.
57 if (len < (SIZE_MAX-1)/3) {
58 while (len--) {
72 while (len--) {
102 * not just "len".
107 extern char* strncpy16to8(char* utf8Str, const char16_t* utf16Str, size_t len) argument
146 size_t len; local
[all...]
H A Dstrdup8to16.c46 size_t len; local
50 len = strlen8to16(s);
53 if (len && SIZE_MAX/len < sizeof(char16_t))
57 ret = (char16_t *) malloc (sizeof(char16_t) * len);
70 size_t len = 0; local
85 len++;
88 len++;
93 len++;
98 return len;
[all...]
H A Dtzstrftime.c424 int len; local
428 len = isleap_sum(year, base) ?
442 (len % DAYSPERWEEK);
445 top += len;
H A Duio.c28 int len = vecs->iov_len; local
30 while (len > 0) {
31 int ret = read( fd, buf, len );
42 len -= ret;
55 int len = (int)vecs->iov_len; local
57 while (len > 0) {
58 int ret = write( fd, buf, len );
69 len -= ret;
/system/core/libdiskconfig/
H A Dconfig_mbr.c29 /* start and len are in LBA units */
32 uint32_t start, uint32_t len)
34 if (len > 0) {
48 pentry->len_lba = len;
146 uint32_t len; /* in lba units */ local
163 len = kb_to_lba(pinfo->len_kb, dinfo->sect_size);
170 len = dinfo->num_lba - *lba;
174 (uint32_t)(((uint64_t)len * (uint64_t)dinfo->sect_size) /
179 pinfo->type, 1, len);
182 *lba += len;
31 cfg_pentry(struct pc_partition *pentry, uint8_t status, uint8_t type, uint32_t start, uint32_t len) argument
[all...]
H A Ddiskconfig.c73 ALOGE("Size modifier illegal when len is -1");
77 /* convert len to kilobytes */
125 if ((tmp = config_str(partnode, "len", NULL)) != NULL) {
126 uint64_t len; local
127 if (parse_len(tmp, &len))
129 pinfo->len_kb = (uint32_t) len;
/system/core/libion/
H A Dion.c57 int ion_alloc(int fd, size_t len, size_t align, unsigned int heap_mask, argument
62 .len = len,
124 int ion_alloc_fd(int fd, size_t len, size_t align, unsigned int heap_mask, argument
129 ret = ion_alloc(fd, len, align, heap_mask, flags, &handle);
H A Dion_test.c18 size_t len = 1024*1024, align = 0; variable
34 ret = ion_alloc(*fd, len, align, heap_mask, alloc_flags, handle);
68 ret = ion_map(fd, handle, len, prot, map_flags, 0, &ptr, &map_fd);
72 for (i = 0; i < len; i++) {
75 for (i = 0; i < len; i++)
82 munmap(ptr, len);
89 munmap(ptr, len);
93 _ion_alloc_test(len, align, flags, &fd, &handle);
95 ret = ion_map(fd, handle, len, prot, flags, 0, &ptr, &map_fd);
129 ptr = mmap(NULL, len, pro
[all...]
/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/liblog/
H A Dlogd_write.c251 int __android_log_bwrite(int32_t tag, const void *payload, size_t len) argument
258 vec[1].iov_len = len;
269 size_t len)
278 vec[2].iov_len = len;
268 __android_log_btwrite(int32_t tag, char type, const void *payload, size_t len) argument

Completed in 817 milliseconds

1234567