aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_install/info/main.c
diff options
context:
space:
mode:
authorMaxim Sobolev <sobomax@FreeBSD.org>2002-09-09 19:43:30 +0000
committerMaxim Sobolev <sobomax@FreeBSD.org>2002-09-09 19:43:30 +0000
commit92d1bb6515c56136430b035758bed96ada076ef1 (patch)
tree003054543223e3603d315e1b39d4432eda313744 /usr.sbin/pkg_install/info/main.c
parent7e5bbd6847ea58fc11759b750d71f24604e5a76b (diff)
Notes
Diffstat (limited to 'usr.sbin/pkg_install/info/main.c')
-rw-r--r--usr.sbin/pkg_install/info/main.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/usr.sbin/pkg_install/info/main.c b/usr.sbin/pkg_install/info/main.c
index c1c881695ea3..401cf131e535 100644
--- a/usr.sbin/pkg_install/info/main.c
+++ b/usr.sbin/pkg_install/info/main.c
@@ -26,7 +26,7 @@ __FBSDID("$FreeBSD$");
#include "info.h"
#include <err.h>
-static char Options[] = "acdDe:fgGhiIkl:LmoO:pqrRst:vVW:x";
+static char Options[] = "acdDe:fgGhiIkl:LmoO:pPqrRst:vVW:x";
int Flags = 0;
match_t MatchType = MATCH_GLOB;
@@ -177,6 +177,10 @@ main(int argc, char **argv)
break;
}
+ case 'P':
+ Flags = SHOW_PTREV;
+ break;
+
case 'h':
case '?':
default:
@@ -188,6 +192,13 @@ main(int argc, char **argv)
argc -= optind;
argv += optind;
+ if (Flags & SHOW_PTREV) {
+ if (!Quiet)
+ printf("Package tools revision: ");
+ printf("%d\n", PKG_INSTALL_VERSION);
+ exit(0);
+ }
+
/* Set some reasonable defaults */
if (!Flags)
Flags = SHOW_COMMENT | SHOW_DESC | SHOW_REQBY;