xref: /original-bsd/lib/libkvm/kvm_geterr.3 (revision be5aa998)
1.\" Copyright (c) 1992 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" %sccs.include.redist.man%
5.\"
6.\"     @(#)kvm_geterr.3	5.2 (Berkeley) 04/29/92
7.\"
8.Dd
9.Dt KVM_GETERR 3
10.Os
11.Sh NAME
12.Nm kvm_geterr
13.Nd get error message on kvm descriptor
14.Sh SYNOPSIS
15.Fd #include <kvm.h>
16.br
17.Ft char *
18.Fn kvm_geterr "kvm_t *kd"
19.Sh DESCRIPTION
20This function returns a string describing the most recent error condition
21on the descriptor
22.Fa kd .
23The results are undefined if the most recent
24.Xr kvm 3
25library call did not produce an error.
26The string returned is stored in memory owned by
27.Xr kvm 3
28so the message should be copied out and saved elsewhere if necessary.
29.Sh BUGS
30This routine cannot be used to access error conditions due to a failed
31.Fn kvm_openfiles
32call, since failure is indicated by returning a
33.Dv NULL
34descriptor.
35Therefore, errors on open are output to the special error buffer
36passed to
37.Fn kvm_openfiles .
38This option is not available to
39.Fn kvm_open .
40.Sh SEE ALSO
41.Xr kvm 3 ,
42.Xr kvm_close 3 ,
43.Xr kvm_getargv 3 ,
44.Xr kvm_getenvv 3 ,
45.Xr kvm_getprocs 3 ,
46.Xr kvm_nlist 3 ,
47.Xr kvm_open 3 ,
48.Xr kvm_openfiles 3 ,
49.Xr kvm_read 3 ,
50.Xr kvm_write 3
51