Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

disktab(5)

GETDISKBYNAME(3X)  —  UNIX Programmer’s Manual

NAME

getdiskbyname − get disk description by its name

SYNOPSIS

#include <disktab.h>

struct disktab ∗
getdiskbyname(name)
char ∗name;

DESCRIPTION

Getdiskbyname takes a disk name (e.g. rm03) and returns a structure describing its geometry information and the standard disk partition tables.  All information obtained from the disktab(5) file.

<disktab.h> has the following form:

/∗ $Header: getdisk.3x 1.1 89/11/06 $ ∗/
 /∗
∗ Disk description table, see disktab(5)
∗/
#define DISKTAB              "/etc/disktab"
 struct disktab {
char∗d_name;/∗ drive name ∗/
char∗d_type;/∗ drive type ∗/
intd_secsize;/∗ sector size in bytes ∗/
intd_ntracks;/∗ # tracks/cylinder ∗/
intd_nsectors;/∗ # sectors/track ∗/
intd_ncylinders;/∗ # cyclinders ∗/
intd_rpm;/∗ revolutions/minute ∗/
char∗d_fmt;/∗ format type ∗/
structpartition {
intp_size;/∗ #sectors in partition ∗/
shortp_bsize;/∗ block size in bytes ∗/
shortp_fsize;/∗frag size in bytes ∗/
};
 structdisktab ∗getdiskbyname();
 

SEE ALSO

disktab(5)

BUGS

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

4BSD

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