]> git.saurik.com Git - apple/xnu.git/blob - bsd/ufs/ufs/ufs_extern.h
xnu-792.10.96.tar.gz
[apple/xnu.git] / bsd / ufs / ufs / ufs_extern.h
1 /*
2 * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
11 *
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
18 * under the License.
19 *
20 * @APPLE_LICENSE_HEADER_END@
21 */
22 /* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */
23 /*-
24 * Copyright (c) 1991, 1993, 1994
25 * The Regents of the University of California. All rights reserved.
26 *
27 * Redistribution and use in source and binary forms, with or without
28 * modification, are permitted provided that the following conditions
29 * are met:
30 * 1. Redistributions of source code must retain the above copyright
31 * notice, this list of conditions and the following disclaimer.
32 * 2. Redistributions in binary form must reproduce the above copyright
33 * notice, this list of conditions and the following disclaimer in the
34 * documentation and/or other materials provided with the distribution.
35 * 3. All advertising materials mentioning features or use of this software
36 * must display the following acknowledgement:
37 * This product includes software developed by the University of
38 * California, Berkeley and its contributors.
39 * 4. Neither the name of the University nor the names of its contributors
40 * may be used to endorse or promote products derived from this software
41 * without specific prior written permission.
42 *
43 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
44 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
45 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
46 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
47 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
48 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
49 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
50 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
51 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
52 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
53 * SUCH DAMAGE.
54 *
55 * @(#)ufs_extern.h 8.10 (Berkeley) 5/14/95
56 */
57 #ifndef _UFS_EXTERN_H_
58 #define _UFS_EXTERN_H_
59
60 #include <sys/appleapiopts.h>
61
62 #ifdef __APPLE_API_PRIVATE
63 struct buf;
64 struct direct;
65 struct disklabel;
66 struct flock;
67 struct inode;
68 struct mbuf;
69 struct mount;
70 struct nameidata;
71 struct proc;
72 struct ucred;
73 struct ufs_args;
74 struct uio;
75 struct vnode_attr;
76 struct vfsconf;
77 struct vnode;
78
79 __BEGIN_DECLS
80 int ufs_remove_internal(vnode_t, vnode_t, struct componentname *, int);
81 int ufs_access_internal(vnode_t, mode_t, ucred_t);
82
83 int ffs_read_internal(vnode_t, struct uio *, int);
84 int ffs_write_internal(vnode_t, struct uio *, int, ucred_t);
85 int ffs_truncate_internal(vnode_t, off_t, int, ucred_t);
86
87 void diskerr
88 (struct buf *, char *, char *, int, int, struct disklabel *);
89 void disksort(struct buf *, struct buf *);
90 u_int dkcksum(struct disklabel *);
91 char *readdisklabel(dev_t, int (*)(), struct disklabel *);
92 int setdisklabel(struct disklabel *, struct disklabel *, u_long);
93 int writedisklabel(dev_t, int (*)(), struct disklabel *);
94
95 int ufs_access(struct vnop_access_args *);
96 int ufs_checkpath(struct inode *, struct inode *, struct ucred *);
97 int ufs_close(struct vnop_close_args *);
98 int ufs_create(struct vnop_create_args *);
99 void ufs_dirbad(struct inode *, doff_t, const char *);
100 int ufs_dirbadentry(struct vnode *, struct direct *, int);
101 int ufs_dirempty(struct inode *, ino_t, struct ucred *);
102 int ufs_direnter(struct inode *, struct vnode *,struct componentname *);
103 int ufs_dirremove(struct vnode *, struct componentname*);
104 int ufs_dirrewrite
105 (struct inode *, struct inode *, struct componentname *);
106 int ufs_getattr(struct vnop_getattr_args *);
107 int ufs_getlbns(struct vnode *, ufs_daddr_t, struct indir *, int *);
108 struct vnode *
109 ufs_ihashget(dev_t, ino_t);
110 void ufs_ihashinit(void);
111 void ufs_ihashins(struct inode *);
112 struct vnode *
113 ufs_ihashlookup(dev_t, ino_t);
114 void ufs_ihashrem(struct inode *);
115 int ufs_inactive(struct vnop_inactive_args *);
116 int ufs_init(struct vfsconf *);
117 int ufs_ioctl(struct vnop_ioctl_args *);
118 int ufs_link(struct vnop_link_args *);
119 int ufs_lookup(struct vnop_lookup_args *);
120 int ufs_makeinode(struct vnode_attr *, struct vnode *, struct vnode **, struct componentname *);
121 int ufs_mkdir(struct vnop_mkdir_args *);
122 int ufs_mknod(struct vnop_mknod_args *);
123 int ufs_mmap(struct vnop_mmap_args *);
124 int ufs_open(struct vnop_open_args *);
125 int ufs_pathconf(struct vnop_pathconf_args *);
126 int ufs_readdir(struct vnop_readdir_args *);
127 int ufs_readlink(struct vnop_readlink_args *);
128 int ufs_reclaim(struct vnode *, struct proc *);
129 int ufs_remove(struct vnop_remove_args *);
130 int ufs_rename(struct vnop_rename_args *);
131 #define ufs_revoke nop_revoke
132 int ufs_rmdir(struct vnop_rmdir_args *);
133 int ufs_root(struct mount *, struct vnode **, vfs_context_t);
134 int ufs_select(struct vnop_select_args *);
135 int ufs_kqfilt_add(struct vnop_kqfilt_add_args *);
136 int ufs_setattr(struct vnop_setattr_args *);
137 int ufs_start(struct mount *, int, vfs_context_t);
138 int ufs_strategy(struct vnop_strategy_args *);
139 int ufs_symlink(struct vnop_symlink_args *);
140 int ufs_whiteout(struct vnop_whiteout_args *);
141 int ufsspec_close(struct vnop_close_args *);
142 int ufsspec_read(struct vnop_read_args *);
143 int ufsspec_write(struct vnop_write_args *);
144
145 #if FIFO
146 int ufsfifo_read(struct vnop_read_args *);
147 int ufsfifo_write(struct vnop_write_args *);
148 int ufsfifo_close(struct vnop_close_args *);
149 int ufsfifo_kqfilt_add(struct vnop_kqfilt_add_args *);
150 #endif
151 int ufs_blktooff(struct vnop_blktooff_args *);
152 int ufs_blockmap(struct vnop_blockmap_args *);
153
154 __END_DECLS
155
156 #endif /* __APPLE_API_PRIVATE */
157 #endif /* ! _UFS_EXTERN_H_ */