summaryrefslogtreecommitdiff
path: root/sysdep/unix
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-05-29 21:58:35 +0000
committerMartin Mares <mj@ucw.cz>2000-05-29 21:58:35 +0000
commite67af42805c16093bb720a1bd04ad8932e86e49e (patch)
tree61c3c4a519118a85815a6f592e5e221f4d14dbf4 /sysdep/unix
parent5459fac61f3a645c636bdf32c140f4d7083034d2 (diff)
Support --version and --help.
Diffstat (limited to 'sysdep/unix')
-rw-r--r--sysdep/unix/main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c
index 37c5e36e..971c79dd 100644
--- a/sysdep/unix/main.c
+++ b/sysdep/unix/main.c
@@ -356,6 +356,16 @@ parse_args(int argc, char **argv)
{
int c;
+ if (argc == 2)
+ {
+ if (!strcmp(argv[1], "--version"))
+ {
+ fprintf(stderr, "BIRD version " BIRD_VERSION "\n");
+ exit(0);
+ }
+ if (!strcmp(argv[1], "--help"))
+ usage();
+ }
while ((c = getopt(argc, argv, opt_list)) >= 0)
switch (c)
{