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 /* 55 * Borrowed bits from i_flag 56 */ 57 #define FI_CACHED 0x100000 58 #define FI_PARTIAL_CACHE 0x200000 59 #define FI_NOCACHE 0x400000 60 61 typedef struct file_ident { /* file identifier block */ 62 uint_t fi_filedes; 63 char *fi_path; 64 daddr_t fi_blocknum; 65 uint_t fi_count; 66 off_t fi_offset; 67 caddr_t fi_memp; 68 char fi_taken; 69 char fi_flags; 70 devid_t *fi_devp; 71 char fi_buf[MAXBSIZE]; 72 struct inode *fi_inode; 73 struct file_ident *fi_forw; 74 struct file_ident *fi_back; 75 } fileid_t; 76 77 extern int diskread(fileid_t *); 78 79 #ifdef __cplusplus 80 } 81 #endif 82 83 #endif /* _SYS_FILEP_H */ 84