summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1999-05-14 14:57:59 +0000
committerjkh <jkh@FreeBSD.org>1999-05-14 14:57:59 +0000
commit1b54d78ab8e054dd5de53a1f180e994453cfc55b (patch)
treea248a42b085f8b26a2c73244e618b70cf5325588 /usr.sbin
parent10b41baa24ca6f7bb3a81be33c19bf99a4345afb (diff)
downloadFreeBSD-src-1b54d78ab8e054dd5de53a1f180e994453cfc55b.zip
FreeBSD-src-1b54d78ab8e054dd5de53a1f180e994453cfc55b.tar.gz
DTRT for "Latest" search keywords.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/sysinstall/package.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/sysinstall/package.c b/usr.sbin/sysinstall/package.c
index 11216c9..e66db28 100644
--- a/usr.sbin/sysinstall/package.c
+++ b/usr.sbin/sysinstall/package.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: package.c,v 1.72 1999/05/14 12:15:34 jkh Exp $
+ * $Id: package.c,v 1.73 1999/05/14 14:29:50 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -55,7 +55,7 @@ extern PkgNode Top;
int
package_add(char *name)
{
- PkgNodePtr tmp;
+ PkgNodePtr tmp, tmp2, *tmp3;
int i;
if (!mediaVerify())
@@ -63,7 +63,8 @@ package_add(char *name)
i = index_initialize("packages/INDEX");
if (DITEM_STATUS(i) != DITEM_SUCCESS)
return i;
- tmp = index_search(&Top, name, NULL);
+ tmp3 = !strpbrk(name, "-_") ? &tmp2 : NULL;
+ tmp = index_search(&Top, name, tmp3);
if (tmp)
return index_extract_one(mediaDevice, &Top, tmp, FALSE);
else {
OpenPOWER on IntegriCloud