Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

creatediskbyname(3x) [ultrix man page]

creatediskbyname(3x)													      creatediskbyname(3x)

Name
       creatediskbyname - get the disk description associated with a file name

Syntax
       #include <disktab.h>

       struct disktab *
       creatediskbyname(name)
       char *name;

Description
       The subroutine takes the name of the character device special file representing a disk device (for example, and returns a structure pointer
       describing its geometry information and the default disk partition tables.  It obtains this information by  polling  the  controlling  disk
       device driver.  The subroutine returns information only for MSCP and SCSI disks.

       The file 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();

Diagnostics
       Successful completion of the subroutine returns a pointer to a valid disktab structure.	Failure of this subroutine returns a null pointer.
       The subroutine fails if it cannot obtain the necessary information from the device driver or disktab file.

       A check is done to ensure that the disktab file exists and is readable.	This check ensures that the subroutine is not being called because
       the disktab file was accidentally removed.  If there is no disktab file, the subroutine fails.

       The subroutine also fails if it cannot determine disk geometry attributes by polling the driver.  This can occur if the disk is not an MSCP
       or SCSI disk.  In some cases where the disk consists of removable media and the media is not loaded, the driver will be unable to determine
       disk attributes.

Restrictions
       The subroutine returns information only for MSCP and SCSI disks.

See Also
       getdiskbyname(3x), ra(4), rz(4), disktab(5)

															      creatediskbyname(3x)

Check Out this Related Man Page

disktab(5)							File Formats Manual							disktab(5)

Name
       disktab - disk description file

Syntax
       #include <disktab.h>

Description
       The file is a simple data base that describes disk geometries and disk partition characteristics.  The format is patterned after the termi-
       nal data base.  Entries in consist of a number of fields separated by colons (:).  The first entry for each disk gives the names  that  are
       known for the disk, separated by vertical bars (|).  The last name given should be a long name fully identifying the disk.

       The following list indicates the normal values stored for each disk entry:
       Name Type Description
       ns   num  Number of sectors per track
       nt   num  Number of tracks per cylinder
       nc   num  Total number of cylinders on the disk
       ba   num  Block size for partition `a' (bytes)
       bd   num  Block size for partition `d' (bytes)
       be   num  Block size for partition `e' (bytes)
       bf   num  Block size for partition `f' (bytes)
       bg   num  Block size for partition `g' (bytes)
       bh   num  Block size for partition `h' (bytes)
       fa   num  Fragment size for partition `a' (bytes)
       fd   num  Fragment size for partition `d' (bytes)
       fe   num  Fragment size for partition `e' (bytes)
       ff   num  Fragment size for partition `f' (bytes)
       fg   num  Fragment size for partition `g' (bytes)
       fh   num  Fragment size for partition `h' (bytes)
       pa   num  Size of partition `a' in sectors
       pb   num  Size of partition `b' in sectors
       pc   num  Size of partition `c' in sectors
       pd   num  Size of partition `d' in sectors
       pe   num  Size of partition `e' in sectors
       pf   num  Size of partition `f' in sectors
       pg   num  Size of partition `g' in sectors
       ph   num  Size of partition `h' in sectors
       se   num  Sector size in bytes
       ty   str  Type of disk (e.g. removable, winchester)

       The entries can be automatically generated with the program.

Files
See Also
       chpt(8), newfs(8)

																	disktab(5)
Man Page