xref: /netbsd-src/sys/fs/tmpfs/tmpfs_vnops.h (revision 5b84b3983f71fd20a534cfa5d1556623a8aaa717)
1 /*	$NetBSD: tmpfs_vnops.h,v 1.2 2005/09/12 19:55:22 yamt Exp $	*/
2 
3 /*
4  * Copyright (c) 2005 The NetBSD Foundation, Inc.
5  * All rights reserved.
6  *
7  * This code is derived from software contributed to The NetBSD Foundation
8  * by Julio M. Merino Vidal.
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions
12  * are met:
13  * 1. Redistributions of source code must retain the above copyright
14  *    notice, this list of conditions and the following disclaimer.
15  * 2. Redistributions in binary form must reproduce the above copyright
16  *    notice, this list of conditions and the following disclaimer in the
17  *    documentation and/or other materials provided with the distribution.
18  * 3. All advertising materials mentioning features or use of this software
19  *    must display the following acknowledgement:
20  *        This product includes software developed by the NetBSD
21  *        Foundation, Inc. and its contributors.
22  * 4. Neither the name of The NetBSD Foundation nor the names of its
23  *    contributors may be used to endorse or promote products derived
24  *    from this software without specific prior written permission.
25  *
26  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
30  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36  * POSSIBILITY OF SUCH DAMAGE.
37  */
38 
39 #if !defined(_TMPFS_VNOPS_H_)
40 #define _TMPFS_VNOPS_H_
41 
42 #if !defined(_KERNEL)
43 #  error "This file is not meant to be included by userland."
44 #endif
45 
46 #include <miscfs/genfs/genfs.h>
47 
48 /* --------------------------------------------------------------------- */
49 
50 /*
51  * Declarations for tmpfs_vnops.c.
52  */
53 
54 extern int (**tmpfs_vnodeop_p)(void *);
55 
56 int	tmpfs_lookup		(void *);
57 int	tmpfs_create		(void *);
58 int	tmpfs_mknod		(void *);
59 int	tmpfs_open		(void *);
60 int	tmpfs_close		(void *);
61 int	tmpfs_access		(void *);
62 int	tmpfs_getattr		(void *);
63 int	tmpfs_setattr		(void *);
64 int	tmpfs_read		(void *);
65 int	tmpfs_write		(void *);
66 #define	tmpfs_fcntl		genfs_fcntl
67 #define	tmpfs_ioctl		genfs_enoioctl
68 #define	tmpfs_poll		genfs_poll
69 #define	tmpfs_kqfilter		genfs_eopnotsupp
70 #define	tmpfs_revoke		genfs_revoke
71 #define	tmpfs_mmap		genfs_mmap
72 int	tmpfs_fsync		(void *);
73 #define	tmpfs_seek		genfs_seek
74 int	tmpfs_remove		(void *);
75 int	tmpfs_link		(void *);
76 int	tmpfs_rename		(void *);
77 int	tmpfs_mkdir		(void *);
78 int	tmpfs_rmdir		(void *);
79 int	tmpfs_symlink		(void *);
80 int	tmpfs_readdir		(void *);
81 int	tmpfs_readlink		(void *);
82 #define	tmpfs_abortop		genfs_abortop
83 int	tmpfs_inactive		(void *);
84 int	tmpfs_reclaim		(void *);
85 #define	tmpfs_lock		genfs_lock
86 #define	tmpfs_unlock		genfs_unlock
87 #define	tmpfs_bmap		genfs_eopnotsupp
88 #define	tmpfs_strategy		genfs_eopnotsupp
89 int	tmpfs_print		(void *);
90 int	tmpfs_pathconf		(void *);
91 #define	tmpfs_islocked		genfs_islocked
92 #define	tmpfs_advlock		genfs_eopnotsupp
93 #define	tmpfs_blkatoff		genfs_eopnotsupp
94 #define	tmpfs_valloc		genfs_eopnotsupp
95 #define	tmpfs_reallocblks	genfs_eopnotsupp
96 #define	tmpfs_vfree		genfs_eopnotsupp
97 int	tmpfs_truncate		(void *);
98 int	tmpfs_update		(void *);
99 #define	tmpfs_lease		genfs_lease_check
100 #define	tmpfs_bwrite		genfs_nullop
101 int	tmpfs_getpages		(void *);
102 #define	tmpfs_putpages		genfs_null_putpages
103 
104 /* --------------------------------------------------------------------- */
105 
106 #endif /* !defined(_TMPFS_VNOPS_H_) */
107