tgdk.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_DKTP_TGDK_H
#define _SYS_DKTP_TGDK_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
struct tgdk_ext {
unsigned tg_rmb : 1;
unsigned tg_rdonly : 1;
unsigned tg_flag : 6;
char *tg_nodetype;
char tg_ctype;
};
struct tgdk_obj {
struct tgdk_objops *tg_ops;
/* for easy of alloc */
};
struct tgdk_iob {
short b_pbyteoff;
short b_flag;
};
typedef struct tgdk_iob *tgdk_iob_handle;
#define IOB_BPALLOC 0x0001
#define IOB_BPBUFALLOC 0x0002
struct tgdk_geom {
int g_cyl;
int g_acyl;
int g_head;
int g_sec;
int g_secsiz;
int g_cap;
};
struct tgdk_objops {
void *);
int (*tg_check_media)(opaque_t, int *);
void (*tg_cleanup)(struct tgdk_obj *);
void *tg_resv[1];
};
#define TGDK_SETNODETYPE(X, Y) \
#define TGDK_IOB_FREE(X, datap) \
#define TGDK_IOB_HTOC(X, handle) \
#define TGDK_IOB_RD(X, handle) \
#define TGDK_IOB_WR(X, handle) \
#define TGDK_GETPHYGEOM(X, datap) \
#define TGDK_SET_BBHOBJ(X, objp) \
#define TGDK_CHECK_MEDIA(X, state) \
#define TGDK_INQUIRY(X, inqpp) \
#ifdef __cplusplus
}
#endif
#endif /* _SYS_DKTP_TGDK_H */