xref: /freebsd-src/sys/contrib/openzfs/tests/zfs-tests/cmd/file/file_common.h (revision 271171e0d97b88ba2a7c3bf750c9672b484c1c13)
1716fd348SMartin Matuska /*
2716fd348SMartin Matuska  * CDDL HEADER START
3716fd348SMartin Matuska  *
4716fd348SMartin Matuska  * The contents of this file are subject to the terms of the
5716fd348SMartin Matuska  * Common Development and Distribution License (the "License").
6716fd348SMartin Matuska  * You may not use this file except in compliance with the License.
7716fd348SMartin Matuska  *
8716fd348SMartin Matuska  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*271171e0SMartin Matuska  * or https://opensource.org/licenses/CDDL-1.0.
10716fd348SMartin Matuska  * See the License for the specific language governing permissions
11716fd348SMartin Matuska  * and limitations under the License.
12716fd348SMartin Matuska  *
13716fd348SMartin Matuska  * When distributing Covered Code, include this CDDL HEADER in each
14716fd348SMartin Matuska  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15716fd348SMartin Matuska  * If applicable, add the following below this CDDL HEADER, with the
16716fd348SMartin Matuska  * fields enclosed by brackets "[]" replaced with your own identifying
17716fd348SMartin Matuska  * information: Portions Copyright [yyyy] [name of copyright owner]
18716fd348SMartin Matuska  *
19716fd348SMartin Matuska  * CDDL HEADER END
20716fd348SMartin Matuska  */
21716fd348SMartin Matuska 
22716fd348SMartin Matuska /*
23716fd348SMartin Matuska  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
24716fd348SMartin Matuska  * Use is subject to license terms.
25716fd348SMartin Matuska  */
26716fd348SMartin Matuska 
27716fd348SMartin Matuska #ifndef FILE_COMMON_H
28716fd348SMartin Matuska #define	FILE_COMMON_H
29716fd348SMartin Matuska 
30716fd348SMartin Matuska /*
31716fd348SMartin Matuska  * header file for file_* utilities. These utilities
32716fd348SMartin Matuska  * are used by the test cases to perform various file
33716fd348SMartin Matuska  * operations (append writes, for example).
34716fd348SMartin Matuska  */
35716fd348SMartin Matuska 
36716fd348SMartin Matuska #ifdef __cplusplus
37716fd348SMartin Matuska extern "C" {
38716fd348SMartin Matuska #endif
39716fd348SMartin Matuska 
40716fd348SMartin Matuska #ifndef _FILE_OFFSET_BITS
41716fd348SMartin Matuska #define	_FILE_OFFSET_BITS 64
42716fd348SMartin Matuska #endif
43716fd348SMartin Matuska 
44716fd348SMartin Matuska #ifndef _LARGEFILE64_SOURCE
45716fd348SMartin Matuska #define	_LARGEFILE64_SOURCE
46716fd348SMartin Matuska #endif
47716fd348SMartin Matuska 
48716fd348SMartin Matuska #include <sys/types.h>
49716fd348SMartin Matuska #include <sys/stat.h>
50716fd348SMartin Matuska #include <errno.h>
51716fd348SMartin Matuska #include <fcntl.h>
52716fd348SMartin Matuska #include <stdio.h>
53716fd348SMartin Matuska #include <unistd.h>
54716fd348SMartin Matuska #include <stdlib.h>
55716fd348SMartin Matuska #include <string.h>
56716fd348SMartin Matuska 
57716fd348SMartin Matuska #define	BLOCKSZ		8192
58716fd348SMartin Matuska #define	DATA		0xa5
59716fd348SMartin Matuska #define	DATA_RANGE	120
60716fd348SMartin Matuska #define	BIGBUFFERSIZE	0x800000
61716fd348SMartin Matuska #define	BIGFILESIZE	20
62716fd348SMartin Matuska 
63716fd348SMartin Matuska extern char *optarg;
64716fd348SMartin Matuska extern int optind, opterr, optopt;
65716fd348SMartin Matuska 
66716fd348SMartin Matuska #ifdef __cplusplus
67716fd348SMartin Matuska }
68716fd348SMartin Matuska #endif
69716fd348SMartin Matuska 
70716fd348SMartin Matuska #endif /* FILE_COMMON_H */
71