summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2019-05-31 17:34:53 -0700
committerCommit Bot <commit-bot@chromium.org>2019-06-03 06:51:45 +0000
commit7ccb50f4352309813cffd98460bd7dcb48d4657f (patch)
tree7925ee94118176cd6a885c314f4d513096b3ae35
parentb91b5f4d74120a10ea2d1de0c23e8b3854deb53e (diff)
downloadchrome-ec-7ccb50f4352309813cffd98460bd7dcb48d4657f.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>
-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);