Home
last modified time | relevance | path

Searched refs:len (Results 1 – 24 of 24) sorted by relevance

/bootable/recovery/minadbd/
Dsockets.c36 int len; in sendfailmsg() local
37 len = strlen(reason); in sendfailmsg()
38 if(len > 0xffff) len = 0xffff; in sendfailmsg()
39 snprintf(buf, sizeof buf, "FAIL%04x", len); in sendfailmsg()
41 return writex(fd, reason, len); in sendfailmsg()
132 D("LS(%d): enqueue %d\n", s->id, p->len); in local_socket_enqueue()
147 while(p->len > 0) { in local_socket_enqueue()
148 int r = adb_write(s->fd, p->ptr, p->len); in local_socket_enqueue()
150 p->len -= r; in local_socket_enqueue()
163 if(p->len == 0) { in local_socket_enqueue()
[all …]
Dutils.c48 buff_addb (char* buff, char* buffEnd, const void* data, int len) in buff_addb() argument
52 if (avail <= 0 || len <= 0) /* already overflowing */ in buff_addb()
55 if (len > avail) in buff_addb()
56 len = avail; in buff_addb()
58 memcpy(buff, data, len); in buff_addb()
60 buff += len; in buff_addb()
Dusb_linux_client.c82 int usb_write(usb_handle *h, const void *data, int len) in usb_write() argument
86 D("about to write (fd=%d, len=%d)\n", h->fd, len); in usb_write()
87 n = adb_write(h->fd, data, len); in usb_write()
88 if(n != len) { in usb_write()
97 int usb_read(usb_handle *h, void *data, int len) in usb_read() argument
101 D("about to read (fd=%d, len=%d)\n", h->fd, len); in usb_read()
102 n = adb_read(h->fd, data, len); in usb_read()
103 if(n != len) { in usb_read()
Dtransport.c39 static void dump_hex( const unsigned char* ptr, size_t len ) in dump_hex() argument
41 int nn, len2 = len; in dump_hex()
101 int len = p->msg.data_length; in dump_packet() local
131 name, func, cmd, arg0, arg1, len); in dump_packet()
132 dump_hex(p->data, len); in dump_packet()
141 int len = sizeof(*ppacket); in read_packet() local
147 while(len > 0) { in read_packet()
148 r = adb_read(fd, p, len); in read_packet()
150 len -= r; in read_packet()
171 int r, len = sizeof(ppacket); in write_packet() local
[all …]
Dtransport.h24 int readx(int fd, void *ptr, size_t len);
25 int writex(int fd, const void *ptr, size_t len);
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) in unix_read() argument
129 return read(fd, buf, len); in unix_read()
134 static __inline__ int unix_write(int fd, const void* buf, size_t len) in unix_write() argument
136 return write(fd, buf, len); in unix_write()
366 static __inline__ int adb_read(int fd, void* buf, size_t len) in adb_read() argument
368 return read(fd, buf, len); in adb_read()
374 static __inline__ int adb_write(int fd, const void* buf, size_t len) in adb_write() argument
376 return write(fd, buf, len); in adb_write()
Dutils.h53 char* buff_addb (char* buff, char* buffEnd, const void* data, int len);
Dadb.c99 int len, tagn; in adb_trace_init() local
105 len = q - p; in adb_trace_init()
111 if (len == taglen && !memcmp(tags[tagn].tag, p, len) ) in adb_trace_init()
356 p->len = p->msg.data_length; in handle_packet()
Dadb.h62 unsigned len; member
384 int usb_write(usb_handle *h, const void *data, int len);
385 int usb_read(usb_handle *h, void *data, int len);
/bootable/diskinstaller/
Dandroid_img_data_layout.conf19 len 8064
27 len 8064
34 len 8064
43 len 8064
Dandroid_img_system_layout.conf19 len 8064
27 len 8064
42 len 8064
/bootable/recovery/applypatch/
Dbsdiff.c60 static void split(off_t *I,off_t *V,off_t start,off_t len,off_t h) in split() argument
64 if(len<16) { in split()
65 for(k=start;k<start+len;k+=j) { in split()
67 for(i=1;k+i<start+len;i++) { in split()
83 x=V[I[start+len/2]+h]; in split()
85 for(i=start;i<start+len;i++) { in split()
118 if(start+len>kk) split(I,V,kk,start+len-kk,h); in split()
124 off_t i,h,len; in qsufsort() local
140 len=0; in qsufsort()
143 len-=I[i]; in qsufsort()
[all …]
Dimgdiff.c140 size_t len; member
293 curr->len = st.st_size; in ReadZip()
313 curr->len = temp_entries[nextentry].uncomp_len; in ReadZip()
314 curr->data = malloc(curr->len); in ReadZip()
327 strm.avail_out = curr->len; in ReadZip()
350 curr->len = temp_entries[nextentry].data_offset - pos; in ReadZip()
352 curr->len = st.st_size - pos; in ReadZip()
357 pos += curr->len; in ReadZip()
419 curr->len = GZIP_HEADER_LEN; in ReadImage()
423 pos += curr->len; in ReadImage()
[all …]
Dapplypatch.c34 static ssize_t FileSink(unsigned char* data, ssize_t len, void* token);
361 int WriteToPartition(unsigned char* data, size_t len, in WriteToPartition() argument
403 size_t written = mtd_write_data(ctx, (char*)data, len); in WriteToPartition()
404 if (written != len) { in WriteToPartition()
406 written, len, partition); in WriteToPartition()
436 while (start < len) { in WriteToPartition()
437 size_t to_write = len - start; in WriteToPartition()
466 start = len; in WriteToPartition()
468 for (p = 0; p < len; p += sizeof(buffer)) { in WriteToPartition()
469 size_t to_read = len - p; in WriteToPartition()
[all …]
/bootable/recovery/mtdutils/
Dflash_image.c103 int len; in main() local
104 while ((len = read(fd, buf, sizeof(buf))) > 0) { in main()
105 wrote = mtd_write_data(out, buf, len); in main()
106 if (wrote != len) die("error writing %s", argv[1]); in main()
108 if (len < 0) die("error reading %s", argv[2]); in main()
131 len = read(fd, buf, left > (int)sizeof(buf) ? (int)sizeof(buf) : left); in main()
132 if (len <= 0) die("error reading %s", argv[2]); in main()
133 if (mtd_write_data(out, buf, len) != len) in main()
135 left -= len; in main()
Dmtdutils.c329 ssize_t mtd_read_data(MtdReadContext *ctx, char *data, size_t len) in mtd_read_data() argument
332 while (read < len) { in mtd_read_data()
335 size_t copy = len - read < avail ? len - read : avail; in mtd_read_data()
343 len - read >= ctx->partition->erase_size) { in mtd_read_data()
348 if (read >= len) { in mtd_read_data()
353 if (ctx->consumed == ctx->partition->erase_size && read < len) { in mtd_read_data()
476 ssize_t mtd_write_data(MtdWriteContext *ctx, const char *data, size_t len) in mtd_write_data() argument
479 while (wrote < len) { in mtd_write_data()
481 if (ctx->stored > 0 || len - wrote < ctx->partition->erase_size) { in mtd_write_data()
483 size_t copy = len - wrote < avail ? len - wrote : avail; in mtd_write_data()
[all …]
/bootable/recovery/
Dadb_install.cpp64 int len = property_get("ro.debuggable", value, NULL); in maybe_restart_adbd() local
65 if (len == 1 && value[0] == '1') { in maybe_restart_adbd()
Dverifier.cpp292 &(key->len), &(key->n0inv), &(key->n[0])) != 3) { in load_keys()
295 if (key->len != RSANUMWORDS) { in load_keys()
296 LOGE("key length (%d) does not match expected size\n", key->len); in load_keys()
299 for (i = 1; i < key->len; ++i) { in load_keys()
303 for (i = 1; i < key->len; ++i) { in load_keys()
Drecovery.cpp1023 int len = strlen(update_package) + 10; in main() local
1024 char* modified_path = (char*)malloc(len); in main()
1025 strlcpy(modified_path, "/cache/", len); in main()
1026 strlcat(modified_path, update_package+6, len); in main()
/bootable/recovery/tools/ota/
Dcheck-lost+found.c120 int len = klogctl(KLOG_READ_ALL, dmesg, sizeof(dmesg) - 1); in main() local
121 if (len < 0) { in main()
125 dmesg[len] = '\0'; in main()
/bootable/recovery/minzip/
DZip.h62 size_t len; member
121 ret.len = pEntry->fileNameLen; in mzGetZipEntryFileName()
DZip.c815 long len; member
824 bec->len -= dataLen; in bufferProcessFunction()
838 bec.len = mzGetZipEntryUncompLen(pEntry); in mzExtractZipEntryToBuffer()
842 if (!ret || bec.len != 0) { in mzExtractZipEntryToBuffer()
/bootable/recovery/edify/
Dexpr.c151 int len = argv[i]->end - argv[i]->start; in AssertFn() local
152 char* err_src = malloc(len + 20); in AssertFn()
155 memcpy(err_src + prefix_len, state->script + argv[i]->start, len); in AssertFn()
156 err_src[prefix_len + len] = '\0'; in AssertFn()
/bootable/recovery/minui/
Dresources.c269 int len = row[4]; in res_create_localized_surface() local