blob: a022aa89f8304c5495302a936123f8beb9d6a832 [file] [log] [blame]
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -07001/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
ny155746a20d5142007-12-09 21:55:53 -08005 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -07007 *
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/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
Marcel Telkab4203d72017-06-14 08:51:35 +020022/* All Rights Reserved */
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -070023
24/*
ny155746a20d5142007-12-09 21:55:53 -080025 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
26 * Use is subject to license terms.
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -070027 */
28
29#ifndef _PKGSTRCT_H
30#define _PKGSTRCT_H
31
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -070032#include <time.h>
33
34#ifdef __cplusplus
35extern "C" {
36#endif
37
38#define CLSSIZ 64
39#define PKGSIZ 64
40#define ATRSIZ 64
41
42#define BADFTYPE '?'
43#define BADMODE (mode_t)ULONG_MAX
44#define BADOWNER "?"
45#define BADGROUP "?"
46#define BADMAJOR (major_t)ULONG_MAX
47#define BADMINOR (minor_t)ULONG_MAX
48#define BADCLASS "none"
49#define BADINPUT 1 /* not EOF */
50#define BADCONT (-1L)
51
52extern char *errstr;
53
54struct ainfo {
55 char *local;
56 mode_t mode;
57 char owner[ATRSIZ+1];
58 char group[ATRSIZ+1];
59 major_t major;
60 minor_t minor;
61};
62
63struct cinfo {
ny155746a20d5142007-12-09 21:55:53 -080064 long cksum;
65 fsblkcnt_t size;
66 time_t modtime;
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -070067};
68
69struct pinfo {
70 char status;
71 char pkg[PKGSIZ+1];
72 char editflag;
73 char aclass[ATRSIZ+1];
74 struct pinfo
75 *next;
76};
77
78struct cfent {
79 short volno;
80 char ftype;
81 char pkg_class[CLSSIZ+1];
82 int pkg_class_idx;
83 char *path;
84 struct ainfo ainfo;
85 struct cinfo cinfo;
86 short npkgs;
87 struct pinfo
88 *pinfo;
89};
90
91/* averify() & cverify() error codes */
92#define VE_EXIST 0x0001
93#define VE_FTYPE 0x0002
94#define VE_ATTR 0x0004
95#define VE_CONT 0x0008
96#define VE_FAIL 0x0010
97#define VE_TIME 0x0020
98
99#ifdef __cplusplus
100}
101#endif
102
103#endif /* _PKGSTRCT_H */