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