1*86a5a956Sjoerg.\" $NetBSD: kvm_geterr.3,v 1.9 2009/03/10 23:49:07 joerg Exp $ 2346e67f8Sthorpej.\" 30215cc7dScgd.\" Copyright (c) 1992, 1993 40215cc7dScgd.\" The Regents of the University of California. All rights reserved. 50215cc7dScgd.\" 60215cc7dScgd.\" This code is derived from software developed by the Computer Systems 70215cc7dScgd.\" Engineering group at Lawrence Berkeley Laboratory under DARPA contract 80215cc7dScgd.\" BG 91-66 and contributed to Berkeley. 90215cc7dScgd.\" 100215cc7dScgd.\" Redistribution and use in source and binary forms, with or without 110215cc7dScgd.\" modification, are permitted provided that the following conditions 120215cc7dScgd.\" are met: 130215cc7dScgd.\" 1. Redistributions of source code must retain the above copyright 140215cc7dScgd.\" notice, this list of conditions and the following disclaimer. 150215cc7dScgd.\" 2. Redistributions in binary form must reproduce the above copyright 160215cc7dScgd.\" notice, this list of conditions and the following disclaimer in the 170215cc7dScgd.\" documentation and/or other materials provided with the distribution. 18eb7c1594Sagc.\" 3. Neither the name of the University nor the names of its contributors 190215cc7dScgd.\" may be used to endorse or promote products derived from this software 200215cc7dScgd.\" without specific prior written permission. 210215cc7dScgd.\" 220215cc7dScgd.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 230215cc7dScgd.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 240215cc7dScgd.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 250215cc7dScgd.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 260215cc7dScgd.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 270215cc7dScgd.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 280215cc7dScgd.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 290215cc7dScgd.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 300215cc7dScgd.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 310215cc7dScgd.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 320215cc7dScgd.\" SUCH DAMAGE. 330215cc7dScgd.\" 340215cc7dScgd.\" @(#)kvm_geterr.3 8.1 (Berkeley) 6/4/93 350215cc7dScgd.\" 360215cc7dScgd.Dd June 4, 1993 370215cc7dScgd.Dt KVM_GETERR 3 380215cc7dScgd.Os 390215cc7dScgd.Sh NAME 400215cc7dScgd.Nm kvm_geterr 410215cc7dScgd.Nd get error message on kvm descriptor 42312aca53Sperry.Sh LIBRARY 43312aca53Sperry.Lb libkvm 440215cc7dScgd.Sh SYNOPSIS 45472351e1Swiz.In kvm.h 460215cc7dScgd.Ft char * 470215cc7dScgd.Fn kvm_geterr "kvm_t *kd" 480215cc7dScgd.Sh DESCRIPTION 490215cc7dScgdThis function returns a string describing the most recent error condition 500215cc7dScgdon the descriptor 510215cc7dScgd.Fa kd . 520215cc7dScgdThe results are undefined if the most recent 530215cc7dScgd.Xr kvm 3 540215cc7dScgdlibrary call did not produce an error. 550215cc7dScgdThe string returned is stored in memory owned by 560215cc7dScgd.Xr kvm 3 570215cc7dScgdso the message should be copied out and saved elsewhere if necessary. 580215cc7dScgd.Sh SEE ALSO 590215cc7dScgd.Xr kvm 3 , 600215cc7dScgd.Xr kvm_close 3 , 610215cc7dScgd.Xr kvm_getargv 3 , 620215cc7dScgd.Xr kvm_getenvv 3 , 630215cc7dScgd.Xr kvm_getprocs 3 , 640215cc7dScgd.Xr kvm_nlist 3 , 650215cc7dScgd.Xr kvm_open 3 , 660215cc7dScgd.Xr kvm_openfiles 3 , 670215cc7dScgd.Xr kvm_read 3 , 680215cc7dScgd.Xr kvm_write 3 69f6254de6Swiz.Sh BUGS 70f6254de6SwizThis routine cannot be used to access error conditions due to a failed 71f6254de6Swiz.Fn kvm_openfiles 72f6254de6Swizcall, since failure is indicated by returning a 73f6254de6Swiz.Dv NULL 74f6254de6Swizdescriptor. 75f6254de6SwizTherefore, errors on open are output to the special error buffer 76f6254de6Swizpassed to 77f6254de6Swiz.Fn kvm_openfiles . 78f6254de6SwizThis option is not available to 79f6254de6Swiz.Fn kvm_open . 80