2 .\" Copyright (c) 2004, 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 LDI_GET_SIZE 9F "Mar 18, 2004"
8 ldi_get_size \- Retrieve device size
12 #include <sys/sunldi.h>
14 \fBint\fR \fBldi_get_size\fR(\fBldi_handle_t\fR \fIlh\fR, \fBuint64_t *\fR\fIsizep\fR);
33 Pointer to the caller's unsigned 64-bit integer buffer.
39 The \fBldi_get_size()\fR function uses the layered driver handle to calculate
40 and return a device's size. The device size is returned within the caller
41 supplied buffer (*\fIsizep\fR). A valid layered driver handle must be obtained
42 via the \fBldi_open_by_name\fR(9F) interface prior to calling
47 The \fBldi_get_size()\fR function returns the following values:
54 The device size has been returned within the caller supplied buffer.
63 The device size could not be found or determined.
69 This function may be called from user or kernel context.
73 \fBldi_open_by_name\fR(9F)
76 \fIWriting Device Drivers\fR