Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

setdisktab(3) [netbsd man page]

GETDISKBYNAME(3)					   BSD Library Functions Manual 					  GETDISKBYNAME(3)

getdiskbyname, setdisktab -- get generic disk description by its name LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <sys/types.h> #include <sys/disklabel.h> #include <disktab.h> int setdisktab(char *name); struct disklabel * getdiskbyname(const char *name); DESCRIPTION
The getdiskbyname() 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 disktab file name from /etc/disktab (aka _PATH_DISKTAB) to name. RETURN VALUES
getdiskbyname() 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. FILES
/etc/disktab the default database of disk types. SEE ALSO
disklabel(5), disktab(5), disklabel(8) HISTORY
The getdiskbyname() function appeared in 4.3BSD. The setdisktab() function appeared in NetBSD 1.4. BUGS
The getdiskbyname() function leaves its results in an internal static object and returns a pointer to that object. Subsequent calls will modify the same object. BSD
June 4, 1993 BSD

Check Out this Related Man Page

getdiskbyname(3)					     Library Functions Manual						  getdiskbyname(3)

getdiskbyname, getdiskbyname_r - Get the disk description using a disk name LIBRARY
Standard C Library (libc) SYNOPSIS
#include <sys/disklabel.h> #include <sys/types.h> struct disklabel *getdiskbyname( char *name); int getdiskbyname_r( char *name, struct disklabel *disk, char *boot, int boot_len); PARAMETERS
Specifies a common name for the disk drive whose geometry and partition characteristics are sought. Points to the structure that will con- tain the returned disk description. Points to the buffer that will contain the optional names of the primary and secondary bootstraps. Specifies the length of boot. This should be BUFSIZ. DESCRIPTION
Operations supported by the getdiskbyname function are also supported by the createlabel function. See The getdiskbyname and getdiskby- name_r functions are supported only for backward compatibility with DIGITAL UNIX Version 4.0 and earlier versions. These functions will be retired in a future release of Tru64 UNIX. The getdiskbyname() function uses a disk (disk drive) name to return a pointer to a structure that describes the geometry and standard par- tition characteristics of the named disk drive. Information obtained from the /etc/disktab database file is written to the type disklabel structure space referenced by the returned pointer. The getdiskbyname_r() function is the reentrant version of getdiskbyname(). Upon successful completion, getdiskbyname_r() returns a value of 0 (zero); the returned structure is pointed at by disk. Upon error, it returns a value of -1, and may set errno to [EINVAL]. RETURN VALUES
Upon successful completion, the getdiskbyname() function, returns a pointer to a type disklabel structure. ERRORS
Either disk or boot is NULL, or boot_len is not equal to BUFSIZ. RELATED INFORMATION
Functions: createlabel(3) Files: disklabel(4), disktab(4) Commands: disklabel(8) delim off getdiskbyname(3)
Man Page