8999 SMBIOS: cleanup 32-bit specific code
[unleashed.git] / usr / src / man / man9f / csx_ConvertSize.9f
bloba7aa89f78c082629fdb6fe589545306689310ac5
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_CONVERTSIZE 9F "Jul 19, 1996"
7 .SH NAME
8 csx_ConvertSize \- convert device sizes
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <sys/pccard.h>
16 \fBint32_t\fR \fBcsx_ConvertSize\fR(\fBconvert_size_t *\fR\fIcs\fR);
17 .fi
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\fIcs\fR \fR
28 .ad
29 .RS 7n
30 Pointer to a \fBconvert_size_t\fR structure.
31 .RE
33 .SH DESCRIPTION
34 .sp
35 .LP
36 \fBcsx_ConvertSize()\fR is a Solaris-specific extension that provides a method
37 for clients to convert from one type of device size representation to another,
38 that is, from \fIdevsize\fR format to \fIbytes\fR and vice versa.
39 .SH STRUCTURE MEMBERS
40 .sp
41 .LP
42 The structure members of \fBconvert_size_t\fR are:
43 .sp
44 .in +2
45 .nf
46 uint32_t    Attributes;
47 uint32_t    bytes;
48 uint32_t    devsize;
49 .fi
50 .in -2
52 .sp
53 .LP
54 The fields are defined as follows:
55 .sp
56 .ne 2
57 .na
58 \fB\fBAttributes\fR \fR
59 .ad
60 .RS 15n
61 This is a bit-mapped field that identifies the type of size conversion to be
62 performed. The field is defined as follows:
63 .sp
64 .ne 2
65 .na
66 \fB\fBCONVERT_BYTES_TO_DEVSIZE\fR\fR
67 .ad
68 .RS 28n
69 Converts \fIbytes\fR to \fIdevsize\fR format.
70 .RE
72 .sp
73 .ne 2
74 .na
75 \fB\fBCONVERT_DEVSIZE_TO_BYTES\fR\fR
76 .ad
77 .RS 28n
78 Converts \fIdevsize\fR format to \fIbytes\fR.
79 .RE
81 .RE
83 .sp
84 .ne 2
85 .na
86 \fB\fBbytes\fR \fR
87 .ad
88 .RS 15n
89 If \fBCONVERT_BYTES_TO_DEVSIZE\fR is set, the value in the \fBbytes\fR field is
90 converted to a \fIdevsize\fR format and returned in the \fBdevsize\fR field.
91 .RE
93 .sp
94 .ne 2
95 .na
96 \fB\fBdevsize\fR \fR
97 .ad
98 .RS 15n
99 If \fBCONVERT_DEVSIZE_TO_BYTES\fR is set, the value in the \fBdevsize\fR field
100 is converted to a \fIbytes\fR value and returned in the \fBbytes\fR field.
103 .SH RETURN VALUES
105 .ne 2
107 \fB\fBCS_SUCCESS\fR \fR
109 .RS 28n
110 Successful operation.
114 .ne 2
116 \fB\fBCS_BAD_SIZE\fR \fR
118 .RS 28n
119 Invalid \fIbytes\fR or \fIdevsize\fR.
123 .ne 2
125 \fB\fBCS_UNSUPPORTED_FUNCTION\fR \fR
127 .RS 28n
128 No \fBPCMCIA \fRhardware installed.
131 .SH CONTEXT
134 This function may be called from user or kernel context.
135 .SH SEE ALSO
138 \fBcsx_ModifyWindow\fR(9F), \fBcsx_RequestWindow\fR(9F)
141 \fIPCCard 95 Standard, PCMCIA/JEIDA\fR