'\" te .\" Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved .TH csx_ConvertSize 9F "19 Jul 1996" "SunOS 5.11" "Kernel Functions for Drivers" .SH NAME csx_ConvertSize \- convert device sizes .SH SYNOPSIS .LP .nf #include \fBint32_t\fR \fBcsx_ConvertSize\fR(\fBconvert_size_t *\fR\fIcs\fR); .fi .SH INTERFACE LEVEL .sp .LP Solaris \fBDDI \fRSpecific (Solaris \fBDDI) \fR .SH PARAMETERS .sp .ne 2 .mk .na \fB\fIcs\fR \fR .ad .RS 7n .rt Pointer to a \fBconvert_size_t\fR structure. .RE .SH DESCRIPTION .sp .LP \fBcsx_ConvertSize()\fR is a Solaris-specific extension that provides a method for clients to convert from one type of device size representation to another, that is, from \fIdevsize\fR format to \fIbytes\fR and vice versa. .SH STRUCTURE MEMBERS .sp .LP The structure members of \fBconvert_size_t\fR are: .sp .in +2 .nf uint32_t Attributes; uint32_t bytes; uint32_t devsize; .fi .in -2 .sp .LP The fields are defined as follows: .sp .ne 2 .mk .na \fB\fBAttributes\fR \fR .ad .RS 15n .rt This is a bit-mapped field that identifies the type of size conversion to be performed. The field is defined as follows: .sp .ne 2 .mk .na \fB\fBCONVERT_BYTES_TO_DEVSIZE\fR\fR .ad .RS 28n .rt Converts \fIbytes\fR to \fIdevsize\fR format. .RE .sp .ne 2 .mk .na \fB\fBCONVERT_DEVSIZE_TO_BYTES\fR\fR .ad .RS 28n .rt Converts \fIdevsize\fR format to \fIbytes\fR. .RE .RE .sp .ne 2 .mk .na \fB\fBbytes\fR \fR .ad .RS 15n .rt If \fBCONVERT_BYTES_TO_DEVSIZE\fR is set, the value in the \fBbytes\fR field is converted to a \fIdevsize\fR format and returned in the \fBdevsize\fR field. .RE .sp .ne 2 .mk .na \fB\fBdevsize\fR \fR .ad .RS 15n .rt If \fBCONVERT_DEVSIZE_TO_BYTES\fR is set, the value in the \fBdevsize\fR field is converted to a \fIbytes\fR value and returned in the \fBbytes\fR field. .RE .SH RETURN VALUES .sp .ne 2 .mk .na \fB\fBCS_SUCCESS\fR \fR .ad .RS 28n .rt Successful operation. .RE .sp .ne 2 .mk .na \fB\fBCS_BAD_SIZE\fR \fR .ad .RS 28n .rt Invalid \fIbytes\fR or \fIdevsize\fR. .RE .sp .ne 2 .mk .na \fB\fBCS_UNSUPPORTED_FUNCTION\fR \fR .ad .RS 28n .rt No \fBPCMCIA \fRhardware installed. .RE .SH CONTEXT .sp .LP This function may be called from user or kernel context. .SH SEE ALSO .sp .LP \fBcsx_ModifyWindow\fR(9F), \fBcsx_RequestWindow\fR(9F) .sp .LP \fIPCCard 95 Standard, PCMCIA/JEIDA\fR