1 /* 2 * File control definitions. 3 * 4 * Copyright (C) 2019, 2020, 2022 Paul Boddie <paul@boddie.org.uk> 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License as 8 * published by the Free Software Foundation; either version 2 of 9 * the License, or (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, 19 * Boston, MA 02110-1301, USA 20 */ 21 22 #pragma once 23 24 #include <l4/sys/compiler.h> 25 26 EXTERN_C_BEGIN 27 28 /* Definitions for flags_t, employing definitions compatible with fcntl-linux.h 29 which can be different from fcntl.h on MIPS and from Newlib. */ 30 31 #define O_RDONLY 0 32 #define O_WRONLY 1 33 #define O_RDWR 2 34 #define O_APPEND 0x0008 35 #define O_CREAT 0x0200 36 #define O_TRUNC 0x0400 37 #define O_EXCL 0x0800 38 #define O_NBIO 0x1000 39 #define O_SYNC 0x2000 40 #define O_NONBLOCK 0x4000 41 #define O_NDELAY O_NONBLOCK 42 #define O_NOCTTY 0x8000 43 #define O_DIRECTORY 0x200000 44 45 /* System-level functions. */ 46 47 int open(const char *pathname, int flags, ... /* mode_t mode */); 48 49 EXTERN_C_END 50 51 /* vim: tabstop=2 expandtab shiftwidth=2 52 */