Home
last modified time | relevance | path

Searched refs:length (Results 1 – 25 of 43) sorted by relevance

12

/system/security/keystore/
Dkeystore_get.h40 static int keystore_get(const char *key, int length, char *value) in keystore_get() argument
42 uint8_t bytes[2] = {length >> 8, length}; in keystore_get()
46 if (length < 0 || length > KEYSTORE_MESSAGE_SIZE) { in keystore_get()
55 send(sock, key, length, 0) == length && shutdown(sock, SHUT_WR) == 0 && in keystore_get()
59 length = bytes[0] << 8 | bytes[1]; in keystore_get()
60 while (offset < length) { in keystore_get()
61 int n = recv(sock, &value[offset], length - offset, 0); in keystore_get()
63 length = -1; in keystore_get()
69 length = -1; in keystore_get()
73 return length; in keystore_get()
Dkeystore_cli.cpp61 uint16_t length = strlen(argv[i]); in main() local
62 bytes[0] = length >> 8; in main()
63 bytes[1] = length; in main()
65 send(sock, argv[i], length, 0); in main()
77 int length; in main() local
83 length = bytes[0] << 8 | bytes[1]; in main()
84 for (offset = 0; offset < length; offset += i) { in main()
85 i = recv(sock, &bytes[offset], length - offset, 0); in main()
91 fwrite(bytes, 1, length, stdout); in main()
Dkeystore_client.cpp78 int length = bytes[0] << 8 | bytes[1]; in keystore_cmd() local
79 while (offset < length) { in keystore_cmd()
80 int n = TEMP_FAILURE_RETRY(recv(sock, &data[offset], length - offset, 0)); in keystore_cmd()
88 reply->setLength(length); in keystore_cmd()
113 void Keystore_Reply::setLength(size_t length) { in setLength() argument
114 mLength = length; in setLength()
117 size_t Keystore_Reply::length() const { in length() function in Keystore_Reply
Dkeystore.cpp90 length = origLen; in Value()
96 int length; member
103 assert(length <= VALUE_SIZE); in ValueString()
104 length = orig->length; in ValueString()
105 value = new char[length + 1]; in ValueString()
106 memcpy(value, orig->value, length); in ValueString()
107 value[length] = '\0'; in ValueString()
126 size_t length; member in ValueString
166 int length = key->length; in encode_key() local
167 for (int i = length; i > 0; --i, ++in, ++out) { in encode_key()
[all …]
Dkeystore_client.h31 void setLength(size_t length);
32 size_t length() const;
/system/core/toolbox/
Dioctl.c20 int length = -1; in ioctl_main() local
41 length = strtol(optarg, NULL, 0); in ioctl_main()
78 length = 4; in ioctl_main()
81 if(length < 0) { in ioctl_main()
82 length = (argc - optind) * arg_size; in ioctl_main()
84 if(length) { in ioctl_main()
85 ioctl_args = calloc(1, length); in ioctl_main()
88 rem = length; in ioctl_main()
102 rem = length; in ioctl_main()
110 else if(length) in ioctl_main()
[all …]
Dmount.c213 int length; in print_mounts() local
223 length = fread(buffer, 1, 100, f); in print_mounts()
224 if (length > 0) in print_mounts()
225 fwrite(buffer, 1, length, stdout); in print_mounts()
226 } while (length > 0); in print_mounts()
/system/vold/
DProcess.cpp37 int length; in readSymLink() local
45 length = readlink(path, link, max- 1); in readSymLink()
46 if (length <= 0) in readSymLink()
48 link[length] = 0; in readSymLink()
53 int length = strlen(mountPoint); in pathMatchesMountPoint() local
54 if (length > 1 && strncmp(path, mountPoint, length) == 0) { in pathMatchesMountPoint()
56 if (mountPoint[length - 1] == '/') in pathMatchesMountPoint()
60 return (path[length] == 0 || path[length] == '/'); in pathMatchesMountPoint()
73 int length = read(fd, buffer, max - 1); in getProcessName() local
74 buffer[length] = 0; in getProcessName()
/system/core/libcutils/
Duevent.c32 ssize_t uevent_kernel_multicast_recv(int socket, void *buffer, size_t length) in uevent_kernel_multicast_recv() argument
35 return uevent_kernel_multicast_uid_recv(socket, buffer, length, &user); in uevent_kernel_multicast_recv()
48 size_t length, uid_t *user) in uevent_kernel_multicast_uid_recv() argument
50 struct iovec iov = { buffer, length }; in uevent_kernel_multicast_uid_recv()
91 bzero(buffer, length); in uevent_kernel_multicast_uid_recv()
Dmspace.c258 size_t length; in destroy_contiguous_mspace() local
265 length = cs->top - (char *)cs; in destroy_contiguous_mspace()
266 if (munmap((char *)cs, length) != 0) in destroy_contiguous_mspace()
267 return length; in destroy_contiguous_mspace()
Dstrdup8to16.c186 int length, size_t *out_len) in strcpylen8to16() argument
192 const char *end = utf8Str + length; /* This line */ in strcpylen8to16()
/system/core/include/cutils/
Duevent.h28 ssize_t uevent_kernel_multicast_recv(int socket, void *buffer, size_t length);
29 ssize_t uevent_kernel_multicast_uid_recv(int socket, void *buffer, size_t length, uid_t *uid);
/system/extras/libublock/include/ublock/
Dublock.h28 int (*read)(char *buf, uint64_t length, uint64_t offset);
29 int (*write)(const char *buf, uint64_t length, uint64_t offset);
/system/extras/fatblock/
Dfatblock.c52 static int read_callback(char *buf, uint64_t length, uint64_t offset) in read_callback() argument
57 result = fs_read(&fs, buf, offset, length); in read_callback()
66 static int write_callback(const char *buf, uint64_t length, uint64_t offset) in write_callback() argument
68 DEBUG("writing to (%llu, %llu): we are read-only\n", offset, length); in write_callback()
/system/core/libusbhost/
Dusbhost.c246 int length; in usb_device_new() local
252 length = read(fd, device->desc, sizeof(device->desc)); in usb_device_new()
253 D("usb_device_new read returned %d errno %d\n", length, errno); in usb_device_new()
254 if (length < 0) in usb_device_new()
259 device->desc_length = length; in usb_device_new()
455 int length, in usb_device_control_transfer() argument
469 ctrl.wLength = length; in usb_device_control_transfer()
478 int length, in usb_device_bulk_transfer() argument
484 if (length > MAX_USBFS_BUFFER_SIZE) in usb_device_bulk_transfer()
485 length = MAX_USBFS_BUFFER_SIZE; in usb_device_bulk_transfer()
[all …]
/system/core/run-as/
Dpackage.c77 size_t length = 0; in map_file() local
103 length = (size_t)st.st_size; in map_file()
104 if ((off_t)length != st.st_size) { in map_file()
110 address = TEMP_FAILURE_RETRY(mmap(NULL, length, PROT_READ, MAP_PRIVATE, fd, 0)); in map_file()
117 *filesize = length; in map_file()
/system/core/libmincrypt/tools/
DDumpPublicKey.java110 if (args.length < 1) { in main()
115 for (int i = 0; i < args.length; i++) { in main()
122 System.out.println(i < args.length - 1 ? "," : ""); in main()
/system/extras/tests/framebuffer/
Drefresh.c96 info.red.offset, info.red.length, in main()
97 info.green.offset, info.green.length, in main()
98 info.blue.offset, info.blue.length in main()
/system/core/include/usbhost/
Dusbhost.h186 int length,
195 int length,
/system/core/libion/
Dion.c82 int ion_map(int fd, struct ion_handle *handle, size_t length, int prot, in ion_map() argument
97 *ptr = mmap(NULL, length, prot, flags, *map_fd, offset); in ion_map()
/system/netd/
DSoftapController.cpp71 wrq.u.data.length = sizeof(tBuf) / sizeof(struct iw_priv_args); in setCommand()
79 for(i=0; i < wrq.u.data.length;i++) { in setCommand()
86 if (i == wrq.u.data.length) { in setCommand()
108 wrq.u.data.length = strlen(mBuf) + 1; in setCommand()
110 wrq.u.data.length = buflen; in setCommand()
/system/core/sh/
Doutput.c109 open_mem(char *block, int length, struct output *file) in open_mem() argument
112 file->nleft = --length; in open_mem()
243 fmtstr(char *outbuf, size_t length, const char *fmt, ...) in fmtstr() argument
250 strout.nleft = length; in fmtstr()
256 outbuf[length - 1] = '\0'; in fmtstr()
/system/core/mkbootimg/
Dbootimg.h85 unsigned length; /* length in blocks */
/system/core/init/
Dproperty_service.c263 int fd, length; in write_persistent_property() local
460 int fd, length; in load_persistent_properties() local
474 length = read(fd, value, sizeof(value) - 1); in load_persistent_properties()
475 if (length >= 0) { in load_persistent_properties()
476 value[length] = 0; in load_persistent_properties()
/system/core/include/ion/
Dion.h33 int ion_map(int fd, struct ion_handle *handle, size_t length, int prot,

12