11.5Snjoly/*	$NetBSD: linux_fcntl.h,v 1.5 2014/06/25 16:30:42 njoly Exp $	*/
21.1Sitohy
31.1Sitohy/*-
41.1Sitohy * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
51.1Sitohy * All rights reserved.
61.1Sitohy *
71.1Sitohy * This code is derived from software contributed to The NetBSD Foundation
81.1Sitohy * by Frank van der Linden and Eric Haszlakiewicz.
91.1Sitohy *
101.1Sitohy * Redistribution and use in source and binary forms, with or without
111.1Sitohy * modification, are permitted provided that the following conditions
121.1Sitohy * are met:
131.1Sitohy * 1. Redistributions of source code must retain the above copyright
141.1Sitohy *    notice, this list of conditions and the following disclaimer.
151.1Sitohy * 2. Redistributions in binary form must reproduce the above copyright
161.1Sitohy *    notice, this list of conditions and the following disclaimer in the
171.1Sitohy *    documentation and/or other materials provided with the distribution.
181.1Sitohy *
191.1Sitohy * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
201.1Sitohy * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
211.1Sitohy * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
221.1Sitohy * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
231.1Sitohy * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
241.1Sitohy * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
251.1Sitohy * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
261.1Sitohy * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
271.1Sitohy * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
281.1Sitohy * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
291.1Sitohy * POSSIBILITY OF SUCH DAMAGE.
301.1Sitohy */
311.1Sitohy
321.1Sitohy/*
331.1Sitohy * Various flag values used in Linux for open(2) and fcntl(2).
341.1Sitohy */
351.1Sitohy
361.1Sitohy#ifndef _M68K_LINUX_FCNTL_H
371.1Sitohy#define _M68K_LINUX_FCNTL_H
381.1Sitohy
391.1Sitohy/* read/write mode for open(2) defined in common/linux_fcntl.h */
401.1Sitohy
411.1Sitohy/* flags used in open(2) */
421.4Schs#define LINUX_O_CREAT		0x00040
431.4Schs#define LINUX_O_EXCL		0x00080
441.4Schs#define LINUX_O_NOCTTY		0x00100
451.4Schs#define LINUX_O_TRUNC		0x00200
461.4Schs#define LINUX_O_APPEND		0x00400
471.4Schs#define LINUX_O_NONBLOCK	0x00800
481.4Schs#define LINUX_O_NDELAY		LINUX_O_NONBLOCK
491.4Schs#define LINUX_O_SYNC		0x01000
501.4Schs#define LINUX_FASYNC		0x02000
511.4Schs#define LINUX_O_DIRECTORY	0x04000
521.4Schs#define LINUX_O_NOFOLLOW	0x08000
531.5Snjoly#define LINUX_O_DIRECT		0x10000
541.5Snjoly#define LINUX_O_LARGEFILE	0x20000
551.5Snjoly#define LINUX_O_NOATIME		0x40000
561.4Schs#define LINUX_O_CLOEXEC		0x80000
571.1Sitohy
581.1Sitohy/* fcntl(2) operations */
591.1Sitohy#define LINUX_F_DUPFD		0
601.1Sitohy#define LINUX_F_GETFD		1
611.1Sitohy#define LINUX_F_SETFD		2
621.1Sitohy#define LINUX_F_GETFL		3
631.1Sitohy#define LINUX_F_SETFL		4
641.1Sitohy#define LINUX_F_GETLK		5
651.1Sitohy#define LINUX_F_SETLK		6
661.1Sitohy#define LINUX_F_SETLKW		7
671.1Sitohy#define LINUX_F_SETOWN		8
681.1Sitohy#define LINUX_F_GETOWN		9
691.1Sitohy#define LINUX_F_SETSIG		10
701.1Sitohy#define LINUX_F_GETSIG		11
711.1Sitohy
721.1Sitohy#define LINUX_F_RDLCK		0
731.1Sitohy#define LINUX_F_WRLCK		1
741.1Sitohy#define LINUX_F_UNLCK		2
751.1Sitohy#define LINUX_F_EXLCK		4
761.1Sitohy#define LINUX_F_SHLCK		8
771.1Sitohy
781.1Sitohy#define LINUX_LOCK_SH		1
791.1Sitohy#define LINUX_LOCK_EX		2
801.1Sitohy#define LINUX_LOCK_NB		4
811.1Sitohy#define LINUX_LOCK_UN		8
821.1Sitohy
831.2Smanu#define LINUX_F_GETLK64		12
841.2Smanu#define LINUX_F_SETLK64		13
851.2Smanu#define LINUX_F_SETLKW64	14
861.4Schs
871.1Sitohy#endif /* !_M68K_LINUX_FCNTL_H */
88