17c478bdstevel@tonic-gate/*
27c478bdstevel@tonic-gate * CDDL HEADER START
37c478bdstevel@tonic-gate *
47c478bdstevel@tonic-gate * The contents of this file are subject to the terms of the
5986fd29setje * Common Development and Distribution License (the "License").
6986fd29setje * You may not use this file except in compliance with the License.
77c478bdstevel@tonic-gate *
87c478bdstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bdstevel@tonic-gate * or http://www.opensolaris.org/os/licensing.
107c478bdstevel@tonic-gate * See the License for the specific language governing permissions
117c478bdstevel@tonic-gate * and limitations under the License.
127c478bdstevel@tonic-gate *
137c478bdstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each
147c478bdstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bdstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the
167c478bdstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying
177c478bdstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bdstevel@tonic-gate *
197c478bdstevel@tonic-gate * CDDL HEADER END
207c478bdstevel@tonic-gate */
217c478bdstevel@tonic-gate/*
22986fd29setje * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
237c478bdstevel@tonic-gate * Use is subject to license terms.
247c478bdstevel@tonic-gate */
257c478bdstevel@tonic-gate
267c478bdstevel@tonic-gate#ifndef	_SYS_BOOTSTAT_H
277c478bdstevel@tonic-gate#define	_SYS_BOOTSTAT_H
287c478bdstevel@tonic-gate
297c478bdstevel@tonic-gate#pragma ident	"%Z%%M%	%I%	%E% SMI"
307c478bdstevel@tonic-gate
317c478bdstevel@tonic-gate#include <sys/stat.h>
327c478bdstevel@tonic-gate
337c478bdstevel@tonic-gate#ifdef	__cplusplus
347c478bdstevel@tonic-gateextern "C" {
357c478bdstevel@tonic-gate#endif
367c478bdstevel@tonic-gate
377c478bdstevel@tonic-gate/*
387c478bdstevel@tonic-gate * 32/64-bit neutral stat and time structure to allow booters to be shared
397c478bdstevel@tonic-gate *	among ILP32 and LP64 kernels.
407c478bdstevel@tonic-gate */
417c478bdstevel@tonic-gatetypedef struct boottime {
427c478bdstevel@tonic-gate	int64_t	tv_sec;
437c478bdstevel@tonic-gate	int64_t	tv_nsec;
447c478bdstevel@tonic-gate} boottime_t;
457c478bdstevel@tonic-gate
467c478bdstevel@tonic-gate/*
477c478bdstevel@tonic-gate * Current booters only support mode and size, with the exception of
487c478bdstevel@tonic-gate *	nfs booter also uses ino.
497c478bdstevel@tonic-gate */
507c478bdstevel@tonic-gatestruct bootstat {
517c478bdstevel@tonic-gate	uint64_t	st_dev;
527c478bdstevel@tonic-gate	uint64_t	st_ino;
537c478bdstevel@tonic-gate	uint32_t	st_mode;
547c478bdstevel@tonic-gate	uint32_t	st_nlink;
557c478bdstevel@tonic-gate	int32_t		st_uid;
567c478bdstevel@tonic-gate	int32_t		st_gid;
577c478bdstevel@tonic-gate	uint64_t	st_rdev;
587c478bdstevel@tonic-gate	uint64_t	st_size;
597c478bdstevel@tonic-gate	boottime_t	st_atim;
607c478bdstevel@tonic-gate	boottime_t	st_mtim;
617c478bdstevel@tonic-gate	boottime_t	st_ctim;
627c478bdstevel@tonic-gate	int32_t		st_blksize;
637c478bdstevel@tonic-gate	int64_t		st_blocks;
647c478bdstevel@tonic-gate	char		st_fstype[_ST_FSTYPSZ];
657c478bdstevel@tonic-gate};
667c478bdstevel@tonic-gate
67986fd29setje/*
68986fd29setje * Special struct for compressed files.
69986fd29setje * Only used by kobj to decompress files before
70986fd29setje * root is mounted. Afterwards, dcfs will take
71986fd29setje * over decompression.
72986fd29setje */
73986fd29setjestruct compinfo {
74986fd29setje	int	iscmp;
75986fd29setje	size_t	fsize;
76986fd29setje	size_t	blksize;
77986fd29setje};
78986fd29setje
797c478bdstevel@tonic-gate#ifdef	__cplusplus
807c478bdstevel@tonic-gate}
817c478bdstevel@tonic-gate#endif
827c478bdstevel@tonic-gate
837c478bdstevel@tonic-gate#endif	/* _SYS_BOOTSTAT_H */
84