summaryrefslogtreecommitdiffstats
path: root/kiss
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2017-01-22 23:59:29 +0100
committerRalf Baechle <ralf@linux-mips.org>2017-01-22 23:59:29 +0100
commitee6eadf12892fe583dab9b4b06e00e32dae82ada (patch)
treeeb9d878374853ea76cf9530968488dc11b137708 /kiss
parent4e7ae2f6912042343a9061d62274166e3877e114 (diff)
kissnet: Switch version number printed to ax25-tools version.
The version number has not been changed ever since ax25-tools 0.0.1 making the version useless for bug reporting. Make sure the banner printed by kissnetd stays properly formatted even if the version string's length changes. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'kiss')
-rw-r--r--kiss/kissnetd.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/kiss/kissnetd.c b/kiss/kissnetd.c
index 8c8fce9..366bb89 100644
--- a/kiss/kissnetd.c
+++ b/kiss/kissnetd.c
@@ -24,7 +24,8 @@
#include <time.h>
#include <limits.h>
-static char *Version = "1.5";
+#include <config.h>
+
static int VerboseMode;
static int MaxFrameSize = 512;
@@ -57,14 +58,17 @@ static void Usage(void)
static void Banner(int Small)
{
if (Small) {
- printf("kissnetd V %s by Frederic RIBLE F1OAT - ATEPRA FPAC/Linux Project\n", Version);
+ printf("kissnetd V %s by Frederic RIBLE F1OAT - ATEPRA FPAC/Linux Project\n", VERSION);
}
else {
printf("****************************************\n");
printf("* Network broadcast between kiss ports *\n");
printf("* ATEPRA FPAC/Linux Project *\n");
printf("****************************************\n");
- printf("* kissnetd Version %-4s *\n", Version);
+ printf("* %*skissnetd Version %s%*s*\n",
+ (int) (10 - strlen(VERSION) / 2), "",
+ VERSION,
+ (int) (10 - (strlen(VERSION) + 1)) / 2, "");
printf("* by Frederic RIBLE F1OAT *\n");
printf("****************************************\n");
}