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