mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-10 15:39:02 +01:00
Support --version and --help.
This commit is contained in:
parent
5459fac61f
commit
e67af42805
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user