xref: /original-bsd/usr.bin/systat/fetch.c (revision c3e32dec)
1 /*-
2  * Copyright (c) 1980, 1992, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  */
7 
8 #ifndef lint
9 static char sccsid[] = "@(#)fetch.c	8.1 (Berkeley) 06/06/93";
10 #endif /* not lint */
11 
12 #include <sys/types.h>
13 #include "systat.h"
14 #include "extern.h"
15 
16 int
17 kvm_ckread(a, b, l)
18 	void *a, *b;
19 	int l;
20 {
21 	if (kvm_read(kd, (u_long)a, b, l) != l) {
22 		if (verbose)
23 			error("error reading kmem at %x\n", a);
24 		return (0);
25 	}
26 	else
27 		return (1);
28 }
29