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