Searched defs:len (Results 1 - 21 of 21) sorted by relevance

/bootable/recovery/minadbd/
H A Dutils.c48 buff_addb (char* buff, char* buffEnd, const void* data, int len) argument
52 if (avail <= 0 || len <= 0) /* already overflowing */
55 if (len > avail)
56 len = avail;
58 memcpy(buff, data, len);
60 buff += len;
H A Dadb.c99 int len, tagn; local
105 len = q - p;
111 if (len == taglen && !memcmp(tags[tagn].tag, p, len) )
356 p->len = p->msg.data_length;
H A Dusb_linux_client.c46 int (*write)(usb_handle *h, const void *data, int len);
47 int (*read)(usb_handle *h, void *data, int len);
187 static int usb_adb_write(usb_handle *h, const void *data, int len) argument
191 D("about to write (fd=%d, len=%d)\n", h->fd, len);
192 n = adb_write(h->fd, data, len);
193 if(n != len) {
202 static int usb_adb_read(usb_handle *h, void *data, int len) argument
206 D("about to read (fd=%d, len=%d)\n", h->fd, len);
367 usb_ffs_write(usb_handle *h, const void *data, int len) argument
403 usb_ffs_read(usb_handle *h, void *data, int len) argument
475 usb_write(usb_handle *h, const void *data, int len) argument
480 usb_read(usb_handle *h, void *data, int len) argument
[all...]
H A Dsockets.c36 int len; local
37 len = strlen(reason);
38 if(len > 0xffff) len = 0xffff;
39 snprintf(buf, sizeof buf, "FAIL%04x", len);
41 return writex(fd, reason, len);
132 D("LS(%d): enqueue %d\n", s->id, p->len);
147 while(p->len > 0) {
148 int r = adb_write(s->fd, p->ptr, p->len);
150 p->len
505 int len = strlen(destination) + 1; local
541 unhex(unsigned char *s, int len) argument
599 unsigned len; local
[all...]
H A Dadb.h62 unsigned len; member in struct:apacket
380 int usb_write(usb_handle *h, const void *data, int len);
381 int usb_read(usb_handle *h, void *data, int len);
H A Dsysdeps.h114 extern int adb_read(int fd, void* buf, int len);
115 extern int adb_write(int fd, const void* buf, int len);
127 static __inline__ int unix_read(int fd, void* buf, size_t len) argument
129 return read(fd, buf, len);
134 static __inline__ int unix_write(int fd, const void* buf, size_t len) argument
136 return write(fd, buf, len);
366 static __inline__ int adb_read(int fd, void* buf, size_t len) argument
368 return read(fd, buf, len);
374 static __inline__ int adb_write(int fd, const void* buf, size_t len) argument
376 return write(fd, buf, len);
[all...]
H A Dtransport.c39 static void dump_hex( const unsigned char* ptr, size_t len )
41 int nn, len2 = len;
101 int len = p->msg.data_length; local
130 D("%s: %s: [%s] arg0=%s arg1=%s (len=%d) ",
131 name, func, cmd, arg0, arg1, len);
132 dump_hex(p->data, len);
141 int len = sizeof(*ppacket); local
147 while(len > 0) {
148 r = adb_read(fd, p, len);
150 len
171 int r, len = sizeof(ppacket); local
382 int len = sizeof(*m); local
404 int len = sizeof(*m); local
711 readx(int fd, void *ptr, size_t len) argument
743 writex(int fd, const void *ptr, size_t len) argument
[all...]
/bootable/recovery/
H A Dadb_install.cpp65 int len = property_get("ro.debuggable", value, NULL); local
66 if (len == 1 && value[0] == '1') {
H A Dfuse_sideload.c96 static void fuse_reply(struct fuse_data* fd, __u64 unique, const void *data, size_t len) argument
102 hdr.len = len + sizeof(hdr);
109 vec[1].iov_len = len;
291 outhdr.len = sizeof(outhdr) + size;
419 ssize_t len = read(fd.ffd, request_buffer, sizeof(request_buffer)); local
420 if (len < 0) {
431 if ((size_t)len < sizeof(struct fuse_in_header)) {
432 fprintf(stderr, "request too short: len=%zu\n", (size_t)len);
[all...]
H A Drecovery.cpp996 int len = strlen(update_package) + 10; local
997 char* modified_path = (char*)malloc(len);
998 strlcpy(modified_path, "/cache/", len);
999 strlcat(modified_path, update_package+6, len);
/bootable/recovery/tools/ota/
H A Dcheck-lost+found.c120 int len = klogctl(KLOG_READ_ALL, dmesg, sizeof(dmesg) - 1); local
121 if (len < 0) {
125 dmesg[len] = '\0';
/bootable/recovery/mtdutils/
H A Dflash_image.c106 int len; local
107 while ((len = read(fd, buf, sizeof(buf))) > 0) {
108 wrote = mtd_write_data(out, buf, len);
109 if (wrote != len) die("error writing %s", argv[1]);
111 if (len < 0) die("error reading %s", argv[2]);
134 len = read(fd, buf, left > (int)sizeof(buf) ? (int)sizeof(buf) : left);
135 if (len <= 0) die("error reading %s", argv[2]);
136 if (mtd_write_data(out, buf, len) != len)
138 left -= len;
[all...]
H A Dmtdutils.c329 ssize_t mtd_read_data(MtdReadContext *ctx, char *data, size_t len) argument
332 while (read < len) {
335 size_t copy = len - read < avail ? len - read : avail;
343 len - read >= ctx->partition->erase_size) {
348 if (read >= len) {
353 if (ctx->consumed == ctx->partition->erase_size && read < len) {
476 ssize_t mtd_write_data(MtdWriteContext *ctx, const char *data, size_t len) argument
479 while (wrote < len) {
481 if (ctx->stored > 0 || len
[all...]
/bootable/recovery/minzip/
H A DZip.h62 size_t len; member in struct:__anon25
121 ret.len = pEntry->fileNameLen;
H A DZip.c234 LOGW("Invalid entries=%d offset=%d (len=%zd)\n",
759 long len; member in struct:__anon23
768 bec->len -= dataLen;
782 bec.len = mzGetZipEntryUncompLen(pEntry);
786 if (!ret || bec.len != 0) {
/bootable/recovery/applypatch/
H A Dbsdiff.c60 static void split(off_t *I,off_t *V,off_t start,off_t len,off_t h) argument
64 if(len<16) {
65 for(k=start;k<start+len;k+=j) {
67 for(i=1;k+i<start+len;i++) {
83 x=V[I[start+len/2]+h];
85 for(i=start;i<start+len;i++) {
118 if(start+len>kk) split(I,V,kk,start+len-kk,h);
124 off_t i,h,len; local
140 len
229 off_t scan,pos,len; local
[all...]
H A Dapplypatch.c35 static ssize_t FileSink(const unsigned char* data, ssize_t len, void* token);
351 int WriteToPartition(unsigned char* data, size_t len, argument
393 size_t written = mtd_write_data(ctx, (char*)data, len);
394 if (written != len) {
396 written, len, partition);
426 while (start < len) {
427 size_t to_write = len - start;
471 start = len;
473 for (p = 0; p < len; p += sizeof(buffer)) {
474 size_t to_read = len
623 FileSink(const unsigned char* data, ssize_t len, void* token) argument
644 MemorySink(const unsigned char* data, ssize_t len, void* token) argument
[all...]
H A Dimgdiff.c70 * source len (8)
74 * source len (8)
76 * source expanded len (8) [size of uncompressed source]
77 * target expected len (8) [size of uncompressed target]
83 * gzip header len (4)
84 * gzip header (gzip header len)
88 * source len (8)
90 * source expanded len (8) [size of uncompressed source]
91 * target expected len (8) [size of uncompressed target]
98 * target len (
140 size_t len; member in struct:__anon2
[all...]
/bootable/recovery/minui/
H A Dresources.c403 int len = row[4]; local
/bootable/recovery/uncrypt/
H A Duncrypt.c137 int len = strlen(v->mount_point); local
138 if (strncmp(path, v->mount_point, len) == 0 &&
139 (path[len] == '/' || path[len] == 0)) {
/bootable/recovery/edify/
H A Dexpr.c151 int len = argv[i]->end - argv[i]->start; local
152 char* err_src = malloc(len + 20);
155 memcpy(err_src + prefix_len, state->script + argv[i]->start, len);
156 err_src[prefix_len + len] = '\0';

Completed in 101 milliseconds