4.3BSD-UWisc/man/cat3/getdisk.3

Compare this file to the similar file:
Show the results in this format:




GETDISKBYNAME(3)    UNIX Programmer's Manual     GETDISKBYNAME(3)



NAME
     getdiskbyname - get disk description by its name

SYNOPSIS
     #include <disktab.h>

     struct disktab *
     getdiskbyname(name)
     char *name;

DESCRIPTION
     _G_e_t_d_i_s_k_b_y_n_a_m_e takes a disk name (e.g. rm03) and returns a
     structure describing its geometry information and the stan-
     dard disk partition tables.  All information obtained from
     the _d_i_s_k_t_a_b(5) file.

     <_d_i_s_k_t_a_b._h> has the following form:

     /*
      * RCS Info
      *   $Header: disktab.h,v 1.1 86/09/05 08:02:13 tadl Exp $
      *   $Locker: tadl $
      */
     /*
      * Copyright (c) 1983 Regents of the University of California.
      * All rights reserved.  The Berkeley software License Agreement
      * specifies the terms and conditions for redistribution.
      *
      *   @(#)disktab.h  5.2 (Berkeley) 10/1/85
      */

     /*
      * Disk description table, see disktab(5)
      */
     #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 */
          int  d_badsectforw;      /* supports DEC bad144 std */
          int  d_sectoffset;       /* use sect rather than cyl offsets */
          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];
     };



Printed 12/27/86          May 12, 1986                          1






GETDISKBYNAME(3)    UNIX Programmer's Manual     GETDISKBYNAME(3)



     struct    disktab *getdiskbyname();

SEE ALSO
     disktab(5)

BUGS
     This information should be obtained from the system for
     locally available disks (in particular, the disk partition
     tables).














































Printed 12/27/86          May 12, 1986                          2