From owner-cvs-all Fri Feb 23 10:49:24 2001 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id BC12237B6A0; Fri, 23 Feb 2001 10:49:16 -0800 (PST) (envelope-from rwatson@FreeBSD.org) Received: (from rwatson@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f1NInGp44900; Fri, 23 Feb 2001 10:49:16 -0800 (PST) (envelope-from rwatson) Message-Id: <200102231849.f1NInGp44900@freefall.freebsd.org> From: Robert Watson Date: Fri, 23 Feb 2001 10:49:16 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/lib/libkvm kvm_getswapinfo.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG rwatson 2001/02/23 10:49:16 PST Modified files: lib/libkvm kvm_getswapinfo.c Log: Adapt libkvm_getswapinfo() to make use of recently committed vm and swap sysctls exporting swap information. When running on a live kernel, the sysctl's will now be used instead of kvm_read, allowing consumers of this interface to run without privilege (setgid kmem). Retain the ability to run on coredumps, or on a kernel using kmem if explicitly pointed at one. A side effect of this change is that kvm_getswapinfo() is faster now in the general case. If the SWIF_DUMP_TREE flag is given (pstat -ss does this), the radix tree walker, which still uses kvm_read in any case, is invoked, and therefore does require privilege. Submitted by: Thomas Moestl Reviewed by: freebsd-audit Revision Changes Path 1.15 +255 -61 src/lib/libkvm/kvm_getswapinfo.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message