[PATCH 3/4] common: globalvar: add variable for buildsystem_version_string

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Now that the buildsystem version is available, make it accessible as a
global variable for runtime usage. If the buildsystem version is not
present (i.e. empty), don't add the variable at all.

Signed-off-by: Steffen Trumtrar <s.trumtrar@xxxxxxxxxxxxxx>
---
 common/globalvar.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/common/globalvar.c b/common/globalvar.c
index 98a028a68aa7..e38ad0c2c668 100644
--- a/common/globalvar.c
+++ b/common/globalvar.c
@@ -595,6 +595,9 @@ static int globalvar_init(void)
 
 	globalvar_add_simple("version", UTS_RELEASE);
 
+	if (strlen(buildsystem_version_string) > 0)
+		globalvar_add_simple("buildsystem.version", buildsystem_version_string);
+
 	return 0;
 }
 pure_initcall(globalvar_init);
-- 
2.28.0


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux