xref: /csrg-svn/usr.bin/systat/fetch.c (revision 62273)
155619Sbostic /*-
2*62273Sbostic  * Copyright (c) 1980, 1992, 1993
3*62273Sbostic  *	The Regents of the University of California.  All rights reserved.
455619Sbostic  *
560197Smckusick  * %sccs.include.redist.c%
621448Smckusick  */
721448Smckusick 
815131Ssam #ifndef lint
9*62273Sbostic static char sccsid[] = "@(#)fetch.c	8.1 (Berkeley) 06/06/93";
1055619Sbostic #endif /* not lint */
1115131Ssam 
1255619Sbostic #include <sys/types.h>
1315131Ssam #include "systat.h"
1455619Sbostic #include "extern.h"
1515131Ssam 
1655619Sbostic int
kvm_ckread(a,b,l)1750148Smarc kvm_ckread(a, b, l)
1850148Smarc 	void *a, *b;
1950148Smarc 	int l;
2015131Ssam {
2155619Sbostic 	if (kvm_read(kd, (u_long)a, b, l) != l) {
2250148Smarc 		if (verbose)
2350148Smarc 			error("error reading kmem at %x\n", a);
2450148Smarc 		return (0);
2550148Smarc 	}
2650148Smarc 	else
2750148Smarc 		return (1);
2815131Ssam }
29