Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/lib/libkvm pull up rev 1.14 from trunk (cgd)
details: https://anonhg.NetBSD.org/src/rev/e48239629149
branches: netbsd-1-4
changeset: 469235:e48239629149
user: cgd <cgd%NetBSD.org@localhost>
date: Fri Aug 20 04:59:09 1999 +0000
description:
pull up rev 1.14 from trunk (cgd)
diffstat:
lib/libkvm/kvm_file.c | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
diffs (62 lines):
diff -r d2bdf857449a -r e48239629149 lib/libkvm/kvm_file.c
--- a/lib/libkvm/kvm_file.c Fri Aug 20 04:56:49 1999 +0000
+++ b/lib/libkvm/kvm_file.c Fri Aug 20 04:59:09 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kvm_file.c,v 1.12 1999/04/01 09:57:00 veego Exp $ */
+/* $NetBSD: kvm_file.c,v 1.12.2.1 1999/08/20 04:59:09 cgd Exp $ */
/*-
* Copyright (c) 1989, 1992, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)kvm_file.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: kvm_file.c,v 1.12 1999/04/01 09:57:00 veego Exp $");
+__RCSID("$NetBSD: kvm_file.c,v 1.12.2.1 1999/08/20 04:59:09 cgd Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -98,15 +98,15 @@
/*
* first copyout filehead
*/
- if (buflen > sizeof(fhead)) {
- if (KREAD(kd, ofhead, &fhead)) {
- _kvm_err(kd, kd->program, "can't read filehead");
- return (0);
- }
- buflen -= sizeof(fhead);
- where -= sizeof(fhead);
- (void)memcpy(kd->argspc, &fhead, sizeof(fhead));
+ if (buflen < sizeof(fhead) ||
+ KREAD(kd, ofhead, &fhead)) {
+ _kvm_err(kd, kd->program, "can't read filehead");
+ return (0);
}
+ buflen -= sizeof(fhead);
+ where += sizeof(fhead);
+ (void)memcpy(kd->argspc, &fhead, sizeof(fhead));
+
/*
* followed by an array of file structures
*/
@@ -118,7 +118,7 @@
}
buflen -= sizeof(struct file);
fp = (struct file *)(void *)where;
- where -= sizeof(struct file);
+ where += sizeof(struct file);
n++;
}
}
@@ -171,8 +171,8 @@
} else {
struct nlist nl[3], *p;
- nl[0].n_name = "_filehead";
- nl[1].n_name = "_numfiles";
+ nl[0].n_name = "_nfiles";
+ nl[1].n_name = "_filehead";
nl[2].n_name = 0;
if (kvm_nlist(kd, nl) != 0) {
Home |
Main Index |
Thread Index |
Old Index