/* $Copyright:	$
 * Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 
 * Sequent Computer Systems, Inc.   All rights reserved.
 *  
 * This software is furnished under a license and may be used
 * only in accordance with the terms of that license and with the
 * inclusion of the above copyright notice.   This software may not
 * be provided or otherwise made available to, or used by, any
 * other person.  No title to or ownership of the software is
 * hereby transferred.
 */

#ident	"$Header: cmpt.h 1.9 89/08/07 $"

#ifndef	_SYS_CMPT_H_

/*
 * cmpt - 4.2 non-VTOC disk compatibility driver
 */

/* $Log:	cmpt.h,v $
 */

#define CMPT_NUMPART	8
#define SPLCMPT		SPLDEV

/*
 * driver-specific part of the cmpt dev.  This information makes
 * the dev object specific for this driver-type.  The driver_id must
 * be first in the private data for conformance to other partitioning
 * drivers.
 */
struct cmpt_private {
	int	cp_driver_id;		/* major # of cmpt device */
	daddr_t	cp_start;		/* start of physical partition */
	long	cp_size;		/* size of physical partition */
	struct	dev *cp_physdev;	/* dev for real disk driver */
	struct	devops	*cp_devops;	/* copy of devops used by other devs */
	int	cp_flags;		/* see below */
};

/* cp_flags */

#define	CP_WRPROTECT	0x01		/* No raw writes allowed */

/*
 * data argument for the V_BUILD ioctl.  This is sufficient data to
 * set up compatible partitioning.
 */
struct	cmptdt {
	int	cd_fd;		/* file descriptor of disk to bind to */
	int	cd_type;	/* which partitioning table to use */
};

/*
 * Partition data
 * The partition tables for a given drive type are defined
 * in the binary configuration file.
 */
struct cmptsize {
	daddr_t	p_start;	/* start of physical partition in sectors */
	long	p_size;		/* size of physical partition in sectors */
};

#define	_SYS_CMPT_H_
#endif	/* _SYS_CMPT_H_ */
