global.system.reset is documented in the reset reason chapter in the
docs, but not for runtime use. global.system.reset_instance is not
documented at all.

Provide a description text for both.

Signed-off-by: Ahmad Fatoum <[email protected]>
---
 common/reset_source.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/common/reset_source.c b/common/reset_source.c
index bd1efe073664..77a75a490347 100644
--- a/common/reset_source.c
+++ b/common/reset_source.c
@@ -9,6 +9,7 @@
 #include <environment.h>
 #include <globalvar.h>
 #include <reset_source.h>
+#include <magicvar.h>
 
 static const char * const reset_src_names[] = {
        [RESET_UKWN] = "unknown",
@@ -93,3 +94,6 @@ static int reset_source_init(void)
        return 0;
 }
 coredevice_initcall(reset_source_init);
+
+BAREBOX_MAGICVAR(global.system.reset, "The reason for the last system reset")
+BAREBOX_MAGICVAR(global.system.reset_instance, "The reset reason instance 
number")
-- 
2.47.3


Reply via email to