creatediskbyname man page on Ultrix

Man page or keyword search:  
man Server   3690 pages
apropos Keyword Search (all sections)
Output format
Ultrix logo
[printable version]

creatediskbyname(3x)					  creatediskbyname(3x)

       creatediskbyname - get the disk description associated with a file name

       #include <disktab.h>

       struct disktab *
       char *name;

       The subroutine takes the name of the character device special file rep‐
       resenting 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();

       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 deter‐
       mine disk attributes.

       The subroutine returns information only for MSCP and SCSI disks.

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


List of man pages available for Ultrix

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
Vote for polarhome
Free Shell Accounts :: the biggest list on the net