xref: /freebsd/tests/sys/cddl/zfs/bin/file_common.h (revision 2fae26bd8b752cfae083962a152f4b1ee54ada17)
1*2fae26bdSAlan Somers /*
2*2fae26bdSAlan Somers  * CDDL HEADER START
3*2fae26bdSAlan Somers  *
4*2fae26bdSAlan Somers  * The contents of this file are subject to the terms of the
5*2fae26bdSAlan Somers  * Common Development and Distribution License (the "License").
6*2fae26bdSAlan Somers  * You may not use this file except in compliance with the License.
7*2fae26bdSAlan Somers  *
8*2fae26bdSAlan Somers  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*2fae26bdSAlan Somers  * or http://www.opensolaris.org/os/licensing.
10*2fae26bdSAlan Somers  * See the License for the specific language governing permissions
11*2fae26bdSAlan Somers  * and limitations under the License.
12*2fae26bdSAlan Somers  *
13*2fae26bdSAlan Somers  * When distributing Covered Code, include this CDDL HEADER in each
14*2fae26bdSAlan Somers  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*2fae26bdSAlan Somers  * If applicable, add the following below this CDDL HEADER, with the
16*2fae26bdSAlan Somers  * fields enclosed by brackets "[]" replaced with your own identifying
17*2fae26bdSAlan Somers  * information: Portions Copyright [yyyy] [name of copyright owner]
18*2fae26bdSAlan Somers  *
19*2fae26bdSAlan Somers  * CDDL HEADER END
20*2fae26bdSAlan Somers  * $FreeBSD$
21*2fae26bdSAlan Somers  */
22*2fae26bdSAlan Somers 
23*2fae26bdSAlan Somers /*
24*2fae26bdSAlan Somers  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
25*2fae26bdSAlan Somers  * Use is subject to license terms.
26*2fae26bdSAlan Somers  */
27*2fae26bdSAlan Somers 
28*2fae26bdSAlan Somers #ifndef FILE_COMMON_H
29*2fae26bdSAlan Somers #define	FILE_COMMON_H
30*2fae26bdSAlan Somers 
31*2fae26bdSAlan Somers #pragma ident	"@(#)file_common.h	1.3	07/05/25 SMI"
32*2fae26bdSAlan Somers 
33*2fae26bdSAlan Somers /*
34*2fae26bdSAlan Somers  * header file for file_* utilities. These utilities
35*2fae26bdSAlan Somers  * are used by the test cases to perform various file
36*2fae26bdSAlan Somers  * operations (append writes, for example).
37*2fae26bdSAlan Somers  */
38*2fae26bdSAlan Somers 
39*2fae26bdSAlan Somers #ifdef __cplusplus
40*2fae26bdSAlan Somers extern "C" {
41*2fae26bdSAlan Somers #endif
42*2fae26bdSAlan Somers 
43*2fae26bdSAlan Somers #include <sys/types.h>
44*2fae26bdSAlan Somers #include <sys/stat.h>
45*2fae26bdSAlan Somers #include <errno.h>
46*2fae26bdSAlan Somers #include <fcntl.h>
47*2fae26bdSAlan Somers #include <stdio.h>
48*2fae26bdSAlan Somers #include <unistd.h>
49*2fae26bdSAlan Somers #include <stdlib.h>
50*2fae26bdSAlan Somers #include <string.h>
51*2fae26bdSAlan Somers 
52*2fae26bdSAlan Somers #define	BLOCKSZ		8192
53*2fae26bdSAlan Somers #define	DATA		0xa5
54*2fae26bdSAlan Somers #define	DATA_RANGE	120
55*2fae26bdSAlan Somers #define	BIGBUFFERSIZE	0x800000
56*2fae26bdSAlan Somers #define	BIGFILESIZE	20
57*2fae26bdSAlan Somers 
58*2fae26bdSAlan Somers extern char *optarg;
59*2fae26bdSAlan Somers extern int optind, opterr, optopt;
60*2fae26bdSAlan Somers 
61*2fae26bdSAlan Somers #ifdef __cplusplus
62*2fae26bdSAlan Somers }
63*2fae26bdSAlan Somers #endif
64*2fae26bdSAlan Somers 
65*2fae26bdSAlan Somers #endif /* FILE_COMMON_H */
66