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