summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/2lib/2stub.c2
-rw-r--r--firmware/2lib/2ui_screens.c4
-rw-r--r--firmware/2lib/include/2api.h8
3 files changed, 8 insertions, 6 deletions
diff --git a/firmware/2lib/2stub.c b/firmware/2lib/2stub.c
index 697b0fc5..dba852e1 100644
--- a/firmware/2lib/2stub.c
+++ b/firmware/2lib/2stub.c
@@ -81,7 +81,7 @@ const char *vb2ex_get_debug_info(struct vb2_context *ctx)
}
__attribute__((weak))
-const char *vb2ex_get_firmware_log(void)
+const char *vb2ex_get_firmware_log(int reset)
{
return NULL;
}
diff --git a/firmware/2lib/2ui_screens.c b/firmware/2lib/2ui_screens.c
index 6cdae95a..3e7ead2a 100644
--- a/firmware/2lib/2ui_screens.c
+++ b/firmware/2lib/2ui_screens.c
@@ -314,7 +314,7 @@ static const struct vb2_screen_info debug_info_screen = {
static vb2_error_t firmware_log_init(struct vb2_ui_context *ui)
{
- const char *log_string = vb2ex_get_firmware_log();
+ const char *log_string = vb2ex_get_firmware_log(1);
if (!log_string) {
VB2_DEBUG("ERROR: Failed to retrieve firmware log\n");
ui->error_code = VB2_UI_ERROR_FIRMWARE_LOG;
@@ -334,7 +334,7 @@ static vb2_error_t firmware_log_init(struct vb2_ui_context *ui)
static vb2_error_t firmware_log_reinit(struct vb2_ui_context *ui)
{
- const char *log_string = vb2ex_get_firmware_log();
+ const char *log_string = vb2ex_get_firmware_log(0);
if (!log_string) {
VB2_DEBUG("ERROR: Failed to retrieve firmware log\n");
ui->error_code = VB2_UI_ERROR_FIRMWARE_LOG;
diff --git a/firmware/2lib/include/2api.h b/firmware/2lib/include/2api.h
index dc661675..9f4dbcb9 100644
--- a/firmware/2lib/include/2api.h
+++ b/firmware/2lib/include/2api.h
@@ -1440,12 +1440,14 @@ char *vb2api_get_debug_info(struct vb2_context *ctx);
*
* Return a pointer to the full firmware log string which is guaranteed to be
* null-terminated. The function implementation should snapshot the full
- * firmware log when it is called the first time. Subsequent calls should
- * return the same pointer.
+ * firmware log when it is called. If `reset` is not zero, it will reset the
+ * firmware log snapshot.
*
+ * @param reset Discard the current firmware log snapshot and
+ * reacquire a new one.
* @return The pointer to the full firmware log string. NULL on error.
*/
-const char *vb2ex_get_firmware_log(void);
+const char *vb2ex_get_firmware_log(int reset);
/**
* Specify the string to be used for an upcoming log screen display.