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]
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
33 #include <sys/types.h>
47 #define LINEARG(an) *(line_args + an)
63 * return values from handler routines;
64 * chosen to match syscall return values
69 #define DFLT_THOLD 0.04
73 int perm
; /* cpr or pm permission */
74 int update
; /* flag updates from cpr/pm data */
75 char *set
; /* "cpr" or "pm" */
77 typedef struct perm_update prmup_t
;
81 char *keyword
; /* keyword string */
82 int (*handler
)(void); /* keyword handler routine */
83 prmup_t
*status
; /* permission and update status */
84 char *cmt
; /* config file comment */
85 short argc
; /* config line arg count */
86 uint8_t any
; /* 0: match argc, 1: at least argc */
87 uint8_t alt
; /* conf line OK from an alt source */
89 typedef struct cinfo cinfo_t
;
91 typedef void (*vact_t
)(char *, size_t, cinfo_t
*);
93 /* Suspend/Resume flags */
94 extern int whitelist_only
;
100 extern prmup_t cpr_status
, pm_status
;
101 extern struct cprconfig new_cc
;
102 extern struct stat def_info
;
103 extern char estar_vers
;
104 extern int pm_fd
, ua_err
;
107 extern void mesg(int, char *, ...);
113 extern char **line_args
;
114 extern void lookup_estar_vers(void);
115 extern void lookup_perms(void);
116 extern void parse_conf_file(char *, vact_t
, boolean_t
);
121 extern int S3_helper(char *, char *, int, int, char *, char *, int *, int);
122 extern int S3sup(void);
123 extern int autoS3(void);
124 extern int autopm(void);
125 extern int autosd(void);
126 extern int cpupm(void);
127 extern int cpuidle(void);
128 extern int cputhr(void);
129 extern int ddprop(void);
130 extern int devdep(void);
131 extern int devthr(void);
132 extern int dreads(void);
133 extern int idlechk(void);
134 extern int loadavg(void);
135 extern int nfsreq(void);
136 extern int sfpath(void);
137 extern int systhr(void);
138 extern int tchars(void);
144 #endif /* _PMCONFIG_H */