aboutsummaryrefslogtreecommitdiff
path: root/src/systemcmds
diff options
context:
space:
mode:
authorufoncz <ufon@kullaonline.net>2014-04-25 21:34:45 +0200
committerufoncz <ufon@kullaonline.net>2014-04-25 21:34:45 +0200
commitfd95adc710cd04855b8f7c2abaf73d9220cd497e (patch)
treeb365603a31ae9209fb5b2b78795e907e7af72b12 /src/systemcmds
parent08e5ed5a1d630f840a838006bab6b1d1ae6aa6c1 (diff)
downloadpx4-firmware-fd95adc710cd04855b8f7c2abaf73d9220cd497e.tar.gz
px4-firmware-fd95adc710cd04855b8f7c2abaf73d9220cd497e.tar.bz2
px4-firmware-fd95adc710cd04855b8f7c2abaf73d9220cd497e.zip
corrections before xmerge
Diffstat (limited to 'src/systemcmds')
-rw-r--r--src/systemcmds/version/version.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/systemcmds/version/version.c b/src/systemcmds/version/version.c
index 38730b10d..37a51dbfc 100644
--- a/src/systemcmds/version/version.c
+++ b/src/systemcmds/version/version.c
@@ -45,6 +45,13 @@
#include <errno.h>
#include <version/version.h>
+static char sz_ver_hw_str[] = "hw";
+static char sz_ver_git_str[] = "git";
+static char sz_ver_date_str[] = "date";
+static char sz_ver_gcc_str[] = "gcc";
+static char sz_ver_all_str[] = "all";
+
+
__EXPORT int version_main(int argc, char *argv[]);
static void usage(const char *reason)
@@ -59,7 +66,7 @@ static void usage(const char *reason)
static void version_githash(int bShowPrefix)
{
if (bShowPrefix == 1) {
- printf("FW git-hash:");
+ printf("FW git-hash: ");
}
printf("%s\n", FW_GIT);
}
@@ -88,7 +95,6 @@ static void version_gcc(int bShowPrefix)
}
printf("%s\n", __VERSION__);
}
-static char sz_ver_hw_str[] = "hw";
int version_main(int argc, char *argv[])
{
@@ -100,19 +106,19 @@ int version_main(int argc, char *argv[])
{
version_hwarch(0);
}
- else if (!strncmp(argv[1], "git", 3))
+ else if (!strncmp(argv[1], sz_ver_git_str, strlen(sz_ver_git_str)))
{
version_githash(0);
}
- else if (!strncmp(argv[1], "date", 3))
+ else if (!strncmp(argv[1], sz_ver_date_str, strlen(sz_ver_date_str)))
{
version_date(0);
}
- else if (!strncmp(argv[1], "gcc", 3))
+ else if (!strncmp(argv[1], sz_ver_gcc_str, strlen(sz_ver_gcc_str)))
{
version_gcc(0);
}
- else if (!strncmp(argv[1], "all", 3))
+ else if (!strncmp(argv[1], sz_ver_all_str, strlen(sz_ver_all_str)))
{
printf("Pixhawk version info\n");
version_hwarch(1);