diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/ccd_config.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/common/ccd_config.c b/common/ccd_config.c index 3e8165e97f..41b1bc7f43 100644 --- a/common/ccd_config.c +++ b/common/ccd_config.c @@ -1501,6 +1501,7 @@ static enum vendor_cmd_rc ccd_vendor(enum vendor_cmd_cc code, } if (handler) { +#ifdef CR50_DEV *response_size = 0; /* Let's be optimistic: 0 means success. */ rc = handler(buf + 1, input_size - 1, response_size); @@ -1510,6 +1511,12 @@ static enum vendor_cmd_rc ccd_vendor(enum vendor_cmd_cc code, * place in the response buffer. */ memmove(buf, buf + 1, *response_size); +#else + *response_size = 1; + ((uint8_t *)buf)[0] = EC_ERROR_ACCESS_DENIED; + ccprintf("CCD is disabled in this image\n"); + rc = VENDOR_RC_NOT_ALLOWED; +#endif } else { rc = VENDOR_RC_NO_SUCH_SUBCOMMAND; *response_size = 0; |