Searched refs:len (Results 26 - 50 of 208) sorted by relevance

123456789

/system/core/libcutils/
H A Dprocess_name.c43 int len = strlen(new_name); local
44 char* copy = (char*) malloc(len + 1);
49 if (len < 16) {
52 prctl(PR_SET_NAME, (unsigned long) new_name + len - 15, 0, 0, 0);
H A Dsockets.c29 socklen_t len = sizeof(cr); local
30 int n = getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &cr, &len);
H A Dstrdup8to16.c46 size_t len; local
50 len = strlen8to16(s);
53 if (len && SIZE_MAX/len < sizeof(char16_t))
57 ret = (char16_t *) malloc (sizeof(char16_t) * len);
70 size_t len = 0; local
85 len++;
88 len++;
93 len++;
98 return len;
[all...]
/system/core/toolbox/
H A Dsmd.c9 int fd, len, r, port = 0; local
28 len = strlen(argv[0]);
29 r = write(fd, argv[0], len);
30 if(r != len) {
/system/extras/ext4_utils/
H A Dextent.c41 u32 len; local
44 len = min(region_len * info.block_size, backing_len);
46 sparse_file_add_data(info.sparse_file, ptr, len, region_block);
47 ptr += len;
48 backing_len -= len;
63 u32 len; local
66 len = min(region_len * info.block_size, backing_len);
68 sparse_file_add_file(info.sparse_file, filename, offset, len,
70 offset += len;
71 backing_len -= len;
75 do_inode_allocate_extents( struct ext4_inode *inode, u64 len) argument
181 inode_allocate_data_extents(struct ext4_inode *inode, u64 len, u64 backing_len) argument
206 inode_allocate_file_extents(struct ext4_inode *inode, u64 len, const char *filename) argument
223 inode_allocate_extents(struct ext4_inode *inode, u64 len) argument
[all...]
H A Dcontents.c36 u32 len = 24; local
42 if (len % info.block_size + dentry_len > info.block_size)
43 len += info.block_size - (len % info.block_size);
44 len += dentry_len;
48 if (len % info.block_size + 8 > info.block_size)
49 len += info.block_size - (len % info.block_size);
50 len += 8;
52 return len;
96 u32 len; local
173 make_file(const char *filename, u64 len) argument
205 u32 len = strlen(link); local
[all...]
H A Dallocate.h30 struct block_allocation *allocate_blocks(u32 len);
34 void reduce_allocation(struct block_allocation *alloc, u32 len);
38 void get_region(struct block_allocation *alloc, u32 *block, u32 *len);
53 u32 block, u32 len, int bg);
55 int append_oob_allocation(struct block_allocation *alloc, u32 len);
/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);
H A Dusb_linux.c86 static int check(void *_desc, int len, unsigned type, int size) argument
90 if(len < size) return -1;
92 if(desc[0] > len) return -1;
98 static int filter_usb_device(int fd, char *ptr, int len, int writable, argument
115 if(check(ptr, len, USB_DT_DEVICE, USB_DT_DEVICE_SIZE))
118 len -= dev->bLength;
121 if(check(ptr, len, USB_DT_CONFIG, USB_DT_CONFIG_SIZE))
124 len -= cfg->bLength;
138 // Keep it short enough because some bootloaders are borked if the URB len is > 255
201 if(check(ptr, len, USB_DT_INTERFAC
311 usb_write(usb_handle *h, const void *_data, int len) argument
361 usb_read(usb_handle *h, void *_data, int len) argument
[all...]
/system/core/include/cutils/
H A Dashmem.h21 int ashmem_pin_region(int fd, size_t offset, size_t len);
22 int ashmem_unpin_region(int fd, size_t offset, size_t len);
H A Dlogd.h41 int __android_log_bwrite(int32_t tag, const void *payload, size_t len);
43 size_t len);
/system/core/include/mincrypt/
H A Dsha.h51 void SHA_update(SHA_CTX* ctx, const void* data, int len);
55 const uint8_t* SHA(const void* data, int len, uint8_t* digest);
/system/vold/
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);
H A DDevmapper.h28 unsigned int numSectors, char *buffer, size_t len);
30 static int lookupActive(const char *name, char *buffer, size_t len);
/system/core/libsparse/
H A Doutput_file.c78 int (*write_data_chunk)(struct output_file *out, unsigned int len,
80 int (*write_fill_chunk)(struct output_file *out, unsigned int len,
82 int (*write_skip_chunk)(struct output_file *out, int64_t len);
94 int64_t len; member in struct:output_file
119 int (*write)(void *priv, const void *buf, int len);
146 static int file_pad(struct output_file *out, int64_t len) argument
151 ret = ftruncate64(outn->fd, len);
159 static int file_write(struct output_file *out, void *data, int len) argument
164 ret = write(outn->fd, data, len);
168 } else if (ret < len) {
218 gz_file_pad(struct output_file *out, int64_t len) argument
242 gz_file_write(struct output_file *out, void *data, int len) argument
298 callback_file_pad(struct output_file *out, int64_t len) argument
303 callback_file_write(struct output_file *out, void *data, int len) argument
326 read_all(int fd, void *buf, size_t len) argument
374 write_sparse_fill_chunk(struct output_file *out, unsigned int len, uint32_t fill_val) argument
410 write_sparse_data_chunk(struct output_file *out, unsigned int len, void *data) argument
484 write_normal_data_chunk(struct output_file *out, unsigned int len, void *data) argument
502 write_normal_fill_chunk(struct output_file *out, unsigned int len, uint32_t fill_val) argument
527 write_normal_skip_chunk(struct output_file *out, int64_t len) argument
552 output_file_init(struct output_file *out, int block_size, int64_t len, bool sparse, int chunks, bool crc) argument
641 output_file_open_callback(int (*write)(void *, const void *, int), void *priv, unsigned int block_size, int64_t len, int gz, int sparse, int chunks, int crc) argument
667 output_file_open_fd(int fd, unsigned int block_size, int64_t len, int gz, int sparse, int chunks, int crc) argument
691 write_data_chunk(struct output_file *out, unsigned int len, void *data) argument
697 write_fill_chunk(struct output_file *out, unsigned int len, uint32_t fill_val) argument
703 write_fd_chunk(struct output_file *out, unsigned int len, int fd, int64_t offset) argument
752 write_file_chunk(struct output_file *out, unsigned int len, const char *file, int64_t offset) argument
769 write_skip_chunk(struct output_file *out, int64_t len) argument
[all...]
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...]
/system/core/adb/
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;
/system/core/libsparse/include/sparse/
H A Dsparse.h29 * @len - size of the expanded sparse file.
38 struct sparse_file *sparse_file_new(unsigned int block_size, int64_t len);
55 * @len - length of the data block
59 * [block * block_size : block * block_size + len) must not already be used in
60 * the sparse file. If len is not a multiple of the block size the data
69 void *data, unsigned int len, unsigned int block);
76 * @len - length of the fill block
80 * The region [block * block_size : block * block_size + len) must not already
81 * be used in the sparse file. If len is not a multiple of the block size the
87 uint32_t fill_val, unsigned int len, unsigne
[all...]
/system/core/sh/
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...]
/system/core/libdiskconfig/
H A Dwrite_lst.c39 item->len = data_len;
79 if (write(fd, lst->data, lst->len) != (int)lst->len) {
80 ALOGE("Failed writing %u bytes at position %lld.", lst->len,
85 ALOGI("Would write %d bytes @ offset %lld.", lst->len, lst->offset);
/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/toolbox/grep/
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...]
/system/core/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/extras/libpagemap/
H A Dpm_map.c22 int pm_map_pagemap(pm_map_t *map, uint64_t **pagemap_out, size_t *len) { argument
27 pagemap_out, len);
32 size_t len, i; local
40 error = pm_map_pagemap(map, &pagemap, &len);
45 for (i = 0; i < len; i++) {
72 size_t len, i; local
80 error = pm_map_pagemap(map, &pagemap, &len);
85 for (i = 0; i < len; i++) {
/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...]

Completed in 265 milliseconds

123456789