Home
last modified time | relevance | path

Searched refs:rc (Results 1 – 25 of 347) sorted by relevance

12345678910>>...14

/system/core/trusty/storage/tests/
Dmain.cpp85 int rc = storage_open_session(TRUSTY_DEVICE_NAME, &session_, port_); in SetUp() local
86 ASSERT_EQ(0, rc); in SetUp()
128 int rc; in WriteZeroChunk() local
136 rc = storage_write(handle, off, data_buf, sizeof(data_buf), in WriteZeroChunk()
138 ASSERT_EQ((int)chunk_len, rc); in WriteZeroChunk()
144 int rc; in WritePatternChunk() local
152 rc = storage_write(handle, off, data_buf, sizeof(data_buf), in WritePatternChunk()
154 ASSERT_EQ((int)chunk_len, rc); in WritePatternChunk()
178 int rc; in ReadChunk() local
186 rc = storage_read(handle, off, data_buf, chunk_len); in ReadChunk()
[all …]
/system/core/trusty/utils/spiproxyd/
Dmain.c29 int rc; in handle_msg() local
34 rc = read(trusty_dev_fd, &msg_buf, sizeof(msg_buf)); in handle_msg()
35 if (rc < 0) { in handle_msg()
36 ALOGE("failed (%d) to read request from TA\n", rc); in handle_msg()
37 return rc; in handle_msg()
39 msg_len = rc; in handle_msg()
42 rc = write(spi_dev_fd, &msg_buf, msg_len); in handle_msg()
43 if (rc < 0 || (size_t)rc != msg_len) { in handle_msg()
44 ALOGE("failed (%d) to forward request to host\n", rc); in handle_msg()
45 return rc < 0 ? rc : -1; in handle_msg()
[all …]
/system/security/keystore/tests/
Dauth_token_table_test.cpp99 AuthTokenTable::Error rc; in TEST() local
104 (std::tie(rc, found) = table.FindAuthorization(make_set(1), KeyPurpose::SIGN, 0), rc)); in TEST()
110 (std::tie(rc, found) = table.FindAuthorization(make_set(2), KeyPurpose::SIGN, 0), rc)); in TEST()
116 (std::tie(rc, found) = table.FindAuthorization(make_set(3), KeyPurpose::SIGN, 0), rc)); in TEST()
122 (std::tie(rc, found) = table.FindAuthorization(make_set(4), KeyPurpose::SIGN, 0), rc)); in TEST()
128 (std::tie(rc, found) = table.FindAuthorization(make_set(5), KeyPurpose::SIGN, 0), rc)); in TEST()
138 AuthTokenTable::Error rc; in TEST() local
145 (std::tie(rc, found) = table.FindAuthorization(make_set(1), KeyPurpose::SIGN, 0), rc)); in TEST()
148 (std::tie(rc, found) = table.FindAuthorization(make_set(2), KeyPurpose::SIGN, 0), rc)); in TEST()
151 (std::tie(rc, found) = table.FindAuthorization(make_set(3), KeyPurpose::SIGN, 0), rc)); in TEST()
[all …]
/system/core/trusty/storage/lib/
Dstorage.c108 ssize_t rc; in send_reqv() local
110 rc = writev(session, tx_iovs, tx_iovcnt); in send_reqv()
111 if (rc < 0) { in send_reqv()
112 rc = -errno; in send_reqv()
114 return rc; in send_reqv()
117 rc = readv(session, rx_iovs, rx_iovcnt); in send_reqv()
118 if (rc < 0) { in send_reqv()
119 rc = -errno; in send_reqv()
121 return rc; in send_reqv()
124 return rc; in send_reqv()
[all …]
/system/core/trusty/storage/proxy/
Dproxy.c113 int rc; in handle_req() local
126 rc = storage_sync_checkpoint(); in handle_req()
127 if (rc < 0) { in handle_req()
135 rc = storage_file_delete(msg, req, req_len); in handle_req()
139 rc = storage_file_open(msg, req, req_len); in handle_req()
143 rc = storage_file_close(msg, req, req_len); in handle_req()
147 rc = storage_file_write(msg, req, req_len); in handle_req()
151 rc = storage_file_read(msg, req, req_len); in handle_req()
155 rc = storage_file_get_size(msg, req, req_len); in handle_req()
159 rc = storage_file_set_size(msg, req, req_len); in handle_req()
[all …]
Dstorage.c128 ssize_t rc; in write_with_retry() local
132 rc = TEMP_FAILURE_RETRY(pwrite(fd, buf, size, offset)); in write_with_retry()
133 if (rc < 0) in write_with_retry()
134 return rc; in write_with_retry()
135 size -= rc; in write_with_retry()
136 buf += rc; in write_with_retry()
137 offset += rc; in write_with_retry()
144 ssize_t rc; in read_with_retry() local
149 rc = TEMP_FAILURE_RETRY(pread(fd, buf, size, offset)); in read_with_retry()
150 if (rc < 0) in read_with_retry()
[all …]
Dipc.c37 int rc; in ipc_connect() local
43 rc = tipc_connect(device, port); in ipc_connect()
44 if (rc >= 0) in ipc_connect()
47 ALOGE("failed (%d) to connect to storage server\n", rc); in ipc_connect()
55 tipc_fd = rc; in ipc_connect()
69 ssize_t rc; in ipc_get_msg() local
74 rc = readv(tipc_fd, iovs, 2); in ipc_get_msg()
75 if (rc < 0) { in ipc_get_msg()
77 return rc; in ipc_get_msg()
81 if ((size_t)rc < sizeof(*msg)) { in ipc_get_msg()
[all …]
Drpmb.c140 int rc; in send_mmc_rpmb_req() local
188 rc = ioctl(mmc_fd, MMC_IOC_MULTI_CMD, &mmc.multi); in send_mmc_rpmb_req()
189 if (rc < 0) { in send_mmc_rpmb_req()
190 ALOGE("%s: mmc ioctl failed: %d, %s\n", __func__, rc, strerror(errno)); in send_mmc_rpmb_req()
192 return rc; in send_mmc_rpmb_req()
196 int rc; in send_ufs_rpmb_req() local
212 rc = ioctl(sg_fd, SG_IO, &io_hdr); in send_ufs_rpmb_req()
213 if (rc < 0) { in send_ufs_rpmb_req()
214 ALOGE("%s: ufs ioctl failed: %d, %s\n", __func__, rc, strerror(errno)); in send_ufs_rpmb_req()
225 rc = ioctl(sg_fd, SG_IO, &io_hdr); in send_ufs_rpmb_req()
[all …]
/system/security/keystore/
DKeyAttestationPackageInfo.cpp34 auto rc = parcel->writeString16(packageName_); in writeToParcel() local
35 if (rc != NO_ERROR) return rc; in writeToParcel()
36 rc = parcel->writeInt64(versionCode_); in writeToParcel()
37 if (rc != NO_ERROR) return rc; in writeToParcel()
42 auto rc = parcel->readString16(&packageName_); in readFromParcel() local
43 if (rc != NO_ERROR) return rc; in readFromParcel()
44 rc = parcel->readInt64(&versionCode_); in readFromParcel()
45 if (rc != NO_ERROR) return rc; in readFromParcel()
48 rc = parcel->readParcelableVector(&temp_vector); in readFromParcel()
49 if (rc != NO_ERROR) return rc; in readFromParcel()
Dkeystore_aidl_hidl_marshalling_utils.cpp46 auto rc = out->writeInt32(size); in writeKeymasterBlob() local
47 if (rc != ::android::OK) return rc; in writeKeymasterBlob()
58 auto rc = out->writeInt32(size); in writeKeymasterBlob() local
59 if (rc != ::android::OK) return rc; in writeKeymasterBlob()
106 auto rc = out->writeInt32(uint32_t(tag)); in writeKeyParameterToParcel() local
107 if (rc != ::android::OK) return rc; in writeKeyParameterToParcel()
113 rc = out->writeInt32(param.f.integer); in writeKeyParameterToParcel()
118 rc = out->writeInt64(param.f.longInteger); in writeKeyParameterToParcel()
125 rc = writeKeymasterBlob(param.blob, out); in writeKeyParameterToParcel()
129 rc = android::BAD_VALUE; in writeKeyParameterToParcel()
[all …]
Dkeymaster_worker.cpp129 ResponseCode rc; in upgradeKeyBlob() local
131 std::tie(rc, blob, charBlob) = in upgradeKeyBlob()
136 if (rc != ResponseCode::NO_ERROR) { in upgradeKeyBlob()
137 return error = rc, result; in upgradeKeyBlob()
187 auto& [rc, resultCharacteristics, outBlob, charOutBlob] = result; in createKeyCharacteristicsCache()
189 KeyStoreServiceReturnCode& rc = std::get<0>(result); in createKeyCharacteristicsCache() local
195 rc = ResponseCode::SYSTEM_ERROR; in createKeyCharacteristicsCache()
210 return rc = ResponseCode::SYSTEM_ERROR, result; in createKeyCharacteristicsCache()
250 rc = KS_HANDLE_HIDL_ERROR( in createKeyCharacteristicsCache()
252 if (!rc.isOk()) { in createKeyCharacteristicsCache()
[all …]
DKeystoreResponse.cpp30 auto rc = in->readInt32(&response_code_); in readFromParcel() local
31 if (rc != NO_ERROR) return rc; in readFromParcel()
36 auto rc = out->writeInt32(response_code_); in writeToParcel() local
37 if (rc != NO_ERROR) return rc; in writeToParcel()
/system/extras/tests/pagingtest/
Dpagingtest.c23 ssize_t rc; in create_tmp_file() local
58 rc = read(urandom, tmp_buf, tmp_size); in create_tmp_file()
60 if (rc < 0) { in create_tmp_file()
65 tmp_buf += rc; in create_tmp_file()
66 tmp_size -= rc; in create_tmp_file()
79 rc = posix_fadvise(fd, 0, size, POSIX_FADV_DONTNEED); in create_tmp_file()
80 if (rc) { in create_tmp_file()
144 int rc; in main() local
166 rc = mmap_test(test_runs, alloc_size); in main()
167 if (rc) { in main()
[all …]
/system/core/trusty/libtrusty/tipc-test/
Dtipc_test.c278 ssize_t rc; in closer3_test() local
298 rc = write(fd[j], buf, sizeof(buf)); in closer3_test()
299 if (rc != sizeof(buf)) { in closer3_test()
302 __func__, j, fd[j], rc); in closer3_test()
316 rc = write(fd[j], buf, sizeof(buf)); in closer3_test()
317 if (rc != sizeof(buf)) { in closer3_test()
320 __func__, j, fd[j], rc); in closer3_test()
345 ssize_t rc; in echo_test() local
371 rc = write(echo_fd, tx_buf, msg_len); in echo_test()
372 if ((size_t)rc != msg_len) { in echo_test()
[all …]
/system/sepolicy/tools/
Dversion_policy.c31 int rc = SEPOL_ERR; in read_cil_file() local
43 rc = stat(path, &filedata); in read_cil_file()
44 if (rc == -1) { in read_cil_file()
52 rc = SEPOL_ERR; in read_cil_file()
55 rc = fread(buff, file_size, 1, file); in read_cil_file()
56 if (rc != 1) { in read_cil_file()
58 rc = SEPOL_ERR; in read_cil_file()
65 rc = cil_add_file(*db, path, buff, file_size); in read_cil_file()
66 if (rc != SEPOL_OK) { in read_cil_file()
79 return rc; in read_cil_file()
[all …]
/system/core/trusty/gatekeeper/
Dtrusty_gatekeeper_ipc.c36 int rc = tipc_connect(TRUSTY_DEVICE_NAME, GATEKEEPER_PORT); in trusty_gatekeeper_connect() local
37 if (rc < 0) { in trusty_gatekeeper_connect()
38 return rc; in trusty_gatekeeper_connect()
41 handle_ = rc; in trusty_gatekeeper_connect()
57 ssize_t rc = write(handle_, msg, msg_size); in trusty_gatekeeper_call() local
60 if (rc < 0) { in trusty_gatekeeper_call()
66 rc = read(handle_, out, *out_size); in trusty_gatekeeper_call()
67 if (rc < 0) { in trusty_gatekeeper_call()
73 if ((size_t) rc < sizeof(struct gatekeeper_message)) { in trusty_gatekeeper_call()
74 ALOGE("invalid response size (%d)\n", (int) rc); in trusty_gatekeeper_call()
[all …]
/system/core/trusty/confirmationui/
DTrustyApp.cpp75 int rc = writev(handle, iov, 2); in TrustyRpc() local
76 if (!rc) { in TrustyRpc()
77 PLOG(ERROR) << "Error sending SND message. " << rc; in TrustyRpc()
78 return rc; in TrustyRpc()
83 rc = read(handle, &header, kHeaderSize); in TrustyRpc()
84 if (!rc) { in TrustyRpc()
85 PLOG(ERROR) << "Error reading ACK. " << rc; in TrustyRpc()
86 return rc; in TrustyRpc()
114 ssize_t rc = writev(handle, iov, 1); in TrustyRpc() local
115 if (!rc) { in TrustyRpc()
[all …]
DNotSoSecureInput.cpp128 teeui::ResponseCode rc; in handleEvent() local
130 auto response = std::tie(rc, ir); in handleEvent()
133 if (rc != ResponseCode::OK) { in handleEvent()
134 LOG(ERROR) << "DeliverInputEvent returned with " << uint32_t(rc); in handleEvent()
135 inputResultCb_(rc); in handleEvent()
139 inputResultCb_(rc); in handleEvent()
142 rc = performDTUPHandshake(); in handleEvent()
143 if (rc != ResponseCode::OK) { in handleEvent()
144 inputResultCb_(rc); in handleEvent()
148 inputResultCb_(rc); in handleEvent()
[all …]
/system/core/trusty/libtrusty/
Dtrusty.c35 int rc; in tipc_connect() local
39 rc = -errno; in tipc_connect()
42 return rc < 0 ? rc : -1; in tipc_connect()
45 rc = ioctl(fd, TIPC_IOC_CONNECT, srv_name); in tipc_connect()
46 if (rc < 0) { in tipc_connect()
47 rc = -errno; in tipc_connect()
51 return rc < 0 ? rc : -1; in tipc_connect()
/system/core/logd/
Dlibaudit.cpp38 int rc = audit_get_reply(fd, &rep, GET_REPLY_BLOCKING, MSG_PEEK); in get_ack() local
39 if (rc < 0) { in get_ack()
40 return rc; in get_ack()
45 rc = reinterpret_cast<struct nlmsgerr*>(rep.data)->error; in get_ack()
46 if (rc) { in get_ack()
47 return -rc; in get_ack()
106 ssize_t rc = TEMP_FAILURE_RETRY( in audit_send() local
110 if (rc < 0) { in audit_send()
112 } else if ((uint32_t)rc != req.nlh.nlmsg_len) { in audit_send()
117 rc = get_ack(fd); in audit_send()
[all …]
/system/core/adb/tools/
Dadb_usbreset.cpp36 [[noreturn]] static void Usage(int rc) { in Usage() argument
41 exit(rc); in Usage()
102 int rc = libusb_init(&ctx); in main() local
103 if (rc != LIBUSB_SUCCESS) { in main()
104 PrintLibusbError(rc, "error: failed to initialize libusb"); in main()
125 rc = libusb_get_active_config_descriptor(device, &config_desc); in main()
126 if (rc != 0) { in main()
127 PrintLibusbError(rc, "warning: failed to get config descriptor"); in main()
141 rc = libusb_open(device, &device_handle); in main()
142 if (rc != 0) { in main()
[all …]
Dcheck_ms_os_desc.cpp35 int rc = libusb_get_active_config_descriptor(device, &config_desc); in is_adb_device() local
36 if (rc != 0) { in is_adb_device()
39 libusb_error_name(rc)); in is_adb_device()
63 int rc = libusb_get_descriptor(handle, type, index, result.data(), result.size()); in get_descriptor() local
64 if (rc < 0) { in get_descriptor()
65 fprintf(stderr, "libusb_get_descriptor failed: %s\n", libusb_error_name(rc)); in get_descriptor()
68 result.resize(rc); in get_descriptor()
76 int rc = libusb_get_string_descriptor_ascii( in get_string_descriptor() local
78 if (rc < 0) { in get_string_descriptor()
79 fprintf(stderr, "libusb_get_string_descriptor_ascii failed: %s\n", libusb_error_name(rc)); in get_string_descriptor()
[all …]
/system/core/trusty/keymaster/ipc/
Dtrusty_keymaster_ipc.cpp40 int rc = tipc_connect(TRUSTY_DEVICE_NAME, KEYMASTER_PORT); in trusty_keymaster_connect() local
41 if (rc < 0) { in trusty_keymaster_connect()
42 return rc; in trusty_keymaster_connect()
45 handle_ = rc; in trusty_keymaster_connect()
66 ssize_t rc = write(handle_, msg, msg_size); in trusty_keymaster_call() local
69 if (rc < 0) { in trusty_keymaster_call()
82 rc = readv(handle_, iov, 2); in trusty_keymaster_call()
83 if (rc < 0) { in trusty_keymaster_call()
89 if ((size_t)rc < sizeof(struct keymaster_message)) { in trusty_keymaster_call()
90 ALOGE("invalid response size (%d)\n", (int)rc); in trusty_keymaster_call()
[all …]
/system/vold/fs/
DVfat.cpp61 int rc = 0; in Check() local
71 rc = ForkExecvp(cmd, nullptr, sFsckUntrustedContext); in Check()
73 if (rc < 0) { in Check()
79 switch (rc) { in Check()
104 LOG(ERROR) << "Filesystem check failed (unknown exit code " << rc << ")"; in Check()
115 int rc; in Mount() local
131 rc = mount(c_source, c_target, "vfat", flags, mountData.c_str()); in Mount()
133 if (rc && errno == EROFS) { in Mount()
136 rc = mount(c_source, c_target, "vfat", flags, mountData.c_str()); in Mount()
139 if (rc == 0 && createLost) { in Mount()
[all …]
/system/core/fs_mgr/
Dfs_mgr_format.cpp63 int rc = 0; in format_ext4() local
65 rc = get_dev_sz(fs_blkdev, &dev_sz); in format_ext4()
66 if (rc) { in format_ext4()
67 return rc; in format_ext4()
104 rc = logwrap_fork_execvp(mke2fs_args.size(), mke2fs_args.data(), nullptr, false, LOG_KLOG, in format_ext4()
106 if (rc) { in format_ext4()
107 LERROR << "mke2fs returned " << rc; in format_ext4()
108 return rc; in format_ext4()
114 rc = logwrap_fork_execvp(arraysize(e2fsdroid_args), e2fsdroid_args, nullptr, false, LOG_KLOG, in format_ext4()
116 if (rc) { in format_ext4()
[all …]

12345678910>>...14