From 04417da1663ee41a9933b1e6bdb0efa1f8896470 Mon Sep 17 00:00:00 2001 From: hubertf Date: Mon, 22 Mar 1999 05:02:39 +0000 Subject: Replace static array of packages given to pkg_perform() with linear list, using chopss' list functions (moved to lib/lpkg.c and lib/lib.h). Properly handle wildcards in arguments to "pkg_info", "pkg_delete" and "pkg_admin check". Some other minor cleanups. --- usr.sbin/pkg_install/create/perform.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'usr.sbin/pkg_install/create/perform.c') diff --git a/usr.sbin/pkg_install/create/perform.c b/usr.sbin/pkg_install/create/perform.c index 724145bb2fd..0d7a3705959 100644 --- a/usr.sbin/pkg_install/create/perform.c +++ b/usr.sbin/pkg_install/create/perform.c @@ -1,11 +1,11 @@ -/* $NetBSD: perform.c,v 1.16 1999/03/09 11:10:40 agc Exp $ */ +/* $NetBSD: perform.c,v 1.17 1999/03/22 05:02:40 hubertf Exp $ */ #include #ifndef lint #if 0 static const char *rcsid = "from FreeBSD Id: perform.c,v 1.38 1997/10/13 15:03:51 jkh Exp"; #else -__RCSID("$NetBSD: perform.c,v 1.16 1999/03/09 11:10:40 agc Exp $"); +__RCSID("$NetBSD: perform.c,v 1.17 1999/03/22 05:02:40 hubertf Exp $"); #endif #endif @@ -187,13 +187,17 @@ cleanup(int sig) } int -pkg_perform(char **pkgs) +pkg_perform(lpkg_head_t *pkgs) { - char *pkg = *pkgs; /* Only one arg to create */ + char *pkg; char *cp; FILE *pkg_in, *fp; package_t plist; char *suffix; /* What we tack on to the end of the finished package */ + lpkg_t *lpp; + + lpp = TAILQ_FIRST(pkgs); + pkg = lpp->lp_name; /* Only one arg to create */ /* Preliminary setup */ sanity_check(); -- cgit