[BACK]Return to Makefile CVS log [TXT][DIR] Up to [local] / src / usr.bin / vmstat

File: [local] / src / usr.bin / vmstat / Makefile (download)

Revision 1.9, Wed Jul 2 00:12:34 2014 UTC (9 years, 11 months ago) by dlg
Branch: MAIN
Changes since 1.8: +2 -1 lines

info about pools is currently given to userland by copying each
pools struct out. however, struct pool in the kernel contains lots
of things that userland probably isnt interested in, like actual
mutexes, and probably shouldnt get easy access to, like pointers
to kernel memory via all the lists/trees.

this implements a kinfo_pool structure that has only the data that
userland needs to know about. it cuts the sysctl code over to
building it from struct pool as required and copying that out
instead, and cuts userland over to only handling kinfo_pool.

the only problem with this is vmstat, which can read kernel images
via kvm, which needs some understanding of struct pool. to cope,
the struct pool definition is guarded by if defined(_KERNEL) ||
defined(_LIBKVM) as inspired by sysctl which needs to do the same
thing sometimes. struct pool itself is generally not visible to
userland though, which is good.

matthew@ suggested struct kinfo_pool instead of struct pool_info.
the kinfo prefix has precedent.
lots of people liked this.

#	$OpenBSD: Makefile,v 1.9 2014/07/02 00:12:34 dlg Exp $

PROG=	vmstat

CPPFLAGS+= -D_LIBKVM
SRCS=	dkstats.c vmstat.c
MAN=	vmstat.8
DPADD=	${LIBKVM}
LDADD=	-lkvm

.include <bsd.prog.mk>