2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
3 * Copyright (c) 2009 The University of Edinburgh
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer;
10 * redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution;
13 * neither the name of the copyright holders nor the names of its
14 * contributors may be used to endorse or promote products derived from
15 * this software without specific prior written permission.
17 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 * Authors: Timothy M. Jones
32 #include "arch/power/linux/linux.hh"
36 // open(2) flags translation table
37 OpenFlagTransTable
PowerLinux::openFlagTable
[] = {
39 { PowerLinux::TGT_O_RDONLY
, _O_RDONLY
},
40 { PowerLinux::TGT_O_WRONLY
, _O_WRONLY
},
41 { PowerLinux::TGT_O_RDWR
, _O_RDWR
},
42 { PowerLinux::TGT_O_APPEND
, _O_APPEND
},
43 { PowerLinux::TGT_O_CREAT
, _O_CREAT
},
44 { PowerLinux::TGT_O_TRUNC
, _O_TRUNC
},
45 { PowerLinux::TGT_O_EXCL
, _O_EXCL
},
47 { PowerLinux::TGT_O_NONBLOCK
, _O_NONBLOCK
},
50 { PowerLinux::TGT_O_NOCTTY
, _O_NOCTTY
},
53 { PowerLinux::TGT_O_SYNC
, _O_SYNC
},
56 { PowerLinux::TGT_O_LARGEFILE
, _O_LARGEFILE
},
59 { PowerLinux::TGT_O_RDONLY
, O_RDONLY
},
60 { PowerLinux::TGT_O_WRONLY
, O_WRONLY
},
61 { PowerLinux::TGT_O_RDWR
, O_RDWR
},
62 { PowerLinux::TGT_O_APPEND
, O_APPEND
},
63 { PowerLinux::TGT_O_CREAT
, O_CREAT
},
64 { PowerLinux::TGT_O_TRUNC
, O_TRUNC
},
65 { PowerLinux::TGT_O_EXCL
, O_EXCL
},
66 { PowerLinux::TGT_O_NONBLOCK
, O_NONBLOCK
},
67 { PowerLinux::TGT_O_NOCTTY
, O_NOCTTY
},
69 { PowerLinux::TGT_O_SYNC
, O_SYNC
},
72 { PowerLinux::TGT_O_LARGEFILE
, O_LARGEFILE
},
77 const int PowerLinux::NUM_OPEN_FLAGS
=
78 (sizeof(PowerLinux::openFlagTable
)/sizeof(PowerLinux::openFlagTable
[0]));