15c51f124SMoriah Waterland /*
25c51f124SMoriah Waterland  * CDDL HEADER START
35c51f124SMoriah Waterland  *
45c51f124SMoriah Waterland  * The contents of this file are subject to the terms of the
55c51f124SMoriah Waterland  * Common Development and Distribution License (the "License").
65c51f124SMoriah Waterland  * You may not use this file except in compliance with the License.
75c51f124SMoriah Waterland  *
85c51f124SMoriah Waterland  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
95c51f124SMoriah Waterland  * or http://www.opensolaris.org/os/licensing.
105c51f124SMoriah Waterland  * See the License for the specific language governing permissions
115c51f124SMoriah Waterland  * and limitations under the License.
125c51f124SMoriah Waterland  *
135c51f124SMoriah Waterland  * When distributing Covered Code, include this CDDL HEADER in each
145c51f124SMoriah Waterland  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
155c51f124SMoriah Waterland  * If applicable, add the following below this CDDL HEADER, with the
165c51f124SMoriah Waterland  * fields enclosed by brackets "[]" replaced with your own identifying
175c51f124SMoriah Waterland  * information: Portions Copyright [yyyy] [name of copyright owner]
185c51f124SMoriah Waterland  *
195c51f124SMoriah Waterland  * CDDL HEADER END
205c51f124SMoriah Waterland  */
215c51f124SMoriah Waterland 
225c51f124SMoriah Waterland /*
23*62224350SCasper H.S. Dik  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
245c51f124SMoriah Waterland  * Use is subject to license terms.
255c51f124SMoriah Waterland  */
265c51f124SMoriah Waterland 
275c51f124SMoriah Waterland #ifndef __PKG_PKGINSTALL_H__
285c51f124SMoriah Waterland #define	__PKG_PKGINSTALL_H__
295c51f124SMoriah Waterland 
305c51f124SMoriah Waterland 
315c51f124SMoriah Waterland #ifdef __cplusplus
325c51f124SMoriah Waterland extern "C" {
335c51f124SMoriah Waterland #endif
345c51f124SMoriah Waterland 
355c51f124SMoriah Waterland /* cppath() variables */
365c51f124SMoriah Waterland #define	DIR_DISPLAY	0x0001	/* display implied directories created */
375c51f124SMoriah Waterland #define	MODE_SRC	0x0002	/* set mode to mode of source file */
385c51f124SMoriah Waterland #define	MODE_SET	0x0004	/* set mode to mode passed in as argument */
395c51f124SMoriah Waterland #define	MODE_0666	0x0008	/* force mode to 0666 */
405c51f124SMoriah Waterland 
415c51f124SMoriah Waterland /* special stdin for request scripts */
425c51f124SMoriah Waterland #define	REQ_STDIN	"/dev/tty"
435c51f124SMoriah Waterland 
445c51f124SMoriah Waterland /* response file writability status */
455c51f124SMoriah Waterland #define	RESP_WR		0	/* Response file is writable. */
465c51f124SMoriah Waterland #define	RESP_RO		1	/* Read only. */
475c51f124SMoriah Waterland 
485c51f124SMoriah Waterland #ifdef __STDC__
495c51f124SMoriah Waterland #ifndef __P
505c51f124SMoriah Waterland #define	__P(x)	x
515c51f124SMoriah Waterland #endif
525c51f124SMoriah Waterland #else
535c51f124SMoriah Waterland #ifndef __P
545c51f124SMoriah Waterland #define	__P(x)	()
555c51f124SMoriah Waterland #endif
565c51f124SMoriah Waterland #endif /* __STDC__ */
575c51f124SMoriah Waterland 
585c51f124SMoriah Waterland extern int	cppath __P((int ctrl, char *f1, char *f2, mode_t mode));
595c51f124SMoriah Waterland extern void	backup __P((char *path, int mode));
605c51f124SMoriah Waterland extern void	pkgvolume __P((struct pkgdev *devp, char *pkg, int part,
615c51f124SMoriah Waterland 		    int nparts));
625c51f124SMoriah Waterland extern void	quit __P((int exitval));
635c51f124SMoriah Waterland extern void	ckreturn __P((int retcode, char *msg));
645c51f124SMoriah Waterland extern int	sortmap __P((struct cfextra ***extlist, VFP_T *pkgmapVfp,
65*62224350SCasper H.S. Dik 			PKGserver serv, VFP_T *tmpvfp, char *a_zoneName));
665c51f124SMoriah Waterland extern void merginfo __P((struct cl_attr **pclass, int install_from_pspool));
675c51f124SMoriah Waterland extern void	set_infoloc __P((char *real_pkgsav));
685c51f124SMoriah Waterland extern int	pkgenv __P((char *pkginst, char *p_pkginfo, char *p_pkgmap));
695c51f124SMoriah Waterland extern void	instvol __P((struct cfextra **extlist, char *srcinst, int part,
70*62224350SCasper H.S. Dik 			int nparts, PKGserver server, VFP_T **a_cfTmpVfp,
715c51f124SMoriah Waterland 			char **r_updated, char **r_skipped,
725c51f124SMoriah Waterland 			char *a_zoneName));
735c51f124SMoriah Waterland extern int	reqexec __P((int update, char *script, int non_abi_scripts,
745c51f124SMoriah Waterland 			boolean_t enable_root_user));
755c51f124SMoriah Waterland extern int	chkexec __P((int update, char *script));
765c51f124SMoriah Waterland extern int	rdonly_respfile __P((void));
775c51f124SMoriah Waterland extern int	is_a_respfile __P((void));
785c51f124SMoriah Waterland extern char	*get_respfile __P((void));
795c51f124SMoriah Waterland extern int	set_respfile __P((char *respfile, char *pkginst,
805c51f124SMoriah Waterland 		    int resp_stat));
815c51f124SMoriah Waterland extern void	predepend __P((char *oldpkg));
825c51f124SMoriah Waterland extern void	cksetPreinstallCheck __P((boolean_t a_preinstallCheck));
835c51f124SMoriah Waterland extern void	cksetZoneName __P((char *a_zoneName));
845c51f124SMoriah Waterland extern int	cksetuid __P((void));
855c51f124SMoriah Waterland extern int	ckconflct __P((void));
865c51f124SMoriah Waterland extern int	ckpkgdirs __P((void));
875c51f124SMoriah Waterland extern int	ckspace __P((void));
885c51f124SMoriah Waterland extern int	ckdepend __P((void));
895c51f124SMoriah Waterland extern int	ckrunlevel __P((void));
905c51f124SMoriah Waterland extern int	ckpartial __P((void));
915c51f124SMoriah Waterland extern int	ckpkgfiles __P((void));
925c51f124SMoriah Waterland extern int	ckpriv __P((void));
935c51f124SMoriah Waterland extern void	is_WOS_arch __P((void));
945c51f124SMoriah Waterland extern void	ckdirs __P((void));
955c51f124SMoriah Waterland extern char	*getinst __P((int *updatingExisting, struct pkginfo *info,
965c51f124SMoriah Waterland 			int npkgs, boolean_t a_preinstallCheck));
975c51f124SMoriah Waterland extern int	is_samepkg __P((void));
985c51f124SMoriah Waterland extern int	dockspace __P((char *spacefile));
995c51f124SMoriah Waterland 
1005c51f124SMoriah Waterland extern int	special_contents_add(int, struct cfextra **, const char *);
1015c51f124SMoriah Waterland extern boolean_t	rm_all_pkg_entries(char *, char *);
1025c51f124SMoriah Waterland 
1035c51f124SMoriah Waterland #ifdef __cplusplus
1045c51f124SMoriah Waterland }
1055c51f124SMoriah Waterland #endif
1065c51f124SMoriah Waterland 
1075c51f124SMoriah Waterland #endif	/* __PKG_PKGINSTALL_H__ */
108