8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / cmd / svr4pkg / hdrs / libadm.h
bloba6d91b9ab6122937404ccdd8748a49abaa9447ed
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
23 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
28 #ifndef __PKG_LIBADM_H__
29 #define __PKG_LIBADM_H__
31 #include <sys/types.h>
32 #include <sys/vtoc.h>
33 #include <limits.h>
34 #include <stdio.h>
35 #include <pkgstrct.h>
36 #include <pkginfo.h>
37 #include <valtools.h>
38 #include "install.h"
40 #if defined(__STDC__)
41 #define __P(protos) protos
42 #else /* __STDC__ */
43 #define __P(protos) ()
44 #endif /* __STDC__ */
48 * ckdate.c
50 extern int ckdate_err __P((char *fmt, char *error));
51 extern int ckdate_hlp __P((char *fmt, char *help));
52 extern int ckdate_val __P((char *fmt, char *input));
53 extern int ckdate __P((char *date, char *fmt, char *defstr, char *error,
54 char *help, char *prompt));
57 * ckgid.c
59 extern int ckgid_dsp __P((void));
60 extern int ckgid_val __P((char *grpnm));
61 extern int ckgrpfile __P((void));
62 extern void ckgid_err __P((int disp, char *error));
63 extern void ckgid_hlp __P((int disp, char *help));
64 extern int ckgid __P((char *gid, short disp, char *defstr, char *error,
65 char *help, char *prompt));
68 * ckint.c
70 extern int ckint_val __P((char *value, short base));
71 extern void ckint_err __P((short base, char *error));
72 extern void ckint_hlp __P((short base, char *help));
73 extern int ckint __P((long *intval, short base, char *defstr, char *error,
74 char *help, char *prompt));
77 * ckitem.c
79 extern CKMENU *allocmenu __P((char *label, int attr));
80 extern void ckitem_err __P((CKMENU *menup, char *error));
81 extern void ckitem_hlp __P((CKMENU *menup, char *help));
82 extern int ckitem __P((CKMENU *menup, char *item[], short max,
83 char *defstr, char *error, char *help,
84 char *prompt));
85 extern int setitem __P((CKMENU *menup, char *choice));
86 extern int setinvis __P((CKMENU *menup, char *choice));
87 extern void printmenu __P((CKMENU *menup));
90 * ckkeywd.c
92 extern int ckkeywd __P((char *strval, char *keyword[], char *defstr,
93 char *error, char *help, char *prompt));
96 * ckpath.c
98 extern int ckpath_stx __P((int pflags));
99 extern int ckpath_val __P((char *path, int pflags));
100 extern void ckpath_err __P((int pflags, char *error, char *input));
101 extern void ckpath_hlp __P((int pflags, char *help));
102 extern int ckpath __P((char *pathval, int pflags, char *defstr,
103 char *error, char *help, char *prompt));
106 * ckrange.c
108 extern void ckrange_err __P((long lower, long upper, int base,
109 char *error));
110 extern void ckrange_hlp __P((long lower, long upper, int base, char *help));
111 extern int ckrange_val __P((long lower, long upper, int base,
112 char *input));
113 extern int ckrange __P((long *rngval, long lower, long upper, short base,
114 char *defstr, char *error, char *help,
115 char *prompt));
118 * ckstr.c
120 extern int ckstr_val __P((char *regexp[], int length, char *input));
121 extern void ckstr_err __P((char *regexp[], int length, char *error,
122 char *input));
123 extern void ckstr_hlp __P((char *regexp[], int length, char *help));
124 extern int ckstr __P((char *strval, char *regexp[], int length,
125 char *defstr, char *error, char *help,
126 char *prompt));
129 * cktime.c
131 extern int cktime_val __P((char *fmt, char *input));
132 extern int cktime_err __P((char *fmt, char *error));
133 extern int cktime_hlp __P((char *fmt, char *help));
134 extern int fmtcheck __P((char *fmt));
135 extern int cktime __P((char *tod, char *fmt, char *defstr, char *error,
136 char *help, char *prompt));
139 * ckuid.c
141 extern int ckuid_dsp __P((void));
142 extern int ckuid_val __P((char *usrnm));
143 extern int ckpwdfile __P((void));
144 extern void ckuid_err __P((short disp, char *error));
145 extern void ckuid_hlp __P((int disp, char *help));
146 extern int ckuid __P((char *uid, short disp, char *defstr, char *error,
147 char *help, char *prompt));
150 * ckyorn.c
152 extern int ckyorn_val __P((char *str));
153 extern void ckyorn_err __P((char *error));
154 extern void ckyorn_hlp __P((char *help));
155 extern int ckyorn __P((char *yorn, char *defstr, char *error, char *help,
156 char *prompt));
159 * devattr.c
161 extern char *devattr __P((char *device, char *attribute));
164 * devreserv.c
166 extern char *_rsvtabpath __P((void));
167 extern int _openlkfile __P((void));
168 extern int _closelkfile __P((void));
169 extern int unreserv __P((long key, char *device));
170 extern char **devreserv __P((long key, char **rsvlst[]));
171 extern int devfree __P((long key, char *device));
172 extern struct reservdev **reservdev __P((void));
175 * devtab.c
177 extern void _setdevtab __P((void));
178 extern void _enddevtab __P((void));
179 extern char *_devtabpath __P((void));
180 extern int _opendevtab __P((char *mode));
181 extern int _validalias __P((char *alias));
182 extern struct devtabent *_getdevtabent __P((void));
183 extern void _freedevtabent __P((struct devtabent *ent));
184 extern struct devtabent *_getdevrec __P((char *device));
187 * dgrpent.c
189 extern void _setdgrptab __P((void));
190 extern void _enddgrptab __P((void));
191 extern char *_dgrptabpath __P((void));
192 extern int _opendgrptab __P((char *mode));
193 extern struct dgrptabent *_getdgrptabent __P((void));
194 extern void _freedgrptabent __P((struct dgrptabent *ent));
195 extern struct dgrptabent *_getdgrprec __P((char *dgroup));
198 * fulldevnm.c
200 extern char *getfullblkname __P((char *cp));
201 extern char *getfullrawname __P((char *cp));
204 * getdev.c
206 extern char **getdev __P((char **devices, char **criteria, int options));
209 * getdgrp.c
211 extern char **getdgrp __P((char **dgroups, char **criteria, int options));
214 * getinput.c
216 extern int getinput __P((char *s));
219 * getvol.c
221 extern int getvol __P((char *device, char *label, int options,
222 char *prompt));
223 extern int _getvol __P((char *device, char *label, int options,
224 char *prompt, char *norewind));
225 extern void doremovecmd __P((char *device, int echo));
228 * listdev.c
230 extern char **listdev __P((char *device));
233 * listdgrp.c
235 extern char **listdgrp __P((char *dgroup));
238 * memory.c
240 extern long sysmem __P((void));
241 extern long asysmem __P((void));
244 * pkginfo.c
246 extern int pkginfo __P((struct pkginfo *info, char *pkginst, ...));
247 extern int fpkginfo __P((struct pkginfo *info, char *pkginst));
248 extern char *fpkginst __P((char *pkg, ...));
251 * pkgnmchk.c
253 extern int pkgnmchk __P((register char *pkg, register char *spec,
254 int presvr4flg));
255 extern void set_ABI_namelngth __P((void));
256 extern int get_ABI_namelngth __P((void));
259 * pkgparam.c
261 extern char *fpkgparam __P((FILE *fp, char *param));
262 extern char *pkgparam __P((char *pkg, char *param));
263 extern void set_PKGpaths __P((char *path));
264 extern char *get_PKGLOC __P((void));
265 extern char *get_PKGADM __P((void));
266 extern void set_PKGADM(char *newpath);
267 extern void set_PKGLOC(char *newpath);
270 * putdev.c
272 extern int _putdevtabrec __P((FILE *stream, struct devtabent *rec));
273 extern int _adddevtabrec __P((char *alias, char **attrval));
274 extern int _moddevtabrec __P((char *device, char **attrval));
275 extern int _rmdevtabrec __P((char *device));
276 extern int _rmdevtabattrs __P((char *device, char **attributes,
277 char ***notfounds));
280 * putdgrp.c
282 extern int _putdgrptabrec __P((FILE *stream, struct dgrptabent *rec));
283 extern int _adddgrptabrec __P((char *dgrp, char **members));
284 extern int _rmdgrptabrec __P((char *dgrp));
285 extern int _rmdgrpmems __P((char *dgrp, char **mems, char ***notfounds));
288 * puterror.c
290 extern void puterror __P((FILE *fp, char *defmesg, char *error));
293 * puthelp.c
295 extern void puthelp __P((FILE *fp, char *defmesg, char *help));
298 * putprmpt.c
300 extern void putprmpt __P((FILE *fp, char *prompt, char *choices[],
301 char *defstr));
304 * puttext.c
306 extern int puttext __P((FILE *fp, char *str, int lmarg, int rmarg));
309 * rdwr_vtoc.c
311 extern int read_vtoc __P((int fd, struct vtoc *vtoc));
312 extern int write_vtoc __P((int fd, struct vtoc *vtoc));
314 #if defined(lint) && !defined(gettext)
315 #define gettext(x) x
316 #endif /* defined(lint) && !defined(gettext) */
318 #endif /* __PKG_LIBADM_H__ */