I don't think I've ever heard anyone use the '-T' feature. Perhaps
better to fold it into '-B' (BIRD output) using getopt '::' trick?

I don't feel super strong about this, but it helps reclaim a getopt
letter.

Kind regards,

Job

Index: main.c
===================================================================
RCS file: /cvs/src/usr.sbin/rpki-client/main.c,v
retrieving revision 1.222
diff -u -p -r1.222 main.c
--- main.c      17 Nov 2022 20:51:39 -0000      1.222
+++ main.c      17 Nov 2022 21:22:13 -0000
@@ -907,13 +907,15 @@ main(int argc, char *argv[])
            "proc exec unveil", NULL) == -1)
                err(1, "pledge");
 
-       while ((c = getopt(argc, argv, "b:Bcd:e:fH:jnorRs:S:t:T:vV")) != -1)
+       while ((c = getopt(argc, argv, "b:B::cd:e:fH:jnorRs:S:t:vV")) != -1)
                switch (c) {
                case 'b':
                        bind_addr = optarg;
                        break;
                case 'B':
                        outformats |= FORMAT_BIRD;
+                       if (optarg)
+                               bird_tablename = optarg;
                        break;
                case 'c':
                        outformats |= FORMAT_CSV;
@@ -964,9 +966,6 @@ main(int argc, char *argv[])
                                err(1, "too many tal files specified");
                        tals[talsz++] = optarg;
                        break;
-               case 'T':
-                       bird_tablename = optarg;
-                       break;
                case 'v':
                        verbose++;
                        break;
@@ -1376,9 +1375,8 @@ usage:
        fprintf(stderr,
            "usage: rpki-client [-BcjnoRrVv] [-b sourceaddr] [-d cachedir]"
            " [-e rsync_prog]\n"
-           "                   [-H fqdn ] [-S skiplist] [-s timeout] [-T 
table]"
-           " [-t tal]\n"
-           "                   [outputdir]\n"
+           "                   [-H fqdn ] [-S skiplist] [-s timeout] [-t tal]"
+           " [outputdir]\n"
            "       rpki-client [-Vv] [-d cachedir] [-j] [-t tal] -f file ..."
            "\n");
        return 1;
Index: rpki-client.8
===================================================================
RCS file: /cvs/src/usr.sbin/rpki-client/rpki-client.8,v
retrieving revision 1.80
diff -u -p -r1.80 rpki-client.8
--- rpki-client.8       17 Nov 2022 20:49:38 -0000      1.80
+++ rpki-client.8       17 Nov 2022 21:22:13 -0000
@@ -22,14 +22,14 @@
 .Nd RPKI validator to support BGP routing security
 .Sh SYNOPSIS
 .Nm
-.Op Fl BcjnoRrVv
+.Op Fl cjnoRrVv
+.Op Fl B Ar table
 .Op Fl b Ar sourceaddr
 .Op Fl d Ar cachedir
 .Op Fl e Ar rsync_prog
 .Op Fl H Ar fqdn
 .Op Fl S Ar skiplist
 .Op Fl s Ar timeout
-.Op Fl T Ar table
 .Op Fl t Ar tal
 .Op Ar outputdir
 .Nm
@@ -62,7 +62,7 @@ in various formats.
 .Pp
 The options are as follows:
 .Bl -tag -width Ds
-.It Fl B
+.It Fl B Ar table
 Create output in the files
 .Pa bird1v4 ,
 .Pa bird1v6 ,
@@ -70,6 +70,11 @@ and
 .Pa bird
 (for bird2)
 in the output directory which is suitable for the BIRD internet routing daemon.
+If
+.Ar table
+is specified, use
+.Ar table
+as roa table name instead of the default 'ROAS'.
 .It Fl b Ar sourceaddr
 Tell the HTTP and rsync clients to use
 .Ar sourceaddr
@@ -193,12 +198,6 @@ Individual RSYNC/RRDP repositories are t
 .Em timeout .
 All network synchronisation tasks are aborted after seven eights of
 .Em timeout .
-.It Fl T Ar table
-For BIRD output generated with the
-.Fl B
-option use
-.Ar table
-as roa table name instead of the default 'ROAS'.
 .It Fl t Ar tal
 Specify a
 .Em Trust Anchor Location Pq TAL

Reply via email to