*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->NetBSD man pages -> setdisktab (3)              
Title
Content
Arch
Section
 

GETDISKBYNAME(3)

Contents


NAME    [Toc]    [Back]

     getdiskbyname, setdisktab - get generic disk description by its name

LIBRARY    [Toc]    [Back]

     Standard C Library (libc, -lc)

SYNOPSIS    [Toc]    [Back]

     #include <sys/types.h>
     #include <sys/disklabel.h>
     #include <disktab.h>

     int
     setdisktab(char *name);

     struct disklabel *
     getdiskbyname(const char *name);

DESCRIPTION    [Toc]    [Back]

     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 file name from /etc/disktab
     (aka _PATH_DISKTAB) to name.

RETURN VALUES    [Toc]    [Back]

     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    [Toc]    [Back]

     /etc/disktab  the default database of disk types.

SEE ALSO    [Toc]    [Back]

      
      
     disklabel(5), disktab(5), disklabel(8)

HISTORY    [Toc]    [Back]

     The getdiskbyname() function appeared in 4.3BSD.

     The setdisktab() function appeared in NetBSD 1.4.

BUGS    [Toc]    [Back]

     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
[ Back ]
 Similar pages
Name OS Title
disk_resetstat NetBSD generic disk framework
disk NetBSD generic disk framework
disk_attach NetBSD generic disk framework
disk_init NetBSD generic disk framework
disk_unbusy OpenBSD generic disk framework
disk_unbusy NetBSD generic disk framework
disk_detach NetBSD generic disk framework
disk_resetstat OpenBSD generic disk framework
disk_busy NetBSD generic disk framework
disk_init OpenBSD generic disk framework
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service