xref: /onnv-gate/usr/src/uts/common/sys/filep.h (revision 157:74b7c7bed4da)
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
50Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
60Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
70Sstevel@tonic-gate  * with the License.
80Sstevel@tonic-gate  *
90Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
100Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
110Sstevel@tonic-gate  * See the License for the specific language governing permissions
120Sstevel@tonic-gate  * and limitations under the License.
130Sstevel@tonic-gate  *
140Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
150Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
160Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
170Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
180Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
190Sstevel@tonic-gate  *
200Sstevel@tonic-gate  * CDDL HEADER END
210Sstevel@tonic-gate  */
220Sstevel@tonic-gate /*
230Sstevel@tonic-gate  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
240Sstevel@tonic-gate  * Use is subject to license terms.
250Sstevel@tonic-gate  */
260Sstevel@tonic-gate 
270Sstevel@tonic-gate #ifndef	_SYS_FILEP_H
280Sstevel@tonic-gate #define	_SYS_FILEP_H
290Sstevel@tonic-gate 
300Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
310Sstevel@tonic-gate 
320Sstevel@tonic-gate #ifdef __cplusplus
330Sstevel@tonic-gate extern "C" {
340Sstevel@tonic-gate #endif
350Sstevel@tonic-gate 
360Sstevel@tonic-gate #include <sys/fs/ufs_fsdir.h>
370Sstevel@tonic-gate #include <sys/fs/ufs_fs.h>
380Sstevel@tonic-gate #include <sys/fs/ufs_inode.h>
390Sstevel@tonic-gate 
400Sstevel@tonic-gate /*
410Sstevel@tonic-gate  *  These structs should be invisible to the caller of
420Sstevel@tonic-gate  *  the user-level routines
430Sstevel@tonic-gate  */
440Sstevel@tonic-gate typedef struct dev_ident {	/* device identifier block */
450Sstevel@tonic-gate 	char		*di_desc;
460Sstevel@tonic-gate 	int		di_dcookie;
470Sstevel@tonic-gate 	char		di_taken;
480Sstevel@tonic-gate 	union {
490Sstevel@tonic-gate 		struct	fs	di_fs;
500Sstevel@tonic-gate 		char	dummy[SBSIZE];
510Sstevel@tonic-gate 	}		un_fs;
520Sstevel@tonic-gate } devid_t;
530Sstevel@tonic-gate 
54*157Sjg /*
55*157Sjg  * Borrowed bits from i_flag
56*157Sjg  */
57*157Sjg #define	FI_CACHED		0x100000
58*157Sjg #define	FI_PARTIAL_CACHE	0x200000
59*157Sjg #define	FI_NOCACHE		0x400000
60*157Sjg 
610Sstevel@tonic-gate typedef struct file_ident {	/* file identifier block */
620Sstevel@tonic-gate 	uint_t		fi_filedes;
630Sstevel@tonic-gate 	char		*fi_path;
640Sstevel@tonic-gate 	daddr_t		fi_blocknum;
650Sstevel@tonic-gate 	uint_t		fi_count;
660Sstevel@tonic-gate 	off_t		fi_offset;
670Sstevel@tonic-gate 	caddr_t		fi_memp;
680Sstevel@tonic-gate 	char		fi_taken;
69*157Sjg 	char		fi_flags;
700Sstevel@tonic-gate 	devid_t		*fi_devp;
710Sstevel@tonic-gate 	char		fi_buf[MAXBSIZE];
720Sstevel@tonic-gate 	struct	inode	*fi_inode;
730Sstevel@tonic-gate 	struct file_ident *fi_forw;
740Sstevel@tonic-gate 	struct file_ident *fi_back;
750Sstevel@tonic-gate }  fileid_t;
760Sstevel@tonic-gate 
770Sstevel@tonic-gate extern int diskread(fileid_t *);
780Sstevel@tonic-gate 
790Sstevel@tonic-gate #ifdef __cplusplus
800Sstevel@tonic-gate }
810Sstevel@tonic-gate #endif
820Sstevel@tonic-gate 
830Sstevel@tonic-gate #endif	/* _SYS_FILEP_H */
84