summaryrefslogtreecommitdiffstats
path: root/lib/libutil
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2009-06-12 18:13:34 +0000
committerjhb <jhb@FreeBSD.org>2009-06-12 18:13:34 +0000
commit677ded171bcf64ee48d23379f01254300f69bb53 (patch)
tree779b1447c06afeea66f4c9f2f5eab8fc31893938 /lib/libutil
parentd5dee91033420ded695ed2f2001e987adaf607d5 (diff)
downloadFreeBSD-src-677ded171bcf64ee48d23379f01254300f69bb53.zip
FreeBSD-src-677ded171bcf64ee48d23379f01254300f69bb53.tar.gz
- Note that these interfaces require <sys/user.h> for the structure
definitions. - Note that these functions return NULL on failure. MFC after: 3 days
Diffstat (limited to 'lib/libutil')
-rw-r--r--lib/libutil/kinfo_getfile.37
-rw-r--r--lib/libutil/kinfo_getvmmap.37
2 files changed, 12 insertions, 2 deletions
diff --git a/lib/libutil/kinfo_getfile.3 b/lib/libutil/kinfo_getfile.3
index 3da9ca2..dfbec0b 100644
--- a/lib/libutil/kinfo_getfile.3
+++ b/lib/libutil/kinfo_getfile.3
@@ -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 call to
.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 ,
diff --git a/lib/libutil/kinfo_getvmmap.3 b/lib/libutil/kinfo_getvmmap.3
index f0e76d9..d917fe8 100644
--- a/lib/libutil/kinfo_getvmmap.3
+++ b/lib/libutil/kinfo_getvmmap.3
@@ -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 call to
.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 ,
OpenPOWER on IntegriCloud