Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ getdisk(3X) — Duplix 4.1

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 is obtained from the disktab(5) file. 

The form of <disktab.h> is as follows:

/∗
 ∗ 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.h5.2 (Berkeley) 10/1/85
 ∗/
 /∗
 ∗ Disk description table, see disktab(5)
 ∗/
#defineDISKTAB"/etc/disktab"
 structdisktab {
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;/∗ # cylinders ∗/
intd_rpm;/∗ revolutions/minute ∗/
intd_badsectforw;/∗ supports DEC bad144 std ∗/
intd_sectoffset;/∗ use sect rather than cyl offsets ∗/
structpartition {
intp_size;/∗ #sectors in partition ∗/
#ifdefis68k
intp_offset;/∗ offset to 1st sector in partition ∗/
#endifis68k
shortp_bsize;/∗ block size in bytes ∗/
shortp_fsize;/∗ frag size in bytes ∗/
} d_partitions[8];
};
 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). 

4th Berkeley Distribution  —  1 August 1985

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