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
31extern "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
57extern int	cppath __P((int ctrl, char *f1, char *f2, mode_t mode));
58extern void	backup __P((char *path, int mode));
59extern void	pkgvolume __P((struct pkgdev *devp, char *pkg, int part,
60		    int nparts));
61extern void	quit __P((int exitval));
62extern void	ckreturn __P((int retcode, char *msg));
63extern int	sortmap __P((struct cfextra ***extlist, VFP_T *pkgmapVfp,
64			PKGserver serv, VFP_T *tmpvfp, char *a_zoneName));
65extern void merginfo __P((struct cl_attr **pclass, int install_from_pspool));
66extern void	set_infoloc __P((char *real_pkgsav));
67extern int	pkgenv __P((char *pkginst, char *p_pkginfo, char *p_pkgmap));
68extern 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));
71extern int	reqexec __P((int update, char *script, int non_abi_scripts,
72			boolean_t enable_root_user));
73extern int	chkexec __P((int update, char *script));
74extern int	rdonly_respfile __P((void));
75extern int	is_a_respfile __P((void));
76extern char	*get_respfile __P((void));
77extern int	set_respfile __P((char *respfile, char *pkginst,
78		    int resp_stat));
79extern void	predepend __P((char *oldpkg));
80extern void	cksetPreinstallCheck __P((boolean_t a_preinstallCheck));
81extern void	cksetZoneName __P((char *a_zoneName));
82extern int	cksetuid __P((void));
83extern int	ckconflct __P((void));
84extern int	ckpkgdirs __P((void));
85extern int	ckspace __P((void));
86extern int	ckdepend __P((void));
87extern int	ckrunlevel __P((void));
88extern int	ckpartial __P((void));
89extern int	ckpkgfiles __P((void));
90extern int	ckpriv __P((void));
91extern void	is_WOS_arch __P((void));
92extern void	ckdirs __P((void));
93extern char	*getinst __P((int *updatingExisting, struct pkginfo *info,
94			int npkgs, boolean_t a_preinstallCheck));
95extern int	is_samepkg __P((void));
96extern int	dockspace __P((char *spacefile));
97
98extern int	special_contents_add(int, struct cfextra **, const char *);
99extern boolean_t	rm_all_pkg_entries(char *, char *);
100
101#ifdef __cplusplus
102}
103#endif
104
105#endif	/* __PKG_PKGINSTALL_H__ */
106