xref: /titanic_51/usr/src/lib/libsmedia/library/common/l_defines.h (revision 06e46062ef4f5f4b687cbafb4518fb123fe23920)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright (c) 1999-2001 by Sun Microsystems, Inc.
24  * All rights reserved.
25  */
26 
27 #ifndef _L_DEFINES_H_
28 #define	_L_DEFINES_H_
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 #include <unistd.h>
37 #include <locale.h>
38 #include <libintl.h>
39 #include <stdlib.h>
40 #include <sys/smedia.h>
41 
42 struct raw_params {
43 	uint32_t offset;
44 	char *buffer;
45 	size_t size;
46 	};
47 
48 struct format_track {
49 	int32_t track_no;
50 	int32_t head;
51 	uint32_t flag;
52 	};
53 
54 struct format_flags {
55 	uint32_t flavor;
56 	uint32_t mode;
57 	};
58 
59 #ifdef DEBUG
60 #define	DPRINTF(str)			(void) printf(str)
61 #define	DPRINTF1(str, a)		(void) printf(str, a)
62 #define	DPRINTF2(str, a, b)		(void) printf(str, a, b)
63 #define	DPRINTF3(str, a, b, c)		(void) printf(str, a, b, c)
64 #define	DPRINTF4(str, a, b, c, d)	(void) printf(str, a, b, c, d)
65 #else
66 #define	DPRINTF(str)
67 #define	DPRINTF1(str, a)
68 #define	DPRINTF2(str, a, b)
69 #define	DPRINTF3(str, a, b, c)
70 #define	DPRINTF4(str, a, b, c, d)
71 #endif
72 
73 
74 #define	SM_FD_VERSION_1 	1
75 #define	SM_SCSI_VERSION_1 	1
76 #define	SM_PCMEM_VERSION_1 	1
77 #define	SM_PLUGIN_VERSION	1
78 #define	SM_PCATA_VERSION_1 	1
79 
80 #ifdef __cplusplus
81 }
82 #endif
83 
84 #endif /* _L_DEFINES_H_ */
85