4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
30 * IOCTLs for the zfs unit test driver
37 #include <sys/param.h>
38 #include <sys/types.h>
41 #define ZUT_DRIVER "zut"
42 #define ZUT_DEV "/dev/zut"
44 #define ZUT_VERSION_STRING "1"
47 * /dev/zut ioctl numbers.
49 #define ZUT_IOC ('U' << 8)
52 #define ZUT_IGNORECASE 0x01
53 #define ZUT_ACCFILTER 0x02
54 #define ZUT_XATTR 0x04
55 #define ZUT_EXTRDDIR 0x08
56 #define ZUT_GETSTAT 0x10
58 typedef struct zut_lookup {
60 int zl_deflags; /* output */
61 int zl_retcode; /* output */
62 char zl_dir[MAXPATHLEN];
63 char zl_file[MAXNAMELEN];
64 char zl_xfile[MAXNAMELEN];
65 char zl_real[MAXPATHLEN]; /* output */
66 uint64_t zl_xvattrs; /* output */
67 struct stat64 zl_statbuf; /* output */
70 typedef struct zut_readdir {
71 uint64_t zr_buf; /* pointer to output buffer */
72 uint64_t zr_loffset; /* output */
73 char zr_dir[MAXPATHLEN];
74 char zr_file[MAXNAMELEN];
76 int zr_retcode; /* output */
77 int zr_eof; /* output */
78 uint_t zr_bytes; /* output */
82 typedef enum zut_ioc {
83 ZUT_IOC_MIN_CMD = ZUT_IOC - 1,
84 ZUT_IOC_LOOKUP = ZUT_IOC,