DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SVR5

size(D2)


size -- return size of logical block device

Synopsis (Not in current DDI version)

   #include <sys/types.h>
   #include <sys/param.h>
   #include <sys/ddi.h>
   

int prefixsize(dev_t dev);

Description

The caller's size( ) entry point routine returns the number of NBPSCTR-byte units on a logical block device (partition). NBPSCTR, defined in param.h, is the number of bytes per logical disk sector.

The size( ) routine is a named entry point and must be defined as a global symbol.

Arguments


dev
The logical device number.

Return values

On success, the size routine should return the number of NBPSCTR-byte units on the logical block device specified by dev; on failure, size should return -1.

Usage

This entry point is required in all block device drivers.

size(D2) is called only when the device is open.

Context and synchronization

User context. The driver can block and can do operations such as copyout(D3) that require access to the requesting process's user-level address space.

Hardware applicability

All

Version applicability

ddi: 1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp

External dependencies

Named entry point routines must be declared in the driver's Master(DSP/4dsp) file. The declaration for this entry point is $entry size.

Differences between versions

Starting with DDI version 8, the size(D2) entry point routine is replaced by the DI_SIZE subfunction of the devinfo(D2) entry point routine.

References

devinfo(D2)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005