Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ getdiskbyname(3c) — CX/UX 6.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought



getdisk(3C)                   4 BSD                   getdisk(3C)



NAME
     getdiskbyname - get disk description by its name

SYNOPSIS
     #include <disktab.h>

     struct disktab *getdiskbyname (name)
     char *name;

DESCRIPTION
     Getdiskbyname takes a raw disk name (e.g. /dev/rdsk/0s0) and
     returns a structure describing its geometry information and
     the standard disk partition tables.  All information is
     obtained from the disk handler via a DSKIOCSTATUS ioctl and
     a DSKIOCGEOMETRY.

     <disktab.h> has the following form:


     /*   disktab.h */

     /*
      *  Disk description table
      */

     struct    disktab {
          char *dname;         /* drive name */
          char *dtype;         /* drive type */
          int  dsecsize;       /* sector size in bytes */
          int  dntracks;       /* # tracks/cylinder */
          int  dnsectors;      /* # sectors/track */
          int  dncylinders;    /* # cylinders */
          int  drpm;           /* revolutions/minute */
          struct    partition{
               int     psize;  /* # kilobytes in partition */
               short   pbsize; /* block size in bytes */
               short   pfsize; /* frag size in bytes */
          } dpartitions[8];
     };

     struct    disktab *getdiskbyname();














Page 1                        CX/UX Programmer's Reference Manual



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026