Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/usr.sbin/pkg_install/lib Pull up revisions 1.43, 1.46-1....
details: https://anonhg.NetBSD.org/src/rev/f036b01d5205
branches: netbsd-1-5
changeset: 490925:f036b01d5205
user: he <he%NetBSD.org@localhost>
date: Tue Mar 20 18:12:06 2001 +0000
description:
Pull up revisions 1.43,1.46-1.47 (requested by hubertf):
Various changes / updates:
o don't swallow ``%'' in file/dir names; fixing PR#11352
o various minor bugfixes and spelling fixes
diffstat:
usr.sbin/pkg_install/lib/file.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diffs (57 lines):
diff -r 06337bc55956 -r f036b01d5205 usr.sbin/pkg_install/lib/file.c
--- a/usr.sbin/pkg_install/lib/file.c Tue Mar 20 18:11:13 2001 +0000
+++ b/usr.sbin/pkg_install/lib/file.c Tue Mar 20 18:12:06 2001 +0000
@@ -1,11 +1,11 @@
-/* $NetBSD: file.c,v 1.37.4.7 2000/12/15 04:11:25 he Exp $ */
+/* $NetBSD: file.c,v 1.37.4.8 2001/03/20 18:12:06 he Exp $ */
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char *rcsid = "from FreeBSD Id: file.c,v 1.29 1997/10/08 07:47:54 charnier Exp";
#else
-__RCSID("$NetBSD: file.c,v 1.37.4.7 2000/12/15 04:11:25 he Exp $");
+__RCSID("$NetBSD: file.c,v 1.37.4.8 2001/03/20 18:12:06 he Exp $");
#endif
#endif
@@ -545,7 +545,7 @@
}
if (read(fd, contents, (size_t) sb.st_size) != (size_t) sb.st_size) {
cleanup(0);
- errx(2, "short read on '%s' - did not get %qd bytes",
+ errx(2, "short read on '%s' - did not get %lld bytes",
fname, (long long) sb.st_size);
}
close(fd);
@@ -651,7 +651,8 @@
{
char args[10], suff[80], *cp;
- args[0] = '\0';
+ args[0] = '-';
+ args[1] = '\0';
/*
* Figure out by a crude heuristic whether this or not this is probably
* compressed.
@@ -661,10 +662,10 @@
if (cp) {
strcpy(suff, cp + 1);
if (strchr(suff, 'z') || strchr(suff, 'Z'))
- strcpy(args, "-z");
+ strcat(args, "z");
}
} else
- strcpy(args, "z");
+ strcat(args, "z");
strcat(args, "xpf");
if (vsystem("%s %s %s %s", TAR_CMD, args, pkg, flist ? flist : "")) {
warnx("%s extract of %s failed!", TAR_CMD, pkg);
@@ -724,6 +725,7 @@
break;
default:
+ *bufp++ = '%';
*bufp++ = *fmt;
break;
}
Home |
Main Index |
Thread Index |
Old Index