Searched defs:len (Results 51 - 75 of 158) sorted by relevance

1234567

/system/core/libdiskconfig/
H A Dconfig_mbr.c29 /* start and len are in LBA units */
32 uint32_t start, uint32_t len)
34 if (len > 0) {
48 pentry->len_lba = len;
146 uint32_t len; /* in lba units */ local
163 len = kb_to_lba(pinfo->len_kb, dinfo->sect_size);
170 len = dinfo->num_lba - *lba;
174 (uint32_t)(((uint64_t)len * (uint64_t)dinfo->sect_size) /
179 pinfo->type, 1, len);
182 *lba += len;
31 cfg_pentry(struct pc_partition *pentry, uint8_t status, uint8_t type, uint32_t start, uint32_t len) argument
[all...]
H A Ddiskconfig.c73 ALOGE("Size modifier illegal when len is -1");
77 /* convert len to kilobytes */
125 if ((tmp = config_str(partnode, "len", NULL)) != NULL) {
126 uint64_t len; local
127 if (parse_len(tmp, &len))
129 pinfo->len_kb = (uint32_t) len;
/system/core/libion/
H A Dion_test.c18 size_t len = 1024*1024, align = 0; variable
34 ret = ion_alloc(*fd, len, align, heap_mask, alloc_flags, handle);
68 ret = ion_map(fd, handle, len, prot, map_flags, 0, &ptr, &map_fd);
72 for (i = 0; i < len; i++) {
75 for (i = 0; i < len; i++)
82 munmap(ptr, len);
89 munmap(ptr, len);
93 _ion_alloc_test(len, align, flags, &fd, &handle);
95 ret = ion_map(fd, handle, len, prot, flags, 0, &ptr, &map_fd);
129 ptr = mmap(NULL, len, pro
[all...]
/system/core/liblog/
H A Dlogd_write.c251 int __android_log_bwrite(int32_t tag, const void *payload, size_t len) argument
258 vec[1].iov_len = len;
269 size_t len)
278 vec[2].iov_len = len;
268 __android_log_btwrite(int32_t tag, char type, const void *payload, size_t len) argument
/system/core/libmincrypt/
H A Dsha.c147 void SHA_update(SHA_CTX* ctx, const void* data, int len) { argument
151 ctx->count += len;
153 while (len > sizeof(ctx->buf) - i) {
155 len -= sizeof(ctx->buf) - i;
161 while (len--) {
245 void SHA_update(SHA_CTX *ctx, const void *data, int len) { argument
249 ctx->count += len;
251 while (len--) {
296 const uint8_t* SHA(const void *data, int len, uint8_t *digest) { argument
301 SHA_update(&ctx, data, len);
[all...]
/system/core/libsysutils/src/
H A DFrameworkListener.cpp47 int len; local
49 len = TEMP_FAILURE_RETRY(read(c->getSocket(), buffer, sizeof(buffer)));
50 if (len < 0) {
53 } else if (!len)
59 for (i = 0; i < len; i++) {
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/libzipfile/
H A Dcentraldir.c9 EOCD_LEN = 22, // EndOfCentralDir len, excl. comment
15 ENTRY_LEN = 46, // CentralDirEnt len, excl. var fields
34 read_central_dir_values(Zipfile* file, const unsigned char* buf, int len) argument
36 if (len < EOCD_LEN) {
39 EOCD_LEN, len);
52 if (EOCD_LEN + file->commentLen > len) {
53 fprintf(stderr, "EOCD(%d) + comment(%d) exceeds len (%d)\n",
54 EOCD_LEN, file->commentLen, len);
65 const unsigned char** buf, ssize_t* len)
90 if (*len < ENTRY_LE
64 read_central_directory_entry(Zipfile* file, Zipentry* entry, const unsigned char** buf, ssize_t* len) argument
190 ssize_t len; local
[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...]
H A Dredir.c261 int len = 0; local
266 len = strlen(redir->nhere.doc->narg.text);
267 if (len <= PIPESIZE) {
268 xwrite(pip[1], redir->nhere.doc->narg.text, len);
282 xwrite(pip[1], redir->nhere.doc->narg.text, len);
/system/core/toolbox/
H A Dnandread.c34 loff_t start = 0, len = 0; local
67 len = strtoll(optarg, NULL, 0);
82 " -L <len> Length (default 0)\n"
188 end = len ? (start + len) : mtdinfo.size;
231 int len = ecclayout.oobfree[i].length; local
232 if (oob_fixed + len > oobbuf.ptr)
233 len = oobbuf.ptr - oob_fixed;
234 if (len) {
235 memcpy(oob_fixed, oobbuf.ptr + ecclayout.oobfree[i].offset, len);
[all...]
H A Dnetstat.c83 size_t len = strlen(buf); local
85 snprintf(buf+len, ADDR_LEN-len, ":%d", port);
87 strncat(buf+len, ":*", ADDR_LEN-len-1);
/system/netd/
H A DNatController.cpp50 size_t len = strnlen(cmd, 255); local
53 if (len == 255) {
/system/vold/
H A DDevmapper.cpp133 int Devmapper::lookupActive(const char *name, char *ubuffer, size_t len) { argument
162 snprintf(ubuffer, len, "/dev/block/dm-%u", minor);
167 unsigned int numSectors, char *ubuffer, size_t len) {
218 snprintf(ubuffer, len, "/dev/block/dm-%u", minor);
166 create(const char *name, const char *loopFile, const char *key, unsigned int numSectors, char *ubuffer, size_t len) argument
H A DLoop.cpp81 int Loop::lookupActive(const char *id, char *buffer, size_t len) { argument
86 memset(buffer, 0, len);
123 strncpy(buffer, filename, len -1);
127 int Loop::create(const char *id, const char *loopFile, char *loopDeviceBuffer, size_t len) { argument
175 strncpy(loopDeviceBuffer, filename, len -1);
/system/bluetooth/tools/
H A Dpipetest.c72 static int _write(int fd, char *buf, int len) { argument
76 ret = write(fd, buf, len);
H A Dsock_shutdown_test.c121 int len = 0; local
129 len = sizeof(local_addr_un);
133 len = sizeof(local_addr_rc);
137 len = sizeof(local_addr_sco);
141 len = sizeof(local_addr_l2);
145 len = sizeof(local_addr_in);
150 ret = bind(fd, addr, len);
170 int len; local
176 len = sizeof(remote_addr_un);
180 len
[all...]
/system/core/adb/
H A Dadb_auth_host.c88 pkey->len = RSANUMWORDS;
110 static void get_user_info(char *buf, size_t len) argument
127 ret = snprintf(buf, len, " %s@%s", username, hostname);
128 if (ret >= (signed)len)
129 buf[len - 1] = '\0';
260 static int get_user_keyfilepath(char *filename, size_t len) argument
293 return snprintf(filename, len, format, android_dir, ADB_KEY_FILE);
348 unsigned int len; local
351 if (!RSA_sign(NID_sha1, token, token_size, sig, &len, key->rsa)) {
355 D("adb_auth_sign len
381 adb_auth_get_userkey(unsigned char *data, size_t len) argument
[all...]
H A Dusb_linux_client.c45 int (*write)(usb_handle *h, const void *data, int len);
46 int (*read)(usb_handle *h, void *data, int len);
186 static int usb_adb_write(usb_handle *h, const void *data, int len) argument
190 D("about to write (fd=%d, len=%d)\n", h->fd, len);
191 n = adb_write(h->fd, data, len);
192 if(n != len) {
201 static int usb_adb_read(usb_handle *h, void *data, int len) argument
205 D("about to read (fd=%d, len=%d)\n", h->fd, len);
363 usb_ffs_write(usb_handle *h, const void *data, int len) argument
399 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 Dusb_windows.c99 int usb_write(usb_handle* handle, const void* data, int len);
102 int usb_read(usb_handle *handle, void* data, int len);
257 int usb_write(usb_handle* handle, const void* data, int len) { argument
262 D("usb_write %d\n", len);
267 (unsigned long)len,
274 D("usb_write got: %ld, expected: %d\n", written, len);
275 if (written == (unsigned long)len) {
276 if(handle->zero_mask && (len & handle->zero_mask) == 0) {
302 int usb_read(usb_handle *handle, void* data, int len) { argument
307 D("usb_read %d\n", len);
[all...]
/system/core/fastboot/
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...]
H A Dusb_osx.c470 int usb_read(usb_handle *h, void *data, int len) { argument
472 UInt32 numBytes = len;
474 if (len == 0) {
504 int usb_write(usb_handle *h, const void *data, int len) { argument
507 if (len == 0) {
527 h->interface, h->bulkOut, (void *)data, len);
534 int lenRemaining = len;
552 if(!(len & h->zero_mask)) {
564 return len;
H A Dusb_windows.c76 int usb_write(usb_handle* handle, const void* data, int len);
79 int usb_read(usb_handle *handle, void* data, int len);
154 int usb_write(usb_handle* handle, const void* data, int len) { argument
155 unsigned long time_out = 500 + len * 8;
160 DBG("usb_write %d\n", len);
163 while(len > 0) {
164 int xfer = (len > MAX_USBFS_BULK_SIZE) ? MAX_USBFS_BULK_SIZE : len;
180 len -= written;
183 if (len
196 usb_read(usb_handle *handle, void* data, int len) argument
[all...]
/system/core/include/diskconfig/
H A Ddiskconfig.h102 uint32_t len; member in struct:write_list
/system/core/libcutils/
H A Dsched_policy.c177 size_t len; local
197 len = strlen(grp);
198 grp[len-1] = '\0'; /* Drop the trailing '\n' */
200 if (bufLen <= len) {
201 len = bufLen - 1;
203 strncpy(buf, grp, len);
204 buf[len] = '\0';

Completed in 198 milliseconds

1234567