xref: /titanic_52/usr/src/cmd/svr4pkg/pkginstall/pkginstall.h (revision 3c112a2b34403220c06c3e2fcac403358cfba168)
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 /*
23  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef __PKG_PKGINSTALL_H__
28 #define	__PKG_PKGINSTALL_H__
29 
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 /* cppath() variables */
36 #define	DIR_DISPLAY	0x0001	/* display implied directories created */
37 #define	MODE_SRC	0x0002	/* set mode to mode of source file */
38 #define	MODE_SET	0x0004	/* set mode to mode passed in as argument */
39 #define	MODE_0666	0x0008	/* force mode to 0666 */
40 
41 /* special stdin for request scripts */
42 #define	REQ_STDIN	"/dev/tty"
43 
44 /* response file writability status */
45 #define	RESP_WR		0	/* Response file is writable. */
46 #define	RESP_RO		1	/* Read only. */
47 
48 #ifdef __STDC__
49 #ifndef __P
50 #define	__P(x)	x
51 #endif
52 #else
53 #ifndef __P
54 #define	__P(x)	()
55 #endif
56 #endif /* __STDC__ */
57 
58 extern int	cppath __P((int ctrl, char *f1, char *f2, mode_t mode));
59 extern void	backup __P((char *path, int mode));
60 extern void	pkgvolume __P((struct pkgdev *devp, char *pkg, int part,
61 		    int nparts));
62 extern void	quit __P((int exitval));
63 extern void	ckreturn __P((int retcode, char *msg));
64 extern int	sortmap __P((struct cfextra ***extlist, VFP_T *pkgmapVfp,
65 			PKGserver serv, VFP_T *tmpvfp, char *a_zoneName));
66 extern void merginfo __P((struct cl_attr **pclass, int install_from_pspool));
67 extern void	set_infoloc __P((char *real_pkgsav));
68 extern int	pkgenv __P((char *pkginst, char *p_pkginfo, char *p_pkgmap));
69 extern void	instvol __P((struct cfextra **extlist, char *srcinst, int part,
70 			int nparts, PKGserver server, VFP_T **a_cfTmpVfp,
71 			char **r_updated, char **r_skipped,
72 			char *a_zoneName));
73 extern int	reqexec __P((int update, char *script, int non_abi_scripts,
74 			boolean_t enable_root_user));
75 extern int	chkexec __P((int update, char *script));
76 extern int	rdonly_respfile __P((void));
77 extern int	is_a_respfile __P((void));
78 extern char	*get_respfile __P((void));
79 extern int	set_respfile __P((char *respfile, char *pkginst,
80 		    int resp_stat));
81 extern void	predepend __P((char *oldpkg));
82 extern void	cksetPreinstallCheck __P((boolean_t a_preinstallCheck));
83 extern void	cksetZoneName __P((char *a_zoneName));
84 extern int	cksetuid __P((void));
85 extern int	ckconflct __P((void));
86 extern int	ckpkgdirs __P((void));
87 extern int	ckspace __P((void));
88 extern int	ckdepend __P((void));
89 extern int	ckrunlevel __P((void));
90 extern int	ckpartial __P((void));
91 extern int	ckpkgfiles __P((void));
92 extern int	ckpriv __P((void));
93 extern void	is_WOS_arch __P((void));
94 extern void	ckdirs __P((void));
95 extern char	*getinst __P((int *updatingExisting, struct pkginfo *info,
96 			int npkgs, boolean_t a_preinstallCheck));
97 extern int	is_samepkg __P((void));
98 extern int	dockspace __P((char *spacefile));
99 
100 extern int	special_contents_add(int, struct cfextra **, const char *);
101 extern boolean_t	rm_all_pkg_entries(char *, char *);
102 
103 #ifdef __cplusplus
104 }
105 #endif
106 
107 #endif	/* __PKG_PKGINSTALL_H__ */
108