summaryrefslogtreecommitdiff
path: root/sessreg.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-01-19 16:37:00 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-01-19 16:37:00 -0800
commitec158dea0bdc8bf4767fe048056178a823a2033b (patch)
treeb25b0914610dbbe36b363231394669d1d4b7709a /sessreg.c
parent64db372b4988e4862acb328492b7bbe14851ebe0 (diff)
Add -V option to print version number
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'sessreg.c')
-rw-r--r--sessreg.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sessreg.c b/sessreg.c
index 1ba0d89..bdfe8f0 100644
--- a/sessreg.c
+++ b/sessreg.c
@@ -136,7 +136,7 @@ usage (int x)
" [-L lastlog-file]"
#endif
"\n"
- " [-t ttys-file] [-l line-name] [-h host-name]\n"
+ " [-t ttys-file] [-l line-name] [-h host-name] [-V]\n"
" [-s slot-number] [-x servers-file] user-name\n",
program_name, program_name);
exit (1);
@@ -241,6 +241,9 @@ main (int argc, char **argv)
case 'd':
dflag++;
break;
+ case 'V':
+ printf("%s\n", PACKAGE_STRING);
+ exit (0);
default:
usage (1);
}