 |
Index for Section 9 |
|
 |
Alphabetical listing for R |
|
 |
Bottom of page |
|
readdisklabel(9r)
NAME
readdisklabel - Disk: Reads a disk label from a device
SYNOPSIS
char * readdisklabel(
dev_t dev,
int (*strategy) (struct buf *),
register struct disklabel *lp );
ARGUMENTS
dev Specifies the major and minor numbers for this device. Device driver
writers use the dev_t data type to represent a device's major and minor
numbers. This data type is an abstraction of the internal
representations of the major and minor numbers. Driver writers do not
need to know how the system internally represents the major and minor
numbers.
strategy
Specifies the device driver's strategy interface.
lp Specifies a pointer to the disklabel structure, initialized by the
readdisklabel interface.
DESCRIPTION
The readdisklabel interface reads a disklabel structure for a given device,
using the device driver's strategy interface to perform the read.
The device driver's open interface calls readdisklabel to read the disk
label from the disk into memory.
RETURN VALUES
Upon successful completion, readdisklabel returns the NULL string.
Otherwise, it returns one of the following messages:
I/O error
The device driver's strategy interface failed.
no disk label
The device driver's strategy interface returns a NULL disklabel.
label corrupted
The disklabel structure contains too many partitions or the checksum is
not zero (0).
SEE ALSO
Kernel Interfaces: setdisklabel(9r), writedisklabel(9r)
Data Structures: disklabel(9s)
 |
Index for Section 9 |
|
 |
Alphabetical listing for R |
|
 |
Top of page |
|