summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2019-05-31 17:34:53 -0700
committerVadim Bendebury <vbendeb@chromium.org>2019-09-21 19:11:24 -0700
commitf6bea2fc727b39073cdaac079896b6c00284a427 (patch)
treebf6431fc1270acf67f5139e28b6aaf4646bfb1e1
parent0336fc15ae2f3022bae96a0a244755de36243f03 (diff)
downloadchrome-ec-f6bea2fc727b39073cdaac079896b6c00284a427.tar.gz
flash_log_vc: return proper error value
Vendor command handler should return a vendor command error code which is ORed with VENDOR_RC_ERR by the vendor command routing function. Before this patch flash log vendor command handler was returning VENDOR_RC_ERR, which is filtered out by gsctool resulting in a return value of zero when there in fact is an error. BRANCH=cr50, cr50-mp BUG=b:132287488 TEST=with appropriate fixes in gsctool (coming in the next patch) was able to run concurrently for a long time a process constantly adding log entries using Cr50 CLI command, and a process constantly retrieving log entries using 'gsctool -L' Change-Id: I2094c0b342d65e6c2a382079f81fb10fc8bacab9 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1639093 Reviewed-by: Andrey Pronin <apronin@chromium.org> (cherry picked from commit 7ccb50f4352309813cffd98460bd7dcb48d4657f) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1657315 (cherry picked from commit 05ec0332f8a4bac64c927675c1935a142c1c0858) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1705730 (cherry picked from commit 162359d0c1fa1f17d325d949eaad2524e56f4c18)
-rw-r--r--common/flash_log_vc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/flash_log_vc.c b/common/flash_log_vc.c
index 8ed85a57d4..5d1515a754 100644
--- a/common/flash_log_vc.c
+++ b/common/flash_log_vc.c
@@ -36,7 +36,7 @@ static enum vendor_cmd_rc vc_pop_log_entry(enum vendor_cmd_cc code, void *buf,
*response_size = 1;
((uint8_t *)buf)[0] = -byte_size;
- return VENDOR_RC_ERR;
+ return VENDOR_RC_INTERNAL_ERROR;
}
DECLARE_VENDOR_COMMAND(VENDOR_CC_POP_LOG_ENTRY, vc_pop_log_entry);