Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ getdisk(3C) — CX/UX 6.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

getdisk(3C)  —  4 BSD

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 ∗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;/∗ # kilobytes in partition ∗/
          short   p_bsize;/∗ block size in bytes ∗/
          short   p_fsize;/∗ frag size in bytes ∗/
     } d_partitions[8];
};
 
struct    disktab ∗getdiskbyname();

CX/UX Programmer’s Reference Manual

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