dda.h revision cee0fb94c0d4227de0a00efc162fb2739844b641
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _DDA_H
#define _DDA_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* Driver for Disk Archiving (dda)
*/
/* Begin: 32-bit align copyin() structs for amd64 only due to 32-bit x86 ABI */
#pragma pack(4)
#endif
/* version for cartridge and dda */
#define DDA_MAJOR_VERSION 0 /* dda driver major version */
/* cartridge file names */
/* inquiry and mt config data */
#define DDA_VENDOR "SUNW "
#define DDA_PRODUCT "DISK_ARCHIVING "
#define DDA_ST_NAME "SUNW MMS disk archiving"
/*
* DM ioctls:
* cmd arg
* --- ---
* DDA_CMD_LOAD char path[PATH_MAX]
* DDA_CMD_NAME char path[PATH_MAX]
* DDA_CMD_CAPACITY dda_capacity_t *capacity
* DDA_CMD_WROTECT NULL
* returns 0 if WP flag on, else non 0
* DDA_CMD_BLKLMT dda_blklmt_t *blklmt
* DDA_CMD_SERIAL dda_serial_t serial
*/
/* cartridge capacity */
typedef struct dda_capacity {
/* read block limits */
typedef struct dda_blklmt {
} dda_blklmt_t;
/* versioning */
typedef struct dda_version {
/* metadata flags */
/* metadata file contents */
typedef struct dda_metadata {
/* index file record */
typedef struct dda_index {
} dda_index_t;
/* End: 32-bit align copyin() structs for amd64 only due to 32-bit x86 ABI */
#pragma pack()
#endif
#ifdef _KERNEL
/* emulated tape drive data structure */
typedef struct dda {
short dda_status; /* sense key */
int dda_inst; /* driver instance (drive number) */
int dda_loaded; /* media loaded */
int dda_read_only; /* opened read only */
int dda_ili; /* incorrect length indicator */
} dda_t;
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _DDA_H */