summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg_install/create/pl.c
diff options
context:
space:
mode:
authorcharnier <charnier@FreeBSD.org>1997-10-08 07:48:21 +0000
committercharnier <charnier@FreeBSD.org>1997-10-08 07:48:21 +0000
commit1c390186cd64897d9b1b87cb01152be10cc44005 (patch)
treefafe85eadca3db5f2091738324c5253d4072cf3e /usr.sbin/pkg_install/create/pl.c
parentad57db7eefbd5760a834879d200ce1043f86046d (diff)
downloadFreeBSD-src-1c390186cd64897d9b1b87cb01152be10cc44005.zip
FreeBSD-src-1c390186cd64897d9b1b87cb01152be10cc44005.tar.gz
Use err(3). Cosmetics in usage string and man page.
Diffstat (limited to 'usr.sbin/pkg_install/create/pl.c')
-rw-r--r--usr.sbin/pkg_install/create/pl.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.sbin/pkg_install/create/pl.c b/usr.sbin/pkg_install/create/pl.c
index f0a8b6d..a10e383 100644
--- a/usr.sbin/pkg_install/create/pl.c
+++ b/usr.sbin/pkg_install/create/pl.c
@@ -1,5 +1,6 @@
#ifndef lint
-static const char *rcsid = "$Id$";
+static const char rcsid[] =
+ "$Id: pl.c,v 1.10 1997/02/22 16:09:30 peter Exp $";
#endif
/*
@@ -25,6 +26,7 @@ static const char *rcsid = "$Id$";
#include "lib.h"
#include "create.h"
#include <errno.h>
+#include <err.h>
#include <md5.h>
/* Check a list for files that require preconversion */
@@ -84,7 +86,7 @@ trylink(const char *from, const char *to)
if (where_count > sizeof(STARTSTRING)-1) { \
strcat(where_args, "|tar xpf -"); \
if (system(where_args)) \
- barf("can't invoke tar pipeline"); \
+ cleanup(0), errx(2, "can't invoke tar pipeline"); \
memset(where_args, 0, maxargs); \
last_chdir = NULL; \
strcpy(where_args, STARTSTRING); \
@@ -111,7 +113,7 @@ copy_plist(char *home, Package *plist)
and sh -c */
where_args = malloc(maxargs);
if (!where_args)
- barf("can't get argument list space");
+ cleanup(0), errx(2, "can't get argument list space");
memset(where_args, 0, maxargs);
strcpy(where_args, STARTSTRING);
@@ -172,7 +174,7 @@ copy_plist(char *home, Package *plist)
last_chdir = home;
}
if (add_count > maxargs - where_count)
- barf("oops, miscounted strings!");
+ cleanup(0), errx(2, "oops, miscounted strings!");
where_count += add_count;
}
/*
@@ -206,7 +208,7 @@ copy_plist(char *home, Package *plist)
mythere ? mythere : where,
p->name);
if (add_count > maxargs - where_count)
- barf("oops, miscounted strings!");
+ cleanup(0), errx(2, "oops, miscounted strings!");
where_count += add_count;
last_chdir = (mythere ? mythere : where);
}
OpenPOWER on IntegriCloud