int
setdisktab(char *name)
struct disklabel *
getdiskbyname(const char *name)
)
function
takes a disk name (e.g.
`rm03')
and returns a prototype disk label
describing its geometry information and the standard
disk partition tables.
All information is obtained from the
disktab(5)
file.
The
setdisktab()
function changes the default
file name from
/etc/disktab
(aka _PATH_DISKTAB)
to
name.
)
returns a null pointer if the entry is not found in the current
disktab
file.
setdisktab()
returns 0 on success and -1 if
name
is a null pointer or points to an empty string.
/etc/disktab)
function appeared in
4.3BSD.
The
setdisktab()
function appeared in
NetBSD1.4.
)
function leaves its results in an internal static object and returns a
pointer to that object.
Subsequent calls will modify the same object.