xref: /titanic_52/usr/src/uts/common/sys/filep.h (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
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, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef	_SYS_FILEP_H
28 #define	_SYS_FILEP_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 #include <sys/fs/ufs_fsdir.h>
37 #include <sys/fs/ufs_fs.h>
38 #include <sys/fs/ufs_inode.h>
39 
40 /*
41  *  These structs should be invisible to the caller of
42  *  the user-level routines
43  */
44 typedef struct dev_ident {	/* device identifier block */
45 	char		*di_desc;
46 	int		di_dcookie;
47 	char		di_taken;
48 	union {
49 		struct	fs	di_fs;
50 		char	dummy[SBSIZE];
51 	}		un_fs;
52 } devid_t;
53 
54 typedef struct file_ident {	/* file identifier block */
55 	uint_t		fi_filedes;
56 	char		*fi_path;
57 	daddr_t		fi_blocknum;
58 	uint_t		fi_count;
59 	off_t		fi_offset;
60 	caddr_t		fi_memp;
61 	char		fi_taken;
62 	devid_t		*fi_devp;
63 	char		fi_buf[MAXBSIZE];
64 	struct	inode	*fi_inode;
65 	struct file_ident *fi_forw;
66 	struct file_ident *fi_back;
67 }  fileid_t;
68 
69 extern int diskread(fileid_t *);
70 
71 #ifdef __cplusplus
72 }
73 #endif
74 
75 #endif	/* _SYS_FILEP_H */
76