1 '\" te
   2 .\"  Copyright (c) 1996, Sun Microsystems, Inc.  All Rights Reserved
   3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   6 .TH CSX_ERROR2TEXT 9F "Jul 19, 1996"
   7 .SH NAME
   8 csx_Error2Text \- convert error return codes to text strings
   9 .SH SYNOPSIS
  10 .LP
  11 .nf
  12 #include <sys/pccard.h>
  13 
  14 
  15 
  16 \fBint32_t\fR \fBcsx_Error2Text\fR(\fBerror2text_t *\fR\fIer\fR);
  17 .fi
  18 
  19 .SH INTERFACE LEVEL
  20 .sp
  21 .LP
  22 Solaris \fBDDI \fRSpecific (Solaris \fBDDI) \fR
  23 .SH PARAMETERS
  24 .sp
  25 .ne 2
  26 .na
  27 \fB\fIer\fR \fR
  28 .ad
  29 .RS 7n
  30 Pointer to an \fBerror2text_t\fR structure.
  31 .RE
  32 
  33 .SH DESCRIPTION
  34 .sp
  35 .LP
  36 This function is a Solaris-specific extension that provides a method for
  37 clients to convert Card Services error return codes to text strings.
  38 .SH STRUCTURE MEMBERS
  39 .sp
  40 .LP
  41 The structure members of \fBerror2text_t\fR are:
  42 .sp
  43 .in +2
  44 .nf
  45 uint32_t     item;                             /*the error code*/
  46 char         test[CS_ERROR_MAX_BUFSIZE};       /*the error code*/
  47 .fi
  48 .in -2
  49 
  50 .sp
  51 .LP
  52 A pointer to the text for the Card Services error return code in the \fBitem\fR
  53 field is returned in the \fBtext\fR field if the error return code is found.
  54 The client is not responsible for allocating a buffer to hold the text. If the
  55 Card Services error return code specified in the item field is not found, the
  56 \fBtext\fR field will be set to a string of the form:
  57 .sp
  58 .LP
  59 "{\fIunknown Card Services return code\fR}"
  60 .SH RETURN VALUES
  61 .sp
  62 .ne 2
  63 .na
  64 \fB\fBCS_SUCCESS\fR \fR
  65 .ad
  66 .RS 28n
  67 Successful operation.
  68 .RE
  69 
  70 .sp
  71 .ne 2
  72 .na
  73 \fB\fBCS_UNSUPPORTED_FUNCTION\fR \fR
  74 .ad
  75 .RS 28n
  76 No \fBPCMCIA \fRhardware installed.
  77 .RE
  78 
  79 .SH CONTEXT
  80 .sp
  81 .LP
  82 This function may be called from user or kernel context.
  83 .SH EXAMPLES
  84 .LP
  85 \fBExample 1 \fR: Using the csxError2Text function
  86 .sp
  87 .in +2
  88 .nf
  89 if ((ret = csx_RegisterClient(&client_handle, &
  90            client_reg)) != CS_SUCCESS)
  91 {
  92    error2text_t error2text;
  93    error2text.item = ret;
  94    csx_Error2Text(&error2text);
  95    cmn_err(CE_CONT, "RegisterClient failed %s (0x%x)",
  96            error2text.text, ret);
  97 }
  98 .fi
  99 .in -2
 100 
 101 .SH SEE ALSO
 102 .sp
 103 .LP
 104 \fBcsx_Event2Text\fR(9F)
 105 .sp
 106 .LP
 107 \fIPC Card 95 Standard, PCMCIA/JEIDA\fR