From owner-svn-src-head@FreeBSD.ORG Fri Jun 12 18:13:34 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9B3610656A9; Fri, 12 Jun 2009 18:13:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7C5678FC1D; Fri, 12 Jun 2009 18:13:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5CIDYid089111; Fri, 12 Jun 2009 18:13:34 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5CIDY1c089109; Fri, 12 Jun 2009 18:13:34 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200906121813.n5CIDY1c089109@svn.freebsd.org> From: John Baldwin Date: Fri, 12 Jun 2009 18:13:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194071 - head/lib/libutil X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2009 18:13:37 -0000 Author: jhb Date: Fri Jun 12 18:13:34 2009 New Revision: 194071 URL: http://svn.freebsd.org/changeset/base/194071 Log: - Note that these interfaces require for the structure definitions. - Note that these functions return NULL on failure. MFC after: 3 days Modified: head/lib/libutil/kinfo_getfile.3 head/lib/libutil/kinfo_getvmmap.3 Modified: head/lib/libutil/kinfo_getfile.3 ============================================================================== --- head/lib/libutil/kinfo_getfile.3 Fri Jun 12 16:37:53 2009 (r194070) +++ head/lib/libutil/kinfo_getfile.3 Fri Jun 12 18:13:34 2009 (r194071) @@ -35,6 +35,7 @@ .Lb libutil .Sh SYNOPSIS .In sys/types.h +.In sys/user.h .In libutil.h .Ft struct kinfo_file * .Fn kinfo_getfile "pid_t pid" "int *cntp" @@ -58,7 +59,7 @@ mib. While the kernel returns a packed structure, this function expands the data into a fixed record format. .Sh RETURN VALUES -The +On success the .Fn kinfo_getfile function returns a pointer to an array of .Vt struct kinfo_file @@ -67,6 +68,10 @@ The array was obtained by an internal ca .Xr malloc 3 and must be freed by the caller with a call to .Xr free 3 . +On failure the +.Fn kinfo_getfile +function returns +.Dv NULL . .Sh SEE ALSO .Xr free 3 , .Xr kinfo_getvmmap 3 , Modified: head/lib/libutil/kinfo_getvmmap.3 ============================================================================== --- head/lib/libutil/kinfo_getvmmap.3 Fri Jun 12 16:37:53 2009 (r194070) +++ head/lib/libutil/kinfo_getvmmap.3 Fri Jun 12 18:13:34 2009 (r194071) @@ -35,6 +35,7 @@ .Lb libutil .Sh SYNOPSIS .In sys/types.h +.In sys/user.h .In libutil.h .Ft struct kinfo_vmentry * .Fn kinfo_getfile "pid_t pid" "int *cntp" @@ -58,7 +59,7 @@ mib. While the kernel returns a packed structure, this function expands the data into a fixed record format. .Sh RETURN VALUES -The +On success the .Fn kinfo_getvmmap function returns a pointer to an array of .Vt struct kinfo_vmentry @@ -67,6 +68,10 @@ The array was obtained by an internal ca .Xr malloc 3 and must be freed by the caller with a call to .Xr free 3 . +On failure the +.Fn kinfo_getvmmap +function returns +.Dv NULL . .Sh SEE ALSO .Xr free 3 , .Xr kinfo_getfile 3 ,