'\" te .\" Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved .\" 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. .\" 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. .\" 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] .TH CSX_CONVERTSIZE 9F "Jul 19, 1996" .SH NAME csx_ConvertSize \- convert device sizes .SH SYNOPSIS .nf #include \fBint32_t\fR \fBcsx_ConvertSize\fR(\fBconvert_size_t *\fR\fIcs\fR); .fi .SH INTERFACE LEVEL illumos \fBDDI \fRSpecific (illumos \fBDDI) \fR .SH PARAMETERS .ne 2 .na \fB\fIcs\fR \fR .ad .RS 7n Pointer to a \fBconvert_size_t\fR structure. .RE .SH DESCRIPTION \fBcsx_ConvertSize()\fR is an illumos-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 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 .na \fB\fBAttributes\fR \fR .ad .RS 15n 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 .na \fB\fBCONVERT_BYTES_TO_DEVSIZE\fR\fR .ad .RS 28n Converts \fIbytes\fR to \fIdevsize\fR format. .RE .sp .ne 2 .na \fB\fBCONVERT_DEVSIZE_TO_BYTES\fR\fR .ad .RS 28n Converts \fIdevsize\fR format to \fIbytes\fR. .RE .RE .sp .ne 2 .na \fB\fBbytes\fR \fR .ad .RS 15n 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 .na \fB\fBdevsize\fR \fR .ad .RS 15n 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 .ne 2 .na \fB\fBCS_SUCCESS\fR \fR .ad .RS 28n Successful operation. .RE .sp .ne 2 .na \fB\fBCS_BAD_SIZE\fR \fR .ad .RS 28n Invalid \fIbytes\fR or \fIdevsize\fR. .RE .sp .ne 2 .na \fB\fBCS_UNSUPPORTED_FUNCTION\fR \fR .ad .RS 28n No \fBPCMCIA \fRhardware installed. .RE .SH CONTEXT This function may be called from user or kernel context. .SH SEE ALSO .BR csx_ModifyWindow (9F), .BR csx_RequestWindow (9F) .sp .LP \fIPCCard 95 Standard, PCMCIA/JEIDA\fR