/system/core/adb/ |
D | adb_client.cpp | 49 static bool ReadProtocolString(int fd, std::string* s, std::string* error) { in ReadProtocolString() argument 52 *error = perror_str("protocol fault (couldn't read status length)"); in ReadProtocolString() 60 *error = perror_str("protocol fault (couldn't read status message)"); in ReadProtocolString() 94 std::string error; in adb_get_emulator_console_port() local 95 if (!adb_query("host:devices", &devices, &error)) { in adb_get_emulator_console_port() 96 printf("no emulator connected: %s\n", error.c_str()); in adb_get_emulator_console_port() 113 static int switch_socket_transport(int fd, std::string* error) { in switch_socket_transport() argument 139 *error = perror_str("write failure during connection"); in switch_socket_transport() 145 if (!adb_status(fd, error)) { in switch_socket_transport() 147 D("Switch transport failed: %s\n", error->c_str()); in switch_socket_transport() [all …]
|
/system/bt/test/suite/cases/ |
D | adapter.c | 25 int error; in adapter_enable_disable() local 27 CALL_AND_WAIT(error = bt_interface->enable(false), adapter_state_changed); in adapter_enable_disable() 28 TASSERT(error == BT_STATUS_SUCCESS, "Error enabling Bluetooth: %d", error); in adapter_enable_disable() 31 CALL_AND_WAIT(error = bt_interface->disable(), adapter_state_changed); in adapter_enable_disable() 32 TASSERT(error == BT_STATUS_SUCCESS, "Error disabling Bluetooth: %d", error); in adapter_enable_disable() 48 int error; in adapter_set_name() local 51 CALL_AND_WAIT(error = bt_interface->set_adapter_property(name), adapter_properties); in adapter_set_name() 52 TASSERT(error == BT_STATUS_SUCCESS, "Error setting device name."); in adapter_set_name() 63 int error; in adapter_get_name() local 67 CALL_AND_WAIT(error = bt_interface->get_adapter_property(BT_PROPERTY_BDNAME), adapter_properties); in adapter_get_name() [all …]
|
D | pan.c | 27 int error; in pan_enable() local 35 CALL_AND_WAIT(error = pan_interface->enable(local_role), pan_control_state_changed); in pan_enable() 36 TASSERT(error == BT_STATUS_SUCCESS, "Error enabling PAN: %d", error); in pan_enable() 45 int error; in pan_connect() local 51 …CALL_AND_WAIT(error = pan_interface->connect(&bt_remote_bdaddr, local_role, remote_role), pan_conn… in pan_connect() 52 TASSERT(error == BT_STATUS_SUCCESS, "Error connecting to remote host: %d", error); in pan_connect() 68 int error; in pan_disconnect() local 74 CALL_AND_WAIT(error = pan_interface->disconnect(&bt_remote_bdaddr), pan_connection_state_changed); in pan_disconnect() 75 TASSERT(error == BT_STATUS_SUCCESS, "Error disconnecting from remote host: %d", error); in pan_disconnect()
|
/system/extras/libpagemap/ |
D | pm_process.c | 36 int error; in pm_process_create() local 48 error = snprintf(filename, MAX_FILENAME, "/proc/%d/pagemap", pid); in pm_process_create() 49 if (error < 0 || error >= MAX_FILENAME) { in pm_process_create() 50 error = (error < 0) ? (errno) : (-1); in pm_process_create() 52 return error; in pm_process_create() 57 error = errno; in pm_process_create() 59 return error; in pm_process_create() 62 error = read_maps(proc); in pm_process_create() 63 if (error) { in pm_process_create() 65 return error; in pm_process_create() [all …]
|
D | pm_map.c | 36 int error; in pm_map_usage_flags() local 41 error = pm_map_pagemap(map, &pagemap, &len); in pm_map_usage_flags() 42 if (error) return error; in pm_map_usage_flags() 55 error = pm_kernel_flags(map->proc->ker, PM_PAGEMAP_PFN(pagemap[i]), in pm_map_usage_flags() 57 if (error) goto out; in pm_map_usage_flags() 63 error = pm_kernel_count(map->proc->ker, PM_PAGEMAP_PFN(pagemap[i]), in pm_map_usage_flags() 65 if (error) goto out; in pm_map_usage_flags() 77 error = 0; in pm_map_usage_flags() 82 return error; in pm_map_usage_flags() 94 int error; in pm_map_workingset() local [all …]
|
D | pm_kernel.c | 30 int error; in pm_kernel_create() local 41 error = errno; in pm_kernel_create() 43 return error; in pm_kernel_create() 48 error = errno; in pm_kernel_create() 51 return error; in pm_kernel_create() 67 int error; in pm_kernel_pids() local 87 error = errno; in pm_kernel_pids() 90 return error; in pm_kernel_pids() 105 error = errno; in pm_kernel_pids() 107 return error; in pm_kernel_pids()
|
/system/keymaster/ |
D | android_keymaster.cpp | 65 response->error = KM_ERROR_UNSUPPORTED_ALGORITHM; in check_supported() 78 rsp->error = KM_ERROR_OK; in GetVersion() 86 response->error = KM_ERROR_OK; in SupportedAlgorithms() 95 response->error = KM_ERROR_MEMORY_ALLOCATION_FAILED; in SupportedAlgorithms() 108 response->error = KM_ERROR_UNSUPPORTED_PURPOSE; in GetSupported() 159 response->error = context_->AddRngEntropy(request.random_data.peek_read(), in AddRngEntropy() 173 response->error = KM_ERROR_UNSUPPORTED_ALGORITHM; in GenerateKey() 178 response->error = factory->GenerateKey(request.key_description, &key_blob, in GenerateKey() 180 if (response->error == KM_ERROR_OK) in GenerateKey() 191 response->error = in GetKeyCharacteristics() [all …]
|
D | aes_operation.cpp | 82 keymaster_error_t* error) { in CreateOperation() argument 83 *error = KM_ERROR_OK; in CreateOperation() 92 *error = KM_ERROR_UNSUPPORTED_KEY_SIZE; in CreateOperation() 99 *error = KM_ERROR_UNSUPPORTED_BLOCK_MODE; in CreateOperation() 103 *error = KM_ERROR_UNSUPPORTED_BLOCK_MODE; in CreateOperation() 107 *error = KM_ERROR_INCOMPATIBLE_BLOCK_MODE; in CreateOperation() 113 *error = GetAndValidateGcmTagLength(begin_params, key.authorizations(), &tag_length); in CreateOperation() 114 if (*error != KM_ERROR_OK) { in CreateOperation() 120 if (!GetAndValidatePadding(begin_params, key, &padding, error)) { in CreateOperation() 125 *error = KM_ERROR_INCOMPATIBLE_PADDING_MODE; in CreateOperation() [all …]
|
D | rsa_operation.cpp | 41 EVP_PKEY* RsaOperationFactory::GetRsaKey(const Key& key, keymaster_error_t* error) { in GetRsaKey() argument 45 *error = KM_ERROR_UNKNOWN_ERROR; in GetRsaKey() 51 *error = KM_ERROR_UNKNOWN_ERROR; in GetRsaKey() 68 keymaster_error_t* error) { in CreateRsaOperation() argument 70 if (!GetAndValidatePadding(begin_params, key, &padding, error)) in CreateRsaOperation() 77 if (require_digest && !GetAndValidateDigest(begin_params, key, &digest, error)) in CreateRsaOperation() 80 UniquePtr<EVP_PKEY, EVP_PKEY_Delete> rsa(GetRsaKey(key, error)); in CreateRsaOperation() 86 *error = KM_ERROR_MEMORY_ALLOCATION_FAILED; in CreateRsaOperation() 100 keymaster_error_t* error) { in CreateRsaOperation() argument 101 UniquePtr<RsaOperation> op(RsaOperationFactory::CreateRsaOperation(key, begin_params, error)); in CreateRsaOperation() [all …]
|
D | ecdsa_keymaster1_operation.h | 66 keymaster_error_t error = wrapped_operation_.Begin(super::ecdsa_key_, input_params); in Begin() local 67 if (error != KM_ERROR_OK) in Begin() 68 return error; in Begin() 74 keymaster_error_t error = wrapped_operation_.PrepareFinish(super::ecdsa_key_, input_params); in Finish() local 75 if (error != KM_ERROR_OK) in Finish() 76 return error; in Finish() 77 error = super::Finish(input_params, signature, output_params, output); in Finish() 79 error = wrapped_operation_.GetError(super::ecdsa_key_); in Finish() 80 if (error == KM_ERROR_OK) in Finish() 82 return error; in Finish() [all …]
|
D | rsa_keymaster1_operation.h | 66 keymaster_error_t error = wrapped_operation_.Begin(super::rsa_key_, input_params); in Begin() local 67 if (error != KM_ERROR_OK) in Begin() 68 return error; in Begin() 74 keymaster_error_t error = wrapped_operation_.PrepareFinish(super::rsa_key_, input_params); in Finish() local 75 if (error != KM_ERROR_OK) in Finish() 76 return error; in Finish() 77 error = super::Finish(input_params, signature, output_params, output); in Finish() 79 error = wrapped_operation_.GetError(super::rsa_key_); in Finish() 80 if (error == KM_ERROR_OK) in Finish() 82 return error; in Finish() [all …]
|
D | symmetric_key.cpp | 46 keymaster_error_t error = validate_algorithm_specific_new_key_params(key_description); in GenerateKey() local 47 if (error != KM_ERROR_OK) in GenerateKey() 48 return error; in GenerateKey() 55 error = context_->GenerateRandom(key_material.writable_data(), key_data_size); in GenerateKey() 56 if (error != KM_ERROR_OK) { in GenerateKey() 58 return error; in GenerateKey() 83 keymaster_error_t error = validate_algorithm_specific_new_key_params(key_description); in ImportKey() local 84 if (error != KM_ERROR_OK) in ImportKey() 85 return error; in ImportKey() 112 keymaster_error_t* error) in SymmetricKey() argument [all …]
|
D | keymaster1_engine.cpp | 87 keymaster_error_t error = keymaster1_device_->generate_key(keymaster1_device_, &key_description, in GenerateKey() local 89 if (error != KM_ERROR_OK) in GenerateKey() 90 return error; in GenerateKey() 96 return error; in GenerateKey() 111 keymaster_error_t error = keymaster1_device_->import_key(keymaster1_device_, &key_description, in ImportKey() local 114 if (error != KM_ERROR_OK) in ImportKey() 115 return error; in ImportKey() 121 return error; in ImportKey() 126 keymaster_error_t* error) const { in BuildRsaKey() 130 *error = TranslateLastOpenSslError(); in BuildRsaKey() [all …]
|
D | ec_key_factory.cpp | 83 keymaster_error_t error = EvpKeyToKeyMaterial(pkey.get(), &key_material); in GenerateKey() local 84 if (error != KM_ERROR_OK) in GenerateKey() 85 return error; in GenerateKey() 102 keymaster_error_t error = UpdateImportKeyDescription( in ImportKey() local 104 if (error != KM_ERROR_OK) in ImportKey() 105 return error; in ImportKey() 120 keymaster_error_t error = in UpdateImportKeyDescription() local 122 if (error != KM_ERROR_OK) in UpdateImportKeyDescription() 123 return error; in UpdateImportKeyDescription() 132 error = get_group_size(*EC_KEY_get0_group(ec_key.get()), &extracted_key_size_bits); in UpdateImportKeyDescription() [all …]
|
D | soft_keymaster_context.cpp | 183 keymaster_error_t error = SetAuthorizations(key_description, origin, hw_enforced, sw_enforced); in CreateKeyBlob() local 184 if (error != KM_ERROR_OK) in CreateKeyBlob() 185 return error; in CreateKeyBlob() 188 error = BuildHiddenAuthorizations(key_description, &hidden); in CreateKeyBlob() 189 if (error != KM_ERROR_OK) in CreateKeyBlob() 190 return error; in CreateKeyBlob() 202 keymaster_error_t error = DeserializeAuthEncryptedBlob(blob, &encrypted_key_material, in ParseOcbAuthEncryptedBlob() local 204 if (error != KM_ERROR_OK) in ParseOcbAuthEncryptedBlob() 205 return error; in ParseOcbAuthEncryptedBlob() 280 keymaster_error_t error = FakeKeyAuthorizations(pkey.get(), sw_enforced, sw_enforced); in ParseOldSoftkeymasterBlob() local [all …]
|
D | rsa_key_factory.cpp | 91 keymaster_error_t error = EvpKeyToKeyMaterial(pkey.get(), &key_material); in GenerateKey() local 92 if (error != KM_ERROR_OK) in GenerateKey() 93 return error; in GenerateKey() 111 keymaster_error_t error = in ImportKey() local 114 if (error != KM_ERROR_OK) in ImportKey() 115 return error; in ImportKey() 130 keymaster_error_t error = in UpdateImportKeyDescription() local 132 if (error != KM_ERROR_OK) in UpdateImportKeyDescription() 133 return error; in UpdateImportKeyDescription() 173 keymaster_error_t error; in CreateEmptyKey() local [all …]
|
D | rsa_keymaster0_key.cpp | 80 keymaster_error_t error = in ImportKey() local 83 if (error != KM_ERROR_OK) in ImportKey() 84 return error; in ImportKey() 116 keymaster_error_t error; in LoadKey() local 118 RsaKeymaster0Key(rsa.release(), hw_enforced, sw_enforced, engine_, &error)); in LoadKey() 120 error = KM_ERROR_MEMORY_ALLOCATION_FAILED; in LoadKey() 122 if (error != KM_ERROR_OK) in LoadKey() 123 return error; in LoadKey() 130 const Keymaster0Engine* engine, keymaster_error_t* error) in RsaKeymaster0Key() argument 131 : RsaKey(rsa_key, hw_enforced, sw_enforced, error), engine_(engine) {} in RsaKeymaster0Key()
|
D | ec_keymaster1_key.cpp | 91 keymaster_error_t error; in LoadKey() local 93 engine_->BuildEcKey(key_material, additional_params, &error)); in LoadKey() 95 return error; in LoadKey() 98 EcdsaKeymaster1Key(ecdsa.release(), hw_enforced, sw_enforced, engine_, &error)); in LoadKey() 100 error = KM_ERROR_MEMORY_ALLOCATION_FAILED; in LoadKey() 102 if (error != KM_ERROR_OK) in LoadKey() 103 return error; in LoadKey() 122 const Keymaster1Engine* engine, keymaster_error_t* error) in EcdsaKeymaster1Key() argument 123 : EcKey(ecdsa_key, hw_enforced, sw_enforced, error), engine_(engine) {} in EcdsaKeymaster1Key()
|
D | operation.cpp | 89 keymaster_error_t* error) const { in GetAndValidatePadding() 90 *error = KM_ERROR_UNSUPPORTED_PADDING_MODE; in GetAndValidatePadding() 104 *error = KM_ERROR_INCOMPATIBLE_PADDING_MODE; in GetAndValidatePadding() 108 *error = KM_ERROR_OK; in GetAndValidatePadding() 114 keymaster_error_t* error) const { in GetAndValidateDigest() 115 *error = KM_ERROR_UNSUPPORTED_DIGEST; in GetAndValidateDigest() 129 *error = KM_ERROR_INCOMPATIBLE_DIGEST; in GetAndValidateDigest() 132 *error = KM_ERROR_OK; in GetAndValidateDigest()
|
/system/extras/tests/sdcard/ |
D | sysutil.cpp | 96 bool error = false; in readStringFromFile() local 101 while (size > 0 && !error && !eof && attempts < kMaxAttempts) in readStringFromFile() 109 error = EAGAIN != errno && EINTR != errno; in readStringFromFile() 110 if (error) in readStringFromFile() 129 if (error) in readStringFromFile() 162 bool error = false; in writeStringToFile() local 165 while (size > 0 && !error && attempts < kMaxAttempts) in writeStringToFile() 171 error = EAGAIN != errno && EINTR != errno; in writeStringToFile() 172 if (error) in writeStringToFile() 186 if (error) in writeStringToFile() [all …]
|
/system/bt/btif/src/ |
D | btif_sock_sdp.c | 135 goto error; in create_base_record() 143 goto error; in create_base_record() 150 goto error; in create_base_record() 157 error: in create_base_record() 181 goto error; in add_sdp_by_uuid() 203 goto error; in add_sdp_by_uuid() 210 error: in add_sdp_by_uuid() 232 goto error; in add_pbap_sdp() 238 goto error; in add_pbap_sdp() 245 goto error; in add_pbap_sdp() [all …]
|
/system/bt/tools/bdtool/ |
D | bdtool.c | 156 int error; in main() local 157 … CALL_AND_WAIT(error = bt_interface->get_adapter_property(BT_PROPERTY_BDNAME), adapter_properties); in main() 158 if (error != BT_STATUS_SUCCESS) { in main() 176 int error; in main() local 177 CALL_AND_WAIT(error = bt_interface->set_adapter_property(property), adapter_properties); in main() 178 if (error != BT_STATUS_SUCCESS) { in main() 182 … CALL_AND_WAIT(error = bt_interface->get_adapter_property(BT_PROPERTY_BDNAME), adapter_properties); in main() 183 if (error != BT_STATUS_SUCCESS) { in main() 202 … int error = sock->listen(BTSOCK_RFCOMM, "meow", (const uint8_t *)&HFP_AG_UUID, 0, &rfcomm_fd, 0); in main() local 203 if (error != BT_STATUS_SUCCESS) { in main() [all …]
|
/system/extras/procmem/ |
D | procmem.c | 76 int error; in main() local 103 error = pm_kernel_create(&ker); in main() 104 if (error) { in main() 112 error = pm_process_create(ker, pid, &proc); in main() 113 if (error) { in main() 120 error = pm_process_workingset(proc, NULL, 1); in main() 121 if (error) { in main() 129 error = pm_process_maps(proc, &maps, &num_maps); in main() 130 if (error) { in main() 170 error = pm_map_workingset(mi->map, &mi->usage); in main() [all …]
|
/system/extras/ext4_utils/ |
D | indirect.c | 58 error("failed to reserve oob block"); in reserve_indirect_block() 63 error("failed to advance %d blocks", len); in reserve_indirect_block() 71 error("failed to reserve oob block"); in reserve_dindirect_block() 88 error("failed to reserve oob block"); in reserve_tindirect_block() 117 error("failed to reserve oob block"); in fill_dindirect_block() 131 error("failed to advance %d blocks", ind_block_len); in fill_dindirect_block() 147 error("failed to reserve oob block"); in fill_tindirect_block() 177 error("failed to advance %d blocks", len); in inode_attach_direct_blocks() 198 error("failed to advance oob block"); in inode_attach_indirect_blocks() 209 error("failed to advance %d blocks", len); in inode_attach_indirect_blocks() [all …]
|
/system/core/libcutils/ |
D | socket_local_client.c | 60 goto error; in socket_make_sockaddr_un() 77 goto error; in socket_make_sockaddr_un() 90 goto error; in socket_make_sockaddr_un() 102 goto error; in socket_make_sockaddr_un() 115 error: in socket_make_sockaddr_un() 136 goto error; in socket_local_client_connect() 140 goto error; in socket_local_client_connect() 145 error: in socket_local_client_connect()
|