1*bf8fee7bSnjoly /* $NetBSD: linux_fcntl.h,v 1.5 2014/06/25 16:30:42 njoly Exp $ */ 20176ca73Sitohy 30176ca73Sitohy /*- 40176ca73Sitohy * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. 50176ca73Sitohy * All rights reserved. 60176ca73Sitohy * 70176ca73Sitohy * This code is derived from software contributed to The NetBSD Foundation 80176ca73Sitohy * by Frank van der Linden and Eric Haszlakiewicz. 90176ca73Sitohy * 100176ca73Sitohy * Redistribution and use in source and binary forms, with or without 110176ca73Sitohy * modification, are permitted provided that the following conditions 120176ca73Sitohy * are met: 130176ca73Sitohy * 1. Redistributions of source code must retain the above copyright 140176ca73Sitohy * notice, this list of conditions and the following disclaimer. 150176ca73Sitohy * 2. Redistributions in binary form must reproduce the above copyright 160176ca73Sitohy * notice, this list of conditions and the following disclaimer in the 170176ca73Sitohy * documentation and/or other materials provided with the distribution. 180176ca73Sitohy * 190176ca73Sitohy * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 200176ca73Sitohy * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 210176ca73Sitohy * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 220176ca73Sitohy * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 230176ca73Sitohy * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 240176ca73Sitohy * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 250176ca73Sitohy * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 260176ca73Sitohy * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 270176ca73Sitohy * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 280176ca73Sitohy * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 290176ca73Sitohy * POSSIBILITY OF SUCH DAMAGE. 300176ca73Sitohy */ 310176ca73Sitohy 320176ca73Sitohy /* 330176ca73Sitohy * Various flag values used in Linux for open(2) and fcntl(2). 340176ca73Sitohy */ 350176ca73Sitohy 360176ca73Sitohy #ifndef _M68K_LINUX_FCNTL_H 370176ca73Sitohy #define _M68K_LINUX_FCNTL_H 380176ca73Sitohy 390176ca73Sitohy /* read/write mode for open(2) defined in common/linux_fcntl.h */ 400176ca73Sitohy 410176ca73Sitohy /* flags used in open(2) */ 42069ef5a4Schs #define LINUX_O_CREAT 0x00040 43069ef5a4Schs #define LINUX_O_EXCL 0x00080 44069ef5a4Schs #define LINUX_O_NOCTTY 0x00100 45069ef5a4Schs #define LINUX_O_TRUNC 0x00200 46069ef5a4Schs #define LINUX_O_APPEND 0x00400 47069ef5a4Schs #define LINUX_O_NONBLOCK 0x00800 48069ef5a4Schs #define LINUX_O_NDELAY LINUX_O_NONBLOCK 49069ef5a4Schs #define LINUX_O_SYNC 0x01000 50069ef5a4Schs #define LINUX_FASYNC 0x02000 51069ef5a4Schs #define LINUX_O_DIRECTORY 0x04000 52069ef5a4Schs #define LINUX_O_NOFOLLOW 0x08000 53*bf8fee7bSnjoly #define LINUX_O_DIRECT 0x10000 54*bf8fee7bSnjoly #define LINUX_O_LARGEFILE 0x20000 55*bf8fee7bSnjoly #define LINUX_O_NOATIME 0x40000 56069ef5a4Schs #define LINUX_O_CLOEXEC 0x80000 570176ca73Sitohy 580176ca73Sitohy /* fcntl(2) operations */ 590176ca73Sitohy #define LINUX_F_DUPFD 0 600176ca73Sitohy #define LINUX_F_GETFD 1 610176ca73Sitohy #define LINUX_F_SETFD 2 620176ca73Sitohy #define LINUX_F_GETFL 3 630176ca73Sitohy #define LINUX_F_SETFL 4 640176ca73Sitohy #define LINUX_F_GETLK 5 650176ca73Sitohy #define LINUX_F_SETLK 6 660176ca73Sitohy #define LINUX_F_SETLKW 7 670176ca73Sitohy #define LINUX_F_SETOWN 8 680176ca73Sitohy #define LINUX_F_GETOWN 9 690176ca73Sitohy #define LINUX_F_SETSIG 10 700176ca73Sitohy #define LINUX_F_GETSIG 11 710176ca73Sitohy 720176ca73Sitohy #define LINUX_F_RDLCK 0 730176ca73Sitohy #define LINUX_F_WRLCK 1 740176ca73Sitohy #define LINUX_F_UNLCK 2 750176ca73Sitohy #define LINUX_F_EXLCK 4 760176ca73Sitohy #define LINUX_F_SHLCK 8 770176ca73Sitohy 780176ca73Sitohy #define LINUX_LOCK_SH 1 790176ca73Sitohy #define LINUX_LOCK_EX 2 800176ca73Sitohy #define LINUX_LOCK_NB 4 810176ca73Sitohy #define LINUX_LOCK_UN 8 820176ca73Sitohy 83238328fbSmanu #define LINUX_F_GETLK64 12 84238328fbSmanu #define LINUX_F_SETLK64 13 85238328fbSmanu #define LINUX_F_SETLKW64 14 86069ef5a4Schs 870176ca73Sitohy #endif /* !_M68K_LINUX_FCNTL_H */ 88