From 82b4d6ffdb2cfb2847aa4a09dc463696790f8907 Mon Sep 17 00:00:00 2001 From: Travis Geiselbrecht Date: Sat, 25 Jul 2020 16:26:12 -0700 Subject: [PATCH] [lib][version] rename the global variable version to lk_version Avoids colliding with some things. --- lib/buildsig/buildsig.c | 2 +- lib/version/include/lib/version.h | 2 +- lib/version/version.c | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/buildsig/buildsig.c b/lib/buildsig/buildsig.c index 014fc4ee..29fb817d 100644 --- a/lib/buildsig/buildsig.c +++ b/lib/buildsig/buildsig.c @@ -40,7 +40,7 @@ extern char __rom_end; const struct buildsig buildsig __SECTION(".text.boot") = { .magic = MAGIC, - .version = &version, + .version = &lk_version, .magic2 = MAGIC2, #if WITH_APP_BOOTLOADER .buildtype = 1, /* TODO: pull from systemwide headers */ diff --git a/lib/version/include/lib/version.h b/lib/version/include/lib/version.h index c5f12aaa..eb761c0d 100644 --- a/lib/version/include/lib/version.h +++ b/lib/version/include/lib/version.h @@ -22,7 +22,7 @@ typedef struct { const char *buildid; } lk_version_t; -extern const lk_version_t version; +extern const lk_version_t lk_version; void print_version(void); diff --git a/lib/version/version.c b/lib/version/version.c index 0a270a9f..58e4bdb0 100644 --- a/lib/version/version.c +++ b/lib/version/version.c @@ -22,7 +22,7 @@ #define BUILDID "" #endif -const lk_version_t version = { +const lk_version_t lk_version = { .struct_version = VERSION_STRUCT_VERSION, .arch = ARCH, .platform = PLATFORM, @@ -33,11 +33,11 @@ const lk_version_t version = { void print_version(void) { printf("version:\n"); - printf("\tarch: %s\n", version.arch); - printf("\tplatform: %s\n", version.platform); - printf("\ttarget: %s\n", version.target); - printf("\tproject: %s\n", version.project); - printf("\tbuildid: %s\n", version.buildid); + printf("\tarch: %s\n", lk_version.arch); + printf("\tplatform: %s\n", lk_version.platform); + printf("\ttarget: %s\n", lk_version.target); + printf("\tproject: %s\n", lk_version.project); + printf("\tbuildid: %s\n", lk_version.buildid); } static int cmd_version(int argc, const console_cmd_args *argv) {