refactor(measured boot): rename add_event2()
To a layman in TCG linguo, add_event2() is not straight forward to
understand. Rename the function into event_log_record().
Change-Id: I75d53a656425cd78a41ebf2c4c4e4e57687adc0d
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
diff --git a/drivers/measured_boot/event_log/event_log.c b/drivers/measured_boot/event_log/event_log.c
index f713595..32b7c55 100644
--- a/drivers/measured_boot/event_log/event_log.c
+++ b/drivers/measured_boot/event_log/event_log.c
@@ -80,14 +80,14 @@
};
/*
- * Add TCG_PCR_EVENT2 event
+ * Record a measurement as a TCG_PCR_EVENT2 event
*
* @param[in] hash Pointer to hash data of TCG_DIGEST_SIZE bytes
* @param[in] image_ptr Pointer to image_data_t structure
*
* There must be room for storing this new event into the event log buffer.
*/
-static void add_event2(const uint8_t *hash, const image_data_t *image_ptr)
+static void event_log_record(const uint8_t *hash, const image_data_t *image_ptr)
{
void *ptr = log_ptr;
uint32_t name_len;
@@ -222,7 +222,7 @@
log_ptr = (uint8_t *)ptr;
/* Add BL2 event */
- add_event2(NULL, plat_data_ptr->images_data);
+ event_log_record(NULL, plat_data_ptr->images_data);
}
/*
@@ -264,7 +264,8 @@
return rc;
}
- add_event2(hash_data, data_ptr);
+ event_log_record(hash_data, data_ptr);
+
return 0;
}