The version is stored in a constant string which is prone to
become outdated, as has happened here.  uname(3) could be
used to make sure it's always up to date, but I don't see
the point given uname(1)'s `r' flag already does this.


Index: sendbug.1
===================================================================
RCS file: /cvs/src/usr.bin/sendbug/sendbug.1,v
retrieving revision 1.25
diff -u -p -r1.25 sendbug.1
--- sendbug.1   9 Sep 2015 21:23:31 -0000       1.25
+++ sendbug.1   11 Oct 2015 21:11:00 -0000
@@ -11,7 +11,7 @@
 .Nd report a bug in OpenBSD
 .Sh SYNOPSIS
 .Nm
-.Op Fl DEPV
+.Op Fl DEP
 .Sh DESCRIPTION
 .Nm
 is used to submit problem reports (PRs) to the
@@ -80,8 +80,6 @@ to read a PR from the standard input, de
 and write them into the current directory.
 .It Fl P
 Generate and print the template with system information filled out.
-.It Fl V
-Print the version number.
 .El
 .Sh ENVIRONMENT
 .Bl -tag -width Ds
Index: sendbug.c
===================================================================
RCS file: /cvs/src/usr.bin/sendbug/sendbug.c,v
retrieving revision 1.71
diff -u -p -r1.71 sendbug.c
--- sendbug.c   10 Oct 2015 20:35:01 -0000      1.71
+++ sendbug.c   11 Oct 2015 21:11:00 -0000
@@ -45,7 +45,6 @@ void  usbdevs(FILE *);
 
 const char *categories = "system user library documentation kernel "
     "alpha amd64 arm hppa i386 m88k mips64 powerpc sh sparc sparc64 vax";
-char *version = "5.5";
 const char *comment[] = {
        "<synopsis of the problem (one line)>",
        "<PR category (one line)>",
@@ -65,7 +64,7 @@ usage(void)
 {
        extern char *__progname;
 
-       fprintf(stderr, "usage: %s [-DEPV]\n", __progname);
+       fprintf(stderr, "usage: %s [-DEP]\n", __progname);
        exit(1);
 }
 
@@ -89,7 +88,7 @@ main(int argc, char *argv[])
        if (pledge("stdio rpath wpath cpath tmppath getpw proc exec", NULL) == 
-1)
                err(1, "pledge");
 
-       while ((ch = getopt(argc, argv, "DEPV")) != -1)
+       while ((ch = getopt(argc, argv, "DEP")) != -1)
                switch (ch) {
                case 'D':
                        Dflag = 1;
@@ -100,9 +99,6 @@ main(int argc, char *argv[])
                case 'P':
                        Pflag = 1;
                        break;
-               case 'V':
-                       printf("%s\n", version);
-                       exit(0);
                default:
                        usage();
                }

Reply via email to