xref: /titanic_44/usr/src/head/pkgstrct.h (revision 9dd0f810214fdc8e1af881a9a5c4b6927629ff9e)
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, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23 /*	  All Rights Reserved  	*/
24 
25 /*
26  * Copyright (c) 1994, by Sun Microsystems, Inc.
27  * All rights reserved.
28  */
29 
30 #ifndef	_PKGSTRCT_H
31 #define	_PKGSTRCT_H
32 
33 #pragma ident	"%Z%%M%	%I%	%E% SMI"	/* SVr4.0 1.9	*/
34 
35 #include <time.h>
36 
37 #ifdef	__cplusplus
38 extern "C" {
39 #endif
40 
41 #define	CLSSIZ	64
42 #define	PKGSIZ	64
43 #define	ATRSIZ	64
44 
45 #define	BADFTYPE	'?'
46 #define	BADMODE		(mode_t)ULONG_MAX
47 #define	BADOWNER	"?"
48 #define	BADGROUP	"?"
49 #define	BADMAJOR	(major_t)ULONG_MAX
50 #define	BADMINOR	(minor_t)ULONG_MAX
51 #define	BADCLASS	"none"
52 #define	BADINPUT	1 /* not EOF */
53 #define	BADCONT		(-1L)
54 
55 extern char	*errstr;
56 
57 struct ainfo {
58 	char	*local;
59 	mode_t	mode;
60 	char	owner[ATRSIZ+1];
61 	char	group[ATRSIZ+1];
62 	major_t	major;
63 	minor_t	minor;
64 };
65 
66 struct cinfo {
67 	long	cksum;
68 	long	size;
69 	time_t	modtime;
70 };
71 
72 struct pinfo {
73 	char	status;
74 	char	pkg[PKGSIZ+1];
75 	char	editflag;
76 	char	aclass[ATRSIZ+1];
77 	struct pinfo
78 		*next;
79 };
80 
81 struct cfent {
82 	short	volno;
83 	char	ftype;
84 	char	pkg_class[CLSSIZ+1];
85 	int	pkg_class_idx;
86 	char	*path;
87 	struct ainfo ainfo;
88 	struct cinfo cinfo;
89 	short	npkgs;
90 	struct pinfo
91 		*pinfo;
92 };
93 
94 /* averify() & cverify() error codes */
95 #define	VE_EXIST	0x0001
96 #define	VE_FTYPE	0x0002
97 #define	VE_ATTR		0x0004
98 #define	VE_CONT		0x0008
99 #define	VE_FAIL		0x0010
100 #define	VE_TIME		0x0020
101 
102 #ifdef	__cplusplus
103 }
104 #endif
105 
106 #endif	/* _PKGSTRCT_H */
107