Searched refs:len (Results 51 - 75 of 258) sorted by relevance

1234567891011

/system/extras/tests/storage/
H A Dwipe_blkdev.c50 static int wipe_block_device(int fd, u64 len, int secure) argument
57 range[1] = len;
84 u64 len; local
119 len = get_block_device_size(fd);
121 if (! len) {
126 ret = wipe_block_device(fd, len, secure);
/system/core/fastboot/
H A Dusb.h63 int usb_read(usb_handle *h, void *_data, int len);
64 int usb_write(usb_handle *h, const void *_data, int len);
/system/core/fastbootd/
H A Dprotocol.h54 int protocol_handle_download(struct protocol_handle *phandle, size_t len);
59 void fastboot_data(struct protocol_handle *handle, size_t len);
H A Dtransport_socket.c86 ssize_t socket_write(struct transport_handle *thandle, const void *data, size_t len) argument
91 D(DEBUG, "about to write (fd=%d, len=%zu)", handle->fd, len);
92 ret = bulk_write(handle->fd, data, len);
101 ssize_t socket_read(struct transport_handle *thandle, void *data, size_t len) argument
106 D(DEBUG, "about to read (fd=%d, len=%zu)", handle->fd, len);
107 ret = bulk_read(handle->fd, data, len);
/system/core/include/log/
H A Dlogd.h41 int __android_log_bwrite(int32_t tag, const void *payload, size_t len);
43 size_t len);
/system/core/libcutils/
H A Dsockets.c32 socklen_t len = sizeof(cr); local
33 int n = getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &cr, &len);
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 };
/system/core/libsync/include/sync/
H A Dsync.h29 uint32_t len; member in struct:sync_fence_info_data
36 uint32_t len; member in struct:sync_pt_info
/system/vold/
H A DDevmapper.h28 unsigned int numSectors, char *buffer, size_t len);
30 static int lookupActive(const char *name, char *buffer, size_t len);
H A DLoop.h29 static int lookupActive(const char *id, char *buffer, size_t len);
31 static int create(const char *id, const char *loopFile, char *loopDeviceBuffer, size_t len);
/system/core/init/
H A Dbootchart.c50 unix_read(int fd, void* buff, int len) argument
53 do { ret = read(fd, buff, len); } while (ret < 0 && errno == EINTR);
58 unix_write(int fd, const void* buff, int len) argument
61 do { ret = write(fd, buff, len); } while (ret < 0 && errno == EINTR);
68 int len = 0; local
71 len = unix_read(fd, buff, buffsize-1);
74 buff[len > 0 ? len : 0] = 0;
75 return len;
94 file_buff_write( FileBuff buff, const void* src, int len )
188 int fd, ret, len; local
198 int len; local
257 int len; local
[all...]
H A Dinit_parser.h34 int expand_props(char *dst, const char *src, int len);
/system/core/libsparse/
H A Dbacked_block.c28 unsigned int len; member in struct:backed_block
67 return bb->len;
209 block_len = a->len / bbl->block_size; /* rounds down */
225 a->file.offset + a->len != b->file.offset) {
231 a->fd.offset + a->len != b->fd.offset) {
239 a->len += b->len;
289 unsigned int len, unsigned int block)
297 bb->len = len;
288 backed_block_add_fill(struct backed_block_list *bbl, unsigned int fill_val, unsigned int len, unsigned int block) argument
306 backed_block_add_data(struct backed_block_list *bbl, void *data, unsigned int len, unsigned int block) argument
324 backed_block_add_file(struct backed_block_list *bbl, const char *filename, int64_t offset, unsigned int len, unsigned int block) argument
343 backed_block_add_fd(struct backed_block_list *bbl, int fd, int64_t offset, unsigned int len, unsigned int block) argument
[all...]
H A Dbacked_block.h33 unsigned int len, unsigned int block);
35 unsigned int len, unsigned int block);
37 int64_t offset, unsigned int len, unsigned int block);
39 int64_t offset, unsigned int len, unsigned int block);
/system/core/adb/
H A Dtransport.c44 static void dump_hex( const unsigned char* ptr, size_t len )
46 int nn, len2 = len;
106 int len = p->msg.data_length; local
135 D("%s: %s: [%s] arg0=%s arg1=%s (len=%d) ",
136 name, func, cmd, arg0, arg1, len);
137 dump_hex(p->data, len);
146 int len = sizeof(*ppacket); local
152 while(len > 0) {
153 r = adb_read(fd, p, len);
155 len
176 int r, len = sizeof(ppacket); local
376 int len; local
465 int len; local
500 int len; local
531 int len = sizeof(*m); local
553 int len = sizeof(*m); local
913 size_t len; local
943 size_t len, remaining = bufsize; local
965 int len; local
1140 readx(int fd, void *ptr, size_t len) argument
1172 writex(int fd, const void *ptr, size_t len) argument
[all...]
H A Dadb_client.c96 int len; local
121 len = strlen(service);
122 snprintf(tmp, sizeof tmp, "%04x", len);
124 if(writex(fd, tmp, 4) || writex(fd, service, len)) {
143 unsigned len; local
162 strcpy(__adb_error, "protocol fault (status len)");
166 len = strtoul((char*)buf, 0, 16);
167 if(len > 255) len = 255;
168 if(readx(fd, __adb_error, len)) {
179 int len; local
[all...]
H A Djdwp_service.c129 int len; local
135 len = snprintf(p, end-p, "%d\n", proc->pid);
136 if (p + len >= end)
138 p += len;
149 int len = jdwp_process_list( buffer+4, bufferlen-4 ); local
150 snprintf(head, sizeof head, "%04x", len);
152 return len + 4;
246 int len = recv( socket, p, size, 0 ); local
247 if (len < 0) {
258 if (len
286 int len = recv(socket, buf, sizeof(buf), 0); local
639 int len; local
[all...]
/system/extras/ext4_utils/
H A Dallocate.c27 u32 len; member in struct:region
130 reg->block, reg->block + reg->len - 1, reg->len)
148 if (reg->len == 1) {
151 fprintf(f, " %d-%d", reg->block, reg->block + reg->len - 1);
158 u32 block, u32 len, int bg_num)
163 reg->len = len;
254 /* Reduces an existing allocation by len blocks by return the last blocks
257 void reduce_allocation(struct block_allocation *alloc, u32 len) argument
157 append_region(struct block_allocation *alloc, u32 block, u32 len, int bg_num) argument
344 ext4_allocate_blocks_from_block_group(u32 len, int bg_num) argument
375 ext4_allocate_best_fit_partial(u32 len) argument
413 ext4_allocate_best_fit(u32 len) argument
446 allocate_blocks(u32 len) argument
513 get_region(struct block_allocation *alloc, u32 *block, u32 *len) argument
543 do_split_allocation(struct block_allocation *alloc, u32 len) argument
580 split_allocation(struct block_allocation *alloc, u32 len) argument
642 append_oob_allocation(struct block_allocation *alloc, u32 len) argument
[all...]
H A Dallocate.h44 struct block_allocation *allocate_blocks(u32 len);
49 void reduce_allocation(struct block_allocation *alloc, u32 len);
53 void get_region(struct block_allocation *alloc, u32 *block, u32 *len);
69 u32 block, u32 len, int bg);
71 int append_oob_allocation(struct block_allocation *alloc, u32 len);
/system/core/toolbox/upstream-netbsd/usr.bin/grep/
H A Dqueue.c65 item->data.dat = grep_malloc(sizeof(char) * x->len);
66 item->data.len = x->len;
69 memcpy(item->data.dat, x->dat, x->len);
/system/core/toolbox/upstream-netbsd/usr.bin/printenv/
H A Dprintenv.c64 size_t len; local
85 len = strlen(*argv);
87 if (!memcmp(*ep, *argv, len)) {
88 cp = *ep + len;
/system/core/logd/tests/
H A Dlogd_test.cpp34 static void my_android_logger_get_statistics(char *buf, size_t len) argument
36 snprintf(buf, len, "getStatistics 0 1 2 3 4");
43 while ((ret = read(sock, buf, len)) > 0) {
44 if ((size_t)ret == len) {
47 len -= ret;
68 size_t len = 8192; local
72 buf = new char [len];
73 my_android_logger_get_statistics(buf, len);
75 buf[len-1] = '\0';
82 bool check = ret <= len;
146 size_t len; local
409 unsigned int len = msg->entry.len; local
527 size_t len; local
[all...]
/system/core/toolbox/upstream-netbsd/lib/libc/gen/
H A Dhumanize_number.c47 humanize_number(char *buf, size_t len, int64_t bytes, argument
88 if (len > 0)
119 if (len < baselen + 1)
124 for (max = 100, i = len - baselen; i-- > 0;)
147 if (len < baselen + 1 + 2)
152 r = snprintf(buf, len, "%d%s%d%s%s%s",
156 r = snprintf(buf, len, "%" PRId64 "%s%s%s",
/system/core/libzipfile/
H A Dcentraldir.c11 EOCD_LEN = 22, // EndOfCentralDir len, excl. comment
17 ENTRY_LEN = 46, // CentralDirEnt len, excl. var fields
36 read_central_dir_values(Zipfile* file, const unsigned char* buf, int len) argument
38 if (len < EOCD_LEN) {
41 EOCD_LEN, len);
54 if (EOCD_LEN + file->commentLen > len) {
55 fprintf(stderr, "EOCD(%d) + comment(%d) exceeds len (%d)\n",
56 EOCD_LEN, file->commentLen, len);
67 const unsigned char** buf, ssize_t* len)
78 if (*len < ENTRY_LE
66 read_central_directory_entry(Zipfile* file, Zipentry* entry, const unsigned char** buf, ssize_t* len) argument
159 ssize_t len; local
[all...]
/system/core/toolbox/
H A Dmkswap.c28 ssize_t len; local
64 len = write(fd, &sw_hdr, sizeof(sw_hdr));
65 if (len != sizeof(sw_hdr)) {
78 len = write(fd, MAGIC_SWAP_HEADER, MAGIC_SWAP_HEADER_LEN);
79 if (len != MAGIC_SWAP_HEADER_LEN) {

Completed in 537 milliseconds

1234567891011