aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan McCrohan <jmccrohan@gmail.com>2012-03-24 18:31:23 +0000
committerJonathan McCrohan <jmccrohan@gmail.com>2012-03-24 18:34:54 +0000
commit886388f1449470b13b4f3749541314d34b6ef1c7 (patch)
treed6f13b1ebb9b6df9c45f60b858752370f79ac9ef
parent66c4eabaf093962ee343004e4c771f803dcab1de (diff)
downloadverteco-886388f1449470b13b4f3749541314d34b6ef1c7.tar.gz
ftphelper: add --version argument
-rw-r--r--src/ftphelper.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ftphelper.c b/src/ftphelper.c
index fae3771..69527db 100644
--- a/src/ftphelper.c
+++ b/src/ftphelper.c
@@ -19,6 +19,10 @@
// gcc ftphelper.c -o ftphelper `pkg-config --libs --cflags libconfig`
+#ifndef VERSION_STRING
+#define VERSION_STRING "[undefined version]"
+#endif
+
#include <stdio.h>
#include <sys/ioctl.h>
#include <sys/types.h>
@@ -102,4 +106,8 @@ int main(int argc, char *argv[]) {
printf("%s", ftp_directory);
return 0;
}
+ if (strcmp(argv[1], "--version") == 0) {
+ printf("%s", VERSION_STRING);
+ return 0;
+ }
}
wo small optimizations (removed "flag"; tv_usec can't be negative)mzuther1-7/+4 2010-02-07added grouping of widgets by update interval (new file "timer_group.c")mzuther13-168/+441 2010-02-07BUG: handle negative delays in timer_process() (timer.c)mzuther1-0/+4 2010-02-06timer.c: I had forgotten how to initialize a "struct" :)mzuther1-3/+4 2010-02-06BUG: compensate timers for processing delay ("timer.c")mzuther1-1/+3 2010-02-06timer.c: exchanged "proprietary code" with timeradd() and timersub() functionsmzuther1-14/+10 2010-02-04timer.c: removed fruitless changes to variable "flag" from timer_process()mzuther1-2/+0 2010-02-04According to its man page, timercmp() is broken on some systems -- applied th...mzuther1-1/+1 2010-02-04small warning removedmichael1-1/+1 2010-02-04clear errno after creating the FIFO by Claas Hilbrechtmichael1-0/+2