| Current File : //usr/share/man/man9f/csx_Event2Text.9f |
'\" te
.\" Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved
.TH csx_Event2Text 9F "19 Jul 1996" "SunOS 5.11" "Kernel Functions for Drivers"
.SH NAME
csx_Event2Text \- convert events to text strings
.SH SYNOPSIS
.LP
.nf
#include <sys/pccard.h>
\fBint32_t\fR \fBcsx_Event2Text\fR(\fBevent2text_t *\fR\fIev\fR);
.fi
.SH INTERFACE LEVEL
.sp
.LP
Solaris \fBDDI \fRSpecific (Solaris \fBDDI) \fR
.SH PARAMETERS
.sp
.ne 2
.mk
.na
\fB\fIev\fR\fR
.ad
.RS 6n
.rt
Pointer to an \fBevent2text_t\fR structure.
.RE
.SH DESCRIPTION
.sp
.LP
This function is a Solaris-specific extension that provides a method for clients to convert Card Services events to text strings.
.SH STRUCTURE MEMBERS
.sp
.LP
The structure members of \fBevent2text_t\fR are:
.sp
.in +2
.nf
event_t event; /*the event code*/
char text[CS_EVENT_MAX_BUFSIZE] /*the event code*/
.fi
.in -2
.sp
.LP
The fields are defined as follows:
.sp
.ne 2
.mk
.na
\fB\fBevent\fR\fR
.ad
.RS 9n
.rt
The text for the event code in the \fBevent\fR field is returned in the \fBtext\fR field.
.RE
.sp
.ne 2
.mk
.na
\fB\fBtext\fR\fR
.ad
.RS 9n
.rt
The text string describing the name of the event.
.RE
.SH RETURN VALUES
.sp
.ne 2
.mk
.na
\fB\fBCS_SUCCESS\fR\fR
.ad
.RS 27n
.rt
Successful operation.
.RE
.sp
.ne 2
.mk
.na
\fB\fBCS_UNSUPPORTED_FUNCTION\fR\fR
.ad
.RS 27n
.rt
No \fBPCMCIA \fRhardware installed.
.RE
.SH CONTEXT
.sp
.LP
This function may be called from user or kernel context.
.SH EXAMPLES
.LP
\fBExample 1 \fR: Using \fBcsx_Event2Text()\fR
.sp
.in +2
.nf
xx_event(event_t event, int priority, event_callback_args_t *eca)
{
event2text_t event2text;
event2text.event = event;
csx_Event2Text(&event2text);
cmn_err(CE_CONT, "event %s (0x%x)", event2text.text, (int)event);
}
.fi
.in -2
.SH SEE ALSO
.sp
.LP
\fBcsx_event_handler\fR(9E), \fBcsx_Error2Text\fR(9F)
.sp
.LP
\fIPC Card 95 Standard, PCMCIA/JEIDA\fR