8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / stand / sys / bootsyms.h
blob70fa1063c276d3ad96e7ead562efd0d4cc6cd07f
1 /*
2 * CDDL HEADER START
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.
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.
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]
19 * CDDL HEADER END
22 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 #ifndef _SYS_BOOTSYMS_H
27 #define _SYS_BOOTSYMS_H
29 #pragma ident "%Z%%M% %I% %E% SMI"
32 * This header file should not exist.
34 * Whether it be due to laziness, machismo, or just plain cluelessness, most
35 * of the symbols over in psm/stand are not properly prototyped anywhere.
37 * To workaround this, developers have adopted the horrendous practice of
38 * "externing" the symbols they need, leading to dozens of declarations of
39 * the same symbol which have to be kept in sync. Unfortunately, no similar
40 * workaround exists for lint's pass2, which requires definitions for all
41 * symbols in order to properly perform cross-checks.
43 * Thus, this header file was created to address two problems:
45 * 1. The "extern" problem. All files beneath stand/lib should #include
46 * this file rather than "extern" the symbol. Additionally, existing
47 * externs should be removed as convenient.
49 * Of course, eventually some brave soul needs to venture over to the
50 * slums of psm/stand and add all the proper header files, at which
51 * point this file can be disposed of.
53 * 2. The lint pass2 problem. Specifically, this file is used to build
54 * llib-lfakeboot.ln, which is then used to properly lint the
55 * binaries under stand/lib. See stand/lib/llib-lfakeboot for more
56 * details.
58 * Note that the set of symbols shared between stand/lib and psm/stand is
59 * itself a moving target. As such, this file should be updated as needed
60 * so that it always contains the *minimum* set of shared symbols needed to
61 * avoid externs and placate lint.
64 #include <sys/saio.h>
66 #ifdef __cplusplus
67 extern "C" {
68 #endif
71 * From psm/stand/boot/$(MACH)/common/fsconf.c:
73 extern int nfs_readsize;
74 extern int boot_nfsw;
75 extern struct boot_fs_ops *boot_fsw[];
76 extern struct boot_fs_ops *extendfs_ops;
77 extern struct boot_fs_ops *origfs_ops;
80 * From psm/stand/boot/common/boot.c:
82 extern int boothowto;
83 extern int verbosemode;
84 extern char *systype;
85 extern struct memlist *pfreelistp;
86 extern struct memlist *vfreelistp;
87 extern void set_default_filename(char *);
90 * From psm/stand/boot/common/heap_kmem.c:
92 extern void *bkmem_alloc(size_t);
93 extern void *bkmem_zalloc(size_t);
94 extern void bkmem_free(void *, size_t);
97 * From psm/stand/boot/$(MACH)/common/$(MACH)_standalloc.c:
99 extern caddr_t resalloc(enum RESOURCES, size_t, caddr_t, int);
100 extern void resfree(enum RESOURCES, caddr_t, size_t);
101 extern void reset_alloc(void);
104 * From psm/stand/lib/names/$(MACH)/common/mfgname.c: (libnames)
106 extern char *get_mfg_name(void);
109 * From psm/stand/boot/i386/common/boot_plat.c or
110 * psm/stand/boot/sparcv9/sun4u/machdep.c:
112 extern int pagesize;
113 extern int global_pages;
115 #ifdef __sparc
117 * From psm/stand/boot/sparc/common/fsconf.c:
119 extern char *bootp_response;
122 * From psm/stand/boot/sparc/common/wanboot.c:
124 extern char *bootcfg;
125 #endif /* __sparc */
127 #ifdef __cplusplus
129 #endif
131 #endif /* _SYS_BOOTSYMS_H */