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) 2017 Peter Tribble. 24 */ 25 26 /* 27 * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 28 * Use is subject to license terms. 29 */ 30 31 #ifndef _PKGADM_H 32 #define _PKGADM_H 33 34 35 #ifdef __cplusplus 36 extern "C" { 37 #endif 38 39 #include "pkglib.h" 40 #include "libinst.h" 41 42 /* version of packaging interface */ 43 #define SUNW_PKGVERS "1.0" 44 45 /* string comparitor abbreviators */ 46 47 #define ci_streq(a, b) (strcasecmp((a), (b)) == 0) 48 #define ci_strneq(a, b, c) (strncasecmp((a), (b), (c)) == 0) 49 #define streq(a, b) (strcmp((a), (b)) == 0) 50 #define strneq(a, b, c) (strncmp((a), (b), (c)) == 0) 51 52 /* max l10n message length we will display */ 53 #define MSG_MAX 1024 54 55 /* main.c */ 56 extern void log_msg(LogMsgType, const char *, ...); 57 extern void set_verbose(boolean_t); 58 extern boolean_t get_verbose(void); 59 /* lock.c */ 60 extern int admin_lock(int, char **); 61 62 #define PKGADM_DBSTATUS_TEXT "text" 63 64 #ifdef __cplusplus 65 } 66 #endif 67 68 #endif /* _PKGADM_H */ 69