xref: /titanic_44/usr/src/uts/common/sys/bootstat.h (revision 78432d5ed5122db8b0bbfa41e00d063bf8ae7171)
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  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 #ifndef	_SYS_BOOTSTAT_H
27 #define	_SYS_BOOTSTAT_H
28 
29 #pragma ident	"%Z%%M%	%I%	%E% SMI"
30 
31 #include <sys/stat.h>
32 
33 #ifdef	__cplusplus
34 extern "C" {
35 #endif
36 
37 /*
38  * 32/64-bit neutral stat and time structure to allow booters to be shared
39  *	among ILP32 and LP64 kernels.
40  */
41 typedef struct boottime {
42 	int64_t	tv_sec;
43 	int64_t	tv_nsec;
44 } boottime_t;
45 
46 /*
47  * Current booters only support mode and size, with the exception of
48  *	nfs booter also uses ino.
49  */
50 struct bootstat {
51 	uint64_t	st_dev;
52 	uint64_t	st_ino;
53 	uint32_t	st_mode;
54 	uint32_t	st_nlink;
55 	int32_t		st_uid;
56 	int32_t		st_gid;
57 	uint64_t	st_rdev;
58 	uint64_t	st_size;
59 	boottime_t	st_atim;
60 	boottime_t	st_mtim;
61 	boottime_t	st_ctim;
62 	int32_t		st_blksize;
63 	int64_t		st_blocks;
64 	char		st_fstype[_ST_FSTYPSZ];
65 };
66 
67 /*
68  * Special struct for compressed files.
69  * Only used by kobj to decompress files before
70  * root is mounted. Afterwards, dcfs will take
71  * over decompression.
72  */
73 struct compinfo {
74 	int	iscmp;
75 	size_t	fsize;
76 	size_t	blksize;
77 };
78 
79 #ifdef	__cplusplus
80 }
81 #endif
82 
83 #endif	/* _SYS_BOOTSTAT_H */
84