Path: blob/main/sys/contrib/openzfs/tests/zfs-tests/cmd/file/file_common.h
48677 views
// SPDX-License-Identifier: CDDL-1.01/*2* CDDL HEADER START3*4* The contents of this file are subject to the terms of the5* Common Development and Distribution License (the "License").6* You may not use this file except in compliance with the License.7*8* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE9* or https://opensource.org/licenses/CDDL-1.0.10* See the License for the specific language governing permissions11* and limitations under the License.12*13* When distributing Covered Code, include this CDDL HEADER in each14* file and include the License file at usr/src/OPENSOLARIS.LICENSE.15* If applicable, add the following below this CDDL HEADER, with the16* fields enclosed by brackets "[]" replaced with your own identifying17* information: Portions Copyright [yyyy] [name of copyright owner]18*19* CDDL HEADER END20*/2122/*23* Copyright 2007 Sun Microsystems, Inc. All rights reserved.24* Use is subject to license terms.25*/2627#ifndef FILE_COMMON_H28#define FILE_COMMON_H2930/*31* header file for file_* utilities. These utilities32* are used by the test cases to perform various file33* operations (append writes, for example).34*/3536#ifdef __cplusplus37extern "C" {38#endif3940#ifndef _FILE_OFFSET_BITS41#define _FILE_OFFSET_BITS 6442#endif4344#ifndef _LARGEFILE64_SOURCE45#define _LARGEFILE64_SOURCE46#endif4748#include <sys/types.h>49#include <sys/stat.h>50#include <errno.h>51#include <fcntl.h>52#include <stdio.h>53#include <unistd.h>54#include <stdlib.h>55#include <string.h>5657#define BLOCKSZ 819258#define DATA 0xa559#define DATA_RANGE 12060#define BIGBUFFERSIZE 0x80000061#define BIGFILESIZE 206263extern char *optarg;64extern int optind, opterr, optopt;6566#ifdef __cplusplus67}68#endif6970#endif /* FILE_COMMON_H */717273