diff options
author | David Sidrane <david_s5@nscdg.com> | 2015-03-05 11:09:23 -1000 |
---|---|---|
committer | David Sidrane <david_s5@nscdg.com> | 2015-04-07 07:49:07 -1000 |
commit | 97c5d1341431526133c17ca23770a66f60004447 (patch) | |
tree | 68219d52d8248334fbbb73fa8fed7436bc716a21 | |
parent | 2e285f4dc320c587df0afce2a20cbbe6cee417d7 (diff) | |
download | px4-firmware-97c5d1341431526133c17ca23770a66f60004447.tar.gz px4-firmware-97c5d1341431526133c17ca23770a66f60004447.tar.bz2 px4-firmware-97c5d1341431526133c17ca23770a66f60004447.zip |
Added Build URI to version command
-rw-r--r-- | src/systemcmds/ver/ver.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/systemcmds/ver/ver.c b/src/systemcmds/ver/ver.c index 087eb52e3..30ac17d8a 100644 --- a/src/systemcmds/ver/ver.c +++ b/src/systemcmds/ver/ver.c @@ -48,13 +48,14 @@ /* string constants for version commands */ static const char sz_ver_hw_str[] = "hw"; -static const char sz_ver_hwcmp_str[] = "hwcmp"; +static const char sz_ver_hwcmp_str[] = "hwcmp"; static const char sz_ver_git_str[] = "git"; -static const char sz_ver_bdate_str[] = "bdate"; +static const char sz_ver_bdate_str[] = "bdate"; +static const char sz_ver_buri_str[] = "uri"; static const char sz_ver_gcc_str[] = "gcc"; static const char sz_ver_all_str[] = "all"; static const char mcu_ver_str[] = "mcu"; -static const char mcu_uid_str[] = "uid"; +static const char mcu_uid_str[] = "uid"; static void usage(const char *reason) { @@ -62,7 +63,7 @@ static void usage(const char *reason) printf("%s\n", reason); } - printf("usage: ver {hw|hwcmp|git|bdate|gcc|all|mcu|uid}\n\n"); + printf("usage: ver {hw|hwcmp|git|bdate|gcc|all|mcu|uid|uri}\n\n"); } __EXPORT int ver_main(int argc, char *argv[]); @@ -106,11 +107,17 @@ int ver_main(int argc, char *argv[]) } - if (show_all || !strncmp(argv[1], sz_ver_bdate_str, sizeof(sz_ver_bdate_str))) { - printf("Build datetime: %s %s\n", __DATE__, __TIME__); - ret = 0; + if (show_all || !strncmp(argv[1], sz_ver_bdate_str, sizeof(sz_ver_bdate_str))) { + printf("Build datetime: %s %s\n", __DATE__, __TIME__); + ret = 0; - } + } + + if (show_all || !strncmp(argv[1], sz_ver_buri_str, sizeof(sz_ver_buri_str))) { + printf("Build uri: %s\n", FW_BUILD_URI); + ret = 0; + + } if (show_all || !strncmp(argv[1], sz_ver_gcc_str, sizeof(sz_ver_gcc_str))) { printf("Toolchain: %s\n", __VERSION__); |