Searched defs:len (Results 101 - 125 of 158) sorted by last modified time

1234567

/system/core/libsysutils/src/
H A DSocketClient.cpp83 int SocketClient::sendBinaryMsg(int code, const void *data, int len) { argument
85 /* 4 bytes for the code & null + 4 bytes for the len */
89 /* Write the len */
90 uint32_t tmp = htonl(len);
95 if (result == 0 && len > 0) {
96 result = sendDataLocked(data, len);
111 int len = strlen(arg); local
112 char *result = (char *)malloc(len * 2 + 3);
114 const char *end = arg + len;
142 int SocketClient::sendData(const void *data, int len) { argument
151 sendDataLocked(const void *data, int len) argument
[all...]
/system/core/libzipfile/
H A Dcentraldir.c9 EOCD_LEN = 22, // EndOfCentralDir len, excl. comment
15 ENTRY_LEN = 46, // CentralDirEnt len, excl. var fields
34 read_central_dir_values(Zipfile* file, const unsigned char* buf, int len) argument
36 if (len < EOCD_LEN) {
39 EOCD_LEN, len);
52 if (EOCD_LEN + file->commentLen > len) {
53 fprintf(stderr, "EOCD(%d) + comment(%d) exceeds len (%d)\n",
54 EOCD_LEN, file->commentLen, len);
65 const unsigned char** buf, ssize_t* len)
90 if (*len < ENTRY_LE
64 read_central_directory_entry(Zipfile* file, Zipentry* entry, const unsigned char** buf, ssize_t* len) argument
190 ssize_t len; local
[all...]
/system/core/logcat/
H A Dlogcat.cpp152 size_t size = sizeof(logger_entry) + buf->len;
170 //printf(">>> pri=%d len=%d msg='%s'\n",
299 else if (entry->entry.len != ret - sizeof(struct logger_entry)) {
301 entry->entry.len, ret - sizeof(struct logger_entry));
305 entry->entry.msg[entry->entry.len] = '\0';
632 int len; local
635 len = q - p;
637 len = strlen(p);
639 len = snprintf( devname, sizeof(devname), "/dev/%.*s", len,
[all...]
/system/core/sdcard/
H A Dfuse.h537 __u32 len; member in struct:fuse_in_header
548 __u32 len; member in struct:fuse_out_header
569 __s64 len; member in struct:fuse_notify_inval_inode_out
H A Dsdcard.c440 hdr.len = sizeof(hdr);
446 static void fuse_reply(struct fuse *fuse, __u64 unique, void *data, int len) argument
452 hdr.len = len + sizeof(hdr);
459 vec[1].iov_len = len;
1162 ssize_t len = read(fuse->fd, local
1164 if (len < 0) {
1171 if ((size_t)len < sizeof(struct fuse_in_header)) {
1172 ERROR("[%d] request too short: len=%zu\n", handler->token, (size_t)len);
[all...]
/system/core/sh/
H A Dalias.c104 int len = strlen(val); local
105 ap->val = ckmalloc(len + 2);
106 memcpy(ap->val, val, len);
107 ap->val[len] = ' '; /* fluff */
108 ap->val[len+1] = '\0';
H A Deval.c617 size_t len; local
618 if (sysctl(mib, 2, 0, &len, 0, 0) != -1 &&
619 (sys_path = ckmalloc(len + 5)) != NULL &&
620 sysctl(mib, 2, sys_path + 5, &len, 0, 0) != -1) {
H A Dexec.c297 int len; local
303 len = p - start + strlen(name) + 2; /* "2" is for '/' and '\0' */
304 while (stackblocksize() < len)
322 return stalloc(len);
H A Dexpand.c1274 int len; local
1277 len = 0;
1279 len++;
1280 return msort(str, len);
1285 msort(struct strlist *list, int len) argument
1292 if (len <= 1)
1294 half = len >> 1;
1302 p = msort(p, len - half); /* sort second half */
1545 size_t len; local
1550 for (i = 1, len
[all...]
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;
H A Djobs.c1221 int len; local
1225 len = sizeof(ps->cmd);
1227 len = sizeof(ps->cmd) / 10;
1228 cmdnleft = len;
1231 char *p = ps->cmd + len - 4;
H A Dmemalloc.c248 grabstackblock(int len) argument
250 len = SHELL_ALIGN(len);
251 stacknxt += len;
252 stacknleft -= len;
276 int len = stackblocksize(); local
277 if (herefd >= 0 && len >= 1024) {
278 xwrite(herefd, stackblock(), len);
279 sstrnleft = len - 1;
283 sstrnleft = stackblocksize() - len
294 int len = stackblocksize() - sstrnleft; local
[all...]
H A Dparser.c912 int len; local
1134 len = out - stackblock();
1139 && len <= 2
1149 grabstackblock(len);
H A Dredir.c261 int len = 0; local
266 len = strlen(redir->nhere.doc->narg.text);
267 if (len <= PIPESIZE) {
268 xwrite(pip[1], redir->nhere.doc->narg.text, len);
282 xwrite(pip[1], redir->nhere.doc->narg.text, len);
H A Dvar.c225 int len; local
246 len = namelen + 2; /* 2 is space for '=' and '\0' */
250 len += strlen(val);
252 d = nameeq = ckmalloc(len);
800 int len; local
807 len = p - name;
810 *lenp = len;
816 if (vp->name_len != len)
818 if (memcmp(vp->text, name, len) != 0)
/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/
H A Ddd.c566 bwrite(int fd, const void *buf, size_t len) argument
573 rv = write(fd, buf, len);
H A Dgetsebool.c17 int i, get_all = 0, rc = 0, active, pending, len = 0, opt; local
31 rc = security_get_boolean_names(&names, &len);
38 if (!len) {
53 if (!len) {
56 len = argc - 1;
57 names = malloc(sizeof(char *) * len);
62 for (i = 0; i < len; i++) {
72 for (i = 0; i < len; i++) {
100 for (i = 0; i < len; i++)
H A Dinsmod.c71 int i, len; local
76 len = min(strlen(argv[i]), end - ptr);
77 memcpy(ptr, argv[i], len);
78 ptr += len;
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...]
/system/core/toolbox/grep/
H A Dfastgrep.c63 fg->len = strlen(pat);
72 fg->qsBc[i] = fg->len;
73 for (i = 1; i < fg->len; i++)
74 fg->qsBc[fg->pattern[i]] = fg->len - i;
91 fg->len = strlen(pat);
98 if (fg->len > 0 && pat[fg->len - 1] == '$') {
100 fg->len--;
106 fg->len--;
110 if (fg->len >
205 grep_search(fastgrep_t *fg, const unsigned char *data, size_t len, regmatch_t *pmatch) argument
281 grep_cmp(const unsigned char *pat, const unsigned char *data, size_t len) argument
326 grep_revstr(unsigned char *str, int len) argument
[all...]
H A Dfile.c143 size_t len; local
161 len = p - bufpos;
162 bufrem -= len;
164 *lenp = len;
169 for (len = bufrem, off = 0; ; len += bufrem) {
171 if (grep_lnbufgrow(len + LNBUFBUMP))
173 memcpy(lnbuf + off, bufpos, len - off);
174 off = len;
185 len
[all...]
H A Dgrep.c226 add_pattern(char *pat, size_t len) argument
237 if (len > 0 && pat[len - 1] == '\n')
238 --len;
240 pattern[patterns] = grep_malloc(len + 1);
241 memcpy(pattern[patterns], pat, len);
242 pattern[patterns][len] = '\0';
290 size_t len; local
296 len = 0;
298 while ((rlen = getline(&line, &len,
[all...]
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);

Completed in 108 milliseconds

1234567