Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Feb 2001 10:49:16 -0800 (PST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/lib/libkvm kvm_getswapinfo.c
Message-ID:  <200102231849.f1NInGp44900@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <tmoestl@gmx.net>
  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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102231849.f1NInGp44900>