xref: /onnv-gate/usr/src/uts/common/sys/bootstat.h (revision 5648:161f8007cab9)
10Sstevel@tonic-gate /*
20Sstevel@tonic-gate  * CDDL HEADER START
30Sstevel@tonic-gate  *
40Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*5648Ssetje  * Common Development and Distribution License (the "License").
6*5648Ssetje  * You may not use this file except in compliance with the License.
70Sstevel@tonic-gate  *
80Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate  * See the License for the specific language governing permissions
110Sstevel@tonic-gate  * and limitations under the License.
120Sstevel@tonic-gate  *
130Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate  *
190Sstevel@tonic-gate  * CDDL HEADER END
200Sstevel@tonic-gate  */
210Sstevel@tonic-gate /*
22*5648Ssetje  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
230Sstevel@tonic-gate  * Use is subject to license terms.
240Sstevel@tonic-gate  */
250Sstevel@tonic-gate 
260Sstevel@tonic-gate #ifndef	_SYS_BOOTSTAT_H
270Sstevel@tonic-gate #define	_SYS_BOOTSTAT_H
280Sstevel@tonic-gate 
290Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
300Sstevel@tonic-gate 
310Sstevel@tonic-gate #include <sys/stat.h>
320Sstevel@tonic-gate 
330Sstevel@tonic-gate #ifdef	__cplusplus
340Sstevel@tonic-gate extern "C" {
350Sstevel@tonic-gate #endif
360Sstevel@tonic-gate 
370Sstevel@tonic-gate /*
380Sstevel@tonic-gate  * 32/64-bit neutral stat and time structure to allow booters to be shared
390Sstevel@tonic-gate  *	among ILP32 and LP64 kernels.
400Sstevel@tonic-gate  */
410Sstevel@tonic-gate typedef struct boottime {
420Sstevel@tonic-gate 	int64_t	tv_sec;
430Sstevel@tonic-gate 	int64_t	tv_nsec;
440Sstevel@tonic-gate } boottime_t;
450Sstevel@tonic-gate 
460Sstevel@tonic-gate /*
470Sstevel@tonic-gate  * Current booters only support mode and size, with the exception of
480Sstevel@tonic-gate  *	nfs booter also uses ino.
490Sstevel@tonic-gate  */
500Sstevel@tonic-gate struct bootstat {
510Sstevel@tonic-gate 	uint64_t	st_dev;
520Sstevel@tonic-gate 	uint64_t	st_ino;
530Sstevel@tonic-gate 	uint32_t	st_mode;
540Sstevel@tonic-gate 	uint32_t	st_nlink;
550Sstevel@tonic-gate 	int32_t		st_uid;
560Sstevel@tonic-gate 	int32_t		st_gid;
570Sstevel@tonic-gate 	uint64_t	st_rdev;
580Sstevel@tonic-gate 	uint64_t	st_size;
590Sstevel@tonic-gate 	boottime_t	st_atim;
600Sstevel@tonic-gate 	boottime_t	st_mtim;
610Sstevel@tonic-gate 	boottime_t	st_ctim;
620Sstevel@tonic-gate 	int32_t		st_blksize;
630Sstevel@tonic-gate 	int64_t		st_blocks;
640Sstevel@tonic-gate 	char		st_fstype[_ST_FSTYPSZ];
650Sstevel@tonic-gate };
660Sstevel@tonic-gate 
67*5648Ssetje /*
68*5648Ssetje  * Special struct for compressed files.
69*5648Ssetje  * Only used by kobj to decompress files before
70*5648Ssetje  * root is mounted. Afterwards, dcfs will take
71*5648Ssetje  * over decompression.
72*5648Ssetje  */
73*5648Ssetje struct compinfo {
74*5648Ssetje 	int	iscmp;
75*5648Ssetje 	size_t	fsize;
76*5648Ssetje 	size_t	blksize;
77*5648Ssetje };
78*5648Ssetje 
790Sstevel@tonic-gate #ifdef	__cplusplus
800Sstevel@tonic-gate }
810Sstevel@tonic-gate #endif
820Sstevel@tonic-gate 
830Sstevel@tonic-gate #endif	/* _SYS_BOOTSTAT_H */
84