Skip to content

Commit

Permalink
Fix compliance check
Browse files Browse the repository at this point in the history
And change LIBSPDM_MSG_LOG_STATUS_CLAMP to LIBSPDM_MSG_LOG_STATUS_BUFFER_FULL.

Signed-off-by: Steven Bellock <[email protected]>
  • Loading branch information
steven-bellock authored and jyao1 committed Sep 1, 2022
1 parent fddad42 commit 75e3b46
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
6 changes: 1 addition & 5 deletions include/library/spdm_common_lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,9 @@ typedef enum {
**/
#define LIBSPDM_DATA_HANDLE_ERROR_RETURN_POLICY_DROP_ON_DECRYPT_ERROR 0x1

#define LIBSPDM_MSG_LOG_STATUS_CLAMP 1
#define LIBSPDM_MSG_LOG_STATUS_BUFFER_FULL 1

#define LIBSPDM_MSG_LOG_MODE_ENABLE 1
/* #define LIBSPDM_MSG_LOG_MODE_WRAP 2
#define LIBSPDM_MSG_LOG_MODE_INC_ERR 4
#define LIBSPDM_MSG_LOG_MODE_INC_CHUNK 8
*/

typedef enum {
LIBSPDM_DATA_LOCATION_LOCAL,
Expand Down
11 changes: 3 additions & 8 deletions include/library/spdm_requester_lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -781,11 +781,7 @@ void libspdm_init_msg_log (void *context, void *msg_buffer, size_t msg_buffer_si
*
* @param context A pointer to the SPDM context.
* @param mode A bitmask specifying the mode in which the message logger operates.
* LIBSPDM_MSG_LOG_MODE_ENABLE - when set the message logger is active.
* LIBSPDM_MSG_LOG_MODE_WRAP - when set the message logger will wrap on buffer
* overflow, else it clamps.
* LIBSPDM_MSG_LOG_MODE_INC_ERR - when set the message logger will include error
* responses in the message log.
* LIBSPDM_MSG_LOG_MODE_ENABLE - when set the message logger is active.
*/
void libspdm_set_msg_log_mode (void *context, uint32_t mode);

Expand All @@ -795,9 +791,8 @@ void libspdm_set_msg_log_mode (void *context, uint32_t mode);
* @param context A pointer to the SPDM context.
*
* @retval uint32_t A bitmask giving the status of the message logger.
* LIBSPDM_MSG_LOG_STATUS_FULL - when LIBSPDM_MSG_LOG_MODE_WRAP is clear and this
* bit is set then the message logging buffer has
* reached capacity.
* LIBSPDM_MSG_LOG_STATUS_BUFFER_FULL - if set the message logging buffer has
* reached capacity.
*/
uint32_t libspdm_get_msg_log_status (void *context);

Expand Down
2 changes: 1 addition & 1 deletion unit_test/test_spdm_requester/get_measurements.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
static size_t m_libspdm_local_buffer_size;
static uint8_t m_libspdm_local_buffer[LIBSPDM_MAX_MESSAGE_BUFFER_SIZE];
static uint8_t m_libspdm_local_psk_hint[32];
static uint8_t m_libspdm_msg_log_buffer[0x5000];
static uint8_t m_libspdm_msg_log_buffer[LIBSPDM_MAX_MESSAGE_BUFFER_SIZE * 2];

size_t libspdm_test_get_measurement_request_size(const void *spdm_context,
const void *buffer,
Expand Down

0 comments on commit 75e3b46

Please sign in to comment.