Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

getdiskbyname(3x) [ultrix man page]

getdiskbyname(3x)														 getdiskbyname(3x)

Name
       getdiskbyname - get disk description by its name

Syntax
       #include <disktab.h>

       struct disktab *
       getdiskbyname(name)
       char *name;

Description
       The subroutine takes a disk name (for example, RM03) and returns a structure describing its geometry information and the standard disk par-
       tition tables.  All information obtained from the file.	A separate subroutine called dynamically generates disktab  entries  by  obtaining
       disk geometry information from the controlling device driver.

       <disktab.h> has the following form:
       #define DISKTAB	      "/etc/disktab"

       struct  disktab {
	     char   *d_name;	      /* drive name */
	     char   *d_type;	      /* drive type */
	     int    d_secsize;	      /* sector size in bytes */
	     int    d_ntracks;	      /* # tracks/cylinder */
	     int    d_nsectors;       /* # sectors/track */
	     int    d_ncylinders;     /* # cylinders */
	     int    d_rpm;	      /* revolutions/minute */
	     struct partition {
		     int     p_size;   /* #sectors in partition */
		     short   p_bsize;  /* block size in bytes */
		     short   p_fsize;  /* frag size in bytes */
	       } d_partitions[8];
       };

       struct  disktab *getdiskbyname();
       struct  disktab *creatediskbyname();

See Also
       creatediskbyname(3x), disktab(5)

																 getdiskbyname(3x)

Check Out this Related Man Page

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

NAME
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
Man Page