From: graichen Date: Sun, 29 Dec 1996 12:21:26 +0000 (+0000) Subject: remove one / from the printf of the filenames (_PATH_UNIX begings with a X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=9a9adc2ae45df0a8b62a7616b0d304a31fa92b4c;p=openbsd remove one / from the printf of the filenames (_PATH_UNIX begings with a slash - /bsd so we don't need an extra slash there) --- diff --git a/sbin/savecore/savecore.c b/sbin/savecore/savecore.c index 5b0567f998d..3a5316acb72 100644 --- a/sbin/savecore/savecore.c +++ b/sbin/savecore/savecore.c @@ -1,4 +1,4 @@ -/* $OpenBSD: savecore.c,v 1.7 1996/10/15 10:17:32 deraadt Exp $ */ +/* $OpenBSD: savecore.c,v 1.8 1996/12/29 12:21:26 graichen Exp $ */ /* $NetBSD: savecore.c,v 1.26 1996/03/18 21:16:05 leo Exp $ */ /*- @@ -385,7 +385,7 @@ err1: syslog(LOG_WARNING, "%s: %s", path, strerror(errno)); (void)fclose(fp); /* Create the core file. */ - (void)snprintf(path, sizeof(path), "%s/%s.%d.core%s", + (void)snprintf(path, sizeof(path), "%s%s.%d.core%s", dirname, _PATH_UNIX, bounds, compress ? ".Z" : ""); if (compress) { if ((fp = zopen(path, "w", 0)) == NULL) { @@ -447,7 +447,7 @@ err2: syslog(LOG_WARNING, /* Copy the kernel. */ ifd = Open(kernel ? kernel : _PATH_UNIX, O_RDONLY); - (void)snprintf(path, sizeof(path), "%s/%s.%d%s", + (void)snprintf(path, sizeof(path), "%s%s.%d%s", dirname, _PATH_UNIX, bounds, compress ? ".Z" : ""); if (compress) { if ((fp = zopen(path, "w", 0)) == NULL) { diff --git a/sbin/savecore/savecore_old.c b/sbin/savecore/savecore_old.c index 69d0c081206..7580e135ea2 100644 --- a/sbin/savecore/savecore_old.c +++ b/sbin/savecore/savecore_old.c @@ -1,4 +1,4 @@ -/* $OpenBSD: savecore_old.c,v 1.5 1996/10/15 10:17:34 deraadt Exp $ */ +/* $OpenBSD: savecore_old.c,v 1.6 1996/12/29 12:21:29 graichen Exp $ */ /* $NetBSD: savecore_old.c,v 1.1.1.1 1996/03/16 10:25:11 leo Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)savecore.c 8.3 (Berkeley) 1/2/94"; #else -static char rcsid[] = "$OpenBSD: savecore_old.c,v 1.5 1996/10/15 10:17:34 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: savecore_old.c,v 1.6 1996/12/29 12:21:29 graichen Exp $"; #endif #endif /* not lint */ @@ -372,7 +372,7 @@ err1: syslog(LOG_WARNING, "%s: %s", path, strerror(errno)); (void)fclose(fp); /* Create the core file. */ - (void)snprintf(path, sizeof(path), "%s/%s.%d.core%s", + (void)snprintf(path, sizeof(path), "%s%s.%d.core%s", dirname, _PATH_UNIX, bounds, compress ? ".Z" : ""); if (compress) { if ((fp = zopen(path, "w", 0)) == NULL) { @@ -428,7 +428,7 @@ err2: syslog(LOG_WARNING, /* Copy the kernel. */ ifd = Open(kernel ? kernel : _PATH_UNIX, O_RDONLY); - (void)snprintf(path, sizeof(path), "%s/%s.%d%s", + (void)snprintf(path, sizeof(path), "%s%s.%d%s", dirname, _PATH_UNIX, bounds, compress ? ".Z" : ""); if (compress) { if ((fp = zopen(path, "w", 0)) == NULL) {