xref: /dragonfly/sys/dev/drm/include/linux/file.h (revision e2a4a6b1)
1403e6d2bSFrançois Tigeot /*
2*e2a4a6b1SFrançois Tigeot  * Copyright (c) 2018-2020 François Tigeot <ftigeot@wolfpond.org>
3403e6d2bSFrançois Tigeot  * All rights reserved.
4403e6d2bSFrançois Tigeot  *
5403e6d2bSFrançois Tigeot  * Redistribution and use in source and binary forms, with or without
6403e6d2bSFrançois Tigeot  * modification, are permitted provided that the following conditions
7403e6d2bSFrançois Tigeot  * are met:
8403e6d2bSFrançois Tigeot  * 1. Redistributions of source code must retain the above copyright
9403e6d2bSFrançois Tigeot  *    notice unmodified, this list of conditions, and the following
10403e6d2bSFrançois Tigeot  *    disclaimer.
11403e6d2bSFrançois Tigeot  * 2. Redistributions in binary form must reproduce the above copyright
12403e6d2bSFrançois Tigeot  *    notice, this list of conditions and the following disclaimer in the
13403e6d2bSFrançois Tigeot  *    documentation and/or other materials provided with the distribution.
14403e6d2bSFrançois Tigeot  *
15403e6d2bSFrançois Tigeot  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16403e6d2bSFrançois Tigeot  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17403e6d2bSFrançois Tigeot  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18403e6d2bSFrançois Tigeot  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19403e6d2bSFrançois Tigeot  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20403e6d2bSFrançois Tigeot  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21403e6d2bSFrançois Tigeot  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22403e6d2bSFrançois Tigeot  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23403e6d2bSFrançois Tigeot  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24403e6d2bSFrançois Tigeot  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25403e6d2bSFrançois Tigeot  */
26403e6d2bSFrançois Tigeot 
27403e6d2bSFrançois Tigeot #ifndef _LINUX_FILE_H_
28403e6d2bSFrançois Tigeot #define _LINUX_FILE_H_
29403e6d2bSFrançois Tigeot 
30403e6d2bSFrançois Tigeot #include <linux/compiler.h>
31403e6d2bSFrançois Tigeot #include <linux/types.h>
32403e6d2bSFrançois Tigeot #include <linux/posix_types.h>
33403e6d2bSFrançois Tigeot 
34*e2a4a6b1SFrançois Tigeot static inline int
get_unused_fd_flags(unsigned flags)35*e2a4a6b1SFrançois Tigeot get_unused_fd_flags(unsigned flags)
36*e2a4a6b1SFrançois Tigeot {
37*e2a4a6b1SFrançois Tigeot 	kprintf("get_unused_fd_flags(): not implemented\n");
38*e2a4a6b1SFrançois Tigeot 	return -1;
39*e2a4a6b1SFrançois Tigeot }
40*e2a4a6b1SFrançois Tigeot 
41*e2a4a6b1SFrançois Tigeot static inline void
fd_install(unsigned int fd,struct file * file)42*e2a4a6b1SFrançois Tigeot fd_install(unsigned int fd, struct file *file)
43*e2a4a6b1SFrançois Tigeot {
44*e2a4a6b1SFrançois Tigeot 	kprintf("fd_install(): not implemented\n");
45*e2a4a6b1SFrançois Tigeot }
46*e2a4a6b1SFrançois Tigeot 
47*e2a4a6b1SFrançois Tigeot static inline void
fput(struct file * file)48*e2a4a6b1SFrançois Tigeot fput(struct file *file)
49*e2a4a6b1SFrançois Tigeot {
50*e2a4a6b1SFrançois Tigeot 	kprintf("fput(): not implemented\n");
51*e2a4a6b1SFrançois Tigeot }
52*e2a4a6b1SFrançois Tigeot 
53*e2a4a6b1SFrançois Tigeot static inline void
put_unused_fd(unsigned int fd)54*e2a4a6b1SFrançois Tigeot put_unused_fd(unsigned int fd)
55*e2a4a6b1SFrançois Tigeot {
56*e2a4a6b1SFrançois Tigeot 	kprintf("put_unused_fd(): not implemented\n");
57*e2a4a6b1SFrançois Tigeot }
58*e2a4a6b1SFrançois Tigeot 
59403e6d2bSFrançois Tigeot #endif	/* _LINUX_FILE_H_ */
60