1ldi_get_size(9F)         Kernel Functions for Drivers         ldi_get_size(9F)
2
3
4

NAME

6       ldi_get_size - Retrieve device size
7

SYNOPSIS

9       #include <sys/sunldi.h>
10
11       int ldi_get_size(ldi_handle_t lh, uint64_t *sizep);
12
13

PARAMETERS

15       lh        Layered handle.
16
17
18       sizep     Pointer to the caller's unsigned 64-bit integer buffer.
19
20

DESCRIPTION

22       The ldi_get_size() function uses the layered driver handle to calculate
23       and return a device's size. The device  size  is  returned  within  the
24       caller  supplied buffer (*sizep). A valid layered driver handle must be
25       obtained  via  the  ldi_open_by_name(9F)  interface  prior  to  calling
26       ldi_get_size().
27

RETURN VALUES

29       The ldi_get_size() function returns the following values:
30
31       DDI_SUCCESS    The device size has been returned within the caller sup‐
32                      plied buffer.
33
34
35       DDI_FAILURE    The device size could not be found or determined.
36
37

CONTEXT

39       This function may be called from user or kernel context.
40

SEE ALSO

42       ldi_open_by_name(9F)
43
44
45       Writing Device Drivers
46
47
48
49SunOS 5.11                        18 Mar 2004                 ldi_get_size(9F)
Impressum