xref: /titanic_52/usr/src/head/pkgstrct.h (revision a20d514e1b317d52819891ca08b32cec2eb5ff04)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*a20d514eSny155746  * Common Development and Distribution License (the "License").
6*a20d514eSny155746  * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate  * and limitations under the License.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * CDDL HEADER END
207c478bd9Sstevel@tonic-gate  */
217c478bd9Sstevel@tonic-gate /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
227c478bd9Sstevel@tonic-gate /*	  All Rights Reserved  	*/
237c478bd9Sstevel@tonic-gate 
247c478bd9Sstevel@tonic-gate /*
25*a20d514eSny155746  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
26*a20d514eSny155746  * Use is subject to license terms.
277c478bd9Sstevel@tonic-gate  */
287c478bd9Sstevel@tonic-gate 
297c478bd9Sstevel@tonic-gate #ifndef	_PKGSTRCT_H
307c478bd9Sstevel@tonic-gate #define	_PKGSTRCT_H
317c478bd9Sstevel@tonic-gate 
327c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"	/* SVr4.0 1.9	*/
337c478bd9Sstevel@tonic-gate 
347c478bd9Sstevel@tonic-gate #include <time.h>
357c478bd9Sstevel@tonic-gate 
367c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
377c478bd9Sstevel@tonic-gate extern "C" {
387c478bd9Sstevel@tonic-gate #endif
397c478bd9Sstevel@tonic-gate 
407c478bd9Sstevel@tonic-gate #define	CLSSIZ	64
417c478bd9Sstevel@tonic-gate #define	PKGSIZ	64
427c478bd9Sstevel@tonic-gate #define	ATRSIZ	64
437c478bd9Sstevel@tonic-gate 
447c478bd9Sstevel@tonic-gate #define	BADFTYPE	'?'
457c478bd9Sstevel@tonic-gate #define	BADMODE		(mode_t)ULONG_MAX
467c478bd9Sstevel@tonic-gate #define	BADOWNER	"?"
477c478bd9Sstevel@tonic-gate #define	BADGROUP	"?"
487c478bd9Sstevel@tonic-gate #define	BADMAJOR	(major_t)ULONG_MAX
497c478bd9Sstevel@tonic-gate #define	BADMINOR	(minor_t)ULONG_MAX
507c478bd9Sstevel@tonic-gate #define	BADCLASS	"none"
517c478bd9Sstevel@tonic-gate #define	BADINPUT	1 /* not EOF */
527c478bd9Sstevel@tonic-gate #define	BADCONT		(-1L)
537c478bd9Sstevel@tonic-gate 
547c478bd9Sstevel@tonic-gate extern char	*errstr;
557c478bd9Sstevel@tonic-gate 
567c478bd9Sstevel@tonic-gate struct ainfo {
577c478bd9Sstevel@tonic-gate 	char	*local;
587c478bd9Sstevel@tonic-gate 	mode_t	mode;
597c478bd9Sstevel@tonic-gate 	char	owner[ATRSIZ+1];
607c478bd9Sstevel@tonic-gate 	char	group[ATRSIZ+1];
617c478bd9Sstevel@tonic-gate 	major_t	major;
627c478bd9Sstevel@tonic-gate 	minor_t	minor;
637c478bd9Sstevel@tonic-gate };
647c478bd9Sstevel@tonic-gate 
657c478bd9Sstevel@tonic-gate struct cinfo {
667c478bd9Sstevel@tonic-gate 	long		cksum;
67*a20d514eSny155746 	fsblkcnt_t	size;
687c478bd9Sstevel@tonic-gate 	time_t		modtime;
697c478bd9Sstevel@tonic-gate };
707c478bd9Sstevel@tonic-gate 
717c478bd9Sstevel@tonic-gate struct pinfo {
727c478bd9Sstevel@tonic-gate 	char	status;
737c478bd9Sstevel@tonic-gate 	char	pkg[PKGSIZ+1];
747c478bd9Sstevel@tonic-gate 	char	editflag;
757c478bd9Sstevel@tonic-gate 	char	aclass[ATRSIZ+1];
767c478bd9Sstevel@tonic-gate 	struct pinfo
777c478bd9Sstevel@tonic-gate 		*next;
787c478bd9Sstevel@tonic-gate };
797c478bd9Sstevel@tonic-gate 
807c478bd9Sstevel@tonic-gate struct cfent {
817c478bd9Sstevel@tonic-gate 	short	volno;
827c478bd9Sstevel@tonic-gate 	char	ftype;
837c478bd9Sstevel@tonic-gate 	char	pkg_class[CLSSIZ+1];
847c478bd9Sstevel@tonic-gate 	int	pkg_class_idx;
857c478bd9Sstevel@tonic-gate 	char	*path;
867c478bd9Sstevel@tonic-gate 	struct ainfo ainfo;
877c478bd9Sstevel@tonic-gate 	struct cinfo cinfo;
887c478bd9Sstevel@tonic-gate 	short	npkgs;
897c478bd9Sstevel@tonic-gate 	struct pinfo
907c478bd9Sstevel@tonic-gate 		*pinfo;
917c478bd9Sstevel@tonic-gate };
927c478bd9Sstevel@tonic-gate 
937c478bd9Sstevel@tonic-gate /* averify() & cverify() error codes */
947c478bd9Sstevel@tonic-gate #define	VE_EXIST	0x0001
957c478bd9Sstevel@tonic-gate #define	VE_FTYPE	0x0002
967c478bd9Sstevel@tonic-gate #define	VE_ATTR		0x0004
977c478bd9Sstevel@tonic-gate #define	VE_CONT		0x0008
987c478bd9Sstevel@tonic-gate #define	VE_FAIL		0x0010
997c478bd9Sstevel@tonic-gate #define	VE_TIME		0x0020
1007c478bd9Sstevel@tonic-gate 
1017c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
1027c478bd9Sstevel@tonic-gate }
1037c478bd9Sstevel@tonic-gate #endif
1047c478bd9Sstevel@tonic-gate 
1057c478bd9Sstevel@tonic-gate #endif	/* _PKGSTRCT_H */
106