xref: /illumos-gate/usr/src/cmd/svr4pkg/pkgadm/pkgadm.h (revision 32991bed)
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*32991bedSPeter Tribble /*
23*32991bedSPeter Tribble  * Copyright (c) 2017 Peter Tribble.
24*32991bedSPeter Tribble  */
25*32991bedSPeter Tribble 
265c51f124SMoriah Waterland /*
275c51f124SMoriah Waterland  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
285c51f124SMoriah Waterland  * Use is subject to license terms.
295c51f124SMoriah Waterland  */
305c51f124SMoriah Waterland 
315c51f124SMoriah Waterland #ifndef _PKGADM_H
325c51f124SMoriah Waterland #define	_PKGADM_H
335c51f124SMoriah Waterland 
345c51f124SMoriah Waterland 
355c51f124SMoriah Waterland #ifdef __cplusplus
365c51f124SMoriah Waterland extern "C" {
375c51f124SMoriah Waterland #endif
385c51f124SMoriah Waterland 
395c51f124SMoriah Waterland #include "pkglib.h"
405c51f124SMoriah Waterland #include "libinst.h"
415c51f124SMoriah Waterland 
425c51f124SMoriah Waterland /* version of packaging interface */
435c51f124SMoriah Waterland #define	SUNW_PKGVERS	"1.0"
445c51f124SMoriah Waterland 
455c51f124SMoriah Waterland /* string comparitor abbreviators */
465c51f124SMoriah Waterland 
475c51f124SMoriah Waterland #define	ci_streq(a, b)		(strcasecmp((a), (b)) == 0)
485c51f124SMoriah Waterland #define	ci_strneq(a, b, c)	(strncasecmp((a), (b), (c)) == 0)
495c51f124SMoriah Waterland #define	streq(a, b)		(strcmp((a), (b)) == 0)
505c51f124SMoriah Waterland #define	strneq(a, b, c)		(strncmp((a), (b), (c)) == 0)
515c51f124SMoriah Waterland 
525c51f124SMoriah Waterland /* max l10n message length we will display */
535c51f124SMoriah Waterland #define	MSG_MAX			1024
545c51f124SMoriah Waterland 
555c51f124SMoriah Waterland /* main.c */
565c51f124SMoriah Waterland extern	void		log_msg(LogMsgType, const char *, ...);
575c51f124SMoriah Waterland extern	void		set_verbose(boolean_t);
585c51f124SMoriah Waterland extern	boolean_t	get_verbose(void);
595c51f124SMoriah Waterland /* lock.c */
605c51f124SMoriah Waterland extern int		admin_lock(int, char **);
615c51f124SMoriah Waterland 
625c51f124SMoriah Waterland #define	PKGADM_DBSTATUS_TEXT	"text"
635c51f124SMoriah Waterland 
645c51f124SMoriah Waterland #ifdef __cplusplus
655c51f124SMoriah Waterland }
665c51f124SMoriah Waterland #endif
675c51f124SMoriah Waterland 
685c51f124SMoriah Waterland #endif /* _PKGADM_H */
69