ftp.nice.ch/pub/next/developer/languages/c/egcs.1.1.1.1beta.I.b.tar.gz#/lib/gcc-lib/i386-next-nextstep3/egcs-2.91.60/include/bsd/dev/disk_label.h

This is disk_label.h in view mode; [Download] [Up]

/* Copyright (c) 1991 by NeXT Computer, Inc.
 *
 *	File:	bsd/dev/disk_label.h - NeXT disk label definition.
 *
 * HISTORY
 * 28-Mar-92  Doug Mitchell at NeXT
 *	Split out from <bsd/dev/disk.h>.
 */

#ifndef	_BSD_DEV_DISK_LABEL_
#define	_BSD_DEV_DISK_LABEL_

#import <bsd/sys/disktab.h>

#define	NLABELS		4		/* # of labels on a disk */
#define	MAXLBLLEN	24		/* dl_label[] size */
#define	NBAD		1670		/* sized to make label ~= 8KB */

/*
 *  if dl_version >= DL_V3 then the bad block table is relocated
 *  to a structure separate from the disk label.
 */
typedef union {
	unsigned short	DL_v3_checksum;
	int	DL_bad[NBAD];			/* block number that is bad */
} dl_un_t;

typedef struct disk_label {
	int		dl_version;		/* label version number*/
	int		dl_label_blkno;		/* block # where this label is*/
	int		dl_size;		/* size of media area (sectors)*/
	char		dl_label[MAXLBLLEN];	/* media label*/
	unsigned	dl_flags;		/* flags (see DL_xxx, below)*/
	unsigned	dl_tag;			/* volume tag*/
	struct	disktab dl_dt;			/* common info in disktab*/
	dl_un_t		dl_un;
	unsigned short	dl_checksum;		/* ones complement checksum*/
	
	/* add things here so dl_checksum stays in a fixed place */
} disk_label_t;

/*
 * Known label versions.
 */
#define	DL_V1		0x4e655854	/* version #1: "NeXT" */
#define	DL_V2		0x646c5632	/* version #2: "dlV2" */
#define	DL_V3		0x646c5633	/* version #3: "dlV3" */
#define	DL_VERSION	DL_V3		/* default version */


/*
 * dl_flags values
 */
#define	DL_UNINIT	0x80000000	/* label is uninitialized */

/*
 * Aliases for disktab fields
 */
#define	dl_name		dl_dt.d_name
#define	dl_type		dl_dt.d_type
#define dl_part		dl_dt.d_partitions
#define	dl_front	dl_dt.d_front
#define	dl_back		dl_dt.d_back
#define	dl_ngroups	dl_dt.d_ngroups
#define	dl_ag_size	dl_dt.d_ag_size
#define	dl_ag_alts	dl_dt.d_ag_alts
#define	dl_ag_off	dl_dt.d_ag_off
#define	dl_secsize	dl_dt.d_secsize
#define	dl_ncyl		dl_dt.d_ncylinders
#define	dl_nsect	dl_dt.d_nsectors
#define	dl_ntrack	dl_dt.d_ntracks
#define	dl_rpm		dl_dt.d_rpm
#define	dl_bootfile	dl_dt.d_bootfile
#define	dl_boot0_blkno	dl_dt.d_boot0_blkno
#define	dl_hostname	dl_dt.d_hostname
#define	dl_rootpartition dl_dt.d_rootpartition
#define	dl_rwpartition	dl_dt.d_rwpartition

/*
 * Other aliases
 */
#define	dl_v3_checksum	dl_un.DL_v3_checksum
#define	dl_bad		dl_un.DL_bad

#endif

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.