diff --git a/garnet/bin/appmgr/util_unittest.cc b/garnet/bin/appmgr/util_unittest.cc index c08e5efa5cc11557266f77f035153f40659c9e95..5d7e4f00127884e95109bff48de59bac51d3f1f8 100644 --- a/garnet/bin/appmgr/util_unittest.cc +++ b/garnet/bin/appmgr/util_unittest.cc @@ -55,8 +55,8 @@ TEST(UtilTests, BindDirectory) { char got1[strlen(msg1) + 1]; char got2[strlen(msg2) + 1]; - channels.client_request.rea2(0, got1, nullptr, sizeof(got1), 0, nullptr, nullptr); - launchInfo.directory_request.rea2(0, got2, nullptr, sizeof(got2), 0, nullptr, nullptr); + channels.client_request.read(0, got1, nullptr, sizeof(got1), 0, nullptr, nullptr); + launchInfo.directory_request.read(0, got2, nullptr, sizeof(got2), 0, nullptr, nullptr); EXPECT_STREQ(got1, msg1); EXPECT_STREQ(got2, msg2); diff --git a/garnet/bin/fidl_compatibility_test/compatibility_test_server_llcpp.cc b/garnet/bin/fidl_compatibility_test/compatibility_test_server_llcpp.cc index e93b8eee3726926625b6d810dd76b2a718af7e7c..9a508a9d0572e10d133911537c455fa286bb4b31 100644 --- a/garnet/bin/fidl_compatibility_test/compatibility_test_server_llcpp.cc +++ b/garnet/bin/fidl_compatibility_test/compatibility_test_server_llcpp.cc @@ -64,7 +64,7 @@ class EchoClientApp { bytes = std::move(response_buffer); uint32_t actual_bytes = 0; uint32_t actual_handles = 0; - ZX_ASSERT(client_end_->rea2(0, bytes.data(), handles.data(), + ZX_ASSERT(client_end_->read(0, bytes.data(), handles.data(), bytes.capacity(), handles.capacity(), &actual_bytes, &actual_handles) == ZX_OK); // TODO(FIDL-350): Hard-coding the event ordinal due to no event diff --git a/garnet/bin/guest/vmm/device/virtio_wl.cc b/garnet/bin/guest/vmm/device/virtio_wl.cc index aaf0ea10ce1e71722e1cc7780688a7b061ffbca7..39a7d17abf78e9ad8f0db9581423ae20dd8031fe 100644 --- a/garnet/bin/guest/vmm/device/virtio_wl.cc +++ b/garnet/bin/guest/vmm/device/virtio_wl.cc @@ -85,7 +85,7 @@ class Connection : public VirtioWl::Vfd { zx_status_t AvailableForRead(uint32_t* bytes, uint32_t* handles) override { TRACE_DURATION("machina", "Connection::AvailableForRead"); zx_status_t status = - channel_.rea2(0, nullptr, nullptr, 0u, 0u, bytes, handles); + channel_.read(0, nullptr, nullptr, 0u, 0u, bytes, handles); return status == ZX_ERR_BUFFER_TOO_SMALL ? ZX_OK : status; } zx_status_t Read(void* bytes, zx_handle_info_t* handles, uint32_t num_bytes, @@ -95,7 +95,7 @@ class Connection : public VirtioWl::Vfd { if (bytes == nullptr) { return ZX_ERR_INVALID_ARGS; } - return channel_.rea2_etc(0, bytes, handles, num_bytes, num_handles, + return channel_.read_etc(0, bytes, handles, num_bytes, num_handles, actual_bytes, actual_handles); } zx_status_t Write(const void* bytes, uint32_t num_bytes, diff --git a/garnet/bin/guest/vmm/virtio_vsock.cc b/garnet/bin/guest/vmm/virtio_vsock.cc index 99ddf113ffedf08c67e7f4c39959e03c7d6e7591..0fa8b87ac09259e89d762d951c80f989ef9d2f48 100644 --- a/garnet/bin/guest/vmm/virtio_vsock.cc +++ b/garnet/bin/guest/vmm/virtio_vsock.cc @@ -436,7 +436,7 @@ zx_status_t VirtioVsock::ChannelConnection::Read(VirtioQueue* queue, while (status == ZX_OK) { size_t len = std::min(desc->len, PeerFree()); uint32_t actual; - status = channel_.rea2(0, desc->addr, nullptr, len, 0, &actual, nullptr); + status = channel_.read(0, desc->addr, nullptr, len, 0, &actual, nullptr); if (status != ZX_OK) { // We are handling two different cases in this branch: // 1. If the channel is empty. diff --git a/garnet/bin/guest/vmm/virtio_vsock_unittest.cc b/garnet/bin/guest/vmm/virtio_vsock_unittest.cc index 020362d9434ceafff51af105218043411037f391..1e07156bbaac56437f9fc0bf8caf8856d6d583f0 100644 --- a/garnet/bin/guest/vmm/virtio_vsock_unittest.cc +++ b/garnet/bin/guest/vmm/virtio_vsock_unittest.cc @@ -127,7 +127,7 @@ struct TestChannelConnection : public TestConnectionBase<zx::channel> { zx_status_t read(uint8_t* data, size_t size, size_t* actual) { uint32_t actual_bytes; zx_status_t status = - channel.rea2(0, data, nullptr, size, 0, &actual_bytes, nullptr); + channel.read(0, data, nullptr, size, 0, &actual_bytes, nullptr); if (status == ZX_OK) { *actual = actual_bytes; } diff --git a/garnet/bin/zircon_benchmarks/channels.cc b/garnet/bin/zircon_benchmarks/channels.cc index f84dcf8f89fbef8f2df9dfb23ad8b9920ab6429c..2da5708addf90de7eb84887210bd80b7d58b6dfe 100644 --- a/garnet/bin/zircon_benchmarks/channels.cc +++ b/garnet/bin/zircon_benchmarks/channels.cc @@ -27,8 +27,8 @@ bool ChannelWriteReadTest(perftest::RepeatState* state, uint32_t message_size) { ZX_ASSERT(channel1.write(0, buffer.data(), buffer.size(), nullptr, 0) == ZX_OK); state->NextStep(); - ZX_ASSERT(channel2.read(0, buffer.data(), buffer.size(), nullptr, nullptr, - 0, nullptr) == ZX_OK); + ZX_ASSERT(channel2.read(0, buffer.data(), nullptr, buffer.size(), 0, + nullptr, nullptr) == ZX_OK); } return true; } diff --git a/garnet/lib/debugger_utils/processes_unittest.cc b/garnet/lib/debugger_utils/processes_unittest.cc index d244e9158e8e26d85e15643a4ed51c69bfbb6ca2..f025e3af719c541c3facd137e65c972c747f63b8 100644 --- a/garnet/lib/debugger_utils/processes_unittest.cc +++ b/garnet/lib/debugger_utils/processes_unittest.cc @@ -32,7 +32,7 @@ void WaitChannelReadable(const zx::channel& channel) { void ReadUint64Packet(const zx::channel& channel, uint64_t expected_value) { uint64_t packet; uint32_t packet_size; - ASSERT_EQ(channel.rea2(0, &packet, nullptr, sizeof(packet), 0, + ASSERT_EQ(channel.read(0, &packet, nullptr, sizeof(packet), 0, &packet_size, nullptr), ZX_OK); EXPECT_EQ(packet_size, sizeof(packet)); EXPECT_EQ(packet, expected_value); @@ -173,7 +173,7 @@ TEST(Processes, PassHandle) { zx::thread thread; uint32_t actual_bytes, actual_handles; - ASSERT_EQ(our_channel.rea2(0u, nullptr, thread.reset_and_get_address(), + ASSERT_EQ(our_channel.read(0u, nullptr, thread.reset_and_get_address(), 0u, 1u, &actual_bytes, &actual_handles), ZX_OK); EXPECT_EQ(actual_bytes, 0u); EXPECT_EQ(actual_handles, 1u); diff --git a/garnet/lib/debugger_utils/test_helper_fixture.cc b/garnet/lib/debugger_utils/test_helper_fixture.cc index a79e21f3a42f87a85d9d83d6c65110dffe4404a8..92721c246159fdd4fb539e7a7ccdae19456ee5e2 100644 --- a/garnet/lib/debugger_utils/test_helper_fixture.cc +++ b/garnet/lib/debugger_utils/test_helper_fixture.cc @@ -73,7 +73,7 @@ zx_status_t TestWithHelper::GetHelperThread(zx::thread* out_thread) { } uint32_t actual_bytes, actual_handles; - status = channel_.rea2(0u, nullptr, out_thread->reset_and_get_address(), + status = channel_.read(0u, nullptr, out_thread->reset_and_get_address(), 0u, 1u, &actual_bytes, &actual_handles); if (status != ZX_OK) { FXL_LOG(ERROR) << "channel->read failed: " << ZxErrorString(status); diff --git a/garnet/lib/inferior_control/test_helper.cc b/garnet/lib/inferior_control/test_helper.cc index eaec3cee4889264c1e02e65ae83709b4c9d32483..c1508c37fbe1fe00cce21ac620fc8c86fee795ed 100644 --- a/garnet/lib/inferior_control/test_helper.cc +++ b/garnet/lib/inferior_control/test_helper.cc @@ -132,7 +132,7 @@ static void ReadUint64Packet(const zx::channel& channel, uint64_t expected_value) { uint64_t packet; uint32_t packet_size; - FXL_CHECK(channel.rea2(0, &packet, nullptr, sizeof(packet), 0, + FXL_CHECK(channel.read(0, &packet, nullptr, sizeof(packet), 0, &packet_size, nullptr) == ZX_OK); FXL_CHECK(packet_size == sizeof(packet)); FXL_CHECK(packet == expected_value); diff --git a/garnet/lib/magma/src/magma_util/platform/zircon/zircon_platform_connection_client.cc b/garnet/lib/magma/src/magma_util/platform/zircon/zircon_platform_connection_client.cc index 9723563783b0691eeae7573440ac0e767f9f728f..79400a31aba706a43e800e5e273e9f1bd21d69c2 100644 --- a/garnet/lib/magma/src/magma_util/platform/zircon/zircon_platform_connection_client.cc +++ b/garnet/lib/magma/src/magma_util/platform/zircon/zircon_platform_connection_client.cc @@ -233,7 +233,7 @@ public: size_t* buffer_size_out) override { uint32_t buffer_actual_size; - zx_status_t status = notification_channel_.rea2(0, buffer, nullptr, buffer_size, 0, + zx_status_t status = notification_channel_.read(0, buffer, nullptr, buffer_size, 0, &buffer_actual_size, nullptr); *buffer_size_out = buffer_actual_size; if (status == ZX_ERR_SHOULD_WAIT) { diff --git a/garnet/lib/magma/tests/unit_tests/test_inflight_list.cc b/garnet/lib/magma/tests/unit_tests/test_inflight_list.cc index f95b3b85074970188fe50a0f9aaf2e754a38c111..92c9c6e81eaea56d11eaa2b0f50a9545c1fab100 100644 --- a/garnet/lib/magma/tests/unit_tests/test_inflight_list.cc +++ b/garnet/lib/magma/tests/unit_tests/test_inflight_list.cc @@ -35,7 +35,7 @@ magma_status_t magma_read_notification_channel(magma_connection_t connection, vo zx_status_t status = static_cast<TestConnection*>(connection) ->channel[0] - .rea2(0, buffer, nullptr, buffer_size, 0, &buffer_actual_size, nullptr); + .read(0, buffer, nullptr, buffer_size, 0, &buffer_actual_size, nullptr); if (status == ZX_OK) { *buffer_size_out = buffer_actual_size; return MAGMA_STATUS_OK; diff --git a/garnet/public/lib/fsl/io/device_watcher.cc b/garnet/public/lib/fsl/io/device_watcher.cc index aaefe705c67611a95dfe7b1902b5c4881a520f1d..39e72f0d36762c8616db1abe948588e1c2284e5c 100644 --- a/garnet/public/lib/fsl/io/device_watcher.cc +++ b/garnet/public/lib/fsl/io/device_watcher.cc @@ -85,7 +85,7 @@ void DeviceWatcher::Handler(async_dispatcher_t* dispatcher, uint32_t size; uint8_t buf[fuchsia_io_MAX_BUF]; zx_status_t status = - dir_watch_.rea2(0, buf, nullptr, sizeof(buf), 0, &size, nullptr); + dir_watch_.read(0, buf, nullptr, sizeof(buf), 0, &size, nullptr); FXL_CHECK(status == ZX_OK) << "Failed to read from directory watch channel"; auto weak = weak_ptr_factory_.GetWeakPtr(); diff --git a/garnet/public/lib/netconnector/cpp/message_relay.cc b/garnet/public/lib/netconnector/cpp/message_relay.cc index 1ef431f15ac44f6763bead68276756e36ff9fd37..0082aabfccc604f051f45d6ed13d1e761f302973 100644 --- a/garnet/public/lib/netconnector/cpp/message_relay.cc +++ b/garnet/public/lib/netconnector/cpp/message_relay.cc @@ -60,7 +60,7 @@ void MessageRelayBase::ReadChannelMessages(async_dispatcher_t* dispatcher, while (channel_) { uint32_t actual_byte_count; uint32_t actual_handle_count; - zx_status_t status = channel_.rea2(0, nullptr, nullptr, 0, 0, &actual_byte_count, + zx_status_t status = channel_.read(0, nullptr, nullptr, 0, 0, &actual_byte_count, &actual_handle_count); if (status == ZX_ERR_SHOULD_WAIT) { @@ -93,7 +93,7 @@ void MessageRelayBase::ReadChannelMessages(async_dispatcher_t* dispatcher, std::vector<uint8_t> message(actual_byte_count); status = - channel_.rea2(0, message.data(), nullptr, message.size(), + channel_.read(0, message.data(), nullptr, message.size(), 0, &actual_byte_count, &actual_handle_count); if (status != ZX_OK) { diff --git a/sdk/lib/fidl/cpp/internal/message_reader_unittest.cc b/sdk/lib/fidl/cpp/internal/message_reader_unittest.cc index a84ddfb523c2e2af9a6a20813808d5b6ee6b9ee1..949a9486580bdf60bf9d4c78d10b5c85cece7c35 100644 --- a/sdk/lib/fidl/cpp/internal/message_reader_unittest.cc +++ b/sdk/lib/fidl/cpp/internal/message_reader_unittest.cc @@ -310,7 +310,7 @@ TEST(MessageReader, ShouldWaitFromRead) { uint32_t actual_bytes, actual_handles; EXPECT_EQ( ZX_ERR_BUFFER_TOO_SMALL, - reader.channel().rea2(ZX_CHANNEL_READ_MAY_DISCARD, nullptr, nullptr, + reader.channel().read(ZX_CHANNEL_READ_MAY_DISCARD, nullptr, nullptr, 0, 0, &actual_bytes, &actual_handles)); return ZX_OK; }; @@ -364,7 +364,7 @@ TEST(MessageReader, ShouldWaitFromReadWithUnbind) { uint32_t actual_bytes, actual_handles; EXPECT_EQ( ZX_ERR_BUFFER_TOO_SMALL, - reader.channel().rea2(ZX_CHANNEL_READ_MAY_DISCARD, nullptr, nullptr, + reader.channel().read(ZX_CHANNEL_READ_MAY_DISCARD, nullptr, nullptr, 0, 0, &actual_bytes, &actual_handles)); reader.Unbind(); return ZX_OK; diff --git a/sdk/lib/svc/dir_unittest.cc b/sdk/lib/svc/dir_unittest.cc index 8a96c065906d389f7ce66483dda46bf1ba330f6c..58298b5d6e69838bcba3110f2075c3754ac06b89 100644 --- a/sdk/lib/svc/dir_unittest.cc +++ b/sdk/lib/svc/dir_unittest.cc @@ -24,7 +24,7 @@ static void connect(void* context, const char* service_name, EXPECT_EQ(ZX_OK, binding.wait_one(ZX_CHANNEL_READABLE, zx::time::infinite(), &observed)); EXPECT_EQ(ZX_ERR_BUFFER_TOO_SMALL, - binding.rea2(ZX_CHANNEL_READ_MAY_DISCARD, nullptr, nullptr, 0, 0, nullptr, nullptr)); + binding.read(ZX_CHANNEL_READ_MAY_DISCARD, nullptr, nullptr, 0, 0, nullptr, nullptr)); EXPECT_EQ(ZX_OK, binding.write(0, "ok", 2, 0, 0)); } @@ -61,7 +61,7 @@ TEST_F(ServiceTest, Control) { EXPECT_EQ(ZX_OK, svc.wait_one(ZX_CHANNEL_READABLE, zx::time::infinite(), &observed)); EXPECT_EQ(ZX_ERR_BUFFER_TOO_SMALL, - svc.rea2(ZX_CHANNEL_READ_MAY_DISCARD, nullptr, nullptr, 0, 0, nullptr, nullptr)); + svc.read(ZX_CHANNEL_READ_MAY_DISCARD, nullptr, nullptr, 0, 0, nullptr, nullptr)); // Verify that connection to a removed service fails. EXPECT_EQ(ZX_OK, zx::channel::create(0, &svc, &request)); @@ -107,7 +107,7 @@ TEST_F(ServiceTest, PublishLegacyService) { EXPECT_EQ(ZX_OK, svc.wait_one(ZX_CHANNEL_READABLE, zx::time::infinite(), &observed)); EXPECT_EQ(ZX_ERR_BUFFER_TOO_SMALL, - svc.rea2(ZX_CHANNEL_READ_MAY_DISCARD, nullptr, nullptr, 0, 0, nullptr, nullptr)); + svc.read(ZX_CHANNEL_READ_MAY_DISCARD, nullptr, nullptr, 0, 0, nullptr, nullptr)); // Verify that connection to a removed service fails. EXPECT_EQ(ZX_OK, zx::channel::create(0, &svc, &request)); diff --git a/src/connectivity/bluetooth/core/bt-host/hci/acl_data_channel.cc b/src/connectivity/bluetooth/core/bt-host/hci/acl_data_channel.cc index 8f7ba5d0d4492df60c88f6e7e3f0c383033115a2..e63891db00a78ade26d39bf05736cf54287c38f3 100644 --- a/src/connectivity/bluetooth/core/bt-host/hci/acl_data_channel.cc +++ b/src/connectivity/bluetooth/core/bt-host/hci/acl_data_channel.cc @@ -431,7 +431,7 @@ void ACLDataChannel::OnChannelReady( uint32_t read_size; auto packet_bytes = packet->mutable_view()->mutable_data(); zx_status_t read_status = - channel_.rea2(0u, packet_bytes.mutable_data(), nullptr, + channel_.read(0u, packet_bytes.mutable_data(), nullptr, packet_bytes.size(), 0, &read_size, nullptr); if (read_status < 0) { bt_log(TRACE, "hci", "failed to read RX bytes: %s", diff --git a/src/connectivity/bluetooth/core/bt-host/hci/command_channel.cc b/src/connectivity/bluetooth/core/bt-host/hci/command_channel.cc index 5062d778279373f10fc5b0e432ea09e0bb81c997..476c907af27b80183b6f570a572e344dc551741f 100644 --- a/src/connectivity/bluetooth/core/bt-host/hci/command_channel.cc +++ b/src/connectivity/bluetooth/core/bt-host/hci/command_channel.cc @@ -624,7 +624,7 @@ void CommandChannel::OnChannelReady(async_dispatcher_t* dispatcher, } auto packet_bytes = packet->mutable_view()->mutable_data(); zx_status_t read_status = - channel_.rea2(0u, packet_bytes.mutable_data(), nullptr, + channel_.read(0u, packet_bytes.mutable_data(), nullptr, packet_bytes.size(), 0, &read_size, nullptr); if (read_status < 0) { bt_log(TRACE, "hci", "Failed to read event bytes: %s", diff --git a/src/connectivity/bluetooth/core/bt-host/testing/fake_controller_base.cc b/src/connectivity/bluetooth/core/bt-host/testing/fake_controller_base.cc index c9095fbadecc19d98a77c6a4d559d5d948e4228a..f4180f6166cc27de66ec44bae51c861b8855a837 100644 --- a/src/connectivity/bluetooth/core/bt-host/testing/fake_controller_base.cc +++ b/src/connectivity/bluetooth/core/bt-host/testing/fake_controller_base.cc @@ -154,7 +154,7 @@ void FakeControllerBase::HandleCommandPacket( const zx_packet_signal_t* signal) { common::StaticByteBuffer<hci::kMaxCommandPacketPayloadSize> buffer; uint32_t read_size; - zx_status_t status = cmd_channel_.rea2(0u, buffer.mutable_data(), nullptr, + zx_status_t status = cmd_channel_.read(0u, buffer.mutable_data(), nullptr, hci::kMaxCommandPacketPayloadSize, 0, &read_size, nullptr); ZX_DEBUG_ASSERT(status == ZX_OK || status == ZX_ERR_PEER_CLOSED); @@ -196,7 +196,7 @@ void FakeControllerBase::HandleACLPacket( buffer; uint32_t read_size; zx_status_t status = - acl_channel_.rea2(0u, buffer.mutable_data(), nullptr, buffer.size(), 0, + acl_channel_.read(0u, buffer.mutable_data(), nullptr, buffer.size(), 0, &read_size, nullptr); ZX_DEBUG_ASSERT(status == ZX_OK || status == ZX_ERR_PEER_CLOSED); if (status < 0) { diff --git a/src/connectivity/bluetooth/tools/bt-intel-tool/command_channel.cc b/src/connectivity/bluetooth/tools/bt-intel-tool/command_channel.cc index 7008695b38586a889acb73fa1aff0cddc05a3a9a..7c55c73ae8d6b1f9c642b40d3de04e30353e2dee 100644 --- a/src/connectivity/bluetooth/tools/bt-intel-tool/command_channel.cc +++ b/src/connectivity/bluetooth/tools/bt-intel-tool/command_channel.cc @@ -202,7 +202,7 @@ void CommandChannel::HandleChannelReady(const zx::channel& channel, } auto packet_bytes = packet->mutable_view()->mutable_data(); zx_status_t read_status = - channel.rea2(0u, packet_bytes.mutable_data(), nullptr, + channel.read(0u, packet_bytes.mutable_data(), nullptr, packet_bytes.size(), 0, &read_size, nullptr); if (read_status < 0) { std::cerr << "CommandChannel: Failed to read event bytes: " diff --git a/src/connectivity/wlan/drivers/wlan/device.cpp b/src/connectivity/wlan/drivers/wlan/device.cpp index 1c16705ff319158f48018f93fee0d22b3307ae52..48f54926cb71f7d13537ca48e9c8bcd9e9be6ae0 100644 --- a/src/connectivity/wlan/drivers/wlan/device.cpp +++ b/src/connectivity/wlan/drivers/wlan/device.cpp @@ -780,7 +780,7 @@ void Device::ProcessChannelPacketLocked(uint64_t signal_count) { for (size_t i = 0; i < signal_count; ++i) { uint32_t read = 0; - zx_status_t status = channel_.rea2(0, fidl_msg_buf_.data(), nullptr, fidl_msg_buf_.size(), + zx_status_t status = channel_.read(0, fidl_msg_buf_.data(), nullptr, fidl_msg_buf_.size(), 0, &read, nullptr); if (status == ZX_ERR_SHOULD_WAIT) { break; } if (status != ZX_OK) { diff --git a/src/ledger/bin/app/fidl/serialization_size_unittest.cc b/src/ledger/bin/app/fidl/serialization_size_unittest.cc index d7c6d24aa18e07ee611e2141237bd47e12b94405..1b6ea6646e0eb271561f59bbb43d030a80d8e7a9 100644 --- a/src/ledger/bin/app/fidl/serialization_size_unittest.cc +++ b/src/ledger/bin/app/fidl/serialization_size_unittest.cc @@ -36,7 +36,7 @@ std::string GetValue(size_t index, size_t min_value_size = 0u) { size_t expected_handles) { uint32_t actual_bytes, actual_handles; zx_status_t status = - channel.rea2(0, nullptr, nullptr, 0, 0, &actual_bytes, &actual_handles); + channel.read(0, nullptr, nullptr, 0, 0, &actual_bytes, &actual_handles); if (status != ZX_ERR_BUFFER_TOO_SMALL) { return ::testing::AssertionFailure() << "Channel read status = " << status diff --git a/src/ledger/bin/app/page_impl_unittest.cc b/src/ledger/bin/app/page_impl_unittest.cc index fcb02e685b3a4ca50d6beab4ba433744312b0abd..9acf59453c21be43b878e7efb61c7b1eb7cb0460 100644 --- a/src/ledger/bin/app/page_impl_unittest.cc +++ b/src/ledger/bin/app/page_impl_unittest.cc @@ -284,14 +284,14 @@ TEST_F(PageImplTest, PutKeyTooLarge) { const size_t key_size = kMaxKeySize + 1; std::string key = GetKey(1, key_size); page_ptr_->Put(convert::ToArray(key), convert::ToArray(value)); - zx_status_t status = reader.rea2(0, nullptr, nullptr, 0, 0, nullptr, nullptr); + zx_status_t status = reader.read(0, nullptr, nullptr, 0, 0, nullptr, nullptr); DrainLoop(); EXPECT_EQ(ZX_ERR_SHOULD_WAIT, status); // With a smaller key, message goes through. key = GetKey(1, kMaxKeySize); page_ptr_->Put(convert::ToArray(key), convert::ToArray(value)); - status = reader.rea2(0, nullptr, nullptr, 0, 0, nullptr, nullptr); + status = reader.read(0, nullptr, nullptr, 0, 0, nullptr, nullptr); DrainLoop(); EXPECT_EQ(ZX_ERR_BUFFER_TOO_SMALL, status); } @@ -320,7 +320,7 @@ TEST_F(PageImplTest, PutReferenceKeyTooLarge) { std::string key = GetKey(1, key_size); page_ptr_->PutReference(convert::ToArray(key), fidl::Clone(*reference), Priority::EAGER); - zx_status_t status = reader.rea2(0, nullptr, nullptr, 0, 0, nullptr, nullptr); + zx_status_t status = reader.read(0, nullptr, nullptr, 0, 0, nullptr, nullptr); DrainLoop(); EXPECT_EQ(ZX_ERR_SHOULD_WAIT, status); @@ -328,7 +328,7 @@ TEST_F(PageImplTest, PutReferenceKeyTooLarge) { key = GetKey(1, kMaxKeySize); page_ptr_->PutReference(convert::ToArray(key), std::move(*reference), Priority::EAGER); - status = reader.rea2(0, nullptr, nullptr, 0, 0, nullptr, nullptr); + status = reader.read(0, nullptr, nullptr, 0, 0, nullptr, nullptr); DrainLoop(); EXPECT_EQ(ZX_ERR_BUFFER_TOO_SMALL, status); } diff --git a/zircon/system/core/devmgr/devcoordinator/coordinator-test.cpp b/zircon/system/core/devmgr/devcoordinator/coordinator-test.cpp index ca745689ad7bb02f789b4c2253918e762e9b4a5a..ecbbfd7a85bfc630aaf5370ff9a254ecda17e246 100644 --- a/zircon/system/core/devmgr/devcoordinator/coordinator-test.cpp +++ b/zircon/system/core/devmgr/devcoordinator/coordinator-test.cpp @@ -66,7 +66,7 @@ TEST(CoordinatorTestCase, OpenVirtcon) { zx::channel sender_channel; uint32_t actual_handles; - status = server.rea2(0, nullptr, sender_channel.reset_and_get_address(), 0, 1, nullptr, &actual_handles); + status = server.read(0, nullptr, sender_channel.reset_and_get_address(), 0, 1, nullptr, &actual_handles); ASSERT_EQ(ZX_OK, status); ASSERT_EQ(1, actual_handles); ASSERT_TRUE(sender_channel.is_valid()); @@ -152,7 +152,7 @@ void CheckBindDriverReceived(const zx::channel& remote, const char* expected_dri zx_handle_t handles[ZX_CHANNEL_MAX_MSG_HANDLES]; uint32_t actual_bytes; uint32_t actual_handles; - zx_status_t status = remote.rea2(0, bytes, handles, sizeof(bytes), fbl::count_of(handles), + zx_status_t status = remote.read(0, bytes, handles, sizeof(bytes), fbl::count_of(handles), &actual_bytes, &actual_handles); ASSERT_OK(status); ASSERT_LT(0, actual_bytes); @@ -237,7 +237,7 @@ void CheckCreateDeviceReceived(const zx::channel& remote, const char* expected_d zx_handle_t handles[ZX_CHANNEL_MAX_MSG_HANDLES]; uint32_t actual_bytes; uint32_t actual_handles; - zx_status_t status = remote.rea2(0, bytes, handles, sizeof(bytes), + zx_status_t status = remote.read(0, bytes, handles, sizeof(bytes), fbl::count_of(handles), &actual_bytes, &actual_handles); ASSERT_OK(status); ASSERT_LT(0, actual_bytes); @@ -307,7 +307,7 @@ void CheckCreateCompositeDeviceReceived(const zx::channel& remote, const char* e zx_handle_t handles[ZX_CHANNEL_MAX_MSG_HANDLES]; uint32_t actual_bytes; uint32_t actual_handles; - zx_status_t status = remote.rea2(0, bytes, handles, sizeof(bytes), fbl::count_of(handles), + zx_status_t status = remote.read(0, bytes, handles, sizeof(bytes), fbl::count_of(handles), &actual_bytes, &actual_handles); ASSERT_OK(status); ASSERT_LT(0, actual_bytes); diff --git a/zircon/system/core/devmgr/devcoordinator/device.cpp b/zircon/system/core/devmgr/devcoordinator/device.cpp index 845094a80c294a5c48d7f3d56a3d2bbae9399dd7..26eb42ccea9e5e5316126d0e6041a08efc4dd517 100644 --- a/zircon/system/core/devmgr/devcoordinator/device.cpp +++ b/zircon/system/core/devmgr/devcoordinator/device.cpp @@ -325,7 +325,7 @@ zx_status_t Device::HandleRead() { } zx_status_t r; - if ((r = channel()->rea2(0, &msg, hin, msize, hcount, &msize, &hcount)) != ZX_OK) { + if ((r = channel()->read(0, &msg, hin, msize, hcount, &msize, &hcount)) != ZX_OK) { return r; } diff --git a/zircon/system/core/devmgr/devhost/devhost.cpp b/zircon/system/core/devmgr/devhost/devhost.cpp index e3c97d5fa0272507258f7dc45a79ad97ef58b9f3..e6a51b30e2f435f65f8c261cbce082670fcabcc7 100644 --- a/zircon/system/core/devmgr/devhost/devhost.cpp +++ b/zircon/system/core/devmgr/devhost/devhost.cpp @@ -636,7 +636,7 @@ zx_status_t DeviceControllerConnection::HandleRead() { zx_handle_t hin[ZX_CHANNEL_MAX_MSG_HANDLES]; uint32_t msize = sizeof(msg); uint32_t hcount = fbl::count_of(hin); - zx_status_t status = conn->rea2(0, msg, hin, msize, hcount, &msize, &hcount); + zx_status_t status = conn->read(0, msg, hin, msize, hcount, &msize, &hcount); if (status != ZX_OK) { return status; } @@ -697,7 +697,7 @@ zx_status_t DevhostControllerConnection::HandleRead() { zx_handle_t hin[ZX_CHANNEL_MAX_MSG_HANDLES]; uint32_t msize = sizeof(msg); uint32_t hcount = fbl::count_of(hin); - zx_status_t status = conn->rea2(0, msg, hin, msize, hcount, &msize, &hcount); + zx_status_t status = conn->read(0, msg, hin, msize, hcount, &msize, &hcount); if (status != ZX_OK) { return status; } diff --git a/zircon/system/dev/bluetooth/bt-hci-mediatek/bt-hci-mediatek.cpp b/zircon/system/dev/bluetooth/bt-hci-mediatek/bt-hci-mediatek.cpp index c3fda967aa1044ad558348f9f2d39d4d3651d010..15337cf434fda885f62f714e6d0b5e731bd9c534 100644 --- a/zircon/system/dev/bluetooth/bt-hci-mediatek/bt-hci-mediatek.cpp +++ b/zircon/system/dev/bluetooth/bt-hci-mediatek/bt-hci-mediatek.cpp @@ -948,7 +948,7 @@ zx_status_t BtHciMediatek::HostToCardPacket(const zx::channel& channel, uint8_t uint8_t* snoop_buf = header_buf + kHciPacketHeaderSize - 1; uint32_t actual; - status = channel.rea2(0, packet_buf, nullptr, packet_buf_size, 0, &actual, nullptr); + status = channel.read(0, packet_buf, nullptr, packet_buf_size, 0, &actual, nullptr); while (status == ZX_OK) { uint32_t snoop_size = actual + 1; actual += kHciPacketHeaderSize; @@ -984,7 +984,7 @@ zx_status_t BtHciMediatek::HostToCardPacket(const zx::channel& channel, uint8_t } } - status = channel.rea2(0, packet_buf, nullptr, packet_buf_size, 0, &actual, nullptr); + status = channel.read(0, packet_buf, nullptr, packet_buf_size, 0, &actual, nullptr); } if (status != ZX_ERR_SHOULD_WAIT) { diff --git a/zircon/system/dev/ethernet/ethertap/ethertap.cpp b/zircon/system/dev/ethernet/ethertap/ethertap.cpp index d7023f8001932583069c0feec766b1b8c1b2fa84..f628699c8d3578dd266081a8bf2e3b16c41e514a 100644 --- a/zircon/system/dev/ethernet/ethertap/ethertap.cpp +++ b/zircon/system/dev/ethernet/ethertap/ethertap.cpp @@ -365,7 +365,7 @@ int TapDevice::Thread() { } if (pending & ZX_CHANNEL_READABLE) { - status = channel_.rea2(0, msg.bytes, msg.handles, buff_size, handle_count, + status = channel_.read(0, msg.bytes, msg.handles, buff_size, handle_count, &msg.num_bytes, &msg.num_handles); if (status != ZX_OK) { ethertap_trace("message read failed: %d\n", status); diff --git a/zircon/system/ulib/audio-utils/audio-device-stream.cpp b/zircon/system/ulib/audio-utils/audio-device-stream.cpp index 537123477c5c80b7ca94d4ec3f618a9f2c534753..d2ac4db3838494ff3be878e2d621c9970f08a242 100644 --- a/zircon/system/ulib/audio-utils/audio-device-stream.cpp +++ b/zircon/system/ulib/audio-utils/audio-device-stream.cpp @@ -209,7 +209,7 @@ zx_status_t AudioDeviceStream::GetSupportedFormats( return res; } - res = stream_ch_.rea2(0u, &resp, nullptr, sizeof(resp), 0, &rxed, nullptr); + res = stream_ch_.read(0u, &resp, nullptr, sizeof(resp), 0, &rxed, nullptr); if (res != ZX_OK) { printf("Failed to read next response after processing %u/%u formats (res %d)\n", processed_formats, expected_formats, res); @@ -392,7 +392,7 @@ zx_status_t AudioDeviceStream::PlugMonitor(float duration) { audio_stream_plug_detect_notify_t state; uint32_t bytes_read; - res = stream_ch_.rea2(0, &state, nullptr, sizeof(state), 0, &bytes_read, nullptr); + res = stream_ch_.read(0, &state, nullptr, sizeof(state), 0, &bytes_read, nullptr); if (res != ZX_OK) { printf("Read failure while waiting for plug notification (res %d)\n", res); break; diff --git a/zircon/system/ulib/audio-utils/audio-input.cpp b/zircon/system/ulib/audio-utils/audio-input.cpp index 507991520a259eef2b946ea42a1d11d80b16f854..b8504603e2d5dcefc170d6a6a4330549502acc7f 100644 --- a/zircon/system/ulib/audio-utils/audio-input.cpp +++ b/zircon/system/ulib/audio-utils/audio-input.cpp @@ -102,7 +102,7 @@ zx_status_t AudioInput::Record(AudioSink& sink, float duration_seconds) { audio_rb_position_notify_t pos_notif; uint32_t bytes_read, junk; - res = rb_ch_.rea2(0, + res = rb_ch_.read(0, &pos_notif, nullptr, sizeof(pos_notif), 0, &bytes_read, &junk); if (res != ZX_OK) { diff --git a/zircon/system/ulib/audio-utils/audio-output.cpp b/zircon/system/ulib/audio-utils/audio-output.cpp index 0161467b66fe5db71f22bdaf0c81d85724e20fe8..d9c9744b1631b966b45333ae0dead227376461c9 100644 --- a/zircon/system/ulib/audio-utils/audio-output.cpp +++ b/zircon/system/ulib/audio-utils/audio-output.cpp @@ -143,7 +143,7 @@ zx_status_t AudioOutput::Play(AudioSource& source) { break; } - res = rb_ch_.rea2(0, + res = rb_ch_.read(0, &pos_notif, nullptr, sizeof(pos_notif), 0, &bytes_read, &junk); if (res != ZX_OK) { diff --git a/zircon/system/ulib/cobalt-client/cobalt_logger.cpp b/zircon/system/ulib/cobalt-client/cobalt_logger.cpp index 4b360fa16ecc0fed3ae0ae9609d4c68e7512b38b..2e0b6915bc483e8d1840ffd68a13d3ce8343b1d7 100644 --- a/zircon/system/ulib/cobalt-client/cobalt_logger.cpp +++ b/zircon/system/ulib/cobalt-client/cobalt_logger.cpp @@ -80,7 +80,7 @@ zx_status_t ReadLoggerSimpleCreateResponse(zx::channel* logger, fuchsia_cobalt_S uint32_t msg_size = sizeof(fuchsia_cobalt_LoggerSimpleLogIntHistogramResponse); FIDL_ALIGNDECL uint8_t msg[msg_size]; uint32_t read_bytes = 0; - zx_status_t result = logger->rea2(0l, &msg, nullptr, msg_size, 0, &read_bytes, nullptr); + zx_status_t result = logger->read(0l, &msg, nullptr, msg_size, 0, &read_bytes, nullptr); if (result != ZX_OK) { return result; } diff --git a/zircon/system/ulib/trace-provider/provider_impl.cpp b/zircon/system/ulib/trace-provider/provider_impl.cpp index b00eb6158a14d8cbcb4f2726de31116240dcfa09..b799ca03b8cec43c3b2987601d74f1dc757997a8 100644 --- a/zircon/system/ulib/trace-provider/provider_impl.cpp +++ b/zircon/system/ulib/trace-provider/provider_impl.cpp @@ -94,7 +94,7 @@ bool TraceProviderImpl::Connection::ReadMessage() { uint32_t num_bytes = 0u; zx_handle_t handles[2]; uint32_t num_handles = 0u; - zx_status_t status = channel_.rea2( + zx_status_t status = channel_.read( 0u, buffer, handles, sizeof(buffer), static_cast<uint32_t>(fbl::count_of(handles)), &num_bytes, &num_handles); if (status != ZX_OK) { diff --git a/zircon/system/ulib/zx/include/lib/zx/channel.h b/zircon/system/ulib/zx/include/lib/zx/channel.h index 74e5dca39685edde54d5b95323d970bc8c5784ca..3fc0779c7d53791f071c30b016467cf6df571664 100644 --- a/zircon/system/ulib/zx/include/lib/zx/channel.h +++ b/zircon/system/ulib/zx/include/lib/zx/channel.h @@ -31,15 +31,14 @@ public: static zx_status_t create(uint32_t flags, channel* endpoint0, channel* endpoint1); - // TODO(ZX-2812): This version has its parameters out-of-order and - // is deprecated. - zx_status_t read(uint32_t flags, void* bytes, uint32_t num_bytes, - uint32_t* actual_bytes, zx_handle_t* handles, - uint32_t num_handles, uint32_t* actual_handles) const { + zx_status_t read(uint32_t flags, void* bytes, zx_handle_t* handles, + uint32_t num_bytes, uint32_t num_handles, + uint32_t* actual_bytes, uint32_t* actual_handles) const { return zx_channel_read(get(), flags, bytes, handles, num_bytes, num_handles, actual_bytes, actual_handles); } + // ZX-2812 Do not use rea2, use read instead. This will be removed shortly. zx_status_t rea2(uint32_t flags, void* bytes, zx_handle_t* handles, uint32_t num_bytes, uint32_t num_handles, uint32_t* actual_bytes, uint32_t* actual_handles) const { @@ -47,15 +46,14 @@ public: num_handles, actual_bytes, actual_handles); } - // TODO(ZX-2812): This version has its parameters out-of-order and - // is deprecated. - zx_status_t read_etc(uint32_t flags, void* bytes, uint32_t num_bytes, - uint32_t* actual_bytes, zx_handle_info_t* handles, - uint32_t num_handles, uint32_t* actual_handles) const { + zx_status_t read_etc(uint32_t flags, void* bytes, zx_handle_info_t* handles, + uint32_t num_bytes, uint32_t num_handles, + uint32_t* actual_bytes, uint32_t* actual_handles) const { return zx_channel_read_etc(get(), flags, bytes, handles, num_bytes, num_handles, actual_bytes, actual_handles); } + // ZX-2812 Do not use rea2_etc, use read_etc instead. This will be removed shortly. zx_status_t rea2_etc(uint32_t flags, void* bytes, zx_handle_info_t* handles, uint32_t num_bytes, uint32_t num_handles, uint32_t* actual_bytes, uint32_t* actual_handles) const { diff --git a/zircon/system/utest/devfs/fidl-tests.cpp b/zircon/system/utest/devfs/fidl-tests.cpp index 972343a4d0386ad44e12a8ab9008732df5ab86df..8ebb6de4531f1eee83e4b4f00bdff2ae184cf46a 100644 --- a/zircon/system/utest/devfs/fidl-tests.cpp +++ b/zircon/system/utest/devfs/fidl-tests.cpp @@ -49,7 +49,7 @@ bool FidlOpenValidator(const zx::channel& directory, const char* path, zx_handle_t handles[4]; uint32_t actual_bytes; uint32_t actual_handles; - ASSERT_EQ(client.rea2(0, buf, handles, sizeof(buf), fbl::count_of(handles), + ASSERT_EQ(client.read(0, buf, handles, sizeof(buf), fbl::count_of(handles), &actual_bytes, &actual_handles), ZX_OK); ASSERT_EQ(actual_bytes, sizeof(fs::OnOpenMsg)); ASSERT_EQ(actual_handles, expected_handles); @@ -75,7 +75,7 @@ bool FidlOpenErrorValidator(const zx::channel& directory) { zx_handle_t handles[4]; uint32_t actual_bytes; uint32_t actual_handles; - ASSERT_EQ(client.rea2(0, buf, handles, sizeof(buf), fbl::count_of(handles), + ASSERT_EQ(client.read(0, buf, handles, sizeof(buf), fbl::count_of(handles), &actual_bytes, &actual_handles), ZX_OK); ASSERT_EQ(actual_bytes, sizeof(fuchsia_io_NodeOnOpenEvent)); ASSERT_EQ(actual_handles, 0); @@ -179,7 +179,7 @@ bool ReadEvent(watch_buffer_t* wb, const zx::channel& c, const char** name, ZX_OK); ASSERT_EQ(observed & ZX_CHANNEL_READABLE, ZX_CHANNEL_READABLE); uint32_t actual; - ASSERT_EQ(c.rea2(0, wb->buf, nullptr, sizeof(wb->buf), 0, &actual, nullptr), ZX_OK); + ASSERT_EQ(c.read(0, wb->buf, nullptr, sizeof(wb->buf), 0, &actual, nullptr), ZX_OK); wb->size = actual; wb->ptr = wb->buf; } diff --git a/zircon/system/utest/ethernet/ethernet.cpp b/zircon/system/utest/ethernet/ethernet.cpp index 8acf73e473c4cf33d1047122c085bbb90daa8b27..b21b4cbe9355f595fa55624df55a1af77f8f8b2e 100644 --- a/zircon/system/utest/ethernet/ethernet.cpp +++ b/zircon/system/utest/ethernet/ethernet.cpp @@ -137,7 +137,7 @@ public: zx_status_t status = ZX_OK; while (ZX_OK == (status = channel_.wait_one(ZX_CHANNEL_READABLE, PROPAGATE_TIME, &obs))) { - status = channel_.rea2(0u, + status = channel_.read(0u, static_cast<void*>(read_buf), nullptr, READBUF_SIZE, diff --git a/zircon/system/utest/fidl-llcpp-interop/controlflow_tests.cpp b/zircon/system/utest/fidl-llcpp-interop/controlflow_tests.cpp index 8b937f86663b922cb00d78d3e4bfc6c136d17756..e2992bf805e0db821e4eb9b2d7ccc60f53215127 100644 --- a/zircon/system/utest/fidl-llcpp-interop/controlflow_tests.cpp +++ b/zircon/system/utest/fidl-llcpp-interop/controlflow_tests.cpp @@ -100,7 +100,7 @@ bool ServerShutdownTest() { zx_handle_t tmp_handles[1] = {}; uint32_t out_bytes = 0; uint32_t out_handles = 0; - ASSERT_EQ(client_chan.rea2(0, + ASSERT_EQ(client_chan.read(0, &epitaph, tmp_handles, sizeof(epitaph), 1, &out_bytes, &out_handles), ZX_OK); @@ -115,7 +115,7 @@ bool ServerShutdownTest() { zx_handle_t tmp_handles[1] = {}; uint32_t out_bytes = 0; uint32_t out_handles = 0; - ASSERT_EQ(client_chan.rea2(0, tmp_bytes, tmp_handles, 1, 1, &out_bytes, &out_handles), + ASSERT_EQ(client_chan.read(0, tmp_bytes, tmp_handles, 1, 1, &out_bytes, &out_handles), ZX_ERR_PEER_CLOSED); ASSERT_EQ(out_bytes, 0); ASSERT_EQ(out_handles, 0); @@ -150,7 +150,7 @@ bool NoReplyMustSendEpitaphTest() { zx_handle_t tmp_handles[1] = {}; uint32_t out_bytes = 0; uint32_t out_handles = 0; - ASSERT_EQ(client_chan.rea2(0, + ASSERT_EQ(client_chan.read(0, &epitaph, tmp_handles, sizeof(epitaph), 1, &out_bytes, &out_handles), ZX_OK); @@ -165,7 +165,7 @@ bool NoReplyMustSendEpitaphTest() { zx_handle_t tmp_handles[1] = {}; uint32_t out_bytes = 0; uint32_t out_handles = 0; - ASSERT_EQ(client_chan.rea2(0, tmp_bytes, tmp_handles, 1, 1, &out_bytes, &out_handles), + ASSERT_EQ(client_chan.read(0, tmp_bytes, tmp_handles, 1, 1, &out_bytes, &out_handles), ZX_ERR_PEER_CLOSED); ASSERT_EQ(out_bytes, 0); ASSERT_EQ(out_handles, 0); @@ -203,7 +203,7 @@ bool MustSendEpitaphTest() { zx_handle_t tmp_handles[1] = {}; uint32_t out_bytes = 0; uint32_t out_handles = 0; - ASSERT_EQ(client_chan.rea2(0, + ASSERT_EQ(client_chan.read(0, &epitaph, tmp_handles, sizeof(epitaph), 1, &out_bytes, &out_handles), ZX_OK); @@ -218,7 +218,7 @@ bool MustSendEpitaphTest() { zx_handle_t tmp_handles[1] = {}; uint32_t out_bytes = 0; uint32_t out_handles = 0; - ASSERT_EQ(client_chan.rea2(0, tmp_bytes, tmp_handles, 1, 1, &out_bytes, &out_handles), + ASSERT_EQ(client_chan.read(0, tmp_bytes, tmp_handles, 1, 1, &out_bytes, &out_handles), ZX_ERR_PEER_CLOSED); ASSERT_EQ(out_bytes, 0); ASSERT_EQ(out_handles, 0); diff --git a/zircon/system/utest/fidl-llcpp-interop/dirent_tests.cpp b/zircon/system/utest/fidl-llcpp-interop/dirent_tests.cpp index 1dcb1b3eec0de062054c0575f826b6f6a29112cc..ea61c18ba692d7ede6910960b01b43ffae0c48b8 100644 --- a/zircon/system/utest/fidl-llcpp-interop/dirent_tests.cpp +++ b/zircon/system/utest/fidl-llcpp-interop/dirent_tests.cpp @@ -795,7 +795,7 @@ bool AssertReadOnDirentsEvent(const zx::channel& chan, const DirentArray& expect auto buffer = std::make_unique<uint8_t[]>(ZX_CHANNEL_MAX_MSG_BYTES); uint32_t actual = 0; - ASSERT_EQ(chan.rea2(0, buffer.get(), nullptr, ZX_CHANNEL_MAX_MSG_BYTES, 0, &actual, nullptr), + ASSERT_EQ(chan.read(0, buffer.get(), nullptr, ZX_CHANNEL_MAX_MSG_BYTES, 0, &actual, nullptr), ZX_OK); ASSERT_GE(actual, sizeof(fidl_message_header_t)); ASSERT_EQ(reinterpret_cast<fidl_message_header_t*>(buffer.get())->ordinal, diff --git a/zircon/system/utest/fs/test-watcher.cpp b/zircon/system/utest/fs/test-watcher.cpp index 142fee36ad4214b0c97e04112645ab76b4ca4278..49691355159093d72d54a6344cff92e0a1b32913 100644 --- a/zircon/system/utest/fs/test-watcher.cpp +++ b/zircon/system/utest/fs/test-watcher.cpp @@ -39,7 +39,7 @@ typedef struct { bool check_for_empty(watch_buffer_t* wb, const zx::channel& c) { char name[NAME_MAX + 1]; ASSERT_NULL(wb->ptr); - ASSERT_EQ(c.rea2(0, &name, nullptr, sizeof(name), 0, nullptr, nullptr), ZX_ERR_SHOULD_WAIT); + ASSERT_EQ(c.read(0, &name, nullptr, sizeof(name), 0, nullptr, nullptr), ZX_ERR_SHOULD_WAIT); return true; } @@ -71,7 +71,7 @@ bool check_for_event(watch_buffer_t* wb, const zx::channel& c, const char* expec ASSERT_EQ(c.wait_one(ZX_CHANNEL_READABLE, zx::deadline_after(zx::sec(5)), &observed), ZX_OK); ASSERT_EQ(observed & ZX_CHANNEL_READABLE, ZX_CHANNEL_READABLE); uint32_t actual; - ASSERT_EQ(c.rea2(0, wb->buf, nullptr, sizeof(wb->buf), 0, &actual, nullptr), ZX_OK); + ASSERT_EQ(c.read(0, wb->buf, nullptr, sizeof(wb->buf), 0, &actual, nullptr), ZX_OK); wb->size = actual; wb->ptr = wb->buf; return check_local_event(wb, expected, event); diff --git a/zircon/system/utest/futex-ownership/utils.cpp b/zircon/system/utest/futex-ownership/utils.cpp index f46a6285a0dc9114b69c51febb2b9f1346ed61ea..225f6590fc1567c727d22d1808cbe8df99428b94 100644 --- a/zircon/system/utest/futex-ownership/utils.cpp +++ b/zircon/system/utest/futex-ownership/utils.cpp @@ -225,7 +225,7 @@ bool ExternalThread::Start() { ASSERT_NE(sigs & ZX_CHANNEL_READABLE, 0); uint32_t rxed_handles = 0; - ASSERT_EQ(local.rea2(0, nullptr, external_thread_.reset_and_get_address(), + ASSERT_EQ(local.read(0, nullptr, external_thread_.reset_and_get_address(), 0, 1, nullptr, &rxed_handles), ZX_OK); ASSERT_EQ(rxed_handles, 1u); diff --git a/zircon/system/utest/libzx/traits.cpp b/zircon/system/utest/libzx/traits.cpp index b8ee5bc68ecefe0ad19b9512a21088e12266986a..6a9ca71e07eac3256523e2ab98a90e3b260855e5 100644 --- a/zircon/system/utest/libzx/traits.cpp +++ b/zircon/system/utest/libzx/traits.cpp @@ -312,7 +312,7 @@ bool traits_test() { zx_exception_info_t info; ASSERT_EQ(exception_channel.wait_one(ZX_CHANNEL_READABLE, zx::time::infinite(), nullptr), ZX_OK); - ASSERT_EQ(exception_channel.rea2(0, &info, exception.reset_and_get_address(), + ASSERT_EQ(exception_channel.read(0, &info, exception.reset_and_get_address(), sizeof(info), 1, nullptr, nullptr), ZX_OK); diff --git a/zircon/system/utest/libzx/zx-test.cpp b/zircon/system/utest/libzx/zx-test.cpp index 03a6073600ae50be2e682f5c7a991b9c265cc3a1..54678575748f87a8efd9d4005d417ff97e217ff9 100644 --- a/zircon/system/utest/libzx/zx-test.cpp +++ b/zircon/system/utest/libzx/zx-test.cpp @@ -164,7 +164,7 @@ static bool channel_rw_test() { zx_handle_t recv[2] = {0}; ASSERT_EQ(channel[0].write(0u, nullptr, 0u, handles, 2), ZX_OK); - ASSERT_EQ(channel[1].rea2(0u, nullptr, recv, 0u, 2, nullptr, nullptr), ZX_OK); + ASSERT_EQ(channel[1].read(0u, nullptr, recv, 0u, 2, nullptr, nullptr), ZX_OK); ASSERT_EQ(zx_handle_close(recv[0]), ZX_OK); ASSERT_EQ(zx_handle_close(recv[1]), ZX_OK); @@ -188,7 +188,7 @@ static bool channel_rw_etc_test() { uint32_t h_count = 0; ASSERT_EQ(channel[0].write(0u, nullptr, 0u, handles, 2), ZX_OK); - ASSERT_EQ(channel[1].rea2_etc(0u, nullptr, recv, 0u, 2, nullptr, &h_count), ZX_OK); + ASSERT_EQ(channel[1].read_etc(0u, nullptr, recv, 0u, 2, nullptr, &h_count), ZX_OK); ASSERT_EQ(h_count, 2u); ASSERT_EQ(recv[0].type, ZX_OBJ_TYPE_EVENTPAIR); diff --git a/zircon/system/utest/policy/job-policy.cpp b/zircon/system/utest/policy/job-policy.cpp index 1553ec66d3dcbb3c842b1e8deb2129e79efe6b38..9a0cd2b46fc316ad4fa52659049ecad87bc89dfb 100644 --- a/zircon/system/utest/policy/job-policy.cpp +++ b/zircon/system/utest/policy/job-policy.cpp @@ -370,7 +370,7 @@ static bool TestInvokingPolicyWithException( } else { zx_exception_info_t info; ASSERT_EQ(exc_channel.wait_one(ZX_CHANNEL_READABLE, zx::time::infinite(), nullptr), ZX_OK); - ASSERT_EQ(exc_channel.rea2(0, &info, exception.reset_and_get_address(), sizeof(info), 1, + ASSERT_EQ(exc_channel.read(0, &info, exception.reset_and_get_address(), sizeof(info), 1, nullptr, nullptr), ZX_OK);