From ce812a22ca63d74ba48e0a7ebb0ea521837b2efd Mon Sep 17 00:00:00 2001 From: Tri Vo Date: Wed, 10 Feb 2021 13:31:22 -0800 Subject: [PATCH] trusty: Fix up error messages Bug: 171750250 Test: m Change-Id: I41cde13a891da36c85df6a451b2d051c18365797 --- trusty/coverage/coverage.cpp | 4 ++-- trusty/fuzz/utils.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/trusty/coverage/coverage.cpp b/trusty/coverage/coverage.cpp index 5eccdc503..9613d0fb5 100644 --- a/trusty/coverage/coverage.cpp +++ b/trusty/coverage/coverage.cpp @@ -130,7 +130,7 @@ Result CoverageRecord::Open() { req.open_args.uuid = uuid_; auto ret = Rpc(&req, -1, &resp); if (!ret.ok()) { - return Error() << "failed to open coverage client: "; + return Error() << "failed to open coverage client: " << ret.error(); } record_len_ = resp.open_args.record_len; shm_len_ = RoundPageUp(record_len_); @@ -153,7 +153,7 @@ Result CoverageRecord::Open() { req.share_record_args.shm_len = shm_len_; ret = Rpc(&req, dma_buf, &resp); if (!ret.ok()) { - return Error() << "failed to send shared memory: "; + return Error() << "failed to send shared memory: " << ret.error(); } shm_ = shm; diff --git a/trusty/fuzz/utils.cpp b/trusty/fuzz/utils.cpp index f4cf0b612..35263373b 100644 --- a/trusty/fuzz/utils.cpp +++ b/trusty/fuzz/utils.cpp @@ -113,7 +113,7 @@ Result TrustyApp::Write(const void* buf, size_t len) { int rc = write(ta_fd_, buf, len); alarm(0); if (rc < 0) { - return Error() << "failed to read TIPC message from TA: "; + return Error() << "failed to write TIPC message to TA: "; } return {};