linux.cc revision 6019:76890d8b28f5
12553SN/A/* 22553SN/A * Copyright (c) 2003-2005 The Regents of The University of Michigan 32553SN/A * Copyright (c) 2007-2008 The Florida State University 42553SN/A * All rights reserved. 52553SN/A * 62553SN/A * Redistribution and use in source and binary forms, with or without 72553SN/A * modification, are permitted provided that the following conditions are 82553SN/A * met: redistributions of source code must retain the above copyright 92553SN/A * notice, this list of conditions and the following disclaimer; 102553SN/A * redistributions in binary form must reproduce the above copyright 112553SN/A * notice, this list of conditions and the following disclaimer in the 122553SN/A * documentation and/or other materials provided with the distribution; 132553SN/A * neither the name of the copyright holders nor the names of its 142553SN/A * contributors may be used to endorse or promote products derived from 152553SN/A * this software without specific prior written permission. 162553SN/A * 172553SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 182553SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 192553SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 202553SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 212553SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 222553SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 232553SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 242553SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 252553SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 262553SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 272665Ssaidi@eecs.umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 282665Ssaidi@eecs.umich.edu * 292553SN/A * Authors: Stephen Hines 302553SN/A */ 315569Snate@binkert.org 325569Snate@binkert.org#include "arch/arm/linux/linux.hh" 332553SN/A 342553SN/A#include <fcntl.h> 352553SN/A 362553SN/A// open(2) flags translation table 372553SN/AOpenFlagTransTable ArmLinux::openFlagTable[] = { 382553SN/A#ifdef _MSC_VER 392553SN/A { ArmLinux::TGT_O_RDONLY, _O_RDONLY }, 402553SN/A { ArmLinux::TGT_O_WRONLY, _O_WRONLY }, 412553SN/A { ArmLinux::TGT_O_RDWR, _O_RDWR }, 422553SN/A { ArmLinux::TGT_O_APPEND, _O_APPEND }, 432553SN/A { ArmLinux::TGT_O_CREAT, _O_CREAT }, 442553SN/A { ArmLinux::TGT_O_TRUNC, _O_TRUNC }, 452553SN/A { ArmLinux::TGT_O_EXCL, _O_EXCL }, 462553SN/A#ifdef _O_NONBLOCK 472553SN/A { ArmLinux::TGT_O_NONBLOCK, _O_NONBLOCK }, 482553SN/A#endif 492553SN/A#ifdef _O_NOCTTY 502553SN/A { ArmLinux::TGT_O_NOCTTY, _O_NOCTTY }, 512553SN/A#endif 522553SN/A#ifdef _O_SYNC 535543Ssaidi@eecs.umich.edu { ArmLinux::TGT_O_SYNC, _O_SYNC }, 545543Ssaidi@eecs.umich.edu#endif 555543Ssaidi@eecs.umich.edu#else /* !_MSC_VER */ 565543Ssaidi@eecs.umich.edu { ArmLinux::TGT_O_RDONLY, O_RDONLY }, 575543Ssaidi@eecs.umich.edu { ArmLinux::TGT_O_WRONLY, O_WRONLY }, 585543Ssaidi@eecs.umich.edu { ArmLinux::TGT_O_RDWR, O_RDWR }, 595543Ssaidi@eecs.umich.edu { ArmLinux::TGT_O_APPEND, O_APPEND }, 605543Ssaidi@eecs.umich.edu { ArmLinux::TGT_O_CREAT, O_CREAT }, 615543Ssaidi@eecs.umich.edu { ArmLinux::TGT_O_TRUNC, O_TRUNC }, 625543Ssaidi@eecs.umich.edu { ArmLinux::TGT_O_EXCL, O_EXCL }, 635543Ssaidi@eecs.umich.edu { ArmLinux::TGT_O_NONBLOCK, O_NONBLOCK }, 645543Ssaidi@eecs.umich.edu { ArmLinux::TGT_O_NOCTTY, O_NOCTTY }, 655543Ssaidi@eecs.umich.edu#ifdef O_SYNC 665543Ssaidi@eecs.umich.edu { ArmLinux::TGT_O_SYNC, O_SYNC }, 675543Ssaidi@eecs.umich.edu#endif 682553SN/A#endif /* _MSC_VER */ 692553SN/A}; 702553SN/A 712553SN/Aconst int ArmLinux::NUM_OPEN_FLAGS = 728600Ssteve.reinhardt@amd.com (sizeof(ArmLinux::openFlagTable)/sizeof(ArmLinux::openFlagTable[0])); 732553SN/A 742553SN/A