summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg_install
diff options
context:
space:
mode:
authorkrion <krion@FreeBSD.org>2006-02-12 16:09:33 +0000
committerkrion <krion@FreeBSD.org>2006-02-12 16:09:33 +0000
commit0775d47dcce82dd92df3e0bef134052ad49256fe (patch)
tree9229702e5235ab825b61a946eed6e34337e402e8 /usr.sbin/pkg_install
parentf4f2eb144956580a014be8ea0491e20c5fdac6e5 (diff)
downloadFreeBSD-src-0775d47dcce82dd92df3e0bef134052ad49256fe.zip
FreeBSD-src-0775d47dcce82dd92df3e0bef134052ad49256fe.tar.gz
Fix pkg_version with the -o argument to print the origin.
Submitted by: Sebastian Stach <sebsta AT t-online DOT de> MFC after: 3 days
Diffstat (limited to 'usr.sbin/pkg_install')
-rw-r--r--usr.sbin/pkg_install/version/perform.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.sbin/pkg_install/version/perform.c b/usr.sbin/pkg_install/version/perform.c
index 85976f8..07c1f43 100644
--- a/usr.sbin/pkg_install/version/perform.c
+++ b/usr.sbin/pkg_install/version/perform.c
@@ -261,11 +261,12 @@ show_version(Package plist, const char *latest, const char *source)
return;
if (ShowOrigin != FALSE)
strlcpy(tmp, plist.origin, PATH_MAX);
- else
+ else {
strlcpy(tmp, plist.name, PATH_MAX);
- if (!Verbose) {
- if ((ch = strrchr(tmp, '-')) != NULL)
- ch[0] = '\0';
+ if (!Verbose) {
+ if ((ch = strrchr(tmp, '-')) != NULL)
+ ch[0] = '\0';
+ }
}
if (latest == NULL) {
if (source == NULL && OUTPUT('!')) {
OpenPOWER on IntegriCloud