Home
last modified time | relevance | path

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

1234

/system/core/toolbox/
Dioctl.c20 int length = -1; in ioctl_main() local
41 length = strtol(optarg, NULL, 0); in ioctl_main()
82 length = 4; in ioctl_main()
85 if(length < 0) { in ioctl_main()
86 length = (argc - optind) * arg_size; in ioctl_main()
88 if(length) { in ioctl_main()
89 ioctl_args = calloc(1, length); in ioctl_main()
92 rem = length; in ioctl_main()
106 rem = length; in ioctl_main()
114 else if(length) in ioctl_main()
[all …]
Dmount.c241 int length; in print_mounts() local
251 length = fread(buffer, 1, 100, f); in print_mounts()
252 if (length > 0) in print_mounts()
253 fwrite(buffer, 1, length, stdout); in print_mounts()
254 } while (length > 0); in print_mounts()
/system/extras/verity/
DBootSignature.java70 private ASN1Integer length; field in BootSignature
81 public BootSignature(String target, int length) { in BootSignature() argument
84 this.length = new ASN1Integer(length); in BootSignature()
115 length = (ASN1Integer) attrs.getObjectAt(1); in BootSignature()
123 attrs.add(length); in getAuthenticatedAttributes()
156 byte[] signable = Arrays.copyOf(image, image.length + attrs.length); in generateSignableImage()
157 for (int i=0; i < attrs.length; i++) { in generateSignableImage()
158 signable[i+image.length] = attrs[i]; in generateSignableImage()
169 if (length.getValue().intValue() != image.length) { in verify()
206 int length = pageSize // include the page aligned image header in getSignableImageSize() local
[all …]
Dverify_boot_signature.c42 ASN1_INTEGER *length; member
47 ASN1_SIMPLE(AuthAttrs, length, ASN1_INTEGER)
161 static int validate_signature_block(const BootSignature *bs, uint64_t length) in validate_signature_block() argument
192 length = htobe64(length); in validate_signature_block()
193 BN_bin2bn((const unsigned char *) &length, sizeof(length), &expected); in validate_signature_block()
195 ASN1_INTEGER_to_BN(bs->authenticatedAttributes->length, &value); in validate_signature_block()
219 static int hash_image(int fd, uint64_t length, const AuthAttrs *aa, in hash_image() argument
253 if ((length - total) < BUFFER_SIZE) { in hash_image()
254 bytes = length - total; in hash_image()
264 } while (total < length); in hash_image()
[all …]
DVeritySigner.java35 if (args.length < 3) { in main()
44 if (args.length > 3 && "-verify".equals(args[3])) { in main()
/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/fastbootd/
Dutils.c164 ssize_t bulk_write(int bulk_in, const char *buf, size_t length) in bulk_write() argument
170 ret = TEMP_FAILURE_RETRY(write(bulk_in, buf + count, length - count)); in bulk_write()
173 bulk_in, length, errno, strerror(errno)); in bulk_write()
178 } while (count < length); in bulk_write()
184 ssize_t bulk_read(int bulk_out, char *buf, size_t length) in bulk_read() argument
189 while (n < length) { in bulk_read()
190 size_t to_read = (length - n > READ_BUF_SIZE) ? READ_BUF_SIZE : length - n; in bulk_read()
194 bulk_out, length, errno, strerror(errno)); in bulk_read()
200 ret, to_read, n, length); in bulk_read()
Dutils.h46 ssize_t bulk_read(int bulk_out, char *buf, size_t length);
47 ssize_t bulk_write(int bulk_in, const char *buf, size_t length);
/system/extras/ksmutils/
Dlookup3.c176 size_t length, /* the length of the key, in uint32_ts */ in hashword() argument
182 a = b = c = 0xdeadbeef + (((uint32_t)length)<<2) + initval; in hashword()
185 while (length > 3) in hashword()
191 length -= 3; in hashword()
196 switch(length) /* all the case statements fall through */ in hashword()
220 size_t length, /* the length of the key, in uint32_ts */ in hashword2() argument
227 a = b = c = 0xdeadbeef + ((uint32_t)(length<<2)) + *pc; in hashword2()
231 while (length > 3) in hashword2()
237 length -= 3; in hashword2()
242 switch(length) /* all the case statements fall through */ in hashword2()
[all …]
/system/core/libutils/
DTokenizer.cpp39 bool ownBuffer, size_t length) : in Tokenizer() argument
41 mBuffer(buffer), mOwnBuffer(ownBuffer), mLength(length), in Tokenizer()
68 size_t length = size_t(stat.st_size); in open() local
73 if (fileMap->create(NULL, fd, 0, length, true)) { in open()
83 buffer = new char[length]; in open()
85 ssize_t nrd = read(fd, buffer, length); in open()
92 length = size_t(nrd); in open()
97 *outTokenizer = new Tokenizer(filename, fileMap, buffer, ownBuffer, length); in open()
DString8.cpp338 size_t oldLength = length(); in appendFormatV()
440 void String8::toLower(size_t start, size_t length) in toLower() argument
446 if (start+length > len) { in toLower()
447 length = len-start; in toLower()
451 while (length > 0) { in toLower()
454 length--; in toLower()
464 void String8::toUpper(size_t start, size_t length) in toUpper() argument
470 if (start+length > len) { in toUpper()
471 length = len-start; in toUpper()
475 while (length > 0) { in toUpper()
[all …]
DFileMap.cpp90 bool FileMap::create(const char* origFileName, int fd, off64_t offset, size_t length, in create() argument
117 adjLength = length + adjust; in create()
142 assert(length > 0); in create()
161 adjLength = length + adjust; in create()
188 mDataLength = length; in create()
/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()
/system/keymaster/
Dgoogle_keymaster_messages.cpp93 void GetKeyCharacteristicsRequest::SetKeyMaterial(const void* key_material, size_t length) { in SetKeyMaterial() argument
95 key_blob.key_material = dup_buffer(key_material, length); in SetKeyMaterial()
96 key_blob.key_material_size = length; in SetKeyMaterial()
135 void BeginOperationRequest::SetKeyMaterial(const void* key_material, size_t length) { in SetKeyMaterial() argument
137 key_blob.key_material = dup_buffer(key_material, length); in SetKeyMaterial()
138 key_blob.key_material_size = length; in SetKeyMaterial()
227 void ImportKeyRequest::SetKeyMaterial(const void* key_material, size_t length) { in SetKeyMaterial() argument
229 key_data = dup_buffer(key_material, length); in SetKeyMaterial()
230 key_data_length = length; in SetKeyMaterial()
256 void ImportKeyResponse::SetKeyMaterial(const void* key_material, size_t length) { in SetKeyMaterial() argument
[all …]
Dgoogle_keymaster_utils.cpp28 int memcmp_s(const void* p1, const void* p2, size_t length) { in memcmp_s() argument
32 while (length-- > 0) in memcmp_s()
Dgoogle_softkeymaster.h45 void GenerateNonce(uint8_t* nonce, size_t length) { in GenerateNonce() argument
46 for (size_t i = 0; i < length; ++i) in GenerateNonce()
/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/core/fastbootd/commands/
Dflash.c57 size_t length; in flash_find_entry() local
63 length = strspn(name, ALLOWED_CHARS); in flash_find_entry()
64 if (length != strlen(name)) { in flash_find_entry()
65 D(ERR, "Not allowed char in name: %c", name[length]); in flash_find_entry()
/system/core/adb/
DSYNC.TXT21 integer, with various uses. This number will be called "length" below. In fact
35 For all of the sync request above the must be followed by length number of
47 5. A four-byte integer representing file name length.
48 6. length number of bytes containing an utf-8 string representing the file
65 A sync request with id "DATA" and length equal to the chunk size. After
69 When the file is tranfered a sync request "DONE" is sent, where length is set
71 request (but not to chuck requests) with an "OKAY" sync response (length can
78 received is split up into chunks. The sync response id is "DATA" and length is
83 length can be ignored.
Dusb_linux_client.c68 .length = cpu_to_le32(sizeof(descriptors)),
137 .length = cpu_to_le32(sizeof(strings)),
346 static int bulk_write(int bulk_in, const char *buf, size_t length) in bulk_write() argument
352 ret = adb_write(bulk_in, buf + count, length - count); in bulk_write()
359 } while (count < length); in bulk_write()
380 static int bulk_read(int bulk_out, char *buf, size_t length) in bulk_read() argument
386 ret = adb_read(bulk_out, buf + count, length - count); in bulk_read()
390 bulk_out, length, count); in bulk_read()
396 } while (count < length); in bulk_read()
/system/core/logd/
DLogStatistics.cpp546 oldLength = string.length(); in format()
551 spaces += spaces_total + oldLength - string.length(); in format()
575 oldLength = string.length(); in format()
581 spaces += spaces_total + oldLength - string.length(); in format()
598 oldLength = string.length(); in format()
603 spaces -= string.length() - oldLength; in format()
714 oldLength = string.length(); in format()
719 spaces += spaces_time + oldLength - string.length(); in format()
731 oldLength = string.length(); in format()
751 spaces -= string.length() - oldLength; in format()
[all …]
/system/extras/puncture_fs/
Dpuncture_fs.c75 u64 length = 0; in create_unique_file() local
93 while (length + base_length < size) { in create_unique_file()
102 length += base_length; in create_unique_file()
104 if (write(fd, base, size - length) < 0) { in create_unique_file()
107 errno, size - length, file_path); in create_unique_file()
/system/core/libziparchive/
Dzip_archive.cc330 const size_t length, const bool read_only, in MapFileSegment() argument
333 const bool success = file_map->create(debug_file_name, fd, start, length, read_only); in MapFileSegment()
342 static int32_t CopyFileToFile(int fd, uint8_t* begin, const uint32_t length, uint64_t *crc_out) { in CopyFileToFile() argument
348 while (count < length) { in CopyFileToFile()
349 uint32_t remaining = length - count; in CopyFileToFile()
404 const char* name, uint16_t length) { in EntryToIndex() argument
405 const uint32_t hash = ComputeHash(name, length); in EntryToIndex()
410 if (hash_table[ent].name_length == length && in EntryToIndex()
411 memcmp(hash_table[ent].name, name, length) == 0) { in EntryToIndex()
418 ALOGV("Zip: Unable to find entry %.*s", length, name); in EntryToIndex()
[all …]
/system/core/include/utils/
DVectorImpl.h72 ssize_t insertArrayAt(const void* array, size_t index, size_t length);
73 ssize_t appendArray(const void* array, size_t length);
170 ssize_t insertArrayAt(const void* array, size_t index, size_t length);
171 ssize_t appendArray(const void* array, size_t length);
/system/media/audio_route/
Daudio_route.c58 unsigned int length; member
103 ALOGE("Path: %s, length: %d", path->name, path->length); in path_print()
104 for (i = 0; i < path->length; i++) { in path_print()
170 ar->mixer_path[ar->num_mixer_paths].length = 0; in path_create()
182 for (i = 0; i < path->length; i++) in find_ctl_index_in_path()
195 if (path->size <= path->length) { in alloc_path_setting()
211 path_index = path->length; in alloc_path_setting()
212 path->length++; in alloc_path_setting()
293 for (i = 0; i < sub_path->length; i++) in path_add_path()
307 for (i = 0; i < path->length; i++) { in path_apply()
[all …]

1234