Home
last modified time | relevance | path

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

12

/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()
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 …]
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) in usb_adb_write() argument
191 D("about to write (fd=%d, len=%d)\n", h->fd, len); in usb_adb_write()
192 n = adb_write(h->fd, data, len); in usb_adb_write()
193 if(n != len) { in usb_adb_write()
202 static int usb_adb_read(usb_handle *h, void *data, int len) in usb_adb_read() argument
206 D("about to read (fd=%d, len=%d)\n", h->fd, len); in usb_adb_read()
207 n = adb_read(h->fd, data, len); in usb_adb_read()
208 if(n != len) { in usb_adb_read()
[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()
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()
Dutils.h53 char* buff_addb (char* buff, char* buffEnd, const void* data, int len);
Dadb.h62 unsigned len; member
380 int usb_write(usb_handle *h, const void *data, int len);
381 int usb_read(usb_handle *h, void *data, int len);
/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.c35 static ssize_t FileSink(const unsigned char* data, ssize_t len, void* token);
351 int WriteToPartition(unsigned char* data, size_t len, in WriteToPartition() argument
393 size_t written = mtd_write_data(ctx, (char*)data, len); in WriteToPartition()
394 if (written != len) { in WriteToPartition()
396 written, len, partition); in WriteToPartition()
426 while (start < len) { in WriteToPartition()
427 size_t to_write = len - start; in WriteToPartition()
471 start = len; in WriteToPartition()
473 for (p = 0; p < len; p += sizeof(buffer)) { in WriteToPartition()
474 size_t to_read = len - p; in WriteToPartition()
[all …]
/bootable/recovery/mtdutils/
Dflash_image.c106 int len; in main() local
107 while ((len = read(fd, buf, sizeof(buf))) > 0) { in main()
108 wrote = mtd_write_data(out, buf, len); in main()
109 if (wrote != len) die("error writing %s", argv[1]); in main()
111 if (len < 0) die("error reading %s", argv[2]); in main()
134 len = read(fd, buf, left > (int)sizeof(buf) ? (int)sizeof(buf) : left); in main()
135 if (len <= 0) die("error reading %s", argv[2]); in main()
136 if (mtd_write_data(out, buf, len) != len) in main()
138 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/
Dinterlace-frames.py29 assert len(frames) > 0, "Must have at least one input frame."
34 assert len(sizes) == 1, "All input images must have the same size."
36 N = len(frames)
Dfuse_sideload.c96 static void fuse_reply(struct fuse_data* fd, __u64 unique, const void *data, size_t len) in fuse_reply() argument
102 hdr.len = len + sizeof(hdr); in fuse_reply()
109 vec[1].iov_len = len; in fuse_reply()
291 outhdr.len = sizeof(outhdr) + size; in handle_read()
419 ssize_t len = read(fd.ffd, request_buffer, sizeof(request_buffer)); in run_fuse_sideload() local
420 if (len < 0) { in run_fuse_sideload()
431 if ((size_t)len < sizeof(struct fuse_in_header)) { in run_fuse_sideload()
432 fprintf(stderr, "request too short: len=%zu\n", (size_t)len); in run_fuse_sideload()
482 outhdr.len = sizeof(outhdr); in run_fuse_sideload()
Dadb_install.cpp65 int len = property_get("ro.debuggable", value, NULL); in maybe_restart_adbd() local
66 if (len == 1 && value[0] == '1') { in maybe_restart_adbd()
Dverifier.cpp389 &(key->len), &(key->n0inv), &(key->n[0])) != 3) { in load_keys()
392 if (key->len != RSANUMWORDS) { in load_keys()
393 LOGE("key length (%d) does not match expected size\n", key->len); in load_keys()
396 for (i = 1; i < key->len; ++i) { in load_keys()
400 for (i = 1; i < key->len; ++i) { in load_keys()
Drecovery.cpp1084 int len = strlen(update_package) + 10; in main() local
1085 char* modified_path = (char*)malloc(len); in main()
1086 strlcpy(modified_path, "/cache/", len); in main()
1087 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.c759 long len; member
768 bec->len -= dataLen; in bufferProcessFunction()
782 bec.len = mzGetZipEntryUncompLen(pEntry); in mzExtractZipEntryToBuffer()
786 if (!ret || bec.len != 0) { in mzExtractZipEntryToBuffer()
/bootable/recovery/uncrypt/
Duncrypt.c137 int len = strlen(v->mount_point); in find_block_device() local
138 if (strncmp(path, v->mount_point, len) == 0 && in find_block_device()
139 (path[len] == '/' || path[len] == 0)) { in find_block_device()
/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.c403 int len = row[4]; in res_create_localized_alpha_surface() local

12