Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/pkg_install/add Fix wrong error handling in case "/...
details: https://anonhg.NetBSD.org/src/rev/97c911577ed2
branches: trunk
changeset: 472933:97c911577ed2
user: tron <tron%NetBSD.org@localhost>
date: Wed May 12 20:43:49 1999 +0000
description:
Fix wrong error handling in case "/var/db/pkg" needs to be created.
Patch suppled by Roland Dowdeswell in PR pkg/7566.
diffstat:
usr.sbin/pkg_install/add/perform.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (35 lines):
diff -r 062d0b00db6f -r 97c911577ed2 usr.sbin/pkg_install/add/perform.c
--- a/usr.sbin/pkg_install/add/perform.c Wed May 12 19:49:09 1999 +0000
+++ b/usr.sbin/pkg_install/add/perform.c Wed May 12 20:43:49 1999 +0000
@@ -1,11 +1,11 @@
-/* $NetBSD: perform.c,v 1.29 1999/03/22 05:02:40 hubertf Exp $ */
+/* $NetBSD: perform.c,v 1.30 1999/05/12 20:43:49 tron Exp $ */
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char *rcsid = "from FreeBSD Id: perform.c,v 1.44 1997/10/13 15:03:46 jkh Exp";
#else
-__RCSID("$NetBSD: perform.c,v 1.29 1999/03/22 05:02:40 hubertf Exp $");
+__RCSID("$NetBSD: perform.c,v 1.30 1999/05/12 20:43:49 tron Exp $");
#endif
#endif
@@ -97,7 +97,7 @@
/* make sure dbdir actually exists! */
if (!(isdir(dbdir) || islinktodir(dbdir))) {
- if (! vsystem("/bin/mkdir -p -m 755 %s", dbdir)) {
+ if (vsystem("/bin/mkdir -p -m 755 %s", dbdir)) {
errx(1, "Database-dir %s cannot be generated, aborting.",
dbdir);
}
@@ -186,7 +186,7 @@
if (!(isdir(p->name) || islinktodir(p->name)) && !Fake) {
if (Verbose)
printf("Desired prefix of %s does not exist, creating.\n", p->name);
- vsystem("mkdir -p %s", p->name);
+ (void)vsystem("mkdir -p %s", p->name);
}
if (chdir(p->name) == -1) {
warn("unable to change directory to `%s'", p->name);
Home |
Main Index |
Thread Index |
Old Index