Support --version and --help.
This commit is contained in:
parent
5459fac61f
commit
e67af42805
1 changed files with 10 additions and 0 deletions
|
@ -356,6 +356,16 @@ parse_args(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int c;
|
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)
|
while ((c = getopt(argc, argv, opt_list)) >= 0)
|
||||||
switch (c)
|
switch (c)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue