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 
22*2eeda986SPeter Tribble /*
23*2eeda986SPeter Tribble  * Copyright (c) 2018 Peter Tribble.
24*2eeda986SPeter Tribble  */
25*2eeda986SPeter Tribble 
265c51f124SMoriah Waterland /*
276e1ae2a3SGary Pennington  * Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
285c51f124SMoriah Waterland  */
295c51f124SMoriah Waterland 
305c51f124SMoriah Waterland #ifndef __PKG_PKGINSTALL_H__
315c51f124SMoriah Waterland #define	__PKG_PKGINSTALL_H__
325c51f124SMoriah Waterland 
335c51f124SMoriah Waterland 
345c51f124SMoriah Waterland #ifdef __cplusplus
355c51f124SMoriah Waterland extern "C" {
365c51f124SMoriah Waterland #endif
375c51f124SMoriah Waterland 
385c51f124SMoriah Waterland /* cppath() variables */
395c51f124SMoriah Waterland #define	DIR_DISPLAY	0x0001	/* display implied directories created */
405c51f124SMoriah Waterland #define	MODE_SRC	0x0002	/* set mode to mode of source file */
415c51f124SMoriah Waterland #define	MODE_SET	0x0004	/* set mode to mode passed in as argument */
425c51f124SMoriah Waterland #define	MODE_0666	0x0008	/* force mode to 0666 */
435c51f124SMoriah Waterland 
445c51f124SMoriah Waterland /* special stdin for request scripts */
455c51f124SMoriah Waterland #define	REQ_STDIN	"/dev/tty"
465c51f124SMoriah Waterland 
475c51f124SMoriah Waterland /* response file writability status */
485c51f124SMoriah Waterland #define	RESP_WR		0	/* Response file is writable. */
495c51f124SMoriah Waterland #define	RESP_RO		1	/* Read only. */
505c51f124SMoriah Waterland 
515c51f124SMoriah Waterland #ifdef __STDC__
525c51f124SMoriah Waterland #ifndef __P
535c51f124SMoriah Waterland #define	__P(x)	x
545c51f124SMoriah Waterland #endif
555c51f124SMoriah Waterland #else
565c51f124SMoriah Waterland #ifndef __P
575c51f124SMoriah Waterland #define	__P(x)	()
585c51f124SMoriah Waterland #endif
595c51f124SMoriah Waterland #endif /* __STDC__ */
605c51f124SMoriah Waterland 
615c51f124SMoriah Waterland extern int	cppath __P((int ctrl, char *f1, char *f2, mode_t mode));
625c51f124SMoriah Waterland extern void	backup __P((char *path, int mode));
635c51f124SMoriah Waterland extern void	pkgvolume __P((struct pkgdev *devp, char *pkg, int part,
645c51f124SMoriah Waterland 		    int nparts));
655c51f124SMoriah Waterland extern void	quit __P((int exitval));
665c51f124SMoriah Waterland extern void	ckreturn __P((int retcode, char *msg));
675c51f124SMoriah Waterland extern int	sortmap __P((struct cfextra ***extlist, VFP_T *pkgmapVfp,
6862224350SCasper H.S. Dik 			PKGserver serv, VFP_T *tmpvfp, char *a_zoneName));
695c51f124SMoriah Waterland extern void merginfo __P((struct cl_attr **pclass, int install_from_pspool));
705c51f124SMoriah Waterland extern void	set_infoloc __P((char *real_pkgsav));
715c51f124SMoriah Waterland extern int	pkgenv __P((char *pkginst, char *p_pkginfo, char *p_pkgmap));
725c51f124SMoriah Waterland extern void	instvol __P((struct cfextra **extlist, char *srcinst, int part,
7362224350SCasper H.S. Dik 			int nparts, PKGserver server, VFP_T **a_cfTmpVfp,
746e1ae2a3SGary Pennington 			char **r_updated, char *a_zoneName));
755c51f124SMoriah Waterland extern int	reqexec __P((int update, char *script, int non_abi_scripts,
765c51f124SMoriah Waterland 			boolean_t enable_root_user));
775c51f124SMoriah Waterland extern int	chkexec __P((int update, char *script));
785c51f124SMoriah Waterland extern int	rdonly_respfile __P((void));
795c51f124SMoriah Waterland extern int	is_a_respfile __P((void));
805c51f124SMoriah Waterland extern char	*get_respfile __P((void));
815c51f124SMoriah Waterland extern int	set_respfile __P((char *respfile, char *pkginst,
825c51f124SMoriah Waterland 		    int resp_stat));
835c51f124SMoriah Waterland extern void	predepend __P((char *oldpkg));
845c51f124SMoriah Waterland extern void	cksetPreinstallCheck __P((boolean_t a_preinstallCheck));
855c51f124SMoriah Waterland extern void	cksetZoneName __P((char *a_zoneName));
865c51f124SMoriah Waterland extern int	cksetuid __P((void));
875c51f124SMoriah Waterland extern int	ckconflct __P((void));
885c51f124SMoriah Waterland extern int	ckpkgdirs __P((void));
895c51f124SMoriah Waterland extern int	ckspace __P((void));
905c51f124SMoriah Waterland extern int	ckdepend __P((void));
915c51f124SMoriah Waterland extern int	ckrunlevel __P((void));
925c51f124SMoriah Waterland extern int	ckpartial __P((void));
935c51f124SMoriah Waterland extern int	ckpkgfiles __P((void));
945c51f124SMoriah Waterland extern int	ckpriv __P((void));
955c51f124SMoriah Waterland extern void	is_WOS_arch __P((void));
965c51f124SMoriah Waterland extern void	ckdirs __P((void));
975c51f124SMoriah Waterland extern char	*getinst __P((int *updatingExisting, struct pkginfo *info,
985c51f124SMoriah Waterland 			int npkgs, boolean_t a_preinstallCheck));
995c51f124SMoriah Waterland extern int	is_samepkg __P((void));
1005c51f124SMoriah Waterland extern int	dockspace __P((char *spacefile));
1015c51f124SMoriah Waterland 
1025c51f124SMoriah Waterland #ifdef __cplusplus
1035c51f124SMoriah Waterland }
1045c51f124SMoriah Waterland #endif
1055c51f124SMoriah Waterland 
1065c51f124SMoriah Waterland #endif	/* __PKG_PKGINSTALL_H__ */
107