6811333 Remove prom_printf() message in emlxs driver
[opensolaris.git] / usr / src / uts / common / sys / mkdev.h
blob896936236085a2247c292daf539a18f90e29ed2b
1 /*
2 * CDDL HEADER START
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.
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.
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]
20 * CDDL HEADER END
23 * Copyright 1997 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
28 /* All Rights Reserved */
30 #ifndef _SYS_MKDEV_H
31 #define _SYS_MKDEV_H
33 #pragma ident "%Z%%M% %I% %E% SMI"
35 #include <sys/types.h>
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
42 * SVR3/Pre-EFT device number constants.
44 #define ONBITSMAJOR 7 /* # of SVR3 major device bits */
45 #define ONBITSMINOR 8 /* # of SVR3 minor device bits */
46 #define OMAXMAJ 0x7f /* SVR3 max major value */
47 #define OMAXMIN 0xff /* SVR3 max major value */
50 * 32-bit Solaris device major/minor sizes.
52 #define NBITSMAJOR32 14
53 #define NBITSMINOR32 18
54 #define MAXMAJ32 0x3ffful /* SVR4 max major value */
55 #define MAXMIN32 0x3fffful /* SVR4 max minor value */
57 #ifdef _LP64
59 #define NBITSMAJOR64 32 /* # of major device bits in 64-bit Solaris */
60 #define NBITSMINOR64 32 /* # of minor device bits in 64-bit Solaris */
61 #define MAXMAJ64 0xfffffffful /* max major value */
62 #define MAXMIN64 0xfffffffful /* max minor value */
64 #define NBITSMAJOR NBITSMAJOR64
65 #define NBITSMINOR NBITSMINOR64
66 #define MAXMAJ MAXMAJ64
67 #define MAXMIN MAXMIN64
69 #else /* !_LP64 */
71 #define NBITSMAJOR NBITSMAJOR32
72 #define NBITSMINOR NBITSMINOR32
73 #define MAXMAJ MAXMAJ32
74 #define MAXMIN MAXMIN32
76 #endif /* !_LP64 */
78 #if !defined(_KERNEL)
81 * Undefine sysmacros.h device macros.
83 #undef makedev
84 #undef major
85 #undef minor
87 #if defined(__STDC__)
89 extern dev_t makedev(const major_t, const minor_t);
90 extern major_t major(const dev_t);
91 extern minor_t minor(const dev_t);
92 extern dev_t __makedev(const int, const major_t, const minor_t);
93 extern major_t __major(const int, const dev_t);
94 extern minor_t __minor(const int, const dev_t);
96 #else
98 extern dev_t makedev();
99 extern major_t major();
100 extern minor_t minor();
101 extern dev_t __makedev();
102 extern major_t __major();
103 extern minor_t __minor();
105 #endif /* defined(__STDC__) */
107 #define OLDDEV 0 /* old device format */
108 #define NEWDEV 1 /* new device format */
110 #define makedev(maj, min) (__makedev(NEWDEV, maj, min))
111 #define major(dev) (__major(NEWDEV, dev))
112 #define minor(dev) (__minor(NEWDEV, dev))
114 #endif /* !defined(_KERNEL) */
116 #ifdef __cplusplus
118 #endif
120 #endif /* _SYS_MKDEV_H */