summaryrefslogtreecommitdiffstats
path: root/usr.sbin/config
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2005-08-10 06:36:44 +0000
committerobrien <obrien@FreeBSD.org>2005-08-10 06:36:44 +0000
commit29228100aad2580f164ec924233f2b19483ffb71 (patch)
treef178976d811d14f8dc2a4942df588feb56cea3cd /usr.sbin/config
parent0875ef67819c724c499d69258fba7083ef97a46c (diff)
downloadFreeBSD-src-29228100aad2580f164ec924233f2b19483ffb71.zip
FreeBSD-src-29228100aad2580f164ec924233f2b19483ffb71.tar.gz
Add an option to tell what version of config(8) this is.
Diffstat (limited to 'usr.sbin/config')
-rw-r--r--usr.sbin/config/config.86
-rw-r--r--usr.sbin/config/main.c6
2 files changed, 10 insertions, 2 deletions
diff --git a/usr.sbin/config/config.8 b/usr.sbin/config/config.8
index 9f9ab42..3cc2d31 100644
--- a/usr.sbin/config/config.8
+++ b/usr.sbin/config/config.8
@@ -36,7 +36,7 @@
.Nd build system configuration files
.Sh SYNOPSIS
.Nm
-.Op Fl gp
+.Op Fl Vgp
.Op Fl d Ar destdir
.Ar SYSTEM_NAME
.Sh DESCRIPTION
@@ -72,6 +72,10 @@ section below).
.Pp
Available options and operands:
.Bl -tag -width ".Ar SYSTEM_NAME"
+.It Fl V
+Print the
+.Nm
+version number.
.It Fl d Ar destdir
Use
.Ar destdir
diff --git a/usr.sbin/config/main.c b/usr.sbin/config/main.c
index 70664a4..9699fa7 100644
--- a/usr.sbin/config/main.c
+++ b/usr.sbin/config/main.c
@@ -54,6 +54,7 @@ static const char rcsid[] =
#include <dirent.h>
#include "y.tab.h"
#include "config.h"
+#include "configvers.h"
#ifndef TRUE
#define TRUE (1)
@@ -95,8 +96,11 @@ main(int argc, char **argv)
char *p;
char xxx[MAXPATHLEN];
- while ((ch = getopt(argc, argv, "d:gp")) != -1)
+ while ((ch = getopt(argc, argv, "d:gpV")) != -1)
switch (ch) {
+ case 'V':
+ printf("%d\n", CONFIGVERS);
+ exit(0);
case 'd':
if (*destdir == '\0')
strlcpy(destdir, optarg, sizeof(destdir));
OpenPOWER on IntegriCloud