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

  man pages->Tru64 Unix man pages -> getdiskbyname (3)              
Title
Content
Arch
Section
 

getdiskbyname(3)

Contents


NAME    [Toc]    [Back]

       getdiskbyname - Get the disk description using a disk name

SYNOPSIS    [Toc]    [Back]

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

       struct disklabel *getdiskbyname(
               char *name ); int getdiskbyname_r(
               char *name,
               struct disklabel *disk,
               char *book,
               int boot_len );

LIBRARY    [Toc]    [Back]

       Standard C Library (libc)

PARAMETERS    [Toc]    [Back]

       Specifies a common name for the disk drive whose  geometry
       and  partition  characteristics are sought.  Points to the
       structure that will contain 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    [Toc]    [Back]

       Operations  supported  by  the  getdiskbyname function are
       also supported by the createlabel function. See  createlabel(3).  The  getdiskbyname  and getdiskbyname_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  partition  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    [Toc]    [Back]

       Upon  successful completion, the getdiskbyname() function,
       returns a pointer to a type disklabel structure.

ERRORS    [Toc]    [Back]

       Either disk or boot is NULL, or boot_len is not  equal  to
       BUFSIZ.

SEE ALSO    [Toc]    [Back]

      
      
       Functions: createlabel(3)

       Files: disklabel(4), disktab(4)

       Commands: disklabel(8)



                                                 getdiskbyname(3)
[ Back ]
 Similar pages
Name OS Title
setdisktab NetBSD get generic disk description by its name
getdiskbyname NetBSD get generic disk description by its name
disktab FreeBSD disk description file
getdiskbyname FreeBSD get generic disk description by its name
disktab OpenBSD disk description file
getdiskbyname OpenBSD get generic disk description by its name
disktab HP-UX disk description file
disktab Tru64 Disk description file
grio_disks IRIX description of guaranteed I/O rates for disk devices
disklabel Tru64 Reads and writes a disk pack label and formats disk partitions
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service