GETDISKBYNAME(3X)

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:

/*
* 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;		/* # cyclinders */
	int	d_rpm;			/* revolutions/minute */
	char	*d_fmt;			/* format type */
	struct	partition {
		int	p_size;		/* #sectors in partition */
		short	p_bsize;	/* block size in bytes */
		short	p_fsize;/*frag size in bytes */
};
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).