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