size(D2)
size - return size of logical block device
As shipped in IRIX 6.5.5. Unchanged since IRIX 6.5.
NAME size - return size of logical block device SYNOPSIS #include <sys/types.h> #include <sys/param.h> #include <sys/ddi.h> int prefixsize(dev_t dev); Arguments dev The logical device number. DESCRIPTION The size entry point 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. 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. Failure cases should include devices whose size will not fit in an int; these devices should have a size64 entry point as well. USAGE This entry point is required in all block device drivers. size(D2) is called only when the device is open. Synchronization Constraints The size routine has user context and can sleep. However, it should be careful not to spend much time sleeping, especially if the routine is called when the logical device is not open. SEE ALSO size64(D2)