summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvenaas <venaas>2007-05-20 13:11:08 +0000
committervenaas <venaas@e88ac4ed-0b26-0410-9574-a7f39faa03bf>2007-05-20 13:11:08 +0000
commit94d97ff76e25f4017c0dcfd631c0d2b53cc66e20 (patch)
tree7c8e0fd1b0c11d672c8c8caf24c6af2e8964c484
parentc146bb93704d4c73c11af606d52f564b1e174907 (diff)
added -v version
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@90 e88ac4ed-0b26-0410-9574-a7f39faa03bf
-rw-r--r--radsecproxy.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/radsecproxy.c b/radsecproxy.c
index c06e57a..9553f91 100644
--- a/radsecproxy.c
+++ b/radsecproxy.c
@@ -2215,7 +2215,7 @@ void getmainconfig(const char *configfile) {
void getargs(int argc, char **argv, uint8_t *foreground, uint8_t *loglevel, char **configfile) {
int c;
- while ((c = getopt(argc, argv, "c:d:f")) != -1) {
+ while ((c = getopt(argc, argv, "c:d:fv")) != -1) {
switch (c) {
case 'c':
*configfile = optarg;
@@ -2228,6 +2228,8 @@ void getargs(int argc, char **argv, uint8_t *foreground, uint8_t *loglevel, char
case 'f':
*foreground = 1;
break;
+ case 'v':
+ debugx(0, DBG_ERR, "radsecproxy revision $Rev$");
default:
goto usage;
}
@@ -2236,7 +2238,7 @@ void getargs(int argc, char **argv, uint8_t *foreground, uint8_t *loglevel, char
return;
usage:
- debug(DBG_ERR, "Usage:\n%s [ -c configfile ] [ -d debuglevel ] [ -f ]", argv[0]);
+ debug(DBG_ERR, "Usage:\n%s [ -c configfile ] [ -d debuglevel ] [ -f ] [ -v ]", argv[0]);
exit(1);
}