Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/usr.sbin/pkg_install/info Pull up revision 1.28-1.29 (r...
details: https://anonhg.NetBSD.org/src/rev/eb090d88b29b
branches: netbsd-1-5
changeset: 493150:eb090d88b29b
user: he <he%NetBSD.org@localhost>
date: Wed Jun 26 16:54:28 2002 +0000
description:
Pull up revision 1.28-1.29 (requested by taca):
Synchronize with recent developments:
o close a memory leak
o clarify error message if running out of file descriptors
o implement new packing list directive, @blddep
o improve buffer size checks
o improve error handling on installation of prerequisite packages
o add optional file verification (none, gpg, pgp5)
diffstat:
usr.sbin/pkg_install/info/main.c | 23 ++++-------------------
1 files changed, 4 insertions(+), 19 deletions(-)
diffs (57 lines):
diff -r 7047f893e3ed -r eb090d88b29b usr.sbin/pkg_install/info/main.c
--- a/usr.sbin/pkg_install/info/main.c Wed Jun 26 16:54:13 2002 +0000
+++ b/usr.sbin/pkg_install/info/main.c Wed Jun 26 16:54:28 2002 +0000
@@ -1,11 +1,11 @@
-/* $NetBSD: main.c,v 1.23.2.2 2002/02/23 18:08:23 he Exp $ */
+/* $NetBSD: main.c,v 1.23.2.3 2002/06/26 16:54:28 he Exp $ */
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char *rcsid = "from FreeBSD Id: main.c,v 1.14 1997/10/08 07:47:26 charnier Exp";
#else
-__RCSID("$NetBSD: main.c,v 1.23.2.2 2002/02/23 18:08:23 he Exp $");
+__RCSID("$NetBSD: main.c,v 1.23.2.3 2002/06/26 16:54:28 he Exp $");
#endif
#endif
@@ -38,7 +38,7 @@
#include "lib.h"
#include "info.h"
-static char Options[] = "aBbcDde:fFhIikLl:mnpqRrsSvV";
+static const char Options[] = "aBbcDde:fFhIikLl:mnpqRrsSvV";
int Flags = 0;
Boolean AllInstalled = FALSE;
@@ -62,21 +62,6 @@
}
int
-find_fn(const char *pkg, char *data)
-{
- lpkg_t *lpp;
- char fn[FILENAME_MAX];
-
- snprintf(fn, sizeof(fn), "%s/%s", _pkgdb_getPKGDB_DIR(), pkg);
- if (!isfile(fn)) { /* might as well use sanity_check() */
- lpp = alloc_lpkg(pkg);
- TAILQ_INSERT_TAIL(&pkgs, lpp, lp_link);
- }
-
- return 0;
-}
-
-int
main(int argc, char **argv)
{
int ch, rc;
@@ -251,7 +236,7 @@
errx(1, "No matching pkg for %s.", *argv);
} else {
if (ispkgpattern(*argv)) {
- if (findmatchingname(_pkgdb_getPKGDB_DIR(), *argv, find_fn, NULL) == 0)
+ if (findmatchingname(_pkgdb_getPKGDB_DIR(), *argv, add_to_list_fn, &pkgs) == 0)
errx(1, "No matching pkg for %s.", *argv);
} else {
lpp = alloc_lpkg(*argv);
Home |
Main Index |
Thread Index |
Old Index