11541Srgrimes/*- 21541Srgrimes * Copyright (c) 1982, 1986, 1990, 1993, 1994 31541Srgrimes * The Regents of the University of California. All rights reserved. 41541Srgrimes * (c) UNIX System Laboratories, Inc. 51541Srgrimes * All or some portions of this file are derived from material licensed 61541Srgrimes * to the University of California by American Telephone and Telegraph 71541Srgrimes * Co. or Unix System Laboratories, Inc. and are reproduced herein with 81541Srgrimes * the permission of UNIX System Laboratories, Inc. 91541Srgrimes * 101541Srgrimes * Redistribution and use in source and binary forms, with or without 111541Srgrimes * modification, are permitted provided that the following conditions 121541Srgrimes * are met: 131541Srgrimes * 1. Redistributions of source code must retain the above copyright 141541Srgrimes * notice, this list of conditions and the following disclaimer. 151541Srgrimes * 2. Redistributions in binary form must reproduce the above copyright 161541Srgrimes * notice, this list of conditions and the following disclaimer in the 171541Srgrimes * documentation and/or other materials provided with the distribution. 181541Srgrimes * 4. Neither the name of the University nor the names of its contributors 191541Srgrimes * may be used to endorse or promote products derived from this software 201541Srgrimes * without specific prior written permission. 211541Srgrimes * 221541Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 231541Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 241541Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 251541Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 261541Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 271541Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 281541Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 291541Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 301541Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 311541Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 321541Srgrimes * SUCH DAMAGE. 331541Srgrimes * 341541Srgrimes * @(#)filio.h 8.1 (Berkeley) 3/28/94 3550477Speter * $FreeBSD$ 361541Srgrimes */ 371541Srgrimes 381541Srgrimes#ifndef _SYS_FILIO_H_ 391541Srgrimes#define _SYS_FILIO_H_ 401541Srgrimes 411541Srgrimes#include <sys/ioccom.h> 421541Srgrimes 431541Srgrimes/* Generic file-descriptor ioctl's. */ 441541Srgrimes#define FIOCLEX _IO('f', 1) /* set close on exec on fd */ 451541Srgrimes#define FIONCLEX _IO('f', 2) /* remove close on exec */ 461541Srgrimes#define FIONREAD _IOR('f', 127, int) /* get # bytes to read */ 471541Srgrimes#define FIONBIO _IOW('f', 126, int) /* set/clear non-blocking i/o */ 481541Srgrimes#define FIOASYNC _IOW('f', 125, int) /* set/clear async i/o */ 491541Srgrimes#define FIOSETOWN _IOW('f', 124, int) /* set owner */ 501541Srgrimes#define FIOGETOWN _IOR('f', 123, int) /* get owner */ 5150459Sgreen#define FIODTYPE _IOR('f', 122, int) /* get d_flags type part */ 5254272Ssos#define FIOGETLBA _IOR('f', 121, int) /* get start blk # */ 53143304Sphkstruct fiodgname_arg { 54143304Sphk int len; 55143304Sphk void *buf; 56143304Sphk}; 57143304Sphk#define FIODGNAME _IOW('f', 120, struct fiodgname_arg) /* get dev. name */ 58195134Sphk#define FIONWRITE _IOR('f', 119, int) /* get # bytes (yet) to write */ 59195191Semaste#define FIONSPACE _IOR('f', 118, int) /* get space in send queue */ 60168397Spjd/* Handle lseek SEEK_DATA and SEEK_HOLE for holey file knowledge. */ 61168397Spjd#define FIOSEEKDATA _IOWR('f', 97, off_t) /* SEEK_DATA */ 62168397Spjd#define FIOSEEKHOLE _IOWR('f', 98, off_t) /* SEEK_HOLE */ 631541Srgrimes 641541Srgrimes#endif /* !_SYS_FILIO_H_ */ 65