diff options
| -rw-r--r-- | usr.sbin/pkg_install/add/perform.c | 10 | ||||
| -rw-r--r-- | usr.sbin/pkg_install/create/perform.c | 7 | ||||
| -rw-r--r-- | usr.sbin/pkg_install/delete/perform.c | 6 | ||||
| -rw-r--r-- | usr.sbin/pkg_install/info/perform.c | 3 | ||||
| -rw-r--r-- | usr.sbin/pkg_install/info/show.c | 4 | ||||
| -rw-r--r-- | usr.sbin/pkg_install/lib/lib.h | 3 | ||||
| -rw-r--r-- | usr.sbin/pkg_install/lib/plist.c | 5 |
7 files changed, 22 insertions, 16 deletions
diff --git a/usr.sbin/pkg_install/add/perform.c b/usr.sbin/pkg_install/add/perform.c index 3b5df6112c4d..84d4c2342fd8 100644 --- a/usr.sbin/pkg_install/add/perform.c +++ b/usr.sbin/pkg_install/add/perform.c @@ -1,6 +1,6 @@ #ifndef lint static const char rcsid[] = - "$Id: perform.c,v 1.53 1998/09/11 07:26:54 jkh Exp $"; + "$Id: perform.c,v 1.54 1998/12/16 13:59:29 jkh Exp $"; #endif /* @@ -131,7 +131,7 @@ pkg_do(char *pkg) } Home = make_playpen(playpen, sb.st_size * 4); if (!Home) - errx(1, "unable to make playpen for %d bytes", sb.st_size * 4); + errx(1, "unable to make playpen for %qd bytes", sb.st_size * 4); where_to = Home; /* Since we can call ourselves recursively, keep notes on where we came from */ if (!getenv("_TOP")) @@ -185,7 +185,7 @@ pkg_do(char *pkg) */ if (!inPlace && min_free(playpen) < sb.st_size * 4) { - warnx("projected size of %d exceeds available free space.\n" + warnx("projected size of %qd exceeds available free space.\n" "Please set your PKG_TMPDIR variable to point to a location with more\n" "free space and try again", sb.st_size * 4); warnx("not extracting %s\ninto %s, sorry!", @@ -330,8 +330,8 @@ pkg_do(char *pkg) if (fexists(POST_INSTALL_FNAME)) { new_m = 1; sprintf(post_script, "%s", POST_INSTALL_FNAME); - sprintf(pre_arg, ""); - sprintf(post_arg, ""); + pre_arg[0] = '\0'; + post_arg[0] = '\0'; } else { if (fexists(INSTALL_FNAME)) { sprintf(post_script, "%s", INSTALL_FNAME); diff --git a/usr.sbin/pkg_install/create/perform.c b/usr.sbin/pkg_install/create/perform.c index 5e7443d9a396..d211a57293c9 100644 --- a/usr.sbin/pkg_install/create/perform.c +++ b/usr.sbin/pkg_install/create/perform.c @@ -1,6 +1,6 @@ #ifndef lint static const char rcsid[] = - "$Id: perform.c,v 1.46 1998/12/05 06:28:58 asami Exp $"; + "$Id: perform.c,v 1.47 1998/12/16 13:59:30 jkh Exp $"; #endif /* @@ -46,7 +46,7 @@ pkg_perform(char **pkgs) Package plist; int len; char *suf; - int compress; + int compress = 0; /* Preliminary setup */ sanity_check(); @@ -67,7 +67,7 @@ pkg_perform(char **pkgs) /* chop suffix off if already specified, remembering if we want to compress */ len = strlen(pkg); - if (len > 4) + if (len > 4) { if (!strcmp(&pkg[len - 4], ".tgz")) { compress = TRUE; pkg[len - 4] = '\0'; @@ -79,6 +79,7 @@ pkg_perform(char **pkgs) else /* default is to compress packages */ compress = TRUE; + } if (compress) suf = "tgz"; else diff --git a/usr.sbin/pkg_install/delete/perform.c b/usr.sbin/pkg_install/delete/perform.c index dc85e02f341b..1a8836669404 100644 --- a/usr.sbin/pkg_install/delete/perform.c +++ b/usr.sbin/pkg_install/delete/perform.c @@ -1,6 +1,6 @@ #ifndef lint static const char rcsid[] = - "$Id: perform.c,v 1.17 1998/11/11 06:09:04 jkh Exp $"; + "$Id: perform.c,v 1.18 1998/12/16 13:59:30 jkh Exp $"; #endif /* @@ -144,8 +144,8 @@ pkg_do(char *pkg) if (fexists(POST_DEINSTALL_FNAME)) { new_m = 1; sprintf(post_script, "%s", POST_DEINSTALL_FNAME); - sprintf(pre_arg, ""); - sprintf(post_arg, ""); + pre_arg[0] = '\0'; + post_arg[0] = '\0'; } else { if (fexists(DEINSTALL_FNAME)) { sprintf(post_script, "%s", DEINSTALL_FNAME); diff --git a/usr.sbin/pkg_install/info/perform.c b/usr.sbin/pkg_install/info/perform.c index eee1b764198a..d7676b003a1d 100644 --- a/usr.sbin/pkg_install/info/perform.c +++ b/usr.sbin/pkg_install/info/perform.c @@ -1,6 +1,6 @@ #ifndef lint static const char rcsid[] = - "$Id: perform.c,v 1.26 1998/12/16 13:59:31 jkh Exp $"; + "$Id: perform.c,v 1.27 1999/07/30 23:14:15 jdp Exp $"; #endif /* @@ -28,6 +28,7 @@ static const char rcsid[] = #include <fts.h> #include <signal.h> +#include <err.h> static int fname_cmp(const FTSENT **, const FTSENT **); static int pkg_do(char *); diff --git a/usr.sbin/pkg_install/info/show.c b/usr.sbin/pkg_install/info/show.c index 9c00a7e5bb31..873dcd970663 100644 --- a/usr.sbin/pkg_install/info/show.c +++ b/usr.sbin/pkg_install/info/show.c @@ -1,6 +1,6 @@ #ifndef lint static const char rcsid[] = - "$Id: show.c,v 1.11 1997/10/08 07:47:38 charnier Exp $"; + "$Id: show.c,v 1.12 1997/10/18 05:42:05 jkh Exp $"; #endif /* @@ -26,6 +26,8 @@ static const char rcsid[] = #include "lib.h" #include "info.h" +#include <err.h> + void show_file(char *title, char *fname) { diff --git a/usr.sbin/pkg_install/lib/lib.h b/usr.sbin/pkg_install/lib/lib.h index 595b2a1c2f7f..f4d839cf914a 100644 --- a/usr.sbin/pkg_install/lib/lib.h +++ b/usr.sbin/pkg_install/lib/lib.h @@ -1,4 +1,4 @@ -/* $Id: lib.h,v 1.26 1998/02/16 17:16:47 jkh Exp $ */ +/* $Id: lib.h,v 1.27 1998/12/16 13:59:31 jkh Exp $ */ /* * FreeBSD install - a package for the installation and maintainance @@ -165,6 +165,7 @@ void write_plist(Package *, FILE *); void read_plist(Package *, FILE *); int plist_cmd(char *, char **); int delete_package(Boolean, Boolean, Package *); +Boolean make_preserve_name(char *, int, char *, char *); /* For all */ int pkg_perform(char **); diff --git a/usr.sbin/pkg_install/lib/plist.c b/usr.sbin/pkg_install/lib/plist.c index d18c543723ae..ac708d98173a 100644 --- a/usr.sbin/pkg_install/lib/plist.c +++ b/usr.sbin/pkg_install/lib/plist.c @@ -1,6 +1,6 @@ #ifndef lint static const char rcsid[] = - "$Id: plist.c,v 1.26 1998/09/01 06:58:11 jkh Exp $"; + "$Id: plist.c,v 1.27 1998/09/11 07:26:58 jkh Exp $"; #endif /* @@ -493,11 +493,12 @@ delete_hierarchy(char *dir, Boolean ign_err, Boolean nukedirs) *cp2 = '\0'; if (!isemptydir(dir)) return 0; - if (RMDIR(dir) && !ign_err) + if (RMDIR(dir) && !ign_err) { if (!fexists(dir)) warnx("directory `%s' doesn't really exist", dir); else return 1; + } /* back up the pathname one component */ if (cp2) { cp1 = dir; |
