diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2007-03-03 12:43:09 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2007-03-03 12:43:09 +0000 |
commit | a4e1e433ee367f48646c9d8b96acef970dc8d017 (patch) | |
tree | d73113a4437384d88d5eade259f70fbadf79462e | |
parent | 01b045db650668ae05f186ddd31f41b049f66634 (diff) |
allow the directory for generated filter files to be set. defaults to cwd
-rw-r--r-- | usr.sbin/bgpctl/bgpctl.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.sbin/bgpctl/bgpctl.c b/usr.sbin/bgpctl/bgpctl.c index 768c4e680d8..7341f6080d2 100644 --- a/usr.sbin/bgpctl/bgpctl.c +++ b/usr.sbin/bgpctl/bgpctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bgpctl.c,v 1.116 2007/03/03 11:45:30 henning Exp $ */ +/* $OpenBSD: bgpctl.c,v 1.117 2007/03/03 12:43:08 henning Exp $ */ /* * Copyright (c) 2003 Henning Brauer <henning@openbsd.org> @@ -88,7 +88,7 @@ usage(void) { extern char *__progname; - fprintf(stderr, "usage: %s [-s socket] [-n] " + fprintf(stderr, "usage: %s [-s socket] [-o path] [-n] " "<command> [arg [...]]\n", __progname); exit(1); } @@ -108,12 +108,15 @@ main(int argc, char *argv[]) sockname = SOCKET_NAME; outdir = getcwd(NULL, 0); - while ((ch = getopt(argc, argv, "ns:")) != -1) { + while ((ch = getopt(argc, argv, "no:s:")) != -1) { switch (ch) { case 'n': if (++nodescr > 1) usage(); break; + case 'o': + outdir = optarg; + break; case 's': sockname = optarg; break; |