xref: /freebsd-src/tools/build/fcntl.h (revision 4a0b7955fd727754b853f6a346b8379e21bcb81f)
1*5425ba83SKa Ho Ng /*-
2*5425ba83SKa Ho Ng  * Copyright (c) 2016 Jilles Tjoelker <jilles@FreeBSD.org>
3*5425ba83SKa Ho Ng  * All rights reserved.
4*5425ba83SKa Ho Ng  *
5*5425ba83SKa Ho Ng  * Redistribution and use in source and binary forms, with or without
6*5425ba83SKa Ho Ng  * modification, are permitted provided that the following conditions
7*5425ba83SKa Ho Ng  * are met:
8*5425ba83SKa Ho Ng  * 1. Redistributions of source code must retain the above copyright
9*5425ba83SKa Ho Ng  *    notice, this list of conditions and the following disclaimer.
10*5425ba83SKa Ho Ng  * 2. Redistributions in binary form must reproduce the above copyright
11*5425ba83SKa Ho Ng  *    notice, this list of conditions and the following disclaimer in the
12*5425ba83SKa Ho Ng  *    documentation and/or other materials provided with the distribution.
13*5425ba83SKa Ho Ng  *
14*5425ba83SKa Ho Ng  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15*5425ba83SKa Ho Ng  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16*5425ba83SKa Ho Ng  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17*5425ba83SKa Ho Ng  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18*5425ba83SKa Ho Ng  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19*5425ba83SKa Ho Ng  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20*5425ba83SKa Ho Ng  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21*5425ba83SKa Ho Ng  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22*5425ba83SKa Ho Ng  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23*5425ba83SKa Ho Ng  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24*5425ba83SKa Ho Ng  * SUCH DAMAGE.
25*5425ba83SKa Ho Ng  */
26*5425ba83SKa Ho Ng 
27*5425ba83SKa Ho Ng #ifndef _LEGACY_SYS_FCNTL_H_
28*5425ba83SKa Ho Ng #define	_LEGACY_SYS_FCNTL_H_
29*5425ba83SKa Ho Ng 
30*5425ba83SKa Ho Ng #include_next <fcntl.h>
31*5425ba83SKa Ho Ng 
32*5425ba83SKa Ho Ng struct spacectl_range {
33*5425ba83SKa Ho Ng 	off_t	r_offset;
34*5425ba83SKa Ho Ng 	off_t	r_len;
35*5425ba83SKa Ho Ng };
36*5425ba83SKa Ho Ng 
37*5425ba83SKa Ho Ng #define SPACECTL_DEALLOC	1
38*5425ba83SKa Ho Ng 
39*5425ba83SKa Ho Ng #define SPACECTL_F_SUPPORTED	0
40*5425ba83SKa Ho Ng 
41*5425ba83SKa Ho Ng __BEGIN_DECLS
42*5425ba83SKa Ho Ng int	fspacectl(int, int, const struct spacectl_range *, int,
43*5425ba83SKa Ho Ng 	    struct spacectl_range *);
44*5425ba83SKa Ho Ng __END_DECLS
45*5425ba83SKa Ho Ng 
46*5425ba83SKa Ho Ng #endif /* !_LEGACY_SYS_STAT_H_ */
47