17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*986fd29aSsetje * Common Development and Distribution License (the "License"). 6*986fd29aSsetje * You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate * 87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate * and limitations under the License. 127c478bd9Sstevel@tonic-gate * 137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate * 197c478bd9Sstevel@tonic-gate * CDDL HEADER END 207c478bd9Sstevel@tonic-gate */ 217c478bd9Sstevel@tonic-gate /* 22*986fd29aSsetje * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate * Use is subject to license terms. 247c478bd9Sstevel@tonic-gate */ 257c478bd9Sstevel@tonic-gate 267c478bd9Sstevel@tonic-gate /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */ 277c478bd9Sstevel@tonic-gate /* All Rights Reserved */ 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gate /* 307c478bd9Sstevel@tonic-gate * University Copyright- Copyright (c) 1982, 1986, 1988 317c478bd9Sstevel@tonic-gate * The Regents of the University of California 327c478bd9Sstevel@tonic-gate * All Rights Reserved 337c478bd9Sstevel@tonic-gate * 347c478bd9Sstevel@tonic-gate * University Acknowledgment- Portions of this document are derived from 357c478bd9Sstevel@tonic-gate * software developed by the University of California, Berkeley, and its 367c478bd9Sstevel@tonic-gate * contributors. 377c478bd9Sstevel@tonic-gate */ 387c478bd9Sstevel@tonic-gate 397c478bd9Sstevel@tonic-gate #ifndef _SYS_FILIO_H 407c478bd9Sstevel@tonic-gate #define _SYS_FILIO_H 417c478bd9Sstevel@tonic-gate 427c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 437c478bd9Sstevel@tonic-gate 447c478bd9Sstevel@tonic-gate /* 457c478bd9Sstevel@tonic-gate * General file ioctl definitions. 467c478bd9Sstevel@tonic-gate */ 477c478bd9Sstevel@tonic-gate 487c478bd9Sstevel@tonic-gate #include <sys/ioccom.h> 497c478bd9Sstevel@tonic-gate 507c478bd9Sstevel@tonic-gate #ifdef __cplusplus 517c478bd9Sstevel@tonic-gate extern "C" { 527c478bd9Sstevel@tonic-gate #endif 537c478bd9Sstevel@tonic-gate 547c478bd9Sstevel@tonic-gate #define FIOCLEX _IO('f', 1) /* set exclusive use on fd */ 557c478bd9Sstevel@tonic-gate #define FIONCLEX _IO('f', 2) /* remove exclusive use */ 567c478bd9Sstevel@tonic-gate /* another local */ 577c478bd9Sstevel@tonic-gate #define FIONREAD _IOR('f', 127, int) /* get # bytes to read */ 587c478bd9Sstevel@tonic-gate #define FIONBIO _IOW('f', 126, int) /* set/clear non-blocking i/o */ 597c478bd9Sstevel@tonic-gate #define FIOASYNC _IOW('f', 125, int) /* set/clear async i/o */ 607c478bd9Sstevel@tonic-gate #define FIOSETOWN _IOW('f', 124, int) /* set owner */ 617c478bd9Sstevel@tonic-gate #define FIOGETOWN _IOR('f', 123, int) /* get owner */ 627c478bd9Sstevel@tonic-gate 637c478bd9Sstevel@tonic-gate /* 647c478bd9Sstevel@tonic-gate * ioctl's for Online: DiskSuite. 657c478bd9Sstevel@tonic-gate * WARNING - the support for these ioctls may be withdrawn 667c478bd9Sstevel@tonic-gate * in future OS releases. 677c478bd9Sstevel@tonic-gate */ 687c478bd9Sstevel@tonic-gate #define _FIOLFS _IO('f', 64) /* file system lock */ 697c478bd9Sstevel@tonic-gate #define _FIOLFSS _IO('f', 65) /* file system lock status */ 707c478bd9Sstevel@tonic-gate #define _FIOFFS _IO('f', 66) /* file system flush */ 717c478bd9Sstevel@tonic-gate #define _FIOAI _FIOOBSOLETE67 /* get allocation info is */ 727c478bd9Sstevel@tonic-gate #define _FIOOBSOLETE67 _IO('f', 67) /* obsolete and unsupported */ 737c478bd9Sstevel@tonic-gate #define _FIOSATIME _IO('f', 68) /* set atime */ 747c478bd9Sstevel@tonic-gate #define _FIOSDIO _IO('f', 69) /* set delayed io */ 757c478bd9Sstevel@tonic-gate #define _FIOGDIO _IO('f', 70) /* get delayed io */ 767c478bd9Sstevel@tonic-gate #define _FIOIO _IO('f', 71) /* inode open */ 777c478bd9Sstevel@tonic-gate #define _FIOISLOG _IO('f', 72) /* disksuite/ufs protocol */ 787c478bd9Sstevel@tonic-gate #define _FIOISLOGOK _IO('f', 73) /* disksuite/ufs protocol */ 797c478bd9Sstevel@tonic-gate #define _FIOLOGRESET _IO('f', 74) /* disksuite/ufs protocol */ 807c478bd9Sstevel@tonic-gate 817c478bd9Sstevel@tonic-gate /* 827c478bd9Sstevel@tonic-gate * Contract-private ioctl() 837c478bd9Sstevel@tonic-gate */ 847c478bd9Sstevel@tonic-gate #define _FIOISBUSY _IO('f', 75) /* networker/ufs protocol */ 857c478bd9Sstevel@tonic-gate #define _FIODIRECTIO _IO('f', 76) /* directio */ 867c478bd9Sstevel@tonic-gate #define _FIOTUNE _IO('f', 77) /* tuning */ 877c478bd9Sstevel@tonic-gate 887c478bd9Sstevel@tonic-gate /* 897c478bd9Sstevel@tonic-gate * WARNING: These 'f' ioctls are also defined in sys/fs/cachefs_fs.h 907c478bd9Sstevel@tonic-gate * It currently defines 78-86. 917c478bd9Sstevel@tonic-gate */ 927c478bd9Sstevel@tonic-gate 937c478bd9Sstevel@tonic-gate /* 947c478bd9Sstevel@tonic-gate * Internal Logging UFS 957c478bd9Sstevel@tonic-gate */ 967c478bd9Sstevel@tonic-gate #define _FIOLOGENABLE _IO('f', 87) /* logging/ufs protocol */ 977c478bd9Sstevel@tonic-gate #define _FIOLOGDISABLE _IO('f', 88) /* logging/ufs protocol */ 987c478bd9Sstevel@tonic-gate 997c478bd9Sstevel@tonic-gate /* 1007c478bd9Sstevel@tonic-gate * File system snapshot ioctls (see sys/fs/ufs_snap.h) 1017c478bd9Sstevel@tonic-gate * (there is another snapshot ioctl, _FIOSNAPSHOTCREATE_MULTI, 1027c478bd9Sstevel@tonic-gate * defined farther down in this file.) 1037c478bd9Sstevel@tonic-gate */ 1047c478bd9Sstevel@tonic-gate #define _FIOSNAPSHOTCREATE _IO('f', 89) /* create a snapshot */ 1057c478bd9Sstevel@tonic-gate #define _FIOSNAPSHOTDELETE _IO('f', 90) /* delete a snapshot */ 1067c478bd9Sstevel@tonic-gate 1077c478bd9Sstevel@tonic-gate /* 1087c478bd9Sstevel@tonic-gate * Return the current superblock of size SBSIZE 1097c478bd9Sstevel@tonic-gate */ 1107c478bd9Sstevel@tonic-gate #define _FIOGETSUPERBLOCK _IO('f', 91) 1117c478bd9Sstevel@tonic-gate 1127c478bd9Sstevel@tonic-gate /* 1137c478bd9Sstevel@tonic-gate * Contract private ioctl 1147c478bd9Sstevel@tonic-gate */ 1157c478bd9Sstevel@tonic-gate #define _FIOGETMAXPHYS _IO('f', 92) 1167c478bd9Sstevel@tonic-gate 1177c478bd9Sstevel@tonic-gate /* 1187c478bd9Sstevel@tonic-gate * TSufs support 1197c478bd9Sstevel@tonic-gate */ 1207c478bd9Sstevel@tonic-gate #define _FIO_SET_LUFS_DEBUG _IO('f', 93) /* set lufs_debug */ 1217c478bd9Sstevel@tonic-gate #define _FIO_SET_LUFS_ERROR _IO('f', 94) /* set a lufs error */ 1227c478bd9Sstevel@tonic-gate #define _FIO_GET_TOP_STATS _IO('f', 95) /* get lufs tranaction stats */ 1237c478bd9Sstevel@tonic-gate 1247c478bd9Sstevel@tonic-gate /* 1257c478bd9Sstevel@tonic-gate * create a snapshot with multiple backing files 1267c478bd9Sstevel@tonic-gate */ 1277c478bd9Sstevel@tonic-gate #define _FIOSNAPSHOTCREATE_MULTI _IO('f', 96) 1287c478bd9Sstevel@tonic-gate 1297c478bd9Sstevel@tonic-gate /* 1307c478bd9Sstevel@tonic-gate * handle lseek SEEK_DATA and SEEK_HOLE for holey file knowledge 1317c478bd9Sstevel@tonic-gate */ 1327c478bd9Sstevel@tonic-gate #define _FIO_SEEK_DATA _IO('f', 97) /* SEEK_DATA */ 1337c478bd9Sstevel@tonic-gate #define _FIO_SEEK_HOLE _IO('f', 98) /* SEEK_HOLE */ 1347c478bd9Sstevel@tonic-gate 135*986fd29aSsetje /* 136*986fd29aSsetje * boot archive compression 137*986fd29aSsetje */ 138*986fd29aSsetje #define _FIO_COMPRESSED _IO('f', 99) /* mark file as compressed */ 139*986fd29aSsetje 1407c478bd9Sstevel@tonic-gate #ifdef __cplusplus 1417c478bd9Sstevel@tonic-gate } 1427c478bd9Sstevel@tonic-gate #endif 1437c478bd9Sstevel@tonic-gate 1447c478bd9Sstevel@tonic-gate #endif /* _SYS_FILIO_H */ 145